From cb7225fb540832d8c393c0e50018fcc34b61ceb6 Mon Sep 17 00:00:00 2001 From: Hugo Wangler <hugwan-6@student.ltu.se> Date: Fri, 22 Nov 2019 13:12:05 +0000 Subject: [PATCH] Update HOME_EXAM_Type_check_part2.md --- HOME_EXAM_Type_check_part2.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/HOME_EXAM_Type_check_part2.md b/HOME_EXAM_Type_check_part2.md index 2d41fa0..bb24d42 100644 --- a/HOME_EXAM_Type_check_part2.md +++ b/HOME_EXAM_Type_check_part2.md @@ -76,40 +76,40 @@ math``` or -math``` +```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``` +```math \frac{\Gamma \ \vdash \ x \ : \ \tau \quad \Gamma \ \vdash \ n \ : \ \tau}{\lang x := n, \sigma \rang \ \Darr \ \Gamma \ \vdash x \ : \ \tau} ``` ### **let** assignment -math``` +```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 -math``` +```math \frac{}{\Gamma \ \vdash b \ : \ bool} ``` ### **if/elseif** statement The conditions, $`b_i`$, of the if- and elseif-statements -math``` +```math \frac{}{\Gamma \ \vdash b_i \ : \ bool} ``` ### Functions Given the function $`p`$ with the type of its return type -math``` +```math \frac{\Gamma \ \vdash p \ : \ \tau \quad \lang p, \sigma \rang \ \Darr \ n}{\Gamma \ \vdash n \ : \ \tau} ``` -- GitLab