2024-03-11 13:07:42 -07:00
|
|
|
|
module Main where
|
|
|
|
|
|
|
|
|
|
open import Language
|
|
|
|
|
open import Analysis.Sign
|
|
|
|
|
open import Data.Vec using (Vec; _∷_; [])
|
|
|
|
|
open import IO
|
|
|
|
|
open import Level using (0ℓ)
|
|
|
|
|
|
2024-04-13 14:13:44 -07:00
|
|
|
|
testCode : Stmt
|
2024-03-11 13:07:42 -07:00
|
|
|
|
testCode =
|
2024-04-13 14:13:44 -07:00
|
|
|
|
⟨ "zero" ← (# 0) ⟩ then
|
|
|
|
|
⟨ "pos" ← ((` "zero") Expr.+ (# 1)) ⟩ then
|
|
|
|
|
⟨ "neg" ← ((` "zero") Expr.- (# 1)) ⟩ then
|
|
|
|
|
⟨ "unknown" ← ((` "pos") Expr.+ (` "neg")) ⟩
|
2024-03-11 13:07:42 -07:00
|
|
|
|
|
|
|
|
|
testProgram : Program
|
|
|
|
|
testProgram = record
|
2024-04-13 14:13:44 -07:00
|
|
|
|
{ rootStmt = testCode
|
2024-03-11 13:07:42 -07:00
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
open WithProg testProgram using (output)
|
|
|
|
|
|
|
|
|
|
main = run {0ℓ} (putStrLn output)
|