summaryrefslogtreecommitdiff
path: root/Chalice/src/PrettyPrinter.scala
diff options
context:
space:
mode:
Diffstat (limited to 'Chalice/src/PrettyPrinter.scala')
-rw-r--r--Chalice/src/PrettyPrinter.scala12
1 files changed, 8 insertions, 4 deletions
diff --git a/Chalice/src/PrettyPrinter.scala b/Chalice/src/PrettyPrinter.scala
index 82e7658c..205349c6 100644
--- a/Chalice/src/PrettyPrinter.scala
+++ b/Chalice/src/PrettyPrinter.scala
@@ -18,8 +18,8 @@ object PrintProgram {
def Member(m: Member) = m match {
case MonitorInvariant(e) =>
print(" invariant "); Expr(e); println(Semi)
- case f@ Field(id, t) =>
- println(" " + (if (f.IsGhost) "ghost " else "") + "var " + id + ": " + t.FullName + Semi)
+ case f@ Field(id, t, ghost) =>
+ println(" " + (if (ghost) "ghost " else "") + "var " + id + ": " + t.FullName + Semi)
case m: Method =>
print(" method " + m.id)
print("("); VarList(m.ins); print(")")
@@ -257,12 +257,16 @@ object PrintProgram {
case e:Div => BinExpr(e, e.OpName, 0x60, false, true, contextBindingPower, fragileContext)
case e:Mod => BinExpr(e, e.OpName, 0x60, false, true, contextBindingPower, fragileContext)
case q:Quantification =>
- print("(" + q.Quantor + " ");
+ print("(" + (q.Q match {case Forall => "forall"; case Exists => "exists"}) + " ");
q.Is match {
case Nil =>
case i :: rest => print(i); rest foreach { v => print(", " + v) }
}
- print(" in "); Expr(q.Seq); print(" :: "); Expr(q.E); print(")");
+ q match {
+ case q: SeqQuantification => print(" in "); Expr(q.seq);
+ case q: TypeQuantification => print(": "); print(q.t.typ.FullName);
+ }
+ print(" :: "); Expr(q.E); print(")");
case EmptySeq(t) =>
print("nil<"); print(t.FullName); print(">");
case ExplicitSeq(es) =>