Package org.sosy_lab.java_smt.basicimpl
Class AbstractArrayFormulaManager<TFormulaInfo,TType,TEnv,TFuncDecl>
java.lang.Object
org.sosy_lab.java_smt.basicimpl.AbstractArrayFormulaManager<TFormulaInfo,TType,TEnv,TFuncDecl>
- All Implemented Interfaces:
ArrayFormulaManager
public abstract class AbstractArrayFormulaManager<TFormulaInfo,TType,TEnv,TFuncDecl>
extends Object
implements ArrayFormulaManager
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final FormulaCreator<TFormulaInfo,TType, TEnv, TFuncDecl> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractArrayFormulaManager(FormulaCreator<TFormulaInfo, TType, TEnv, TFuncDecl> pFormulaCreator) -
Method Summary
Modifier and TypeMethodDescription<TI extends Formula,TE extends Formula>
BooleanFormulaequivalence(ArrayFormula<TI, TE> pArray1, ArrayFormula<TI, TE> pArray2) Make aBooleanFormulathat represents the equality of twoArrayFormula.protected abstract TFormulaInfoequivalence(TFormulaInfo pArray1, TFormulaInfo pArray2) <TE extends Formula>
FormulaType<TE>getElementType(ArrayFormula<?, TE> pArray) protected final FormulaCreator<TFormulaInfo,TType, TEnv, TFuncDecl> <TI extends Formula>
FormulaType<TI>getIndexType(ArrayFormula<TI, ?> pArray) protected abstract <TI extends Formula,TE extends Formula>
TFormulaInfointernalMakeArray(String pName, FormulaType<TI> pIndexType, FormulaType<TE> pElementType) protected abstract <TI extends Formula,TE extends Formula>
TFormulaInfointernalMakeArray(FormulaType<TI> pIndexType, FormulaType<TE> pElementType, TFormulaInfo defaultElement) <TI extends Formula,TE extends Formula, FTI extends FormulaType<TI>, FTE extends FormulaType<TE>>
ArrayFormula<TI,TE> makeArray(FTI pIndexType, FTE pElementType, TE defaultElement) Create a new array constant with values initialized to defaultElement.<TI extends Formula,TE extends Formula, FTI extends FormulaType<TI>, FTE extends FormulaType<TE>>
ArrayFormula<TI,TE> Declare a new array with exactly the given name.select(ArrayFormula<TI, TE> pArray, TI pIndex) Read a value that is stored in the array at the specified position.protected abstract TFormulaInfoselect(TFormulaInfo pArray, TFormulaInfo pIndex) <TI extends Formula,TE extends Formula>
ArrayFormula<TI,TE> store(ArrayFormula<TI, TE> pArray, TI pIndex, TE pValue) Store a value into a cell of the specified array.protected abstract TFormulaInfostore(TFormulaInfo pArray, TFormulaInfo pIndex, TFormulaInfo pValue) protected final TTypetoSolverType(FormulaType<?> formulaType) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.sosy_lab.java_smt.api.ArrayFormulaManager
makeArray, makeArray
-
Field Details
-
formulaCreator
-
-
Constructor Details
-
AbstractArrayFormulaManager
protected AbstractArrayFormulaManager(FormulaCreator<TFormulaInfo, TType, TEnv, TFuncDecl> pFormulaCreator)
-
-
Method Details
-
select
Description copied from interface:ArrayFormulaManagerRead a value that is stored in the array at the specified position.- Specified by:
selectin interfaceArrayFormulaManager- Parameters:
pArray- The array from which to readpIndex- The position from which to read- Returns:
- A formula that represents the result of the "read"
-
select
-
store
public <TI extends Formula,TE extends Formula> ArrayFormula<TI,TE> store(ArrayFormula<TI, TE> pArray, TI pIndex, TE pValue) Description copied from interface:ArrayFormulaManagerStore a value into a cell of the specified array.- Specified by:
storein interfaceArrayFormulaManager- Parameters:
pArray- The array to which to writepIndex- The position to which to writepValue- The value that should be written- Returns:
- A formula that represents the "write"
-
store
protected abstract TFormulaInfo store(TFormulaInfo pArray, TFormulaInfo pIndex, TFormulaInfo pValue) -
makeArray
public <TI extends Formula,TE extends Formula, ArrayFormula<TI,FTI extends FormulaType<TI>, FTE extends FormulaType<TE>> TE> makeArray(String pName, FTI pIndexType, FTE pElementType) Description copied from interface:ArrayFormulaManagerDeclare a new array with exactly the given name.Please make sure that the given name is valid in SMT-LIB2. Take a look at
FormulaManager.isValidName(java.lang.String)for further information.This method does not quote or unquote the given name, but uses the plain name "AS IS".
Formula.toString()can return a different String than the given one.- Specified by:
makeArrayin interfaceArrayFormulaManagerpIndexType- The type of the array indexpElementType- The type of the array elements
-
makeArray
public <TI extends Formula,TE extends Formula, ArrayFormula<TI,FTI extends FormulaType<TI>, FTE extends FormulaType<TE>> TE> makeArray(FTI pIndexType, FTE pElementType, TE defaultElement) Description copied from interface:ArrayFormulaManagerCreate a new array constant with values initialized to defaultElement.- Specified by:
makeArrayin interfaceArrayFormulaManagerdefaultElement- The default value of all entries in the array.
-
internalMakeArray
protected abstract <TI extends Formula,TE extends Formula> TFormulaInfo internalMakeArray(String pName, FormulaType<TI> pIndexType, FormulaType<TE> pElementType) -
internalMakeArray
protected abstract <TI extends Formula,TE extends Formula> TFormulaInfo internalMakeArray(FormulaType<TI> pIndexType, FormulaType<TE> pElementType, TFormulaInfo defaultElement) -
getIndexType
- Specified by:
getIndexTypein interfaceArrayFormulaManager
-
getElementType
- Specified by:
getElementTypein interfaceArrayFormulaManager
-
equivalence
public <TI extends Formula,TE extends Formula> BooleanFormula equivalence(ArrayFormula<TI, TE> pArray1, ArrayFormula<TI, TE> pArray2) Description copied from interface:ArrayFormulaManagerMake aBooleanFormulathat represents the equality of twoArrayFormula.- Specified by:
equivalencein interfaceArrayFormulaManager
-
equivalence
-
getFormulaCreator
-
toSolverType
-