<<

Programming "EASY"

Rahul Kumar IIT Kanpur Outline

• What is "EASY"? • Why use "EASY"? • Basic idea taken from NLP • Programming with NLP • How it works... • Example • Why can' be designed in "EASY" • Future Goals •

What is "EASY"?

• A • A programming language is a vocabulary and set of grammatical rules for instructing a or device to perform specific tasks. • The term programming language usually refers to high-level , such as BASIC, , C++, COBOL, , , Ada, and Pascal. • Each language has a unique set of keywords (words that it understands) and a special for organizing program instructions. Why use "EASY"?

• Textbooks and scientific publications related to and numerical computation can use English sentences in description of , so that all can understand them. • A who needs to implement a specific , especially an unfamiliar one, will often start with a description, and then "translate" that description into the target programming language and modify it to interact correctly with the rest of the program. However, this won't be needed while using "EASY". • It can also be used in schools to teach programming to kids as they can use the words and syntax freely. Natural Language Programming

• Natural language programming (NLP) is an ontology-assisted way of programming in terms of natural language sentences, .g. English. A structured document with Content, sections and subsections for explanations of sentences forms a NLP document, is actually a . Programming with NLP

• Do we really need computer languages to tell our computers what to do? Why can’t we just use natural human languages, like English, instead? • So the first question is: how might we represent these programs? • In principle we could use pretty much any programming language. But to things practical, particularly at the beginning, we need a programming language with a couple of key characteristics. How it works...

• The programming language is written in C. When it encounters a sentence, the keywords are recognized and then converted to a C program which is then executed. • This language will have lots of keywords. The keywords will be simple english words. Also it will contain various keywords with same meanings as there are synonyms in the . • For eg. If we have an array A and we give the "sort in ascending order" or "arrange in ascending order", then both of them will perform the same task. Example

• set the first number to 1 • set the second number to 2 • if the firstnumber is equal to the secondnumber • then set the sum to 5 • end if • Queue q

• Enqueue x • Enqueue y • Add the top two elements of q Why can't Computers be designed in "EASY"?

• At its most fundamental level, a computer provides a fixed set of instructions that it can execute. Each instruction has a number, which can be rendered in binary. The raw instructions themselves, if written down, are called language. • We invented a program called a that takes a different language and turns it into machine language. • So while it' possible for a compiler to take

ADD THE VALUES OF THE A AND VARIABLES AND STORE THEM IN THE Z VARIABLE

and convert this into machine language, it's really more efficient just to have a of notation:

Z := A+B Future Goals

• The majority of activities performed by humans are done through language. • As is increasingly making the methods and platforms on which we communicate ever more accessible, there is an even greater need to understand the languages we use to communicate. • This language will take us a step closer towards a world where will understand human languages and respond. References

• http://www.expertsystem.com • https://en.wikipedia.org/wiki/Neuro-linguistic_programming