Property | Type | Description |
---|
Method | Description | |
---|---|---|
Dispatch ( ICodeAndContractVisitor visitor ) : void |
Calls visitor.Visit(IMethodContract).
|
|
MakeCopyFor ( BlockStatement containingBlock ) : MethodContract |
Makes a copy of this contract, changing the containing block to the given block.
|
|
MethodContract ( ) : System.Collections.Generic |
Allocates an empty method contract that indicates that the method body must be inlined.
|
|
MethodContract ( IEnumerable |
Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.
|
|
MethodContract ( IEnumerable |
Allocates a collection of collections of objects that augment the type signature of a method with additional information that describes the contract between calling method and called method. This constructor omits termination checking, for backwards compatability, but should probably be depricated.
|
|
SetContainingBlock ( BlockStatement containingBlock ) : void |
Completes the two stage construction of this object. This allows bottom up parsers to construct an Expression before constructing the containing Expression. This method should be called once only and must be called before this object is made available to client code. The construction code itself should also take care not to call any other methods or property/event accessors on the object until after this method has been called.
|
Method | Description | |
---|---|---|
CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool |
Checks for errors and return true if any are found.
|
|
MethodContract ( MethodContract template ) : System.Collections.Generic |
A copy constructor that allocates an instance that is the same as the given template.
|
protected CheckForErrorsAndReturnTrueIfAnyAreFound ( ) : bool | ||
return | bool |
public Dispatch ( ICodeAndContractVisitor visitor ) : void | ||
visitor | ICodeAndContractVisitor | |
return | void |
public MakeCopyFor ( BlockStatement containingBlock ) : MethodContract | ||
containingBlock | BlockStatement | |
return | MethodContract |
public MethodContract ( ) : System.Collections.Generic | ||
return | System.Collections.Generic |
public MethodContract ( IEnumerable |
||
allocates | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that are newly allocated by a call to the method. |
frees | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that are freed by a call to the method. |
modifiedVariables | IEnumerable |
A possibly empty or null list of target expressions (variables) that are modified by the called method. |
postconditions | IEnumerable |
A possibly empty or null list of postconditions that are established by the called method. |
preconditions | IEnumerable |
A possibly empty list of preconditions that must be established by the calling method. |
reads | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that may be read by the called method. |
thrownExceptions | IEnumerable |
A possibly empty or null list of exceptions that may be thrown (or passed on) by the called method. |
writes | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that may be written to by the called method. |
isPure | bool | True if the method has no observable side-effect on program state and hence this method is safe to use in a contract, which may or may not be executed, depending on how the program has been compiled. |
return | System.Collections.Generic |
public MethodContract ( IEnumerable |
||
allocates | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that are newly allocated by a call to the method. |
frees | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that are freed by a call to the method. |
modifiedVariables | IEnumerable |
A possibly empty or null list of target expressions (variables) that are modified by the called method. |
postconditions | IEnumerable |
A possibly empty or null list of postconditions that are established by the called method. |
preconditions | IEnumerable |
A possibly empty list of preconditions that must be established by the calling method. |
reads | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that may be read by the called method. |
thrownExceptions | IEnumerable |
A possibly empty or null list of exceptions that may be thrown (or passed on) by the called method. |
writes | IEnumerable |
A possibly empty list of expressions that each represents a set of memory locations that may be written to by the called method. |
isPure | bool | True if the method has no observable side-effect on program state and hence this method is safe to use in a contract, which may or may not be executed, depending on how the program has been compiled. |
variants | IEnumerable |
A possibly empty list of variants, each of which is decreased in each call from the method. |
return | System.Collections.Generic |
protected MethodContract ( MethodContract template ) : System.Collections.Generic | ||
template | MethodContract | The template to copy. |
return | System.Collections.Generic |
public SetContainingBlock ( BlockStatement containingBlock ) : void | ||
containingBlock | BlockStatement | |
return | void |