summaryrefslogtreecommitdiff
path: root/Source/Dafny/Printer.cs
Commit message (Collapse)AuthorAge
* Add /view:<view1, view2> option to filter module exports to be printed.Gravatar qunyanm2016-02-11
|
* Fix issue 128. Change the translation of CanCallAssumption for let-such-thatGravatar qunyanm2016-02-04
| | | | | | | | | | | | | expression from // CanCall[[ var b :| RHS(b,g); Body(b,g,h) ]] = // (forall b0,b1 :: typeAntecedent ==> // CanCall[[ RHS(b,g) ]] && // (RHS(b,g) ==> CanCall[[ Body(b,g,h) ]]) && // $let$canCall(b,g)) to // CanCall[[ var b0,b1 :| RHS(b0,b1,g); Body(b0,b1,g,h) ]] = // $let$canCall(g) && // CanCall[[ Body($let$b0(g), $let$b1(g), h) ]]
* Fix printing for ForallStmt. Previously we traverse the resolved forallGravatar qunyanm2015-12-04
| | | | | | | | expressions to get the attributes for the forallstmt, which is flawed since the forallexpr could have been splitted into different subquantifiers each with different triggers. PrintExpression already knows how to print out splitted forall expressions, so we use it to print the resolved forall expressions instead.
* Made an adjustment in the printing of resolved forall expressions (previous ↵Gravatar leino2015-11-28
| | | | | | | code introduced with bug fix 103 and tripped over with the /rprint and /autoTriggers:1 flags used in the new dafny4/UnionFind.dfy test).
* Fix issue 103. Emit the quantifiers for ForallStmt before AutoTrigger so thatGravatar qunyanm2015-11-25
| | | | the auto-triggers can be computed for ForallStmt.
* Fix issue 94. Allow tuple-based assignment in statement contexts.Gravatar qunyanm2015-11-14
|
* Introduced new datatype update syntax: D.(f := E)Gravatar leino2015-10-23
| | | | | The old syntax, D[f := E], is still supported for a short while, but generates a warning about that syntax being deprecated. The new syntax also supports multiple updates: D.(f := E0, g := E1, h := E2)
* Parsing and pretty printing of the new "existential guards" of the two kinds ↵Gravatar leino2015-10-03
| | | | of "if" statements.
* Only print extraneous comments if asked.Gravatar Michael Lowell Roberts2015-09-17
|
* Merge.Gravatar Clément Pit--Claudel2015-08-19
|\ | | | | | | | | Changes that were needed included preventing the InductionRewriter from iterating on a SplitQuantifier and using the new error reporting engine.
* | Refactor calls to 'new CallCmd' and clear a few FIXMEsGravatar Clément Pit--Claudel2015-08-18
| |
* | Review preceding commit with RustanGravatar Clément Pit--Claudel2015-08-17
| |
* | Start committing split quantifiersGravatar Clément Pit--Claudel2015-08-14
| | | | | | | | | | | | | | | | | | This requires rewriting the parts of the AST that contain these quantifiers. We unfortunately don't have facilities to do such rewrites at the moment (and there are loops in the AST, so it would be hard to write such a facility). As a workaround, this commit introduces a field in quantifier expressions, SplitQuantifiers. Code that manipulate triggers is expected to look for this field, and ignore the other fields if that one is found.
| * Change the induction heuristic for lemmas to also look in precondition for ↵Gravatar leino2015-08-12
| | | | | | | | | | | | clues about which parameters to include. As a result, improved many test cases (see, e.g., dafny4/NipkowKlein-chapter7.dfy!) and beautified some others.
| * Bug fixes and improvements in pretty printingGravatar leino2015-08-11
| |
| * Disallow user-defined attributes that begin with an underscoreGravatar leino2015-08-11
| |
| * Moved discovery of induction variables into a Rewriter.Gravatar leino2015-08-11
| | | | | | | | | | Generate warnings for malformed :induction arguments. Removed the functionality that allowed induction on 'this'.
| * Added routine OneAttributeToString to pretty printerGravatar leino2015-08-10
|/
* Small refactoring of Printer.csGravatar Clément Pit--Claudel2015-07-06
|
* Add an infinite set collection type.Gravatar qunyanm2015-05-29
|
* Allow MatchExpr and MatchStmt to have nested patterns. Such asGravatar qunyanm2015-05-14
| | | | | | | | | | | | | | | | | | function last<T>(xs: List<T>): T requires xs != Nil { match xs case Cons(y, Nil) => y case Cons(y, Cons(z, zs)) => last(Cons(z, zs)) } And function minus(x: Nat, y: Nat): Nat { match (x, y) case (Zero, _) => Zero case (Suc(_), Zero) => x case (Suc(a), Suc(b)) => minus(a, b) }
* Added "inductive lemma" methodsGravatar leino2015-05-07
|
* Added inductive predicatesGravatar leino2015-05-06
|
* Make sure that PrintTopLevelDecls receives program FullName, not just Name, ↵Gravatar chrishaw2015-04-07
| | | | so that printMode NoIncludes/NoGhost works
* Fixed some bugs in override axioms (but still missing support for classes ↵Gravatar leino2015-04-05
| | | | | | | with type parameters). Resolve ClassDecl.TraitsTyp as types. Moved declaration of TraitParent and NoTraitAtAll to prelude.
* Added 'protected' keyword (syntax)Gravatar leino2015-03-07
|
* Stop pretty-print from emitting deprecated semi-colons.Gravatar qunyanm2015-03-05
|
* Add imap display/update expressionsGravatar chrishaw2015-02-27
|
* Add imap type, which is like map but may have have infinite sizeGravatar chrishaw2015-02-26
|
* Switched use of List(IToken) in UserDefinedType to NameSegment/ExprDotName, ↵Gravatar leino2015-01-23
| | | | | | | so use the new name resolution machinery that handles modules and type parameters Included some inadvertently left-out test cases in dafny0/Modules0.dfy Fixed comparable-types tests
* Fixed resolution of method calls with explicit type parameters.Gravatar leino2015-01-02
| | | | Finished refactoring of the recent name segments changes.
* Language change: All functions and methods declared lexically outside any ↵Gravatar leino2014-12-12
| | | | | | | | | | class are now automatically static, and fields are no longer allowed to be declared there. Stated differently, all heap state must now be declared inside an explicitly declared class, and functions and methods declared outside any class can be viewed as belonging to the module. The motivating benefit of this change is to no longer need the 'static' keyword when declaring a module of functions and methods.
* MergeGravatar leino2014-12-09
|\
* | Allow user-specified type parametersGravatar leino2014-12-09
| |
* | Finished up refactoring of the new name segment parsing, AST, and resolution.Gravatar leino2014-12-07
| | | | | | | | Removed now defunct IdentifierSequence from the AST.
| * added multiple trait inheritance.Gravatar Reza Ahmadi2014-12-03
| | | | | | | | - a class can now extend more than one traits
* | Snapshot, to be continuedGravatar leino2014-12-02
|/
* Now the parser parses "Type" rather than "IToken" for a traitGravatar Reza Ahmadi2014-11-05
|
* Added initial support for dirty while statements.Gravatar chmaria2014-11-01
|
* Add support for counting spec/impl/proof lines by supressing, e.g., ghost ↵Gravatar Bryan Parno2014-10-27
| | | | statements
* Add char literals.Gravatar leino2014-10-20
| | | | Disallow backslash from being part of identifier names.
* Added types "char" and "string" (the latter being a synonym for "seq<char>").Gravatar leino2014-10-20
| | | | | | Added string literals with various escapes--a subset of those supported in C# and similar languages, including the C# verbatim strings. Previously, the "print" statement and custom attributes could support expression-or-string arguments; there is no longer a need to special-case these, so these arguments are now just expressions. Fixed lack of operator resolution in custom attributes.
* Print system module (in a comment) with /rprint.Gravatar leino2014-09-09
| | | | Cleaner printing of .reads and .requires members of the built-in arrow "classes".
* Disallow parentheses-less declarations of predicates and co-predicates, ↵Gravatar leino2014-08-27
| | | | along with a backward-compatibility warning message if such declarations are attempted
* Refactoring: renamed DerivedTypeDecl to NewtypeDeclGravatar leino2014-08-26
|
* Changed syntax of newtypeGravatar leino2014-08-26
|
* Type check and pretty print newtype constraintsGravatar leino2014-08-22
|
* Start of derived types (aka "new types")Gravatar leino2014-08-20
| | | | Fixed bug in type checking for integer division.
* Refactor: Change ApplyExpr's Receiver to FunctionGravatar Dan Rosén2014-08-14
|
* MergeGravatar leino2014-08-13
|\