summaryrefslogtreecommitdiff
path: root/Source/Dafny/Scanner.cs
Commit message (Collapse)AuthorAge
* Implement module export so we can export a subset of items defined in theGravatar qunyanm2016-01-29
| | | | module.
* Implement 'extern' declaration modifier.Gravatar Richard L. Ford2016-01-27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The 'extern' declaration modifier provides a more convenient way of interfacing Dafny code with C# source files and .Net DLLs. We support an 'extern' keyword on a module, class, function method, or method (cannot extern ghost). We check the CompileNames of all modules to make sure there are no duplicate names. Every Dafny-generated C# class is marked partial, so it can potentially be extended. The extern keyword could be accompanied by an optional string naming the corresponding C# method/class to connect to. If not given the name of the method/class is used. An 'extern' keyword implies an {:axiom} attribute for functions and methods, so their ensures clauses are assumed to be true without proof. In addition to the .dfy files, the user may supply C# files (.cs) and dynamic linked libraries (.dll) on command line. These will be passed onto the C# compiler, the .cs files as sources, and the .dll files as references. As part of this change the grammar was refactored some. New productions are - TopDecls - a list of top-level declarations. - TopDecl - a single top-level declaration - DeclModifiers - a list of declaration modifiers which are either 'abstract', 'ghost', 'static', 'protected', or 'extern'. They can be in any order and we diagnose duplicates. In addition, since they are not all allowed in all contexts, we check and give diagnostics if an DeclModifier appears where it is not allowed.
* Parsing and pretty printing of the new "existential guards" of the two kinds ↵Gravatar leino2015-10-03
| | | | of "if" statements.
* 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.
* Fix a bug with includes and /useBaseNameForFileNameGravatar Clément Pit--Claudel2015-07-23
| | | | | | | If /useBasenameForFilename is specified, tokens just contain file names, which is not enough to locate included files. Solution based on Rustan's advice.
* 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.
* Add an infinite set collection type.Gravatar qunyanm2015-05-29
|
* Added "inductive lemma" methodsGravatar leino2015-05-07
|
* Added inductive predicatesGravatar leino2015-05-06
|
* Allow trigger annotations in more statements and expressionsGravatar chrishaw2015-03-11
|
* Added 'protected' keyword (syntax)Gravatar leino2015-03-07
|
* Add imap type, which is like map but may have have infinite sizeGravatar chrishaw2015-02-26
|
* Minor change to grammar to avoid missing tokenGravatar wuestholz2015-01-24
|
* Allow user-specified type parametersGravatar leino2014-12-09
|
* Snapshot, to be continuedGravatar leino2014-12-02
|
* Use arbitrary lookahead to determine if the next expression is a lambda ↵Gravatar leino2014-11-13
| | | | expression.
* Took a pass through the whole grammar to clean up allowSemi/allowLambda ↵Gravatar leino2014-11-11
| | | | parameters
* Cleaned up a number of LL(1) conflicts in the grammar (I wish Coco/R ↵Gravatar leino2014-11-10
| | | | | | supported a GREEDY annotation) Don't allow colons with no intervening expressions in sequence-slicing expression
* Resolved several more LL(1) warnings in the grammarGravatar Rustan Leino2014-11-06
|
* Started fixing a number of LL(1) warningsGravatar leino2014-11-06
| | | | | Disallow empty modifies/reads clauses (this eliminates some LL(1) warnings) Require modify statement to take a nonempty list of frame expressions
* Added initial support for dirty while statements.Gravatar chmaria2014-11-01
|
* Allow non-ghost axioms in order to model trusted external calls,Gravatar Bryan Parno2014-10-27
| | | | | e.g., Ironclad's calls to assembly instructions. Also fixed what appeared to be a bug in the Makefile for invoking Coco
* Allow underscores in numeric literals (and in field/destructor names that ↵Gravatar leino2014-10-23
| | | | | | are written as numeric strings). The underscores have no semantic meaning, but can help a human parse the numbers.
* 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.
* Did more refactoring.Gravatar wuestholz2014-09-23
|
* Changed syntax of newtypeGravatar leino2014-08-26
|
* Changed syntax of derived types to "newtype"Gravatar leino2014-08-21
| | | | Added parsing of constraints (beyond parsing is yet to come)
* Start of derived types (aka "new types")Gravatar leino2014-08-20
| | | | Fixed bug in type checking for integer division.
* 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
* Make syntax of "match" expressions and "match" statements the same -- curly ↵Gravatar Rustan Leino2014-06-24
| | | | braces around the cases are now supported for both and are optional for both
* Added "modify" statement.Gravatar Rustan Leino2014-04-03
| | | | In a frame govered by a ghost context, ignore explicit mentions of `g if g is a ghost field.
* 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
|
* Add support for the "include" keyword, which accepts a (possibly relative) pathGravatar Bryan Parno2013-12-10
| | | | | to another Dafny file. That file's functions and methods are included but not checked. This is intended to support incremental verification on a per-file basis.
* Allow calls to side-effect-free ghost methods from expressionsGravatar Rustan Leino2013-08-06
|
* 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)
* Add support for hexidecimal numbers.Gravatar parno2013-07-30
|
* Fixed parsing bug in "if" and "while" guardsGravatar Rustan Leino2013-07-10
|
* Made the semi-colon after "type" and "module" declarations optional.Gravatar Rustan Leino2013-05-10
|
* The "choose" statement, hacky and specialized as it was, is now gone. Use ↵Gravatar Rustan Leino2013-03-27
| | | | the assign-such-that statement instead. For example: x :| x in S;
* Finished support for ==# in calc, changed Paulson example to use it.Gravatar Nadia Polikarpova2013-03-20
|
* Added the <== operator.Gravatar Nadia Polikarpova2013-03-14
|
* Renamed "parallel" statement to "forall" statement, and made the parentheses ↵Gravatar Rustan Leino2013-03-06
| | | | around the bound variables optional.
* "!!" can now be parsed as two "!". More concise parsing for "!in".Gravatar Nadia Polikarpova2013-02-07
|
* Removed the syntactic form copredicate #-form with the implicit argument.Gravatar Rustan Leino2013-01-16
| | | | Added syntactic support for codatatype #-form equalities.
* Improved error message for making the mistake of saying 'returns' instead of ↵Gravatar Rustan Leino2012-11-25
| | | | 'yields' for an iterator