This section contains 728 words (approx. 3 pages at 300 words per page) |
In grammar, as well as in the theory of programming languages, "syntax" specifies the grammatical nature or construction of a statement. "Semantics" deals with the meaning attached to a well-formed statement. It should be observed that not all syntactically correct statements have a valid meaning--Noam Chomsky, the well-known linguist, constructed the counter-example, "Colorless green ideas sleep furiously," a grammatical but completely meaningless statement in English, to show why.
Thus, the consideration of the semantics of statements in programming language, as in natural language, is an important endeavor in its own right. To this end, it is often useful to use mathematical functions to describe the semantics of programming language statements, since the meaning of a computer program can be thought of as a function that accepts the program's input values and produces their corresponding output values. Functions of course also play a very important role in...
This section contains 728 words (approx. 3 pages at 300 words per page) |