Programming Language "EASY"
Total Page:16
File Type:pdf, Size:1020Kb
Programming Language "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't computers be designed in "EASY" • Future Goals • References What is "EASY"? • A programming language • A programming language is a vocabulary and set of grammatical rules for instructing a computer or computing device to perform specific tasks. • The term programming language usually refers to high-level languages, such as BASIC, C, C++, COBOL, Java, FORTRAN, Ada, and Pascal. • Each language has a unique set of keywords (words that it understands) and a special syntax for organizing program instructions. Why use "EASY"? • Textbooks and scientific publications related to computer science and numerical computation can use English sentences in description of algorithms, so that all programmers can understand them. • A programmer who needs to implement a specific algorithm, especially an unfamiliar one, will often start with a pseudocode 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, e.g. English. A structured document with Content, sections and subsections for explanations of sentences forms a NLP document, which is actually a computer program. 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 make 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 english language. • For eg. If we have an array A and we give the command "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 machine language. • We invented a program called a compiler that takes a different language and turns it into machine language. • So while it's possible for a compiler to take ADD THE VALUES OF THE A AND B VARIABLES AND STORE THEM IN THE Z VARIABLE and convert this into machine language, it's really more efficient just to have a form of notation: Z := A+B Future Goals • The majority of activities performed by humans are done through language. • As technology 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 machines will understand human languages and respond. References • http://www.expertsystem.com • https://en.wikipedia.org/wiki/Neuro-linguistic_programming .