diff --git a/Main.agda b/Main.agda index 09ad11d..b847237 100644 --- a/Main.agda +++ b/Main.agda @@ -13,6 +13,25 @@ testCode = ⟨ "neg" ← ((` "zero") Expr.- (# 1)) ⟩ then ⟨ "unknown" ← ((` "pos") Expr.+ (` "neg")) ⟩ +testCodeCond₁ : Stmt +testCodeCond₁ = + ⟨ "var" ← (# 1) ⟩ then + if (` "var") then ( + ⟨ "var" ← ((` "var") Expr.+ (# 1)) ⟩ + ) else ( + ⟨ "var" ← ((` "var") Expr.- (# 1)) ⟩ then + ⟨ "var" ← (# 1) ⟩ + ) + +testCodeCond₂ : Stmt +testCodeCond₂ = + ⟨ "var" ← (# 1) ⟩ then + if (` "var") then ( + ⟨ "x" ← (# 1) ⟩ + ) else ( + ⟨ noop ⟩ + ) + testProgram : Program testProgram = record { rootStmt = testCode