++++++++++++
-(t is little tau, T is large tau, E is 'in', and + is that other symbol)
+(v is used for values, e for expressions, s for statements, c is the context)
-[Eq, Neq]
+[Eq, NEq, Plus, Minus, Times, Div, Lt, ELt, Gt, EGt]
-e:bool <= e1:t & e2:t
-where e is e1 Eq e2.
+<e1 o e2,c> => <v,c''> <= <e1,c> => <v1,c'> <e2,c'> => <v2,c''> v is the result of using operator o on v1 and v2
-[Plus, Minus, Times, Div]
+[Assignment]
-e:int <= e1:int & e2:int
-where e is e1 Plus e2.
+<i := e,c> => c'[i -> v] <= <e,c> => <v,c'>
+Assign the value v to i in the first scope i is found in.
-[Lt, ELt, Gt, EGt]
+[ENeg]
-e:bool <= e1:int & e2:int
-where e is e1 Lt e2.
+<e,c> => <-v,c'> <= <e,c> => <v,c'>
-[Assignment]
+[ENot]
-T+ i := e:t <= i:t E T & T+ e:t
-where the assignment is identifier i = expression e.
+<e,c> => <not v,c'> <= <e,c> => <v,c'>
+[EVar]
-[ExpT]
+<i,c> => <c(i),c>
-u,e:t <= e:t & u:t
-where the expression is type u expression e.
+[EInt]
+<n,c> => <n,c>
-[ENeg]
+[EBool]
-e:int <= e:int
+<b,c> => <b,c>
+[EReadI,EReadB]
-[ENot]
+<c> => <v,c'> <= <IO,c> => <v,c'>
+
+[EPost]
-e:bool <= e:bool
+<i,c> => <v,c[i->v']> <= c(i) => v, v±1 => v'
+Look up the variable, add/subtract 1 from the value then return the old value and context with modified value
-[SExp, SBlock]
+[SExp]
-S:NoType <= e:t
+<e,c> => c' <= <e,c> => <v,c'>
+[SBlock]
+
+<SBlock s,c> => c''' <= push(c) => c' <s,c'> => c'' pop(c'') => c'''
+
+Push a new scope onto the context, execute the statements in this context and the pop the scope from the context
+
+[SEQ]
+
+<s1;s2,c> => c'' <= <s1,c> => c' <s2,c'> => c''
[SIf]
-T+ if e then s1 else s2 <= T+ e:bool & T+ s1 & T+ s2
+<if e s1 s2,c> => pop(c''') <= <e,c> => <true,c'> push(c') <s1,c''> => c'''
+
+<if e s1 s2,c> => pop(c''') <= <e,c> => <false,c'> push(c') <s2,c''> => c'''
[SWhile]
-T+ while e do s <= T+ e:bool & T+ s
+<while e s,c> => c' => <e,c> => <false,c'>
+
+<while e s,c> => pop(c''') => <e,c> => <true,c'> push(c') => c'' <s,c''> => c'''
[SDecl]
-T+ i:t => T', i:t <= i!ET & e:t & u:t
+<i := e,c> => c'[i->v] <= <e,c> => <v,c'>
+
+Adds i with value v to the current scope in the context
-(Type u Ident i = Exp e)
+[SDeclD]
+<int i,c> => c[i->0]
+<bool i,c> => c[i->false]
+Adds i with default value in the current scope
+[SNoop]
+<SNoop,c> => c
+SNoops does nothing so the same context is returned
+[SPrint]
+<e,c> => c'' <= <e,c> => <v,c'> <IO v,c'> => c''