Formal Semantics Labs in Gofer
- Install Gofer
- Update path:
$ export PATH=/path/to/gofer/executable:$PATH
- Start interpreter:
$ gofer - Enable Haskell-like syntax:
? :s -S - Load source file:
? :l while.gs
task1implements the factorial function using therepeat-constructs_task1 "y"retrieves the value for variableyin states_task1
s_task2 "y"retrieves the value of variableyin states_task2
s_task3 "y"retrieves the value of variableyin states_task3
s_final' "x"retrieves the value of variablexin states_final'(0)