Packages

t

org.kiama.util

CompilerBase

trait CompilerBase[T, C <: Config] extends Profiler

Trait to provide basic functionality for a compiler-like program constructed from phases, including profiling and timing support. T is the type of the syntax tree communicated from the parser to the main processing of the compiler. C is the type of the configuration.

Source
Compiler.scala
Linear Supertypes
Profiler, bitbucket.inkytonik.dsprofile.Profiler, Values, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CompilerBase
  2. Profiler
  3. Profiler
  4. Values
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Record extends Product with Serializable
    Definition Classes
    Values
  2. case class Child (i: Int) extends Step with Product with Serializable

    A step to child i of the current node, counting from zero.

    A step to child i of the current node, counting from zero.

    Definition Classes
    Profiler
  3. case class Dep (step: Step, tipe: Value, attribute: Value) extends Product with Serializable

    Dependence record saying that the source attribute depends on attribute of a node with type type that is the given step away.

    Dependence record saying that the source attribute depends on attribute of a node with type type that is the given step away.

    Definition Classes
    Profiler
  4. abstract class Step extends AnyRef

    A single step in the evaluation of an attribute.

    A single step in the evaluation of an attribute.

    Definition Classes
    Profiler

Abstract Value Members

  1. abstract def createConfig(args: Seq[String], output: Emitter = new OutputEmitter, error: Emitter = new ErrorEmitter): C

    Create the configuration for a particular run of the compiler.

    Create the configuration for a particular run of the compiler. If supplied, use emitter instead of a standard output emitter.

  2. abstract def makeast(reader: Reader, filename: String, config: C): Either[T, String]

    Make an AST from the file with the given name, returning it wrapped in Left.

    Make an AST from the file with the given name, returning it wrapped in Left. Returns Right with an error message if an AST cannot be made. config provides access to all aspects of the configuration.

Concrete 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 checkFor(record: Record, dim: Dimension, eventtype: String, needed: Dimension)(f: (Value) ⇒ Value): Value
    Definition Classes
    Values
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def dimValue(record: Record, dim: Dimension): Value

    Support Kiama-specific profiling dimensions.

    Support Kiama-specific profiling dimensions.

    Definition Classes
    Profiler → Profiler → Values
  8. def driver(args: Seq[String]): Unit

    Driver for this compiler.

    Driver for this compiler. First, use the argument list to create a configuration for this execution. Then, use the configuration to run the file processing in the appropriate way.

  9. def encoding: String

    The character encoding of input files read by this compiler.

    The character encoding of input files read by this compiler. Defaults to UTF-8.

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. def finishReport(): Unit
    Definition Classes
    Values
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
  16. def includeTimings: Boolean
    Definition Classes
    Profiler
  17. def isEventType(record: Record, eventtype: String): Boolean
    Definition Classes
    Values
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def main(args: Array[String]): Unit

    The entry point for this compiler.

  20. def nanoToMs(nano: Long): Long
    Definition Classes
    Profiler
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. final def notify(): Unit
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  24. def output(str: String): Unit
    Definition Classes
    Values
  25. def outputln(str: String): Unit
    Definition Classes
    Values
  26. def parseProfileOption(value: String): Seq[Dimension]
    Definition Classes
    Profiler
  27. def percent(v: Long, total: Long): String
    Definition Classes
    Profiler
  28. def prettyprint(ast: T): String

    Pretty-print an abstract syntax trees.

    Pretty-print an abstract syntax trees. Default: return an empty string.

  29. def printDependencyGraph(record: Record, dim: Dimension): Unit

    Print the dependency graph for the attribute evaluation represented by record.

    Print the dependency graph for the attribute evaluation represented by record. The output is in dot form.

    Definition Classes
    Profiler
  30. def printReports(totalTime: Long, dimensionNames: Seq[Dimension], records: List[Record]): Unit
    Definition Classes
    Profiler
  31. val printTables: Boolean
    Definition Classes
    Values
  32. def process(filename: String, ast: T, config: C): Unit

    Function to process the input that was parsed.

    Function to process the input that was parsed. filename is the name of the file from which the input came. ast is the abstract syntax tree produced by the parser from that file. config provides access to all aspects of the configuration. The default implmentation does nothing.

  33. def processfile(filename: String, config: C): Unit

    Process a file argument by using makeast to turn their contents into abstract syntax trees (ASTs) and then by process which conducts arbitrary processing on the ASTs.

    Process a file argument by using makeast to turn their contents into abstract syntax trees (ASTs) and then by process which conducts arbitrary processing on the ASTs. The character encoding of the files is given by the encoding method.

  34. def processfiles(filenames: Seq[String], config: C): Unit

    Process the files one by one.

  35. def profile[T](computation: ⇒ T, dimensionNames: Seq[Dimension], logging: Boolean): T
    Definition Classes
    Profiler
  36. def profileStart(logging: Boolean): Unit
    Definition Classes
    Profiler
  37. def profileStop(): (Seq[Dimension]) ⇒ Unit
    Definition Classes
    Profiler
  38. def profileStop(dimensionNames: Seq[Dimension]): Unit
    Definition Classes
    Profiler
  39. def profileStopInteractive(): Unit
    Definition Classes
    Profiler
  40. def startReport(dimensionNames: Seq[Dimension]): Unit

    Take any actions that need to be done at the start of reporting.

    Take any actions that need to be done at the start of reporting.

    Definition Classes
    Profiler → Values
  41. val startTime: Long
    Definition Classes
    Profiler
  42. def subjectsToStep(src: Any, dst: Any): Step

    Summarise the single step between two nodes at which attributes have been evaluated.

    Summarise the single step between two nodes at which attributes have been evaluated.

    Definition Classes
    Profiler
  43. def summariseAlongDims(dimensionNames: Seq[Dimension], records: List[Record], nrecords: Int, profiledTime: Long): Unit
    Definition Classes
    Profiler
  44. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  45. def time[T](computation: ⇒ T, warmup: Int, n: Int, discard: Int): Unit
    Definition Classes
    Profiler
  46. def toString(): String
    Definition Classes
    AnyRef → Any
  47. def trace(predicate: (Event) ⇒ Boolean): Unit
    Definition Classes
    Profiler
  48. def valueToString(a: Value): String
    Definition Classes
    Values
  49. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  50. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  51. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. object Next extends Step with Product with Serializable

    A step to the previous node in a sequence.

    A step to the previous node in a sequence.

    Definition Classes
    Profiler
  53. object Other extends Step with Product with Serializable

    A step to a node that doesn't fit into any of the other categories.

    A step to a node that doesn't fit into any of the other categories. This category will be used for nodes that were obtained as the result of reference attributes or as values that sit outside the main tree.

    Definition Classes
    Profiler
  54. object Parent extends Step with Product with Serializable

    A step to the parent of the current node.

    A step to the parent of the current node.

    Definition Classes
    Profiler
  55. object Prev extends Step with Product with Serializable

    A step to the previous node in a sequence.

    A step to the previous node in a sequence.

    Definition Classes
    Profiler
  56. object Self extends Step with Product with Serializable

    A step nowhere.

    A step nowhere. I.e., the dependent attribute is evaluated at the current node.

    Definition Classes
    Profiler

Inherited from Profiler

Inherited from bitbucket.inkytonik.dsprofile.Profiler

Inherited from Values

Inherited from AnyRef

Inherited from Any

Ungrouped