Packages

  • package root
    Definition Classes
    root
  • package IVF

    This project is built over the following components

    This project is built over the following components

    • IVF.Model : contains abstract syntax trees and control flow graphs, enables to execute code
    • IVF.Criterion : defines criterion and coverage, useful to test a given program on predefined states set with a criterion
    • IVF.TestGenerator : enables to generate automatically tests from criteria
    Definition Classes
    root
  • package Model

    Contains models necessary to run tests

    Contains models necessary to run tests

    Definition Classes
    IVF
  • package AST

    Contains abstract syntax tree definitions

    Contains abstract syntax tree definitions

    Definition Classes
    Model
    See also

    IVF.Model.AST

  • AST
  • CFG
  • State

case class CFG(graph: GraphType, labels: Map[Int, Command]) extends Product with Serializable

Describes a control flow graph

Contains a graph with integer labels and labeled directed edges

Each node corresponds to an AST stored in a

Map[Int, AST.Command]
graph

the scala graph containing integers

labels

map from int label to AST

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CFG
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CFG(graph: GraphType, labels: Map[Int, Command])

    graph

    the scala graph containing integers

    labels

    map from int label to AST

Type Members

  1. class CFGTraverser extends Traversable[scalax.collection.Graph.NodeT]

    An easy way to traverse a cfg execution and apply Traversable methods

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def backwardPathBuilderAux[P](label: Int, path: Vector[Int], i: Int, loopStates: Map[Int, Int], param: P, lambda: (Int, P, Vector[Int]) ⇒ (Option[Set[Vector[Int]]], P)): Set[Vector[Int]]

    Recursive function used to build paths from a source in the backward direction

    Recursive function used to build paths from a source in the backward direction

    Automatically returns the full path when arriving to graph start (note: place a skip as first instruction if you don't want some criterion to fail) Automatically returns no path when the maximum number of loops is exceeded

    P

    lambda parameter and return type

    label

    the current / start node

    path

    the path built from source to current node

    i

    the maximum loop execution number

    loopStates

    loop states (for each loop node id, the number of times we already went through the loop)

    param

    a generic parameter to give to lambda

    lambda

    the stop condition (to implement a given condition. Must return Some(path) if the path is finished, None if we let the exploration continue and the next generic parameter to use for next step

    returns

    a set of all the paths found matching stop condition

    Example:
    1. if you want to stop the graph exploration when you find a ref node for a variable A

      def lambda(node, A, path) =
          if(cfg.getAST(node).isDef(A))
              Some((path, A))
          else
              None
      
      backwardPathBuilderAux(0,
                            Vector(0),
                            1,
                            cfg.emptyLoopStates,
                            AST.A.Variable("X"),
                            lambda)

      here the generic type can be IVF.Model.AST.A.Expression.Variable

  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def emptyLoopStates: Map[Int, Int]

    Provides valid starting loop states required in IVF.Model.CFG.forwardPathBuilderAux and IVF.Model.CFG.backwardPathBuilderAux

    Provides valid starting loop states required in IVF.Model.CFG.forwardPathBuilderAux and IVF.Model.CFG.backwardPathBuilderAux

    returns

    initial loop states

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def exec(label: Int, state: State): CFGTraverser

    Shorthand for IVF.Model.CFG.CFGTraverser

    label

    label to start the execution at

    state

    state used at the beginning of the execution

  10. def extend(cfg2: CFG): CFG

    Returns a new CFG made of this extended with a new CFG

    Returns a new CFG made of this extended with a new CFG

    cfg2

    the CFG to merge

  11. def extend(graph2: GraphType, labels2: Map[Int, Command]): CFG

    Returns a new CFG made of this extended with a new graph and some new labels

    Returns a new CFG made of this extended with a new graph and some new labels

    graph2

    the graph to merge

    labels2

    the labels to merge

  12. def fillPathUp(path: Vector[Int], maxLoopExec: Int): Vector[Vector[Int]]

    Offers all possible paths from a source to a subpath

    Offers all possible paths from a source to a subpath

    path

    the subpath to fulfill up

    maxLoopExec

    the maximum execution number of each loop during computation

  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. def forwardPathBuilderAux[P](label: Int, path: Vector[Int], i: Int, loopStates: Map[Int, Int], param: P, lambda: (Int, P, Vector[Int]) ⇒ (Option[Set[Vector[Int]]], P)): Set[Vector[Int]]

    Recursive function used to build paths from a source in the forward direction

    Recursive function used to build paths from a source in the forward direction

    Automatically returns the full path when arriving to graph end Automatically returns no path when the maximum number of loops is exceeded

    P

    lambda parameter and return type

    label

    the current / start node

    path

    the path built from source to current node

    i

    the maximum loop execution number

    loopStates

    loop states (for each loop node id, the number of times we already went through the loop)

    param

    a generic parameter to give to lambda

    lambda

    the stop condition (to implement a given condition. Must return Some(path) if the path is finished, None if we let the exploration continue and the next generic parameter to use for next step

    returns

    a set of all the paths found matching stop condition

    Example:
    1. if you want to stop the graph exploration when you find a ref node for a variable A

      def lambda(node, A, path) =
          if(cfg.getAST(node).isDef(A))
              Some((path, A))
          else
              None
      
      forwardPathBuilderAux(0,
                            Vector(0),
                            1,
                            cfg.emptyLoopStates,
                            AST.A.Variable("X"),
                            lambda)

      here the generic type can be IVF.Model.AST.A.Expression.Variable

  15. def getAST(label: Int): AST

    Returns the AST located at a given label

    Returns the AST located at a given label

    label

    label

  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. val graph: GraphType
  18. def graphOp(op: (GraphType) ⇒ GraphType): CFG

    Returns a new CFG whose graph is changed by the lambda given

    Returns a new CFG whose graph is changed by the lambda given

    op

    transforms the graph

  19. def isAssign(label: Int): Boolean

    Checks if a node is an Assign AST

    Checks if a node is an Assign AST

    label

    node

  20. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  21. def isWhile(label: Int): Boolean

    Checks if a node is a While AST

    Checks if a node is a While AST

    label

    node

  22. val labels: Map[Int, Command]
  23. def mapOp(op: (Map[Int, Command]) ⇒ Map[Int, Command]): CFG

    Returns a new CFG whose labels are changed by the lambda given

    Returns a new CFG whose labels are changed by the lambda given

    op

    transforms the labels

  24. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  25. def next(source: Int, path: String): Option[Int]

    Finds the next step in graph execution

    Finds the next step in graph execution

    source

    the current node

    path

    if several paths are available, then this is necessary to choose the path ("" or "true" or "false")

    returns

    Some(Int) if a path is found None else

  26. def nodeToString(i: Int): String

    Get the first line of an AST for graph display

    Get the first line of an AST for graph display

    i

    label

  27. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  28. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  29. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped