In this assignment you'll develop semantic definitions of several types of statements in your selected languages and write some simple programs that demonstrate those semantics.
Develop a semantic description of your initial state function (the
Program token). Include a description of what State constitutes and
give an example. Develop your description in two ways.
- Explain it as a transformation on the program's state, using mathematical notation, as appropriate. Follow the methods of denotational semantics chapters 7 and 8 in Noonan and Tucker.
- Write it as a function in a programming language other than the one you are trying to explain, preferably one with a simple hashmap or dictionary data structure (e.g. Python or Java).
- Develop a semantic description of the meaning of the assignment statement in your selected languages. For Prolog, use basic fact notation and basic rule statement (although any Term statement is basically an assignment). Create your description using the two methods listed above.
- Pick one other type of statement and describe its semantics using the same methodology.
- A perfectly acceptable extension for any assignment going forward is to do a third language.
- Describe the semantics for other types of statements.
Make a compilable and runnable haiku in the language that helps to
demonstrate the meaning of a statement in the language.
The haiku Python def shows how the def function adds a new symbol to the computer's state which can subsequently be called.
The writeup for this week is the assignment itself, plus the code, which should be integrated with your writeup. Once you have written up your assignment, give your main page for this week the label: