- Give a (simplified) Structural Operational Semantics (SOS) for your language. You don't need to detail rules that are similar (follow the same pattern). Regarding variable environment (store) you may omit details as long as the presentation is easy to follow.
- Give a (simplified) Structural Operational Semantics (SOS) for your language. You don't need to detail rules that are similar (follow the same pattern). Regarding variable environment (store) you may omit details as long as the presentation is easy to follow.
- 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.
\frac{<b, σ> ⇓ true <c_1, σ> ⇓ σ'}{<\text{if } b \text{ then }c_1 \text{ else } c_2,σ> ⇓ σ'}
\frac{<b, σ> → true <c_1, σ> → σ'}{<\text{if } b \text{ then }c_1 \text{ else } c_2,σ> → σ'}
```
```math
\frac{<b, σ> → false <c_2, σ> → σ'}{<\text{if } b \text{ then }c_1 \text{ else } c_2,σ> → σ''}
```
```
### While expression
``` rust
if3>5{
### Return expression
func();
}
else{
anotherfunc();
}
```
- 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.
### While expression
```math
\frac{<b, σ> → true <c, σ> → σ' <\text{while } b \text{ do } c, σ'> → σ''}{<\text{while } b \text{ do } c, σ> → σ''}
```
```math
\frac{<b, σ> → false}{<\text{while } b \text{ do } c, σ> → σ}
```
``` rust
leta=0;
whilea<10{
// something that should loop 10 times
a=a+1;
}
```
```
- For your implementation, give a program (or set of test programs) that cover all the semantics of your language that you have successfully implemented. (Maybe a subset of the input language accepted by the grammar.)
- For your implementation, give a program (or set of test programs) that cover all the semantics of your language that you have successfully implemented. (Maybe a subset of the input language accepted by the grammar.)
- Compare your solution to the requirements (as stated in the README.md). What are your contributions to the implementation.
- Compare your solution to the requirements (as stated in the README.md). What are your contributions to the implementation.
```
## Your type checker
## Your type checker
- Give a simplified set of Type Checking Rules for your language (those rules look very much like the SOS rules, but over types not values). Also here you don't need to detail rules that are similar (follow the same pattern).
- Give a simplified set of Type Checking Rules for your language (those rules look very much like the SOS rules, but over types not values). Also here you don't need to detail rules that are similar (follow the same pattern).