Trait

org.emmalanguage.compiler.tools

GraphTools

Related Doc: package tools

Permalink

trait GraphTools extends Common with ControlFlow

Self Type
GraphTools with Core
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. GraphTools
  2. ControlFlow
  3. CFG
  4. Common
  5. API
  6. AST
  7. Variables
  8. Values
  9. Types
  10. Trees
  11. Transversers
  12. Terms
  13. Symbols
  14. Patterns
  15. Parameters
  16. Methods
  17. Loops
  18. Bindings
  19. CommonAST
  20. AnyRef
  21. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. type =?>[-A, +B] = PartialFunction[A, B]

    Permalink

    Syntax sugar for partial functions.

    Syntax sugar for partial functions.

    Definition Classes
    CommonAST
  2. trait API extends BindingAPI with LoopAPI with MethodAPI with ParameterAPI with PatternAPI with SymbolAPI with TermAPI with TransverserAPI with TreeAPI with TypeAPI with ValueAPI with VariableAPI

    Permalink

    Virtual AST API.

    Virtual AST API.

    Definition Classes
    AST
  3. case class Attr[A, I, S](tree: scala.reflect.api.Universe.Tree, acc: A, inh: I, syn: S) extends Product with Serializable

    Permalink

    An attributed tree.

    An attributed tree.

    tree

    The tree being attributed.

    acc

    Accumulated attributes.

    inh

    Inherited attributes.

    syn

    Synthesized attributes.

    Definition Classes
    Transversers
  4. trait BackendAPI extends AnyRef

    Permalink

    Backend-specific APIs.

    Backend-specific APIs. This trait should be implemented by each backend.

    Definition Classes
    API
  5. trait BindingAPI extends AnyRef

    Permalink

    Bindings (values, variables and parameters).

    Bindings (values, variables and parameters).

    Examples
    // values
    val a = 42
    
    // variables
    var b = true
    
    // parameters
    def method(c: Char) = c
    (d: Double) => d
    abstract class A(e: Exception) { e.printStackTrace() }
    class C(f: Float) { println(f) }
    Definition Classes
    Bindings
  6. trait ClassAPI extends ReflectedSymbol[scala.reflect.api.Universe.ClassSymbol]

    Permalink
    Definition Classes
    API
  7. trait ComprehensionCombinatorsAPI extends ModuleAPI

    Permalink
    Definition Classes
    API
  8. trait ComprehensionSyntaxAPI extends ModuleAPI

    Permalink
    Definition Classes
    API
  9. trait DSCFAnnotationsAPI extends ModuleAPI

    Permalink
    Definition Classes
    API
  10. class DataBag$API extends ModuleAPI

    Permalink
    Definition Classes
    API
  11. class DataBagAPI extends ClassAPI

    Permalink
    Definition Classes
    API
  12. case class FlowGraph[V] extends Product with Serializable

    Permalink
    Definition Classes
    ControlFlow
  13. trait GraphRepresentationAPI extends ModuleAPI

    Permalink
    Definition Classes
    API
  14. class Group$API extends ModuleAPI

    Permalink
    Definition Classes
    API
  15. trait GroupAPI extends ClassAPI

    Permalink
    Definition Classes
    API
  16. trait LoopAPI extends AnyRef

    Permalink

    Loops (while and do-while).

    Loops (while and do-while).

    Definition Classes
    Loops
  17. trait ManagedAttr[A <: HList, I <: HList, S <: HList] extends (scala.reflect.api.Universe.Tree) ⇒ AST.Attr[A, I, S]

    Permalink

    Utility for managing attribute grammars.

    Utility for managing attribute grammars.

    Definition Classes
    Transversers
  18. trait Meta extends AnyRef

    Permalink

    Meta information (attachments).

    Meta information (attachments).

    Definition Classes
    CommonAST
  19. trait MethodAPI extends AnyRef

    Permalink

    Methods (defs).

    Methods (defs).

    Examples
    // definitions
    def pi = 3.14
    def greet() = println("Hello, World!")
    def nil[A] = List.empty[A]
    def pNil[A]() = println(nil[A])
    def succ(i: Int) = i + 1
    def one[A](a: A) = a :: Nil
    def add(x: Int, y: Int) = x + y
    def pair[A, B](a: A, b: B) = (a, b)
    def addCurry(x: Int)(y: Int) = x + y
    def pairCurry[A, B](a: A)(b: B) = (a, b)
    def zero[N: Numeric] = implicitly[Numeric[N]].zero
    def times2[N](n: N)(implicit N: Numeric[N]) = N.times(n, N.fromInt(2))
    
    // calls
    pi
    greet()
    nil[String]
    pNil[String]()
    succ(42)
    one[Char]('1')
    add(2, 3)
    pair[String, Double]("pi = ", 3.14)
    addCurry(2)(3)
    pairCurry[String, Double]("pi = ")(3.14)
    zero[Double]
    times2[Long](5)
    Definition Classes
    Methods
  20. trait ModuleAPI extends ReflectedSymbol[scala.reflect.api.Universe.ModuleSymbol]

    Permalink
    Definition Classes
    API
  21. class MutableBag$API extends ModuleAPI

    Permalink
    Definition Classes
    API
  22. class MutableBagAPI extends ClassAPI

    Permalink
    Definition Classes
    API
  23. trait Node extends AnyRef

    Permalink

    Common parent for all virtual AST nodes.

    Common parent for all virtual AST nodes.

    Definition Classes
    CommonAST
  24. class OpsAPI extends ComprehensionCombinatorsAPI with RuntimeAPI

    Permalink
    Definition Classes
    API
  25. trait ParameterAPI extends AnyRef

    Permalink

    (method / lambda) Parameters.

    (method / lambda) Parameters.

    Examples
    def method(c: Char) = c
    (d: Double) => d
    abstract class A(e: Exception) { e.printStackTrace() }
    class C(f: Float) { println(f) }
    Definition Classes
    Parameters
  26. trait PatternAPI extends AnyRef

    Permalink

    Patterns (for pattern matching).

    Patterns (for pattern matching).

    Definition Classes
    Patterns
  27. trait ReflectedSymbol[S <: scala.reflect.api.Universe.Symbol] extends AnyRef

    Permalink
    Definition Classes
    API
  28. trait RuntimeAPI extends ModuleAPI

    Permalink
    Definition Classes
    API
  29. case class Strategy[A <: HList, I <: HList, S <: HList](grammar: AST.AttrGrammar[A, I, S], factory: AST.Factory) extends Product with Serializable

    Permalink

    A traversal / transformation strategy.

    A traversal / transformation strategy. 4 fundamental strategies are available:

    1. Top-down continue left-to-right 2. Top-down break left-to-right 3. Bottom-up continue left-to-right 4. Bottom-up break left-to-right

    Right-to-left variants are not supported.

    Definition Classes
    Transversers
  30. trait SymbolAPI extends AnyRef

    Permalink
    Definition Classes
    Symbols
  31. trait TermAPI extends AnyRef

    Permalink
    Definition Classes
    Terms
  32. abstract class Transform[A <: HList, I <: HList, S <: HList] extends scala.reflect.api.Universe.Transformer with AST.ManagedAttr[A, I, S]

    Permalink

    An abstract transformation (default is top-down break).

    An abstract transformation (default is top-down break).

    Definition Classes
    Transversers
  33. trait TransverserAPI extends AnyRef

    Permalink

    Fluent tree traversal / transformation APIs.

    Fluent tree traversal / transformation APIs.

    Definition Classes
    Transversers
  34. abstract class Traversal[A <: HList, I <: HList, S <: HList] extends scala.reflect.api.Universe.Traverser with AST.ManagedAttr[A, I, S]

    Permalink

    An abstract traversal (default is top-down break).

    An abstract traversal (default is top-down break).

    Definition Classes
    Transversers
  35. trait TreeAPI extends AnyRef

    Permalink
    Definition Classes
    Trees
  36. trait TypeAPI extends AnyRef

    Permalink
    Definition Classes
    Types
  37. trait ValueAPI extends AnyRef

    Permalink

    Values (vals).

    Values (vals).

    Examples
    val x = 42
    println(x)
    object Math { val pi = 3.14 }
    println(Math.pi)
    ("Hello", '!')._1
    println(math.e)
    import scala.math.e
    println(e)
    Definition Classes
    Values
  38. trait VariableAPI extends AnyRef

    Permalink

    Variables (vars).

    Variables (vars).

    Examples
    var x = 42
    x = x * 2
    object Greet { var hi = "Hello" }
    println(Greet.hi + ", World!")
    // This is a `Def.Call` of the method `hi_=`, not a `Var.Mut`:
    Greet.hi = "Hola"
    Definition Classes
    Variables
  39. trait emmaAPI extends ModuleAPI

    Permalink
    Definition Classes
    API

Abstract Value Members

  1. abstract def abort(msg: String, pos: scala.reflect.api.Universe.Position = NoPosition): Nothing

    Permalink

    Raises an error and terminates compilation.

    Raises an error and terminates compilation.

    Definition Classes
    CommonAST
  2. abstract def enclosingOwner: scala.reflect.api.Universe.Symbol

    Permalink

    Returns the enclosing named entity (class, method, value, etc).

    Returns the enclosing named entity (class, method, value, etc).

    Definition Classes
    CommonAST
  3. abstract def eval[T](code: scala.reflect.api.Universe.Tree): T

    Permalink

    Evaluates a snippet of code and returns a value of type T.

    Evaluates a snippet of code and returns a value of type T. Note: this can be called on type--checked trees (as opposed to the eval method in ToolBox).

    Definition Classes
    CommonAST
  4. abstract def inferImplicit(tpe: scala.reflect.api.Universe.Type): Option[scala.reflect.api.Universe.Tree]

    Permalink

    Infers an implicit value from the enclosing context (if possible).

    Infers an implicit value from the enclosing context (if possible).

    Definition Classes
    CommonAST
  5. abstract def meta(tree: scala.reflect.api.Universe.Tree): (GraphTools.this)#Meta

    Permalink

    Returns the meta information associated with tree.

    Returns the meta information associated with tree.

    Definition Classes
    CommonAST
  6. abstract def meta(sym: scala.reflect.api.Universe.Symbol): (GraphTools.this)#Meta

    Permalink

    Returns the meta information associated with sym.

    Returns the meta information associated with sym.

    Definition Classes
    CommonAST
  7. abstract def parse(code: String): scala.reflect.api.Universe.Tree

    Permalink

    Parses a snippet of source code and returns the AST.

    Parses a snippet of source code and returns the AST.

    Definition Classes
    CommonAST
  8. abstract def pipeline(typeCheck: Boolean = false, withPre: Boolean = true, withPost: Boolean = true)(transformations: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree*): (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Combines a sequence of transformations into a pipeline with pre- and post-processing.

    Combines a sequence of transformations into a pipeline with pre- and post-processing.

    Definition Classes
    Common
  9. abstract def postProcess: Seq[(scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree]

    Permalink

    Standard pipeline suffix.

    Standard pipeline suffix. Brings a tree into a form acceptable for scalac after being transformed.

    Definition Classes
    Common
  10. abstract def preProcess: Seq[(scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree]

    Permalink

    Standard pipeline prefix.

    Standard pipeline prefix. Brings a tree into a form convenient for transformation.

    Definition Classes
    Common
  11. abstract def typeCheck(tree: scala.reflect.api.Universe.Tree, typeMode: Boolean = false): scala.reflect.api.Universe.Tree

    Permalink

    Type-checks a tree (use typeMode=true for type-trees).

    Type-checks a tree (use typeMode=true for type-trees).

    Definition Classes
    CommonAST
  12. abstract val u: Universe

    Permalink
    Definition Classes
    CommonAST
  13. abstract def warning(msg: String, pos: scala.reflect.api.Universe.Position = NoPosition): Unit

    Permalink

    Raises a compiler warning.

    Raises a compiler warning.

    Definition Classes
    CommonAST

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object API

    Permalink

    Reflection of the Emma API.

    Reflection of the Emma API.

    Definition Classes
    API
  5. object Attr extends Serializable

    Permalink
    Definition Classes
    Transversers
  6. object ControlFlow

    Permalink
    Definition Classes
    ControlFlow
  7. object CytoscapeGraphJsonProtocol extends DefaultJsonProtocol

    Permalink
  8. lazy val Flags: Set[scala.reflect.api.Universe.FlagSet]

    Permalink

    All explicit flags.

    All explicit flags.

    Definition Classes
    CommonAST
  9. lazy val FlagsNoSynthetic: Set[scala.reflect.api.Universe.FlagSet]

    Permalink
    Definition Classes
    CommonAST
  10. object GraphTools

    Permalink
  11. object Max

    Permalink

    Constant limits.

    Constant limits.

    Definition Classes
    CommonAST
  12. object UniverseImplicits

    Permalink

    Factors out the implicit objects that need to be imported from the Scala universe.

    Factors out the implicit objects that need to be imported from the Scala universe.

    Please use

    import UniverseImplicits._
    
    u.Type
    u.method

    as opposed to

    import universe._ // or import u._
    
    Type
    method

    in order to make the parts of the Emma compiler which depend on the Scala metaprogramming API explicit.

    Attributes
    protected[org.emmalanguage]
    Definition Classes
    AST
  13. object Validation

    Permalink

    Common validation helpers.

    Common validation helpers.

    Definition Classes
    Common
  14. object api extends API

    Permalink

    Virtual non-overlapping semantic AST based on Scala trees.

    Virtual non-overlapping semantic AST based on Scala trees.

    Definition Classes
    AST
  15. object are

    Permalink
    Definition Classes
    CommonAST
  16. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  17. def asSource(title: String)(tree: scala.reflect.api.Universe.Tree): String

    Permalink

    Prints tree for debugging.

    Prints tree for debugging.

    Makes a best effort to shorten the resulting source code for better readability, especially removing particular package qualifiers. Does not return parseable source code.

    title

    Useful to distinguish different printouts from each other.

    tree

    The tree to print as source code.

    returns

    The printable source code.

    Definition Classes
    AST
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  20. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  21. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  22. lazy val fixSymbolTypes: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Populates the missing types of lambda symbols in a tree.

    Populates the missing types of lambda symbols in a tree. WARN: Mutates the symbol table in place.

    Definition Classes
    AST
  23. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  24. object has

    Permalink
    Definition Classes
    CommonAST
  25. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  26. object have

    Permalink
    Definition Classes
    CommonAST
  27. def identity(typeCheck: Boolean = false): (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    The identity transformation with pre- and post-processing.

    The identity transformation with pre- and post-processing.

    Definition Classes
    Common
  28. object is

    Permalink
    Definition Classes
    CommonAST
  29. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  30. def nameClashes(tree: scala.reflect.api.Universe.Tree): Seq[scala.reflect.api.Universe.TermSymbol]

    Permalink

    Returns a sequence of symbols in tree that have clashing names.

    Returns a sequence of symbols in tree that have clashing names.

    Definition Classes
    AST
  31. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  32. lazy val normalizeStatements: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Normalizes all statements in term position by wrapping them in a block.

    Normalizes all statements in term position by wrapping them in a block.

    Definition Classes
    AST
  33. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  34. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  35. lazy val qualifyStatics: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Fully qualifies references to static symbols.

    Fully qualifies references to static symbols.

    Definition Classes
    AST
  36. lazy val removeShadowedThis: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Rewrites A.this.x as x if A is shadowed another symbol in the owner chain.

    Rewrites A.this.x as x if A is shadowed another symbol in the owner chain.

    Can be used before showCode to avoid printing invalid trees such as

    class A {
      val x = 42;
      class A {
        scala.Predef.println(A.this.x)
      }
    }
    Definition Classes
    AST
  37. lazy val resolveNameClashes: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Ensures that all definitions within tree have unique names.

    Ensures that all definitions within tree have unique names.

    Definition Classes
    AST
  38. lazy val restoreTypeTrees: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Restores u.TypeTrees with their original field set.

    Restores u.TypeTrees with their original field set.

    Definition Classes
    AST
  39. lazy val shadowedOwners: Set[scala.reflect.api.Universe.Symbol]

    Permalink

    Computes a set of owners whose name is shadowed in the current scope.

    Computes a set of owners whose name is shadowed in the current scope.

    Definition Classes
    AST
  40. lazy val stubTypeTrees: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Replaces u.TypeTrees that have their original field set with stubs that only have their tpe field set to the corresponding type.

    Replaces u.TypeTrees that have their original field set with stubs that only have their tpe field set to the corresponding type. Type-trees of val/vars are left empty for the compiler to infer.

    Definition Classes
    AST
  41. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  42. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  43. lazy val unQualifyStatics: (scala.reflect.api.Universe.Tree) ⇒ scala.reflect.api.Universe.Tree

    Permalink

    Removes the qualifiers from references to static symbols.

    Removes the qualifiers from references to static symbols.

    Definition Classes
    AST
  44. def unTypeCheck(tree: scala.reflect.api.Universe.Tree): scala.reflect.api.Universe.Tree

    Permalink

    Removes all type and symbol attributes from a tree.

    Removes all type and symbol attributes from a tree.

    Definition Classes
    CommonAST
  45. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  46. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  47. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ControlFlow

Inherited from CFG

Inherited from Common

Inherited from compiler.API

Inherited from AST

Inherited from Variables

Inherited from Values

Inherited from Types

Inherited from Trees

Inherited from Transversers

Inherited from Terms

Inherited from Symbols

Inherited from Patterns

Inherited from Parameters

Inherited from Methods

Inherited from Loops

Inherited from Bindings

Inherited from CommonAST

Inherited from AnyRef

Inherited from Any

Ungrouped