Interface SymbolicTypeFactory

All Known Implementing Classes:
CommonSymbolicTypeFactory

public interface SymbolicTypeFactory
A factory used to produce SymbolicTypes and other related objects.
  • Method Details

    • setExpressionComparator

      void setExpressionComparator(Comparator<SymbolicExpression> c)
      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

      SymbolicTypeSequence sequence(Iterable<? extends SymbolicType> elements)
      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

      SymbolicTypeSequence sequence(SymbolicType[] elements)
      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

      SymbolicTypeSequence singletonSequence(SymbolicType type)
      Creates a SymbolicTypeSequence of 1 element that has a SymbolicType
      Parameters:
      type - any SymbolicType
      Returns:
      a SymbolicTypeSequence that contains one element only.
    • arrayType

      SymbolicArrayType arrayType(SymbolicType elementType)
      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

      SymbolicCompleteArrayType arrayType(SymbolicType elementType, NumericExpression extent)
      Creates a SymbolicCompleteArrayType
      Parameters:
      elementType - the type of elements in the array
      extent - the length of the array as a NumericExpression
      Returns:
      a SymbolicCompleteArrayType of length extent and type elementType
    • tupleType

      SymbolicTupleType tupleType(StringObject name, SymbolicTypeSequence fieldTypes)
      Creates a SymbolicTupleType
      Parameters:
      name - the name of the SymbolicTupleType
      fieldTypes - a finite, ordered typeSequence
      Returns:
      a SymbolicTupleType that contains a name and fieldTypes as typeSequence
    • unionType

      SymbolicUnionType unionType(StringObject name, SymbolicTypeSequence memberTypes)
      Creates a SymbolicUnionType
      Parameters:
      name - the name of the unionType
      memberTypes - a typeSequence of the elements in the UnionType
      Returns:
      a SymbolicUnionType that contains a name and a memberTypes.
    • functionType

      SymbolicFunctionType functionType(SymbolicTypeSequence inputTypes, SymbolicType outputType)
      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

      SymbolicSetType setType(SymbolicType elementType)
    • mapType

      SymbolicMapType mapType(SymbolicType keyType, SymbolicType valueType)
    • uninterpretedType

      SymbolicUninterpretedType uninterpretedType(StringObject name)
      Returns an uninterpreted type which is an instance of SymbolicUninterpretedType.
      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

      SymbolicType 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)
      Parameters:
      type -
      Returns:
      the pure type of the type
    • entryType

      SymbolicTupleType entryType(SymbolicMapType mapType)