summaryrefslogtreecommitdiff
path: root/Source/Dafny/Cloner.cs
Commit message (Collapse)AuthorAge
* Fix issue 125. Add the missing case 2 and 3 with refinement and opened imports.Gravatar qunyanm2016-02-05
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For the following situation module LibA { // ...things declared here... } module LibB { // ...things declared here... } module R { import opened LibA // ...things declared here... } module S refines R { import opened LibB // ...declared here... } 1. If module R declares a TopLevelDecl “G”, then we should report an error if S attempts to declare an incompatible TopLevelDecl “G”. Dafny does this already. 2. If LibA declares a TopLevelDecl “G” but R does not directly declare any TopLevelDecl G”, then we should also issue an error for any TopLevelDecl “G” in S. This behavior is missing in Dafny. 3. If each of LibA and LibB declares some TopLevelDecl “G”, but neither R nor S directly declares any TopLevelDecl “G”, then no error should be issued, and any use of “G” in S should resolve to the “G” in LibA. This behavior is missing in Dafny.
* Implement module export so we can export a subset of items defined in theGravatar qunyanm2016-01-29
| | | | module.
* 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.
* Hover text includes #[_k-1] suffix for terms rewritten in prefix ↵Gravatar Rustan Leino2015-10-02
| | | | | | | predicates/lemmas (this fixes an item from the wishlist). Include in hover text the extreme predicates for which an extreme lemmas has been rewritten (but don't include ==# in this list--or should it perhaps be included?). Under a (temporary) switch /rewriteFocalPredicates, each use of a focal predicate P in a prefix lemma is rewritten into P#[_k-1].
* MergeGravatar leino2015-09-28
|\
* | Changed computation of ghosts until pass 2 of resolution.Gravatar leino2015-09-28
| | | | | | | | | | | | | | Other clean-up in resolution passes, like: Include everything of type "char" into bounds that are discovered, and likewise for reference types. Allow more set comprehensions, determining if they are finite based on their argument type. Changed CalcExpr.SubExpressions to not include computed expressions.
| * merged IronDafny updates. two unit tests related to traits do not pass if ↵Gravatar Michael Lowell Roberts2015-09-21
|/ | | | ENABLE_IRONDAFNY is defined but this isn't critical and will be addressed shortly.
* 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.
| * Changed hover-text location for recursive ind/co-lemma callsGravatar Rustan Leino2015-08-17
| |
* | 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.
* | Refactor the error reporting codeGravatar Clément Pit--Claudel2015-08-18
| | | | | | | | | | The new error reporting system has a simpler interface, isn't tied to the resolver, and contains error source information.
| * Bug fixes and improvements in pretty printingGravatar leino2015-08-11
| |
| * Disallow user-defined attributes that begin with an underscoreGravatar leino2015-08-11
|/
* Merge my autoTriggers work into the master branchGravatar Clément Pit--Claudel2015-07-17
|\ | | | | | | | | This contains trigger related things under the autoTriggers flag (disabled by default), and some bug-fixes and cleanups that are already enabled.
| * [IronDafny] implemented workaround for "import opened" bug(s).Gravatar Michael Lowell Roberts2015-07-13
| |
* | Small refactoring of Printer.csGravatar Clément Pit--Claudel2015-07-06
| |
| * multiple changes...Gravatar Michael Lowell Roberts2015-07-02
| | | | | | | | | | - fix for requirement inheritance in refinement. - minimimally viable implementation of exclusive refinement feature.
| * Add the ability to specify how much "fuel" a function should have,Gravatar Bryan Parno2015-07-01
|/ | | | | | | | | | | | | | | | | | | i.e., how many times Z3 is permitted to unfold it's definition. The new {:fuel} annotation can be added to the function itself, it which case it will apply to all uses of that function, or it can overridden within the scope of a module, function, method, iterator, calc, forall, while, assert, or assume. The general format is: {:fuel functionName,lowFuel,highFuel} When applied as an annotation to the function itself, omit functionName. If highFuel is omitted, it defaults to lowFuel + 1. The default fuel setting for recursive functions is 1,2. Setting the fuel higher, say, to 3,4, will give more unfoldings, which may make some proofs go through with less programmer assistance (e.g., with fewer assert statements), but it may also increase verification time, so use it with care. Setting the fuel to 0,0 is similar to making the definition opaque, except when used with all literal arguments.
* Fix various bugs in nested match patterns listed in issue #83Gravatar qunyanm2015-06-19
|
* 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
|
* Revised look-up and compilation of inherited trait members (static ↵Gravatar leino2015-04-07
| | | | functions/methods don't work yet)
* 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.
* Allow trigger annotations in more statements and expressionsGravatar chrishaw2015-03-11
|
* Added 'protected' keyword (syntax)Gravatar leino2015-03-07
|
* 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
* When ambiguous references all resolve to the same declaration, don't complainGravatar leino2015-01-09
|
* 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
| |
| * removing one unnessessary check in the clonerGravatar Reza Ahmadi2014-12-02
| |
| * - fixed a bug in merging fields that come from a parent traitGravatar Reza Ahmadi2014-12-02
|/ | | | - added one more test
* Now the parser parses "Type" rather than "IToken" for a traitGravatar Reza Ahmadi2014-11-05
|
* Comparisons and well-founded order of charGravatar leino2014-10-21
|
* 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.
* 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
* Merge, and refactored bit in Cloner into class ClonerButDropMethodBodies.Gravatar leino2014-08-27
|\