Package edu.udel.cis.vsl.sarl.type.IF
Interface SymbolicTypeFactory
- All Known Implementing Classes:
CommonSymbolicTypeFactory
public interface SymbolicTypeFactory
A factory used to produce
SymbolicType
s and other related objects.-
Method Summary
Modifier and TypeMethodDescriptionarrayType
(SymbolicType elementType) Creates a SymbolicArrayType that has elements of type elementTypearrayType
(SymbolicType elementType, NumericExpression extent) Creates a SymbolicCompleteArrayTypeboundedIntegerType
(NumericExpression min, NumericExpression max, boolean cyclic) entryType
(SymbolicMapType mapType) functionType
(SymbolicTypeSequence inputTypes, SymbolicType outputType) Creates a SymbolicFunctionType, which represents an abstract mathematical functionvoid
init()
Initializes the factory; should be called only after the comparators have all been linked.mapType
(SymbolicType keyType, SymbolicType valueType) pureType
(SymbolicType type) The pureType of t1 is t1 after removing the length for example, CommonSymbolicCompleteArrayType(type1) should have the same pureType as CommonSymbolicArrayType(type1)realType()
sequence
(SymbolicType[] elements) Creates a SymbolicTypeSequecne from an array of SymbolicTypesequence
(Iterable<? extends SymbolicType> elements) Creates a SymbolicTypeSequence from a list of SymbolicTypesvoid
setting the way you want to comparator to compare two expressions used when comparing CompleteArrayTypesetType
(SymbolicType elementType) Creates a SymbolicTypeSequence of 1 element that has a SymbolicTypetupleType
(StringObject name, SymbolicTypeSequence fieldTypes) Creates a SymbolicTupleTypeCreates a TypeComparator that is used to compare SymbolicTypesReturns an uninterpreted type which is an instance ofSymbolicUninterpretedType
.unionType
(StringObject name, SymbolicTypeSequence memberTypes) Creates a SymbolicUnionType
-
Method Details
-
setExpressionComparator
setting the way you want to comparator to compare two expressions used when comparing CompleteArrayType- Parameters:
c
- used to compare
-
init
void init()Initializes the factory; should be called only after the comparators have all been linked. Precondition: the object factory has already been initialized. -
objectFactory
ObjectFactory objectFactory()- Returns:
- an object factory of the type factory
-
booleanType
SymbolicType booleanType()- Returns:
- a booleanType from the factory
-
integerType
SymbolicIntegerType integerType()- Returns:
- a SymbolicIntegerType from the factory of objects
-
herbrandIntegerType
SymbolicIntegerType herbrandIntegerType()- Returns:
- a SymbolicIntegerType that has a herbrand kind.
-
boundedIntegerType
SymbolicIntegerType boundedIntegerType(NumericExpression min, NumericExpression max, boolean cyclic) - Parameters:
min
-max
-cyclic
-- Returns:
- a SymbolicIntegerType
-
realType
SymbolicRealType realType()- Returns:
- a real type of kind ideal.
-
herbrandRealType
SymbolicRealType herbrandRealType()- Returns:
- a herbrand real type from the factory
-
characterType
SymbolicType characterType()- Returns:
- a primitive type of kind char.
-
sequence
Creates a SymbolicTypeSequence from a list of SymbolicTypes- Parameters:
elements
- a non-null
list of elements can be of any type that extends SymbolicType.- Returns:
- a symbolic type sequence for any SymbolicType elements.
-
sequence
Creates a SymbolicTypeSequecne from an array of SymbolicType- Parameters:
elements
- array of any length of any SymbolicType, e.g. integer, real, primitve, array, ...- Returns:
- a SymbolicTypeSequence for the elements in the array.
-
singletonSequence
Creates a SymbolicTypeSequence of 1 element that has a SymbolicType- Parameters:
type
- any SymbolicType- Returns:
- a SymbolicTypeSequence that contains one element only.
-
arrayType
Creates a SymbolicArrayType that has elements of type elementType- Parameters:
elementType
- any SymbolicType that represents that type of the SymbolicArrayType- Returns:
- an SymbolicArrayType of elements of type elementType.
-
arrayType
Creates a SymbolicCompleteArrayType- Parameters:
elementType
- the type of elements in the arrayextent
- the length of the array as a NumericExpression- Returns:
- a SymbolicCompleteArrayType of length extent and type elementType
-
tupleType
Creates a SymbolicTupleType- Parameters:
name
- the name of the SymbolicTupleTypefieldTypes
- a finite, ordered typeSequence- Returns:
- a SymbolicTupleType that contains a name and fieldTypes as typeSequence
-
unionType
Creates a SymbolicUnionType- Parameters:
name
- the name of the unionTypememberTypes
- a typeSequence of the elements in the UnionType- Returns:
- a SymbolicUnionType that contains a name and a memberTypes.
-
functionType
Creates a SymbolicFunctionType, which represents an abstract mathematical function- Parameters:
inputTypes
- a SymbolicTypeSequence of SymbolicTypes.outputType
- a SymbolicType that represents the output of the function- Returns:
- a SymbolicFunctionType of sequence inputTypes and outputType.
-
setType
-
mapType
-
uninterpretedType
Returns an uninterpreted type which is an instance ofSymbolicUninterpretedType
.- Parameters:
name
- the name of the returning uninterpreted type- Returns:
- an instance of
SymbolicUninterpretedType
whose name is the given String.
-
typeComparator
TypeComparator typeComparator()Creates a TypeComparator that is used to compare SymbolicTypes- Returns:
- a typeComparator to compare two symbolic types
-
typeSequenceComparator
TypeSequenceComparator typeSequenceComparator()- Returns:
- typeSequenceComparator that is used when comparing two symbolic Tuple, Union, or Function types
-
pureType
The pureType of t1 is t1 after removing the length for example, CommonSymbolicCompleteArrayType(type1) should have the same pureType as CommonSymbolicArrayType(type1)- Parameters:
type
-- Returns:
- the pure type of the type
-
entryType
-