public final class DependencyContractImpl extends Object implements DependencyContract
Contract.OriginalVariables| Modifier and Type | Field and Description |
|---|---|
(package private) String |
baseName |
(package private) Term |
globalDefs |
(package private) int |
id |
(package private) KeYJavaType |
kjt |
(package private) String |
name |
(package private) Map<LocationVariable,? extends ProgramVariable> |
originalAtPreVars |
(package private) Map<ProgramVariable,Term> |
originalDeps |
(package private) Term |
originalMby |
(package private) ImmutableList<ProgramVariable> |
originalParamVars |
(package private) Map<LocationVariable,Term> |
originalPres |
(package private) ProgramVariable |
originalSelfVar |
(package private) KeYJavaType |
specifiedIn |
(package private) IObserverFunction |
target |
INVALID_ID| Constructor and Description |
|---|
DependencyContractImpl(String baseName,
KeYJavaType kjt,
IObserverFunction target,
KeYJavaType specifiedIn,
Map<LocationVariable,Term> pres,
Term mby,
Map<ProgramVariable,Term> deps,
ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Map<LocationVariable,? extends ProgramVariable> atPreVars)
Deprecated.
|
DependencyContractImpl(String baseName,
String name,
KeYJavaType kjt,
IObserverFunction target,
KeYJavaType specifiedIn,
Map<LocationVariable,Term> pres,
Term mby,
Map<ProgramVariable,Term> deps,
ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Map<LocationVariable,? extends ProgramVariable> atPreVars,
Term globalDefs,
int id) |
| Modifier and Type | Method and Description |
|---|---|
ContractPO |
createProofObl(InitConfig initConfig)
Returns a proof obligation to the passed contract and initConfig.
|
ProofOblInput |
createProofObl(InitConfig initConfig,
Contract contract)
Returns a proof obligation to the passed contract and initConfig.
|
ProofOblInput |
createProofObl(InitConfig initConfig,
Contract contract,
boolean addSymbolicExecutionLabel)
Returns a proof obligation to the passed contract and initConfig.
|
Term |
getAccessible(ProgramVariable heap) |
Term |
getAssignable(LocationVariable heap) |
Term |
getDep(LocationVariable heap,
boolean atPre,
ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Map<LocationVariable,? extends ProgramVariable> atPreVars,
Services services)
Returns the dependency set of the contract.
|
Term |
getDep(LocationVariable heap,
boolean atPre,
Term heapTerm,
Term selfTerm,
ImmutableList<Term> paramTerms,
Map<LocationVariable,Term> atPres,
Services services)
Returns the dependency set of the contract.
|
String |
getDisplayName()
Returns the displayed name.
|
Term |
getGlobalDefs() |
Term |
getGlobalDefs(LocationVariable heap,
Term heapTerm,
Term selfTerm,
ImmutableList<Term> paramTerms,
Services services) |
String |
getHTMLText(Services services)
Returns the contract in pretty HTML format.
|
KeYJavaType |
getKJT()
Returns the KeYJavaType representing the class/interface to which the
specification element belongs.
|
Term |
getMby() |
Term |
getMby(Map<LocationVariable,Term> heapTerms,
Term selfTerm,
ImmutableList<Term> paramTerms,
Map<LocationVariable,Term> atPres,
Services services)
Returns the measured_by clause of the contract.
|
Term |
getMby(ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Services services)
Returns the measured_by clause of the contract.
|
String |
getName()
Returns the unique internal name of the specification element.
|
Contract.OriginalVariables |
getOrigVars()
Returns the original ProgramVariables to replace them easier.
|
String |
getPlainText(Services services)
Returns the contract in pretty plain text format.
|
Term |
getPre(List<LocationVariable> heapContext,
Map<LocationVariable,Term> heapTerms,
Term selfTerm,
ImmutableList<Term> paramTerms,
Map<LocationVariable,Term> atPres,
Services services) |
Term |
getPre(List<LocationVariable> heapContext,
ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Map<LocationVariable,? extends ProgramVariable> atPreVars,
Services services) |
Term |
getPre(LocationVariable heap,
ProgramVariable selfVar,
ImmutableList<ProgramVariable> paramVars,
Map<LocationVariable,? extends ProgramVariable> atPreVars,
Services services)
Returns the precondition of the contract.
|
Term |
getPre(LocationVariable heap,
Term heapTerm,
Term selfTerm,
ImmutableList<Term> paramTerms,
Map<LocationVariable,Term> atPres,
Services services)
Returns the precondition of the contract.
|
ProofOblInput |
getProofObl(Services services)
Lookup the proof obligation belonging to the contract in the
specification repository.
|
Term |
getRequires(LocationVariable heap) |
IObserverFunction |
getTarget()
Returns the contracted function symbol.
|
private String |
getText(boolean includeHtmlMarkup,
Services services) |
String |
getTypeName()
Returns technical name for the contract type.
|
VisibilityModifier |
getVisibility()
Returns the visibility of the invariant (null for default visibility)
|
boolean |
hasMby()
Tells whether the contract contains a measured_by clause.
|
boolean |
hasSelfVar()
Checks if a self variable is originally provided.
|
int |
id()
Returns the id number of the contract.
|
String |
proofToString(Services services)
Returns a parseable String representation of the contract.
|
DependencyContract |
setID(int newId)
Returns a contract which is identical this contract except that
the id is set to the new id.
|
Contract |
setTarget(KeYJavaType newKJT,
IObserverFunction newPM)
Returns a contract which is identical to this contract except that
the KeYJavaType and IObserverFunction are set to the new values.
|
boolean |
toBeSaved()
Tells whether, on saving a proof where this contract is available, the
contract should be saved too.
|
String |
toString() |
boolean |
transactionApplicableContract() |
final String baseName
final String name
final KeYJavaType kjt
final IObserverFunction target
final KeYJavaType specifiedIn
final Map<LocationVariable,Term> originalPres
final Term originalMby
final Map<ProgramVariable,Term> originalDeps
final ProgramVariable originalSelfVar
final ImmutableList<ProgramVariable> originalParamVars
final Map<LocationVariable,? extends ProgramVariable> originalAtPreVars
final Term globalDefs
final int id
DependencyContractImpl(String baseName, String name, KeYJavaType kjt, IObserverFunction target, KeYJavaType specifiedIn, Map<LocationVariable,Term> pres, Term mby, Map<ProgramVariable,Term> deps, ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Map<LocationVariable,? extends ProgramVariable> atPreVars, Term globalDefs, int id)
@Deprecated DependencyContractImpl(String baseName, KeYJavaType kjt, IObserverFunction target, KeYJavaType specifiedIn, Map<LocationVariable,Term> pres, Term mby, Map<ProgramVariable,Term> deps, ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Map<LocationVariable,? extends ProgramVariable> atPreVars)
public String getName()
SpecificationElementgetName in interface SpecificationElementpublic int id()
Contractpublic KeYJavaType getKJT()
SpecificationElementgetKJT in interface SpecificationElementpublic IObserverFunction getTarget()
Contractpublic boolean hasMby()
Contractpublic Term getPre(LocationVariable heap, ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Map<LocationVariable,? extends ProgramVariable> atPreVars, Services services)
Contractpublic Term getPre(List<LocationVariable> heapContext, ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Map<LocationVariable,? extends ProgramVariable> atPreVars, Services services)
public Term getPre(LocationVariable heap, Term heapTerm, Term selfTerm, ImmutableList<Term> paramTerms, Map<LocationVariable,Term> atPres, Services services)
Contractpublic Term getPre(List<LocationVariable> heapContext, Map<LocationVariable,Term> heapTerms, Term selfTerm, ImmutableList<Term> paramTerms, Map<LocationVariable,Term> atPres, Services services)
public Term getRequires(LocationVariable heap)
getRequires in interface Contractpublic Term getAssignable(LocationVariable heap)
getAssignable in interface Contractpublic Term getAccessible(ProgramVariable heap)
getAccessible in interface Contractpublic Term getMby(ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Services services)
Contractpublic Term getMby(Map<LocationVariable,Term> heapTerms, Term selfTerm, ImmutableList<Term> paramTerms, Map<LocationVariable,Term> atPres, Services services)
Contractpublic String getPlainText(Services services)
ContractgetPlainText in interface Contractpublic String getHTMLText(Services services)
ContractgetHTMLText in interface Contractpublic boolean toBeSaved()
Contractpublic String proofToString(Services services)
ContractproofToString in interface Contractpublic Term getDep(LocationVariable heap, boolean atPre, ProgramVariable selfVar, ImmutableList<ProgramVariable> paramVars, Map<LocationVariable,? extends ProgramVariable> atPreVars, Services services)
Contractpublic Term getDep(LocationVariable heap, boolean atPre, Term heapTerm, Term selfTerm, ImmutableList<Term> paramTerms, Map<LocationVariable,Term> atPres, Services services)
Contractpublic Term getGlobalDefs()
getGlobalDefs in interface Contractpublic Term getGlobalDefs(LocationVariable heap, Term heapTerm, Term selfTerm, ImmutableList<Term> paramTerms, Services services)
getGlobalDefs in interface Contractpublic String getDisplayName()
SpecificationElementgetDisplayName in interface SpecificationElementpublic VisibilityModifier getVisibility()
SpecificationElementgetVisibility in interface SpecificationElementpublic boolean transactionApplicableContract()
transactionApplicableContract in interface Contractpublic final ProofOblInput createProofObl(InitConfig initConfig, Contract contract, boolean addSymbolicExecutionLabel)
ContractcreateProofObl in interface Contractpublic ProofOblInput createProofObl(InitConfig initConfig, Contract contract)
ContractcreateProofObl in interface Contractpublic final ContractPO createProofObl(InitConfig initConfig)
ContractcreateProofObl in interface Contractpublic ProofOblInput getProofObl(Services services)
ContractgetProofObl in interface Contractpublic DependencyContract setID(int newId)
Contractpublic Contract setTarget(KeYJavaType newKJT, IObserverFunction newPM)
Contractpublic String getTypeName()
ContractgetTypeName in interface Contractpublic boolean hasSelfVar()
ContracthasSelfVar in interface Contracttrue self variable is originally provided,
false no self variable available.public Contract.OriginalVariables getOrigVars()
ContractgetOrigVars in interface Contract