Packages

c

tip.analysis

TypeAnalysis

class TypeAnalysis extends DepthFirstAstVisitor[Unit] with Analysis[TypeData]

Unification-based type analysis. The analysis associates a tip.types.Type with each variable declaration and expression node in the AST. It is implemented using tip.solvers.UnionFindSolver.

To novice Scala programmers: The parameter declData is declared as "implicit", which means that invocations of TypeAnalysis obtain its value implicitly: The call to new TypeAnalysis in Tip.scala does not explicitly provide this parameter, but it is in scope of implicit val declData: TypeData = new DeclarationAnalysis(programNode).analyze(). The TIP implementation uses implicit parameters many places to provide easy access to the declaration information produced by DeclarationAnalysis and the type information produced by TypeAnalysis. For more information about implicit parameters in Scala, see https://docs.scala-lang.org/tour/implicit-parameters.html.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. TypeAnalysis
  2. Analysis
  3. DepthFirstAstVisitor
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new TypeAnalysis(program: AProgram)(implicit declData: DeclarationData)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. implicit val allFieldNames: List[String]
  5. def analyze(): TypeData

    Performs the analysis and returns the result.

    Performs the analysis and returns the result.

    Definition Classes
    TypeAnalysisAnalysis
  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @IntrinsicCandidate()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. val log: Logger
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  17. val solver: UnionFindSolver[Type]
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. def visit(node: AstNode, arg: Unit): Unit

    Generates the constraints for the given sub-AST.

    Generates the constraints for the given sub-AST.

    node

    the node for which it generates the constraints

    arg

    unused for this visitor

    Definition Classes
    TypeAnalysisDepthFirstAstVisitor
  21. def visitChildren(node: AstNode, arg: Unit): Unit

    Recursively perform the visit to the sub-node of the passed node, passing the provided argument.

    Recursively perform the visit to the sub-node of the passed node, passing the provided argument.

    node

    the node whose children need to be visited

    arg

    the argument to be passed to all sub-nodes

    Definition Classes
    DepthFirstAstVisitor
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] ) @Deprecated
    Deprecated

Inherited from Analysis[TypeData]

Inherited from DepthFirstAstVisitor[Unit]

Inherited from AnyRef

Inherited from Any

Ungrouped