diff options
author | kyessenov <unknown> | 2010-07-30 21:29:12 +0000 |
---|---|---|
committer | kyessenov <unknown> | 2010-07-30 21:29:12 +0000 |
commit | 71d2692bc427232d71707d3b241ee90b6278b06b (patch) | |
tree | 82d88fa94f514d44c48058f426aac36c8db5e9bd /Chalice/src/PrettyPrinter.scala | |
parent | 62fdc7d6ae9b6edf8b4031ad0ed4068d23e82000 (diff) |
Chalice:
* add sequence axiom updates from Dafny
* fix a bug in pretty printer for functions and predicates
* add a command line option for not checking termination; refactor options code to update syntax help string
* relax resolver to allow ghost state in assume statements (we don't know how to compile them in general anyways; assume false is still a special case and is compiled into assert false)
Diffstat (limited to 'Chalice/src/PrettyPrinter.scala')
-rw-r--r-- | Chalice/src/PrettyPrinter.scala | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/Chalice/src/PrettyPrinter.scala b/Chalice/src/PrettyPrinter.scala index af068b23..82e7658c 100644 --- a/Chalice/src/PrettyPrinter.scala +++ b/Chalice/src/PrettyPrinter.scala @@ -41,19 +41,22 @@ object PrintProgram { print(" condition " + id)
optE match {
case None =>
- case Some(e) => print(" where " + Expr(e))
+ case Some(e) => print(" where "); Expr(e)
}
println(Semi)
case Predicate(id, definition) =>
- println(" predicate " + id + " { " + Expr(definition) + "}")
+ print(" predicate " + id + " { "); Expr(definition); println(" }")
case Function(id, ins, out, specs, e) =>
- print(" function " + id + "(" + VarList(ins) + ")" + ": " + out.id);
+ print(" function " + id + "("); VarList(ins); print("): " + out.FullName);
+ println
specs foreach {
case Precondition(e) => print(" requires "); Expr(e); println(Semi)
case Postcondition(e) => print(" ensures "); Expr(e); println(Semi)
case LockChange(ee) => print(" lockchange "); ExprList(ee); println(Semi)
}
- print(" { " + Expr(e) + "}");
+ print(" { ");
+ Expr(e);
+ println(" }");
}
def Stmt(s: Statement, indent: Int): Unit = s match {
case Assert(e) =>
|