Class StandardTypes

java.lang.Object
edu.udel.cis.vsl.abc.ast.IF.StandardTypes

public class StandardTypes extends Object
The class collects together the standard type definitions, e.g., size_t, ptrdiff_t, etc. It provides methods to get the set of all names of these types, to get the a list of artificially created typedefs for the types, and to add those typedefs to a scope. The reason for all of this is to provide an easy way to ignore typedefs in the standard header files and instead use the symbolic versions of these types provided by the type factory.
  • Field Details

  • Constructor Details

  • Method Details

    • addToScope

      public void addToScope(Scope scope) throws UnsourcedException
      Adds typdefs for all of the standard types to the given scope (usually the file scope). Each type name is defined to be the type returned by the type factory with the corresponding name.
      Parameters:
      scope - a static program scope
      Throws:
      UnsourcedException - if any typedefs with same name are already in the scope
    • getStandardTypeNames

      public Collection<String> getStandardTypeNames()
      Returns the names as a collection.
      Returns:
      set of names of standard types
    • getStandardTypedefs

      public List<Typedef> getStandardTypedefs()
      Returns the list of typedefs.
      Returns:
      list of standard typedefs
    • isCollateStateType

      public boolean isCollateStateType(Type type)
      Is the given type a $collate_state type?
      Parameters:
      type -
      Returns: