Package org.sosy_lab.java_smt.api
Interface ArrayFormulaManager
-
- All Known Implementing Classes:
AbstractArrayFormulaManager
public interface ArrayFormulaManagerThis interface represents the theory of (arbitrarily nested) arrays. (as defined in the SMTLib2 standard)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <TI extends Formula,TE extends Formula>
BooleanFormulaequivalence(ArrayFormula<TI,TE> pArray1, ArrayFormula<TI,TE> pArray2)Make aBooleanFormulathat represents the equality of twoArrayFormula.<TE extends Formula>
FormulaType<TE>getElementType(ArrayFormula<?,TE> pArray)<TI extends Formula>
FormulaType<TI>getIndexType(ArrayFormula<TI,?> pArray)<TI extends Formula,TE extends Formula,FTI extends FormulaType<TI>,FTE extends FormulaType<TE>>
ArrayFormula<TI,TE>makeArray(String pName, FTI pIndexType, FTE pElementType)Declare a new array with exactly the given name.<TI extends Formula,TE extends Formula>
ArrayFormula<TI,TE>makeArray(String pName, FormulaType.ArrayFormulaType<TI,TE> type)Declare a new array.<TI extends Formula,TE extends Formula>
TEselect(ArrayFormula<TI,TE> pArray, TI pIndex)Read a value that is stored in the array at the specified position.<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.
-
-
-
Method Detail
-
select
<TI extends Formula,TE extends Formula> TE select(ArrayFormula<TI,TE> pArray, TI pIndex)
Read a value that is stored in the array at the specified position.- Parameters:
pArray- The array from which to readpIndex- The position from which to read- Returns:
- A formula that represents the result of the "read"
-
store
<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.- 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"
-
makeArray
<TI extends Formula,TE extends Formula,FTI extends FormulaType<TI>,FTE extends FormulaType<TE>> ArrayFormula<TI,TE> makeArray(String pName, FTI pIndexType, FTE pElementType)
Declare 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.- Parameters:
pIndexType- The type of the array indexpElementType- The type of the array elements- Returns:
- Formula that represents the array
-
makeArray
<TI extends Formula,TE extends Formula> ArrayFormula<TI,TE> makeArray(String pName, FormulaType.ArrayFormulaType<TI,TE> type)
Declare a new array.- Parameters:
pName- The name of the array variable
-
equivalence
<TI extends Formula,TE extends Formula> BooleanFormula equivalence(ArrayFormula<TI,TE> pArray1, ArrayFormula<TI,TE> pArray2)
Make aBooleanFormulathat represents the equality of twoArrayFormula.
-
getIndexType
<TI extends Formula> FormulaType<TI> getIndexType(ArrayFormula<TI,?> pArray)
-
getElementType
<TE extends Formula> FormulaType<TE> getElementType(ArrayFormula<?,TE> pArray)
-
-