@@ -22,7 +22,7 @@ The LL(2) syntax differs from Scala-based syntax primarily in:
2222
2323| Category | Scala-based Syntax | LL(2) Syntax | AST Node |
2424| ---| ---| ---| ---|
25- | ** Program** | ` // #Sireum ` ` package p ` ` import org.sireum._ ` ... | ` package p ` ... | ` TopUnit.Program ` |
25+ | ** Program** | ` // #Sireum \n package p import org.sireum._ ... ` | ` package p\n ... ` | ` TopUnit.Program ` |
2626| ** Import** | ` import a.b.c ` | ` import a.b.c ` | ` Stmt.Import ` |
2727| ** Import wildcard** | ` import a.b._ ` | ` import a.b._ ` | ` Stmt.Import ` + ` WildcardSelector ` |
2828| ** Import rename** | ` import a.b.{x => y} ` | ` import a.b.{x => y} ` | ` Stmt.Import ` + ` MultiSelector ` |
@@ -37,7 +37,7 @@ The LL(2) syntax differs from Scala-based syntax primarily in:
3737| ** Sig trait** | ` @sig trait Foo ` | ` type @trait Foo ` | ` Stmt.Sig(isImmutable=T) ` |
3838| ** Sealed sig** | ` @sig sealed trait Foo ` | ` type @sealed @trait Foo ` | ` Stmt.Sig(isSealed=T) ` |
3939| ** Msig trait** | ` @msig trait Foo ` | ` type @trait @mut Foo ` | ` Stmt.Sig(isImmutable=F) ` |
40- | ** Enum** | ` @enum object Color { ... } ` | ` type @enum Color: { ... } ` | ` Stmt.Enum ` |
40+ | ** Enum** | ` @enum object Color { "Red"\n "Green" } ` | ` type @enum Color: { Red\n Green } ` | ` Stmt.Enum ` |
4141| ** Range type** | ` @range(min = 0, max = 10) class Idx ` | ` type @range(min = 0, max = 10) Idx ` | ` Stmt.SubZ(isBitVector=F) ` |
4242| ** Bits type** | ` @bits(signed = F, width = 8) class U8 ` | ` type @bits(signed = F, width = 8) U8 ` | ` Stmt.SubZ(isBitVector=T) ` |
4343| ** Type alias** | ` type Foo = Bar[Z] ` | ` type @alias Foo = Bar[Z] ` | ` Stmt.TypeAlias ` |
@@ -81,8 +81,8 @@ The LL(2) syntax differs from Scala-based syntax primarily in:
8181| ** Induct** | ` (exp: @induct) ` | ` (@induct exp) ` | ` Stmt.Induct ` |
8282| ** Deduce steps** | ` Deduce(1. claim ...) ` | ` deduce { 1. claim ... } ` | ` Stmt.DeduceSteps ` |
8383| ** Deduce sequent** | ` Deduce(⊢ ...) ` | ` deduce : premises ⊢ conclusion ` | ` Stmt.DeduceSequent ` |
84- | ** Assert** | ` assert(exp) ` | ` assert exp ` | ` Stmt.Expr ` (assert builtin) |
85- | ** Assume** | ` assume(exp) ` | ` assume exp ` | ` Stmt.Expr ` (assume builtin) |
84+ | ** Assert** | ` assert(exp) ` | ` assert exp [, exp] ` | ` Stmt.Expr ` (assert builtin) |
85+ | ** Assume** | ` assume(exp) ` | ` assume exp [, exp] ` | ` Stmt.Expr ` (assume builtin) |
8686
8787### Expressions
8888
@@ -95,7 +95,7 @@ The LL(2) syntax differs from Scala-based syntax primarily in:
9595| ** Apply** | ` x(i) ` | ` x(i) ` | ` Exp.Invoke(ident.id="apply") ` |
9696| ** Binary** | ` a + b ` | ` a + b ` | ` Exp.Binary ` |
9797| ** Unary** | ` -x ` , ` !x ` | ` -x ` , ` !x ` | ` Exp.Unary ` |
98- | ** If exp** | ` if (c) t else e ` | ` (c? t : e) ` | ` Exp.If ` |
98+ | ** If exp** | ` if (c) t else e ` | ` if (c) t else e ` | ` Exp.If ` |
9999| ** Tuple** | ` (a, b) ` | ` (a, b) ` | ` Exp.Tuple ` |
100100| ** This** | ` this ` | ` this ` | ` Exp.This ` |
101101| ** Super** | ` super ` | ` super ` | ` Exp.Super ` |
@@ -156,11 +156,11 @@ The LL(2) syntax differs from Scala-based syntax primarily in:
156156| ---| ---| ---| ---|
157157| ** Proof block** | ` Proof(...) ` | ` deduce { ... } ` | ` ProofAst ` |
158158| ** Regular step** | ` n (claim) by just ` | ` n. claim by just ` | ` ProofAst.Step.Regular ` |
159- | ** Assume step** | ` n Assume(claim) ` | ` n. assume( claim) ` | ` ProofAst.Step.Assume ` |
160- | ** Assert step** | ` n Assert(claim, SubProof(...)) ` | ` n. assert( claim) { ... } ` | ` ProofAst.Step.Assert ` |
159+ | ** Assume step** | ` n Assume(claim) ` | ` n. assume claim ` | ` ProofAst.Step.Assume ` |
160+ | ** Assert step** | ` n Assert(claim, SubProof(...)) ` | ` n. assert claim { ... } ` | ` ProofAst.Step.Assert ` |
161161| ** SubProof** | ` n SubProof(...) ` | ` n. { steps } ` | ` ProofAst.Step.SubProof ` |
162162| ** Let step** | ` n Let((x: T) => ...) ` | ` n. { x: T steps } ` | ` ProofAst.Step.Let ` |
163- | ** Justification** | ` by just ` | ` by just. ` | ` ProofAst.Step.Justification.* ` |
163+ | ** Justification** | ` by just ` | ` by just ` | ` ProofAst.Step.Justification.* ` |
164164| ** Sequent** | ` ⊢(premises, conclusion) ` | ` : premises ⊢ conclusion ` | ` Sequent ` |
165165
166166### LL(2)-Only Constructs
0 commit comments