summaryrefslogtreecommitdiff
path: root/Source/Dafny/RefinementTransformer.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.
* Fix issue 117. Generate an error when the "opened" of an import doesn't matchGravatar qunyanm2016-01-08
| | | | between a module and its refinement base.
* Parsing and pretty printing of the new "existential guards" of the two kinds ↵Gravatar leino2015-10-03
| | | | of "if" statements.
* 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.
* 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.
* Allow forall statements in refinementsGravatar leino2015-07-31
|
* multiple changes...Gravatar Michael Lowell Roberts2015-07-02
| | | | | - fix for requirement inheritance in refinement. - minimimally viable implementation of exclusive refinement feature.
* Add an infinite set collection type.Gravatar qunyanm2015-05-29
|
* Added "inductive lemma" methodsGravatar leino2015-05-07
|
* Added inductive predicatesGravatar leino2015-05-06
|
* This changeset changes the default visibility of a function/predicate body ↵Gravatar leino2015-03-09
| | | | | | | | | | outside the module that declares it. The body is now visible across the module boundary. To contain the knowledge of the body inside the module, mark the function/predicate as 'protected'. Semantics of 'protected': * The definition (i.e., body) of a 'protected' function is not visible outside the defining module * The idea is that inside the defining module, a 'protected' function may or may not be opaque. However, this will be easier to support once opaque/reveal are language primitives. Therefore, for the time being, {:opaque} is not allowed to be applied to 'protected' functions. * In order to extend the definition of a predicate in a refinement module, the predicate must be 'protected' * The 'protected' status of a function must be preserved in refinement modules
* Added 'protected' keyword (syntax)Gravatar leino2015-03-07
|
* Add imap type, which is like map but may have have infinite sizeGravatar chrishaw2015-02-26
|
* Fixed an encoding bug for newtypes (this fixes Issue #50)Gravatar Rustan Leino2015-01-27
|
* 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
* 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.
* Fixed some issues with assignments in refinements, both soundness bugs in ↵Gravatar leino2014-12-02
| | | | previous version and changes necessitated by recent parsing refactoring
* 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
* Refactoring: renamed DerivedTypeDecl to NewtypeDeclGravatar leino2014-08-26
|
* MergeGravatar leino2014-08-20
|\
* | Start of derived types (aka "new types")Gravatar leino2014-08-20
| | | | | | | | Fixed bug in type checking for integer division.
| * Change behavior of 'decreases *', which can be applied to loops and methods. ↵Gravatar Rustan Leino2014-08-19
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now, loops that may possibly do an infinite number of iterations (that is, loops marked with 'decreases *') and calls to methods marked with 'decreases *' are allowed only in methods that themselves are marked with 'decreases *'. As before, ghost loops and ghost methods are not allowed to be marked with 'decreases *'. Previously, 'decreases *' was allowed on a method only if the method was tail recursive; this is no longer so. Note, however, that if the method is not tail recursive and engages in infinite recursion, then it will eventually run out of stack space. Previously, a 'decreases *' was not inherited in a refining module; this is no longer so. That is, 'decreases *' is now inherited. To refine a possibly non-terminating method or loop, the refining version simply provides a decreases clause that does not mention '*'. Note that if the refined method is not recursive, it still needs to have _some_ decreases clause in order not to inherit the 'decreases *' from the refined method, but the expression stated in the decreases clause can be arbitrary (for example, one can write 'decreases true' or 'decreases 7' or 'decreases x' for some 'x' in scope). Note, in the new design, a method needs to be declared with 'decreases *' if it may recurse forever _or_ if it contains a possibly infinite loop. Note that the absence of 'decreases *' on a loop does not mean the loop will terminate, but it does mean that the loop will iterate a finite number of times (the subtle distinction here is that a loop without a 'decreases *' is allowed to contain a nested loop that has a 'decreases *' -- provided the enclosing method is also declared with 'decreases *', as previously mentioned).
* MergeGravatar Dan Rosén2014-08-11
|\
* | Add higher-order-functions and some other goodiesGravatar Dan Rosén2014-08-11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * The reads clause now needs to be self framing. * The requires clause now needs to be framed by the reads clause. * There are one-shot lambdas, with a single arrow, but they will probably be removed. * There is a {:heapQuantifier} attribute to quantifiers, but they will probably be removed. * Add smart handling of type variables * Add < and > for datatype & type parameter
| * added trait feature:Gravatar Reza Ahmadi2014-07-18
|/ | | | | | -possibility to declare traits in Dafny -possibility to extend a class by a trait -possibility to override body-less methods
* Renamed "arbitrary type" to "opaque type"Gravatar Rustan Leino2014-07-15
|
* Support for type synonyms in refinementsGravatar Rustan Leino2014-07-14
| | | | Started allowing arbitrary types to have type parameters
* Added type synonyms. (No support yet for these in refinements.)Gravatar Rustan Leino2014-07-11
|
* Make reveal axioms from opaque functions quantify over layersGravatar Dan Rosén2014-07-10
|
* Fixed refinement of modify statementsGravatar Rustan Leino2014-04-04
|
* Support the transition from "modify Frame;" to "modify Frame { Body }" by ↵Gravatar Rustan Leino2014-04-04
| | | | refinement.
* Refactoring: renamed VarDecl to LocalVariable, and renamed VarDeclStmt.Lhss ↵Gravatar Rustan Leino2014-03-17
| | | | to VarDeclStmt.Locals
* Deprecated "comethod" keyword in favor of "colemma". (Also, "prefix method" ↵Gravatar Rustan Leino2014-02-23
| | | | -> "prefix lemma")
* Preliminary support for reals in Dafny specs. No compiler suport yet.Gravatar Bryan Parno2014-02-10
|
* Produce hover text for many of the refinement omissions (i.e., "..." and the ↵Gravatar Rustan Leino2014-01-31
| | | | like).
* Changed the iterator class hover text back to the iterator name (which is ↵Gravatar Rustan Leino2013-12-20
| | | | consistent with everything else), not the "iterator" keyword
* Added an .EndTok for every statement. (Note, in some places, especially in ↵Gravatar Rustan Leino2013-12-19
| | | | | | | VarDecl statements, there's often no good .EndTok information.) Used the .EndTok in CaptureState information. In other words, move the blue dots in the IDE to after the statement just executed. Removed /*!*/ comments in some parts of the source code -- CodeContracts reveal this information.
* Refactored the calling of rewritersGravatar Rustan Leino2013-12-11
|
* Introduced keywords "lemma" (like a "ghost method", but not allowed to have ↵Gravatar Rustan Leino2013-08-02
| | | | a "modifies" clause) and "colemma" (synonymous with "comethod"; perhaps "comethod" will go away at some point)
* Renamed "parallel" statement to "forall" statement, and made the parentheses ↵Gravatar Rustan Leino2013-03-06
| | | | around the bound variables optional.
* Added Equals method on TypeGravatar Rustan Leino2013-02-20
| | | | | Fixed some precondition violations Various improvements in Contracts
* renamed "abstract module" to "module facade"Gravatar Rustan Leino2012-10-22
| | | | renamed "ghost module" to "abstract module", adding a keyword "abstract"
* allow a refinement to introduce "return" statements, at the price of ↵Gravatar Rustan Leino2012-10-22
| | | | | | re-verifying the postcondition at that time let refined classes inherit attributes
* combine {:autocontracts} and refinementGravatar Rustan Leino2012-10-21
|
* New feature:Gravatar Rustan Leino2012-10-11
| | | | | | | * Added "comethod" declarations and support for writing manual co-inductive proofs (but currently blindly assume comethod postconditions to, in positive positions, only have copredicates and codatatype equalities--other cases still need to be dealt with) Code restructuring: * New set of Boogie procedure stubs generated for each other * Start of improvements around TrSplitExpr
* Put all sources under \Source directoryGravatar Rustan Leino2012-10-04