8. Instructions m ::= *(r3) := r1
| r3 := (*r1)
| r3 := r1
| r3 := n
| r3 := uop r1
| r3 := r1 bop r2
Program p ::= pi|i | r3 := r1 bop n
| mkbool r1 ucond
Instruction i ::= m| m t | mkbool r1 bcond r2
| nop
Type t ::= u8_t | halt
| u16_t | label l
| u32_t | jmp l
| s8_t | ijmp r
| s16_t | if r1 cond1 jmp l
| s32_t | if r1 cond2 r2 jmp l
| lcall s
| cast(r1, t)
Instructions I ::= nď i | r3 := getpc()
Heap H ::= nxn ď n | r3 := returnaddress()
Memory M ::= nď n | pusharg(n, r)
Register R ::= rď n | r3 := malloc(r)
Labels L ::= l ď pc | free(r)
AllocAMemory V ::= nxnď n | r3 := alloca(r)
Instructions: (maps instruction number to instruction) Operations uop ::= -|~|!
Heap: (maps heap address and memory size to non bop ::= +,-,*,/,%,>>,<<,|,&,^
overlapping memory addresses) Conditions ucond ::= == 0|!= 0
Register: (maps register name to numeric value) bcond ::= ==|!= | >|>=|<|<=
Memory: (maps address to numeric value) Operands v ::= n (an integer literal)
Labels: (maps label to instruction address pc) r (a register)
AllocAMemory: (maps alloca address and memory size l (a label)
to non overlapping memory addresses) s (a symbol)