Skip to content
Snippets Groups Projects
Commit 1b2ea194 authored by David Söderberg's avatar David Söderberg
Browse files

Update HOME_EXAM.md

parent 21ddc8cb
No related branches found
No related tags found
No related merge requests found
......@@ -252,15 +252,32 @@ illegal stuff;
<f, σ>⇓σ'
```
``` rust
fn main() {
func();
}
```
### Command sequence
```math
\frac{<c_1,σ> ⇓ σ' <c_2,σ'> ⇓ σ''}{<c_1;c_2,σ> ⇓ σ''}
```
``` rust
func();
let a:bool = true;
```
### Operands for integer expressions
```math
\frac{<e_1,σ> ⇓ i_1 <e_2, σ> ⇓ i_2}{<e_1 + e2, σ> ⇓ i_1 \text{ plus } i_2}
```
``` rust
8 / 4 = 2;
```
The other integer expressions are
- -, minus
- *, multiplication
......@@ -314,6 +331,14 @@ Declares the variable $`v`$ with type $`t`$ to current scope.
{<v := e, σ> ⇓ σ[v := e]}
```
### If true/false expression
```math
\frac{<e, σ> ⇓ true <c1, σ> ⇓ σ'}{<if \text{ } b \text{ } then \text{ } c1> ⇓ σ}
```
### While expression
### Return expression
- Explain (in text) what an interpretation of your example should produce, do that by dry running your given example step by step. Relate back to the SOS rules. You may skip repetitions to avoid cluttering.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment