summaryrefslogtreecommitdiff
path: root/Source/Core/AbsyExpr.cs
Commit message (Collapse)AuthorAge
* Added and briefly tested the updated syntax. NaN/oo not supported yetGravatar Checkmate502016-07-19
|
* Changed the syntax reading of the float typeGravatar Checkmate502016-07-16
|
* change to updateGravatar Checkmate502016-06-07
|
* removed an unnecessary type checking additionGravatar Checkmate502016-06-07
|
* fixed some merging issuesGravatar Checkmate502016-06-07
|
* Normalise line endings using a .gitattributes file. UnfortunatelyGravatar Dan Liew2015-06-28
| | | | | | this required that this commit globally modify most files. If you want to use git blame to see the real author of a line use the ``-w`` flag so that whitespace changes are ignored.
* Fix issue with computation of statement checksums for lambda expressions.Gravatar Valentin Wüstholz2015-06-12
|
* Make caching of verification results more fine-grained for changes that ↵Gravatar Valentin Wüstholz2015-05-17
| | | | affect preconditions.
* Protect Bitvector field of BvExtractExpr when it is immutable.Gravatar Dan Liew2015-02-12
|
* Protect E0 and E1 in BvConcatExpr if Expr is immutable.Gravatar Dan Liew2015-02-12
|
* Fix what looked like a serious design issue when Type checkingGravatar Dan Liew2015-02-12
| | | | | | | anything that implements the IAppliable interface. Type checking should never need to change the reference of a list of arguments (hence the removal of the ``ref`` keyword) and we need to use IList<Expr> instead of List<Expr> to allow NAryExpr to do its type checking.
* When an Expr immutable, never change Type reference if it has been set,Gravatar Dan Liew2015-02-12
| | | | even if the types are equivalent.
* Protect the Args field of NAryExpr when it is immutable.Gravatar Dan Liew2015-02-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Made changing the reference throw an exception if the NAryExpr was constructed as immutable * Changed the type of NAryExpr.Args to be IList<Expr> rather than List<Expr> so that when the NAryExpr is immutable I can return ``_Args.AsReadOnly()`` (instead of ``_Args``) which returns a read only wrapper around the List<Expr> so that clients cannot change the list. I came across two problems * Making this change required changing types all over the place (from List<Expr> to IList<Expr>). I feel that changes are extensive enough that there's a good chance that out of tree clients using Boogie's libraries might break. I've waited for a code review but this didn't happen so I'm committing anyway. * I came across something that looks like bad design of the IAppliable interface which potentially breaks immutability enforcement. I've left this as a "FIXME" in this. Here's the problematic method. ``` Type Typecheck(ref List<Expr>/*!*/ args, out TypeParamInstantiation/*!*/ tpInstantiation, TypecheckingContext/*!*/ tc); ``` It potentially allows the instance of the args to be changed which seems very suspect.
* Fix performance issue in ComputeHashCode() methods of Expr classes.Gravatar Dan Liew2015-02-02
| | | | | | If constructing immutable Expr bottom up this would be very inefficient because the hashcode would be recomputed unnecessarily. Now just make ComputeHashCode() methods call GetHashCode() on Expr instead.
* Fix typechecking immutable Expr when we haveGravatar Dan Liew2015-01-31
| | | | | | | | | | | | <bool> == <bool> or <bool> != <bool> The type checker tries rewrite the Expr when it gets type checked which breaks immutability so disable doing this if the Expr is immutable.
* Made it produce slightly different passive commands for assignments to ↵Gravatar wuestholz2015-01-30
| | | | assumption variables.
* Protect the NAryExpr.Fun field when the NAryExpr is immutable.Gravatar Dan Liew2015-01-29
| | | | | Add a unit test for this. We need to protect the Args field too but that is going to be much harder to enforce.
* Protect the Expr field of OldExpr if it is immutable. Add unit testGravatar Dan Liew2015-01-29
| | | | to check this is being enforced.
* Protect the Type field of an Expr if is Immutable. Note if the ExprGravatar Dan Liew2015-01-29
| | | | | | has never been type checked we allow the Type field to be set but once it has been set it cannot be changed to refer to a different Type.
* Protect the Name and Decl fields of IdentifierExpr when it isGravatar Dan Liew2015-01-29
| | | | | immutable by raising an exception if an attempt is made to modify it after construction.
* Prevent a BvConst being changed once constructed. The motivationGravatar Dan Liew2015-01-29
| | | | | | | for doing this is that we would like a LiteralExpr to be immutable when constructed but because the "Val" field can point to a BvConst which is an object it means that although the Val reference cannot change the BvConst could be changed.
* Add the ability to declare Expr to be immutable at construction time.Gravatar Dan Liew2015-01-29
| | | | | | | | | | | | This is currently not enforced (it really should be). So right now it only amounts to a promise by the client that the Expr will not be modified after it is constructed. We should actually enforce this by protecting various fields of the Expr classes so they can't be changed if an Expr is constructed as Immutable. The motivation for doing this is it allows the value of GetHashCode() to be cached. Expr classes now implement ComputeHashCode() to do the actuall hash code computation.
* Worked on the verification result caching (statement checksums).Gravatar wuestholz2015-01-26
|
* Made invariant of class 'IfThenElse' robust by changing the designGravatar 0biha2015-01-01
| | | | (replaced public field by private field + getter/setter)
* Worked on more native support for partially-verified assertions.Gravatar wuestholz2014-12-28
|
* Fixed issue with resolution of function calls.Gravatar wuestholz2014-11-26
|
* Fix FunctionCall.Resolve() so that when the function is resolved the type ↵Gravatar Dan Liew2014-11-25
| | | | | | becomes availble via ShallowType(). This fixes the ExprTypeChecking.FunctionCallTypeResolved() unit test.
* Fix bug in FunctionCall that caused the ExprTypeChecking.FunctionCall()Gravatar Dan Liew2014-11-25
| | | | | | | | | unit test to fail. The issue was that one of FunctionCall constructors created a new IdentifierExpr without associating a type with it. To fix this we now set the type of the IdentifierExpr to the return type of the Function passed into the constructor.
* fixed various CodeContracts issues.Gravatar qadeer2014-09-18
|
* Added missing Expr.Neg() static method.Gravatar Dan Liew2014-08-15
|
* Minor refactoringGravatar wuestholz2014-08-03
|
* MergeGravatar Dan Rosén2014-08-01
|\
* | Add alpha equivalence check for Expr, and use it when lambda liftingGravatar Dan Rosén2014-08-01
| |
| * Fix bug in NAryExpr where is was possible for A.Equals(B) to returnGravatar Dan Liew2014-07-29
| | | | | | | | | | | | | | | | | | | | | | true but A.GetHashCode() == B.GetHashCode() return false. The case of the bug was that Args.GetHashCode() was being used which uses Object.GetHashCode() which uses references to compute GetHashCode(). This is wrong because we want hash codes to equal for structural equality. To fix this I've implemented a really simple hashing method. I have not tested how resilient this is to collisions.
| * Fix bug in NAryExpr where Equals() override was not correctly implemented.Gravatar Dan Liew2014-07-28
|/ | | | | | | | The previous implementation which called object.Equals(this.Args, other.Args) would in turn call ``this.Args.Equals(others.Args)`` which for List<> is reference equality. Equals() is purposely overloaded on Expr classes in Boogie to provide structural equality so this has been fixed so a comparision of elements in the list is performed.
* Fix nasty bug introduced by commit 61a94f409975.Gravatar Dan Liew2014-07-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were many calls in the code to ``` new TokenTextWriter("<buffer>", buffer, false) ``` Prior to 61a94f409975 this was a call to the following constructor ``` TokenTextWriter(string filename, TextWriter writer, bool setTokens) ``` After that commit these then became calls to ``` TokenTextWriter(string filename, TextWriter writer, bool pretty) ``` An example of where this would cause issues was if ToString() was called on an AbsyCmd then the its token would be modified because the setTokens parameter was effectively set to True when the original intention was for it to be set to false! To fix this I've * Removed the default parameter value for pretty and fixed all uses so that we pass false where it was implicitly being set before * Where the intention was to set setTokens to false this has been fixed so it is actually set to false! Unfortunately I couldn't find a way of observing this bug from the Boogie executable so I couldn't create a test case. I could only observe it when I was using Boogie's APIs.
* Refactored how checksums are computed.Gravatar wuestholz2014-07-13
|
* Did some refactoring, fixed minor issues, and made it apply the more ↵Gravatar wuestholz2014-07-06
| | | | advanced verification result caching even for implementations with errors.
* Add some pretty-printing, on by default. Turn off with the flag "/pretty:0"Gravatar Dan Rosén2014-06-24
| | | | | | When running boogie form the command line, this should be on by default. On the other hand, the TokenTextWriter constructors and PrintBplFile now have an argument for this, but by default it is off.
* Add isBvConst and asBvConst accessors to LiteralExpr to match theGravatar Dan Liew2014-05-28
| | | | others already present for bool, BigNum and BigDec.
* Recursive walking of Exprs doesn't play nice when the depth of the AST is high.Gravatar akashlal2014-01-07
| | | | | Reduce depth of AST whenever possible (e.g., use a binary tree instead of a linear list of terms)
* Resolved some issues with data races.Gravatar wuestholz2013-07-23
|
* All ...Seq classes now goneGravatar Ally Donaldson2013-07-22
|
* ExprSeq: farewellGravatar Ally Donaldson2013-07-22
|
* Started to remove ...Seq classesGravatar Ally Donaldson2013-07-22
|
* More refactoringGravatar Ally Donaldson2013-07-22
|
* More refactoring: PureCollections.Sequence not used anymore.Gravatar Ally Donaldson2013-07-22
|
* More refactoring towards replacing PureCollections.Sequence with ListGravatar Ally Donaldson2013-07-22
|
* Refactoring of VariableSeq and TypeSeqGravatar Ally Donaldson2013-07-22
|
* Allow attributes on procedure formals, function formals, and bound variablesGravatar Unknown2013-01-07
|