org.kiama.util

ProfilingCompiler

trait ProfilingCompiler[T <: Attributable] extends Compiler[T] with Profiler

A compiler that is capable of producing profiling reports. This trait augments the argument processing to allow a leading -p option to specify the profiling dimensions, or a leding -t option to specify that timings should be collected.

Source
Compiler.scala
Linear Supertypes
Profiler, bitbucket.inkytonik.dsprofile.Profiler, Values, Compiler[T], RegexCompiler[T], RegexParsers, Parsers, CompilerBase[T], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. ProfilingCompiler
  2. Profiler
  3. Profiler
  4. Values
  5. Compiler
  6. RegexCompiler
  7. RegexParsers
  8. Parsers
  9. CompilerBase
  10. AnyRef
  11. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class Child(i: Int) extends Step with Product with Serializable

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

  2. 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.

  3. type Elem = Char

    Definition Classes
    RegexParsers → Parsers
  4. case class Error extends NoSuccess with Product with Serializable

    Definition Classes
    Parsers
  5. case class Failure extends NoSuccess with Product with Serializable

    Definition Classes
    Parsers
  6. type Input = Reader[Elem]

    Definition Classes
    Parsers
  7. sealed abstract class NoSuccess extends ParseResult[Nothing]

    Definition Classes
    Parsers
  8. trait OnceParser[+T] extends Parser[T]

    Definition Classes
    Parsers
  9. sealed abstract class ParseResult[+T] extends AnyRef

    Definition Classes
    Parsers
  10. abstract class Parser[+T] extends (Input) ⇒ ParseResult[T]

    Definition Classes
    Parsers
  11. case class Record extends Product with Serializable

    Definition Classes
    Values
  12. abstract class Step extends AnyRef

    A single step in the evaluation of an attribute.

  13. case class Success[+T] extends ParseResult[T] with Product with Serializable

    Definition Classes
    Parsers
  14. case class ~[+a, +b] extends Product with Serializable

    Definition Classes
    Parsers

Abstract Value Members

  1. abstract def parser: Parser[T]

    The actual parser used to produce the AST.

    The actual parser used to produce the AST.

    Definition Classes
    RegexCompiler

Concrete Value Members

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

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. object Next extends Step with Product with Serializable

    A step to the previous node in a sequence.

  7. object NoSuccess

    Definition Classes
    Parsers
  8. def OnceParser[T](f: (Input) ⇒ ParseResult[T]): Parser[T] with OnceParser[T]

    Definition Classes
    Parsers
  9. object Other extends Step with Product with Serializable

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

  10. object Parent extends Step with Product with Serializable

    A step to the parent of the current node.

  11. def Parser[T](f: (Input) ⇒ ParseResult[T]): Parser[T]

    Definition Classes
    Parsers
  12. object Prev extends Step with Product with Serializable

    A step to the previous node in a sequence.

  13. object Self extends Step with Product with Serializable

    A step nowhere.

  14. def accept[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Definition Classes
    Parsers
  15. def accept[ES](es: ES)(implicit arg0: (ES) ⇒ List[Elem]): Parser[List[Elem]]

    Definition Classes
    Parsers
  16. implicit def accept(e: Elem): Parser[Elem]

    Definition Classes
    Parsers
  17. def acceptIf(p: (Elem) ⇒ Boolean)(err: (Elem) ⇒ String): Parser[Elem]

    Definition Classes
    Parsers
  18. def acceptMatch[U](expected: String, f: PartialFunction[Elem, U]): Parser[U]

    Definition Classes
    Parsers
  19. def acceptSeq[ES](es: ES)(implicit arg0: (ES) ⇒ Iterable[Elem]): Parser[List[Elem]]

    Definition Classes
    Parsers
  20. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  21. def chainl1[T, U](first: ⇒ Parser[T], p: ⇒ Parser[U], q: ⇒ Parser[(T, U) ⇒ T]): Parser[T]

    Definition Classes
    Parsers
  22. def chainl1[T](p: ⇒ Parser[T], q: ⇒ Parser[(T, T) ⇒ T]): Parser[T]

    Definition Classes
    Parsers
  23. def chainr1[T, U](p: ⇒ Parser[T], q: ⇒ Parser[(T, U) ⇒ U], combine: (T, U) ⇒ U, first: U): Parser[U]

    Definition Classes
    Parsers
  24. def checkFor(record: Record, dim: Dimension, eventtype: String, needed: Dimension)(f: (Value) ⇒ Value): Value

    Definition Classes
    Values
  25. def checkargs(args: Array[String], emitter: Emitter): Array[String]

    Check the supplied arguments, returning any arguments that are to be processed elsewhere.

    Check the supplied arguments, returning any arguments that are to be processed elsewhere. Default: return the arguments unchanged.

    Definition Classes
    CompilerBase
  26. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  27. def commit[T](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    Parsers
  28. def compile(args: Array[String], console: Console): String

    Run the driver using the given args and return the resulting output, which may be error messages or the result of running the compiled program, for example.

    Run the driver using the given args and return the resulting output, which may be error messages or the result of running the compiled program, for example. Read standard input from the specified console. Reset the message buffer before calling the driver.

    Definition Classes
    CompilerBase
  29. def dimValue(record: Record, dim: Dimension): Value

    Support Kiama-specific profiling dimensions.

    Support Kiama-specific profiling dimensions.

    Definition Classes
    Profiler → Profiler → Values
  30. def driver(args: Array[String], console: Console, emitter: Emitter): Unit

    Wrap the normal compiler driver in a profile call, if we are profiling (indicated by a -p option with dimensions).

    Wrap the normal compiler driver in a profile call, if we are profiling (indicated by a -p option with dimensions). Before calling the driver, extract the comma-separated profiling dimensions if they are there. If dimensions are present, print reports along those dimensions, otherwise enter an interactive shell to allow reports to be produced.

    If not profiling, check for a -t option and, if present, run the compiler driver to collect timings.

    If neither -p nor -t are the first option, just run the compiler driver as normal.

    Definition Classes
    ProfilingCompilerCompilerBase
  31. def elem(e: Elem): Parser[Elem]

    Definition Classes
    Parsers
  32. def elem(kind: String, p: (Elem) ⇒ Boolean): Parser[Elem]

    Definition Classes
    Parsers
  33. 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.

    Definition Classes
    CompilerBase
  34. final def eq(arg0: AnyRef): Boolean

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

    Definition Classes
    AnyRef → Any
  36. def err(msg: String): Parser[Nothing]

    Definition Classes
    Parsers
  37. def failure(msg: String): Parser[Nothing]

    Definition Classes
    Parsers
  38. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  39. def finishReport(): Unit

    Definition Classes
    Values
  40. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  41. def guard[T](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    Parsers
  42. def handleWhiteSpace(source: CharSequence, offset: Int): Int

    Attributes
    protected
    Definition Classes
    RegexParsers
  43. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  44. def includeTimings: Boolean

    Definition Classes
    Profiler
  45. def isEventType(record: Record, eventtype: String): Boolean

    Definition Classes
    Values
  46. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  47. implicit def literal(s: String): Parser[String]

    Definition Classes
    RegexParsers
  48. def log[T](p: ⇒ Parser[T])(name: String): Parser[T]

    Definition Classes
    Parsers
  49. def main(args: Array[String]): Unit

    Process the program in the file given as the first command-line argument, read input using JLine input editing, and emit output to the standard output.

    Process the program in the file given as the first command-line argument, read input using JLine input editing, and emit output to the standard output.

    Definition Classes
    CompilerBase
  50. def makeast(reader: Reader, filename: String, emitter: Emitter): 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.

    Definition Classes
    RegexCompilerCompilerBase
  51. def mkList[T]: (~[T, List[T]]) ⇒ List[T]

    Definition Classes
    Parsers
  52. def nanoToMs(nano: Long): Long

    Definition Classes
    Profiler
  53. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  54. def not[T](p: ⇒ Parser[T]): Parser[Unit]

    Definition Classes
    Parsers
  55. final def notify(): Unit

    Definition Classes
    AnyRef
  56. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  57. def opt[T](p: ⇒ Parser[T]): Parser[Option[T]]

    Definition Classes
    Parsers
  58. def output(str: String): Unit

    Definition Classes
    Values
  59. def outputln(str: String): Unit

    Definition Classes
    Values
  60. def parse[T](p: Parser[T], in: Reader): ParseResult[T]

    Definition Classes
    RegexParsers
  61. def parse[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Definition Classes
    RegexParsers
  62. def parse[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Definition Classes
    RegexParsers
  63. def parseAll[T](p: Parser[T], in: CharSequence): ParseResult[T]

    Definition Classes
    RegexParsers
  64. def parseAll[T](p: Parser[T], in: Reader): ParseResult[T]

    Definition Classes
    RegexParsers
  65. def parseAll[T](p: Parser[T], in: Reader[Char]): ParseResult[T]

    Definition Classes
    RegexParsers
  66. def parseProfileOption(value: String): Seq[Dimension]

    Definition Classes
    Profiler
  67. def percent(v: Long, total: Long): String

    Definition Classes
    Profiler
  68. def phrase[T](p: Parser[T]): Parser[T]

    Definition Classes
    RegexParsers → Parsers
  69. def positioned[T <: Positional](p: ⇒ Parser[T]): Parser[T]

    Definition Classes
    RegexParsers → Parsers
  70. 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
  71. def printReports(totalTime: Long, dimensionNames: Seq[Dimension], records: List[Record]): Unit

    Definition Classes
    Profiler
  72. var printTables: Boolean

    Definition Classes
    Values
  73. def process(filename: String, ast: T, console: Console, emitter: Emitter): Boolean

    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. console should be used to read anything needed by the processing. emitter should be used for output. emitterReturn true if everything worked, false otherwise. If false is returned, messages about the problem should be logged by process using the messaging facility.

    Definition Classes
    CompilerCompilerBase
  74. def profile[T](computation: ⇒ T, dimensionNames: Dimension*): T

    Definition Classes
    Profiler
  75. def profileStart(): Unit

    Definition Classes
    Profiler
  76. def profileStop(): (Seq[Dimension]) ⇒ Unit

    Definition Classes
    Profiler
  77. def profileStop(dimensionNames: Seq[Dimension]): Unit

    Definition Classes
    Profiler
  78. def profileStopInteractive(): Unit

    Definition Classes
    Profiler
  79. implicit def regex(r: Regex): Parser[String]

    Definition Classes
    RegexParsers
  80. def rep[T](p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  81. def rep1[T](first: ⇒ Parser[T], p0: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
    Annotations
    @migration
    Migration

    (Changed in version 2.9.0) The p0 call-by-name arguments is evaluated at most once per constructed Parser object, instead of on every need that arises during parsing.

  82. def rep1[T](p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  83. def rep1sep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Definition Classes
    Parsers
  84. def repN[T](num: Int, p: ⇒ Parser[T]): Parser[List[T]]

    Definition Classes
    Parsers
  85. def repsep[T](p: ⇒ Parser[T], q: ⇒ Parser[Any]): Parser[List[T]]

    Definition Classes
    Parsers
  86. def skipWhitespace: Boolean

    Definition Classes
    RegexParsers
  87. 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
  88. var startTime: Long

    Definition Classes
    Profiler
  89. 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
  90. def success[T](v: T): Parser[T]

    Definition Classes
    Parsers
  91. def summariseAlongDims(dimensionNames: Seq[Dimension], records: List[Record], nrecords: Int, profiledTime: Long): Unit

    Definition Classes
    Profiler
  92. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  93. def time[T](computation: ⇒ T, warmup: Int, n: Int, discard: Int): Unit

    Definition Classes
    Profiler
  94. def toString(): String

    Definition Classes
    AnyRef → Any
  95. def trace(predicate: (Event) ⇒ Boolean): Unit

    Definition Classes
    Profiler
  96. def valueToString(a: Value): String

    Definition Classes
    Values
  97. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  100. val whiteSpace: Regex

    Attributes
    protected
    Definition Classes
    RegexParsers

Deprecated Value Members

  1. def lastNoSuccess: NoSuccess

    Definition Classes
    Parsers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0

  2. def lastNoSuccess_=(x: NoSuccess): Unit

    Definition Classes
    Parsers
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) lastNoSuccess was not thread-safe and will be removed in 2.11.0

Inherited from Profiler

Inherited from bitbucket.inkytonik.dsprofile.Profiler

Inherited from Values

Inherited from Compiler[T]

Inherited from RegexCompiler[T]

Inherited from RegexParsers

Inherited from Parsers

Inherited from CompilerBase[T]

Inherited from AnyRef

Inherited from Any

Ungrouped