| Commit message (Collapse) | Author | Age |
|
|
|
| |
Save and restore the value of Sink.RetVariable so that it doesn't get changed during the translation of a method body when new procedures end up getting declared during the translation.
|
|
|
|
| |
Support for stub methods.
|
|
|
|
| |
of an IMethodReference so it is guaranteed to know if the method is static or not and also to be able to access its parameters as IParameterDefinitions which is needed to know if they are out params or not.
|
|
|
|
|
|
| |
custom attribute [Stub], then no procedure declaration is created for it. The user must make sure to provide Boogie with a file containing the procedure declaration.
In addition, if the attribute has a string argument, [Stub("f")], then "f" is used as the nsame of the corresponding procedure instead of the encoded name computed from the method.
|
|
|
|
| |
(which is created by the heap when the initial Heap object is created). When the Sink is asked for a procedure corresponding to a method, if the method's encoded name matches any of the these procedures, then the matching procedure is returned.
|
|
|
|
|
|
|
|
| |
and Expression traversers need to have a mode that controls two things:
1. Parameters occurring in contracts are translated as the corresponding in-parameter of the corresponding procedure. Parameters occurring in method bodies are translated as the corresponding out-parameter of the corresponding procedure.
2. Method calls in method bodies are translated as call commands. Method calls in contracts are translated as function calls.
|
| |
|
|
|
|
| |
the called ctor.
|
|
|
|
|
|
| |
Added support for string literals.
Translating structs no longer crashes the translator, but on the other hand, they are just skipped and not translated...
Added a helper method to make sure that generated identifiers are Boogie-legal.
|
|
|
|
| |
Fix a problem in two of the heaps where the AST for "type Type;" wasn't getting created.
|
| |
|
|
|
|
|
| |
1. introduced ProcedureInfo for packaging up relevant information about a Procedure
2. removed the call to the code that generates the static class constructor. this is temporarily broken; have to discuss with mike
|
|
|
|
| |
initialized in instance constructors and static fields are initialized in static constructors. Added wrinkle is that compiler generates a static constructor only if it needs to, so if there isn't one, we create one.
|
| |
|
| |
|
|
|
|
|
|
| |
Ctors now initialize all fields to default (null-equivalent) values.
Generate procedures for interface methods.
Translate enums just by ignoring them and using the integers that they really are.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
now provides a way to declare a new user-defined type and to represent the expressions "typeof(T)" or "o.Type" in the BPL program using a new function $DynamicType. Added a method to the Sink so that any of the translation visitors can find or declare a new type. When an object is allocated, an assumption is generated that gives its dynamic type.
Fixed the dynamic dispatch inlining so that the $DynamicType of the object is used to decide which override to call.
|
|
|
|
|
| |
Suppress source contexts for empty statements.
Added a "whole program" option. When that is specified, then virtual calls are translated into a series of if-statements that test the dynamic type of the receiver and call the appropriate method. This is done only for subtypes that are defined in the CUA (Code Under Analysis -- which currently consists of just the one assembly being translated). [Note: currently the dynamic type is not implemented. That is next.]
|
| |
|
|
|
|
| |
Sink because a procedure needs to be created for every method called in the translated program and not just the methods defined in the assembly being translated. This means the contract provider is needed only in the sink and not by any of the traversers.
|
|
|
|
| |
attributes on the associated procedure.
|
| |
|
|
|
|
|
|
|
| |
Translate "default value" expressions.
Fix translation of non-trivial conditional expressions and added two more optimizations for trivial ones (trivial ones are where either the true branch or the false branch are constants).
Fix translation of array length expressions.
Fix translation of logical negation expressions.
|
|
|
|
| |
Make the pre- and post-conditions *not* be free contracts.
|
|
|
|
| |
general one that generates function calls for heap reads and writes so that the actual heap representation can be decided just by changing the prelude.
|
| |
|
|
|
|
|
|
|
| |
Added a new heap representation, TwoDBoxHeap.
Made method names unique (previously, overloads all shared the same procedure name). As part of that, no longer require method references to be resolved in order to generate a name.
Added a regression test for TwoDBoxHeap.
Added tests for method overloads for unique name generation.
|
|
|
|
| |
that assignments are done correctly.
|
| |
|
| |
|
|
|
|
| |
Refactored some code to make it easier to work with different heap representations.
|
| |
|
|
|
|
|
|
| |
the appropriate Heap objects.
Also added the ability to easily have access to the ASTs that result from the specific heap representation's declarations.
|
|
|
|
| |
representation is implemented as a different object.
|
|
|
|
| |
component.
|
|
|
|
| |
translate them.
|
|
|
|
| |
easily have different ways of translating the heap.
|
| |
|
|
|
|
| |
2. Added tests for array translation
|
| |
|
|
|
|
| |
ISourceLocationProvider so that we can get the closest source location even if the location we have doesn't correspond to an exact source location.
|
| |
|
|
|
|
| |
statement that has a source location.
|
| |
|
|
|
|
|
| |
Fixed bug in translation of assume statement
Added code for special handling of poirot specific calls
|
|
|
|
| |
Updated the regression input file
|
|
|
|
|
|
| |
the "this" parameter.
If a method definition is marked with an attribute whose name is "AsyncAttribute", then all calls to that method have {: async } added as an attribute on the call.
|