From 9368c8aa9d95ae4e1cfbed54c2996c6ef41d61b3 Mon Sep 17 00:00:00 2001 From: Rustan Leino Date: Thu, 11 Oct 2012 19:24:41 -0700 Subject: New feature: * 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 --- Util/Emacs/dafny-mode.el | 6 +++--- Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs | 3 ++- Util/latex/dafny.sty | 3 ++- Util/vim/syntax/dafny.vim | 3 ++- 4 files changed, 9 insertions(+), 6 deletions(-) (limited to 'Util') diff --git a/Util/Emacs/dafny-mode.el b/Util/Emacs/dafny-mode.el index 1ba6186b..035703cf 100644 --- a/Util/Emacs/dafny-mode.el +++ b/Util/Emacs/dafny-mode.el @@ -30,9 +30,9 @@ ]\\)*" . font-lock-comment-face) `(,(dafny-regexp-opt '( - "class" "datatype" "codatatype" "type" "function" "predicate" "copredicate" - "iterator" - "ghost" "var" "method" "constructor" + "class" "datatype" "codatatype" "type" "iterator" + "function" "predicate" "copredicate" + "ghost" "var" "method" "constructor" "comethod" "module" "import" "default" "as" "opened" "static" "refines" "returns" "yields" "requires" "ensures" "modifies" "reads" "free" "invariant" "decreases" diff --git a/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs b/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs index ac1b755c..2c3a650e 100644 --- a/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs +++ b/Util/VS2010/Dafny/DafnyLanguageService/Grammar.cs @@ -17,7 +17,7 @@ namespace Demo StringLiteral stringLiteral = TerminalFactory.CreateCSharpString("String"); this.MarkReservedWords( // NOTE: these keywords must also appear once more below - "class", "ghost", "static", "var", "method", "constructor", "datatype", "codatatype", + "class", "ghost", "static", "var", "method", "constructor", "comethod", "datatype", "codatatype", "iterator", "type", "assert", "assume", "new", "this", "object", "refines", "module", "import", "as", "default", "opened", @@ -267,6 +267,7 @@ namespace Demo | "var" | "method" | "constructor" + | "comethod" | "datatype" | "codatatype" | "type" diff --git a/Util/latex/dafny.sty b/Util/latex/dafny.sty index 879b90cb..8ac9defe 100644 --- a/Util/latex/dafny.sty +++ b/Util/latex/dafny.sty @@ -9,7 +9,8 @@ bool,nat,int,object,set,multiset,seq,array,array2,array3,map, function,predicate,copredicate, ghost,var,static,refines, - method,constructor,returns,yields,module,import,default,opened,as,in, + method,constructor,comethod, + returns,yields,module,import,default,opened,as,in, requires,modifies,ensures,reads,decreases,free, % expressions match,case,false,true,null,old,fresh,choose,this, diff --git a/Util/vim/syntax/dafny.vim b/Util/vim/syntax/dafny.vim index 45afbcf0..fc98156a 100644 --- a/Util/vim/syntax/dafny.vim +++ b/Util/vim/syntax/dafny.vim @@ -5,7 +5,8 @@ syntax clear syntax case match -syntax keyword dafnyFunction function predicate copredicate method constructor +syntax keyword dafnyFunction function predicate copredicate +syntax keyword method constructor comethod syntax keyword dafnyTypeDef class datatype codatatype type iterator syntax keyword module import opened as default syntax keyword dafnyConditional if then else match case -- cgit v1.2.3