summaryrefslogtreecommitdiff
path: root/Chalice/src/PrettyPrinter.scala
diff options
context:
space:
mode:
authorGravatar kyessenov <unknown>2010-08-17 00:55:40 +0000
committerGravatar kyessenov <unknown>2010-08-17 00:55:40 +0000
commit96b51321e63a424bf0f8ae87a4440402bd3e8f1b (patch)
tree155888f0783fb12083ae1fdbeb8ceb0df2cb1ccf /Chalice/src/PrettyPrinter.scala
parentcb12b9742986681359a2703ab4204f29ef8ce140 (diff)
Chalice: refactored AST code for class hierarchy (no need for caches since Scala uses structural equality for case classes); landed first piece of refinement code
Diffstat (limited to 'Chalice/src/PrettyPrinter.scala')
-rw-r--r--Chalice/src/PrettyPrinter.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/Chalice/src/PrettyPrinter.scala b/Chalice/src/PrettyPrinter.scala
index 5ec898c5..c10aa9ea 100644
--- a/Chalice/src/PrettyPrinter.scala
+++ b/Chalice/src/PrettyPrinter.scala
@@ -9,7 +9,7 @@ object PrintProgram {
for (decl <- prog) decl match {
case cl: Class =>
if (cl.IsExternal) print("external ")
- println("class " + cl.id + " module " + cl.module + " {")
+ println("class " + cl.id + " module " + cl.module + (if (cl.IsRefinement) " refines " + cl.refinesId else "") + " {")
cl.members foreach Member
println("}")
case ch: Channel =>
@@ -97,8 +97,8 @@ object PrintProgram {
println(Semi)
case SpecStmt(lhs, locals, pre, post) =>
if (locals.size > 0) {
- if (locals(0).IsGhost) print("ghost ");
- if (locals(0).IsImmutable) print("const ") else print("var ")
+ if (locals(0).isGhost) print("ghost ");
+ if (locals(0).isImmutable) print("const ") else print("var ")
} else
print("var ");
VarList(locals);