public abstract class AbstractArrayFormulaManager<TFormulaInfo,TType,TEnv,TFuncDecl> extends Object implements ArrayFormulaManager
| Modifier and Type | Field and Description |
|---|---|
protected FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> |
formulaCreator |
| Constructor and Description |
|---|
AbstractArrayFormulaManager(FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> pFormulaCreator) |
| Modifier and Type | Method and Description |
|---|---|
<TI extends Formula,TE extends Formula> |
equivalence(ArrayFormula<TI,TE> pArray1,
ArrayFormula<TI,TE> pArray2)
Make a
BooleanFormula that represents the equality of two ArrayFormula. |
protected abstract TFormulaInfo |
equivalence(TFormulaInfo pArray1,
TFormulaInfo pArray2) |
<TE extends Formula> |
getElementType(ArrayFormula<?,TE> pArray) |
protected FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> |
getFormulaCreator() |
<TI extends Formula> |
getIndexType(ArrayFormula<TI,?> pArray) |
protected abstract <TI extends Formula,TE extends Formula> |
internalMakeArray(String pName,
FormulaType<TI> pIndexType,
FormulaType<TE> pElementType) |
<TI extends Formula,TE extends Formula> |
makeArray(String pName,
FormulaType.ArrayFormulaType<TI,TE> type)
Declare a new array.
|
<TI extends Formula,TE extends Formula,FTI extends FormulaType<TI>,FTE extends FormulaType<TE>> |
makeArray(String pName,
FTI pIndexType,
FTE pElementType)
Declare a new array with exactly the given name.
|
<TI extends Formula,TE extends Formula> |
select(ArrayFormula<TI,TE> pArray,
TI pIndex)
Read a value that is stored in the array at the specified position.
|
protected abstract TFormulaInfo |
select(TFormulaInfo pArray,
TFormulaInfo pIndex) |
<TI extends Formula,TE extends Formula> |
store(ArrayFormula<TI,TE> pArray,
TI pIndex,
TE pValue)
Store a value into a cell of the specified array.
|
protected abstract TFormulaInfo |
store(TFormulaInfo pArray,
TFormulaInfo pIndex,
TFormulaInfo pValue) |
protected TType |
toSolverType(FormulaType<?> formulaType) |
protected final FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> formulaCreator
public AbstractArrayFormulaManager(FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> pFormulaCreator)
public <TI extends Formula,TE extends Formula> TE select(ArrayFormula<TI,TE> pArray, TI pIndex)
ArrayFormulaManagerselect in interface ArrayFormulaManagerpArray - The array from which to readpIndex - The position from which to readprotected abstract TFormulaInfo select(TFormulaInfo pArray, TFormulaInfo pIndex)
public <TI extends Formula,TE extends Formula> ArrayFormula<TI,TE> store(ArrayFormula<TI,TE> pArray, TI pIndex, TE pValue)
ArrayFormulaManagerstore in interface ArrayFormulaManagerpArray - The array to which to writepIndex - The position to which to writepValue - The value that should be writtenprotected abstract TFormulaInfo store(TFormulaInfo pArray, TFormulaInfo pIndex, TFormulaInfo pValue)
public <TI extends Formula,TE extends Formula> ArrayFormula<TI,TE> makeArray(String pName, FormulaType.ArrayFormulaType<TI,TE> type)
ArrayFormulaManagermakeArray in interface ArrayFormulaManagerpName - The name of the array variablepublic <TI extends Formula,TE extends Formula,FTI extends FormulaType<TI>,FTE extends FormulaType<TE>> ArrayFormula<TI,TE> makeArray(String pName, FTI pIndexType, FTE pElementType)
ArrayFormulaManagerPlease 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.
makeArray in interface ArrayFormulaManagerpIndexType - The type of the array indexpElementType - The type of the array elementsprotected abstract <TI extends Formula,TE extends Formula> TFormulaInfo internalMakeArray(String pName, FormulaType<TI> pIndexType, FormulaType<TE> pElementType)
public <TI extends Formula> FormulaType<TI> getIndexType(ArrayFormula<TI,?> pArray)
getIndexType in interface ArrayFormulaManagerpublic <TE extends Formula> FormulaType<TE> getElementType(ArrayFormula<?,TE> pArray)
getElementType in interface ArrayFormulaManagerpublic <TI extends Formula,TE extends Formula> BooleanFormula equivalence(ArrayFormula<TI,TE> pArray1, ArrayFormula<TI,TE> pArray2)
ArrayFormulaManagerBooleanFormula that represents the equality of two ArrayFormula.equivalence in interface ArrayFormulaManagerprotected abstract TFormulaInfo equivalence(TFormulaInfo pArray1, TFormulaInfo pArray2)
protected final FormulaCreator<TFormulaInfo,TType,TEnv,TFuncDecl> getFormulaCreator()
protected final TType toSolverType(FormulaType<?> formulaType)