- All Superinterfaces:
Sourceable
This represents a block of ACSL contract for a function.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumContractKind: This kind is used to denotes all kinds of contracts. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd anMPICollectiveBehaviorvoidaddNamedBehavior(NamedFunctionBehavior behavior) Adds a named behavior to the function.Returns the default behavior of the function.getBehavior(String name) returns the behavior with the given name; null if no such behavior exists.Returns aIteratorof a set ofMPICollectiveBehaviors.guard()Returns the guard of the function.booleanis there assigns clause in this contract?booleanis there depends clause in this contract?booleanAn efficient mark to indicate weather theFunctionContracthas MPI waits-for.booleanis there reads clause in this contract?booleanis there any requirements or ensurances ?booleanisPure()Does the contract containspureclause?Returns the named behaviors of the function.intReturns the number ofMPICollectiveBehaviors.voidprint(String prefix, PrintStream out, boolean isDebug) prints this function contractscope()The static scope in which the function contract exists.voidsetDefaultBehavior(FunctionBehavior behavior) Sets the default behavior of the function.voidsetGuard(Expression expression) Sets the guard of the function.voidsetHasMPIWaitsfor(boolean hasWaitsfor) Set the efficient mark to tell if the function contracts has MPI waits-fors.voidsetPure(boolean value) Updates the contract to denote if it containspureclause.Methods inherited from interface dev.civl.mc.model.IF.Sourceable
getSource, setCIVLSource
-
Method Details
-
defaultBehavior
FunctionBehavior defaultBehavior()Returns the default behavior of the function.- Returns:
-
namedBehaviors
Iterable<NamedFunctionBehavior> namedBehaviors()Returns the named behaviors of the function.- Returns:
-
guard
Expression guard()Returns the guard of the function.- Returns:
-
isPure
boolean isPure()Does the contract containspureclause?- Returns:
-
setPure
void setPure(boolean value) Updates the contract to denote if it containspureclause.- Parameters:
value-
-
setGuard
Sets the guard of the function.- Parameters:
expression-
-
setDefaultBehavior
Sets the default behavior of the function.- Parameters:
behavior-
-
addNamedBehavior
Adds a named behavior to the function.- Parameters:
behavior-
-
addMPICollectiveBehavior
Add anMPICollectiveBehavior- Parameters:
behavior-
-
getMPIBehaviors
Iterable<MPICollectiveBehavior> getMPIBehaviors()Returns aIteratorof a set ofMPICollectiveBehaviors.- Returns:
-
getBehavior
returns the behavior with the given name; null if no such behavior exists.- Parameters:
name-- Returns:
-
print
prints this function contract- Parameters:
prefix-out-isDebug-
-
hasReadsClause
boolean hasReadsClause()is there reads clause in this contract?- Returns:
-
hasAssignsClause
boolean hasAssignsClause()is there assigns clause in this contract?- Returns:
-
hasDependsClause
boolean hasDependsClause()is there depends clause in this contract?- Returns:
-
hasRequirementsOrEnsurances
boolean hasRequirementsOrEnsurances()is there any requirements or ensurances ?- Returns:
-
numMPICollectiveBehaviors
int numMPICollectiveBehaviors()Returns the number ofMPICollectiveBehaviors.- Returns:
-
hasMPIWaitsfor
boolean hasMPIWaitsfor()An efficient mark to indicate weather theFunctionContracthas MPI waits-for.- Returns:
-
setHasMPIWaitsfor
void setHasMPIWaitsfor(boolean hasWaitsfor) Set the efficient mark to tell if the function contracts has MPI waits-fors.- Parameters:
hasWaitsfor-
-
scope
Scope scope()The static scope in which the function contract exists. Not necessarily the same as the function definition's parameter scope, because the contract may have been associated with a function prototype.- Returns:
- scope in which contract exists
-