Add more test programs
Signed-off-by: Danila Fedorin <danila.fedorin@gmail.com>
This commit is contained in:
parent
838aaf9c58
commit
c1581075d3
19
Main.agda
19
Main.agda
|
@ -13,6 +13,25 @@ testCode =
|
||||||
⟨ "neg" ← ((` "zero") Expr.- (# 1)) ⟩ then
|
⟨ "neg" ← ((` "zero") Expr.- (# 1)) ⟩ then
|
||||||
⟨ "unknown" ← ((` "pos") Expr.+ (` "neg")) ⟩
|
⟨ "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 : Program
|
||||||
testProgram = record
|
testProgram = record
|
||||||
{ rootStmt = testCode
|
{ rootStmt = testCode
|
||||||
|
|
Loading…
Reference in New Issue
Block a user