Skip to content
Snippets Groups Projects
Commit 589f3ba8 authored by Hugo Wangler's avatar Hugo Wangler
Browse files

Update HOME_EXAM_Type_check_part2.md

parent 6acba2bc
Branches
No related tags found
No related merge requests found
......@@ -68,25 +68,25 @@ or
```
Not equals (!=):
```math
$`
\frac{\Gamma \ \vdash \ e1 \ : \ bool \quad \Gamma \ \vdash \ e2 \ : \ bool}{\Gamma \ \vdash (e1 \ != \ e2) \ : \ bool}
```
`$
or
```math
$`
\frac{\Gamma \ \vdash \ e1 \ : \ i32 \quad \Gamma \ \vdash \ e2 \ : \ i32}{\Gamma \ \vdash (e1 \ != \ e2) \ : \ bool}
```
`$
### Assignment
Given the type $`\tau`$, variable $`x`$ and value $`n`$
```math
$`
\frac{\Gamma \ \vdash \ x \ : \ \tau \quad \Gamma \ \vdash \ n \ : \ \tau}{\lang x := n, \sigma \rang \ \Darr \ \Gamma \ \vdash x \ : \ \tau}
```
`$
### **let** assignment
```math
$`
\frac{\Gamma \ \vdash \ n \ : \ \tau}{\lang \text{let} \ x \ : \ \tau \ := \ n, \sigma \rang \ \Darr \ \Gamma \ \vdash x \ : \ \tau}
```
`$
### **while** statement
The condition, $`b`$, of the while statement
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment