scala.tools.nsc.typechecker.PatternMatching

MatchOptimizations

trait MatchOptimizations extends CommonSubconditionElimination with DeadCodeElimination with SwitchEmission with OptimizedCodegen with SymbolicMatchAnalysis with DPLLSolver

Self Type
MatchOptimizations with TreeMakers
Source
PatternMatching.scala
Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. MatchOptimizations
  2. DPLLSolver
  3. CNF
  4. SymbolicMatchAnalysis
  5. Logic
  6. OptimizedCodegen
  7. CodegenCore
  8. SwitchEmission
  9. OptimizedMatchMonadInterface
  10. DeadCodeElimination
  11. CommonSubconditionElimination
  12. TreeMakerApproximation
  13. Prettification
  14. TreeMakers
  15. TypedSubstitution
  16. MatchMonadInterface
  17. AnyRef
  18. Any
Implicitly
  1. by any2stringadd
  2. by any2stringfmt
  3. by any2ArrowAssoc
  4. by any2Ensuring
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait AbsCodegen extends AnyRef

  2. trait AbsConst extends AnyRef

  3. trait AbsVar extends AnyRef

  4. case class AlternativesTreeMaker(prevBinder: Symbol, altss: List[List[TreeMaker]], pos: Position) extends TreeMaker with NoNewBinders with Product with Serializable

  5. case class And(a: Prop, b: Prop) extends Prop with Product with Serializable

  6. case class AndCond(a: Cond, b: Cond) extends Cond with Product with Serializable

  7. case class BodyTreeMaker(body: Tree, matchPt: Type) extends TreeMaker with NoNewBinders with Product with Serializable

  8. class CNFBudgetExceeded extends RuntimeException

  9. trait Casegen extends AbsCodegen

  10. type Clause = Set[Lit]

    Definition Classes
    CNF
  11. abstract class CommonCodegen extends AbsCodegen

  12. abstract class Cond extends AnyRef

  13. abstract class CondTreeMaker extends FunTreeMaker

  14. sealed abstract class Const extends AbsConst

    Definition Classes
    SymbolicMatchAnalysisLogic
  15. case class ConstructorExample(cls: Symbol, ctorArgs: List[CounterExample]) extends CounterExample with Product with Serializable

  16. class CounterExample extends AnyRef

  17. case class Eq(p: Var, q: Const) extends Prop with Product with Serializable

  18. class EqualityCond extends Cond

  19. case class EqualityTestTreeMaker(prevBinder: Symbol, patTree: Tree, pos: Position) extends CondTreeMaker with Product with Serializable

  20. case class ExtractorTreeMaker(extractor: Tree, extraCond: Option[Tree], nextBinder: Symbol, localSubstitution: Substitution, extractorReturnsBoolean: Boolean, checkedLength: Option[Int], prevBinder: Symbol) extends FunTreeMaker with Product with Serializable

    Make a TreeMaker that will result in an extractor call specified by extractor the next TreeMaker (here, we don't know which it'll be) is chained after this one by flatMap'ing a function with binder nextBinder over our extractor's result the function's body is determined by the next TreeMaker in this function's body, and all the subsequent ones, references to the symbols in from will be replaced by the corresponding tree in to

  21. type Formula = Array[Clause]

    Definition Classes
    CNFLogic
  22. abstract class FunTreeMaker extends TreeMaker

  23. case class GuardTreeMaker(guardTree: Tree) extends TreeMaker with NoNewBinders with Product with Serializable

  24. case class ListExample(ctorArgs: List[CounterExample]) extends CounterExample with Product with Serializable

  25. class Lit extends AnyRef

    Definition Classes
    DPLLSolverCNF
  26. type Model = Map[Sym, Boolean]

    Definition Classes
    Logic
  27. case class NegativeExample(nonTrivialNonEqualTo: List[Const]) extends CounterExample with Product with Serializable

  28. trait NoNewBinders extends TreeMaker

  29. class NonNullCond extends Cond

  30. case class Not(a: Prop) extends Prop with Product with Serializable

  31. case class Or(a: Prop, b: Prop) extends Prop with Product with Serializable

  32. case class OrCond(a: Cond, b: Cond) extends Cond with Product with Serializable

  33. case class ProductExtractorTreeMaker(prevBinder: Symbol, extraCond: Option[Tree], localSubstitution: Substitution) extends FunTreeMaker with Product with Serializable

  34. class Prop extends AnyRef

  35. trait PropMap extends AnyRef

  36. trait PropTraverser extends AnyRef

  37. class RegularSwitchMaker extends SwitchMaker

  38. class ReusedCondTreeMaker extends TreeMaker

  39. case class ReusingCondTreeMaker(sharedPrefix: List[Test], toReused: (TreeMaker) ⇒ TreeMaker) extends TreeMaker with Product with Serializable

  40. case class SubstOnlyTreeMaker(prevBinder: Symbol, nextBinder: Symbol) extends TreeMaker with Product with Serializable

  41. class Substitution extends AnyRef

  42. abstract class SwitchMaker extends AnyRef

  43. case class Sym(variable: Var, const: Const) extends Prop with Product with Serializable

  44. case class Test(cond: Cond, treeMaker: TreeMaker) extends Product with Serializable

  45. abstract class TreeMaker extends AnyRef

  46. abstract class TreeMakersToConds extends AnyRef

  47. case class TrivialTreeMaker(tree: Tree) extends TreeMaker with NoNewBinders with Product with Serializable

  48. case class TupleExample(ctorArgs: List[CounterExample]) extends CounterExample with Product with Serializable

  49. class TypeCond extends Cond

  50. sealed class TypeConst extends Const

  51. case class TypeExample(c: Const) extends CounterExample with Product with Serializable

  52. case class TypeTestTreeMaker(prevBinder: Symbol, testedBinder: Symbol, expectedTp: Type, nextBinderTp: Type, pos: Position, extractorArgTypeTest: Boolean) extends CondTreeMaker with Product with Serializable

    implements the run-time aspects of (§8.

  53. sealed class ValueConst extends Const

  54. case class ValueExample(c: ValueConst) extends CounterExample with Product with Serializable

  55. class Var extends AbsVar

    Definition Classes
    SymbolicMatchAnalysisLogic

Abstract Value Members

  1. abstract val typer: Typer

    Definition Classes
    MatchMonadInterface

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. def +(other: String): String

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  5. def ->[B](y: B): (MatchOptimizations, B)

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to ArrowAssoc[MatchOptimizations] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  6. def /\(props: Iterable[Prop]): Prop

    Definition Classes
    Logic
    Annotations
    @inline()
  7. final def ==(arg0: AnyRef): Boolean

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

    Definition Classes
    Any
  9. object Cond extends AnyRef

  10. object Const extends AnyRef

  11. object CounterExample extends AnyRef

  12. val EmptyModel: Map[Sym, Boolean]

    Definition Classes
    DPLLSolverLogic
  13. object EmptySubstitution extends Substitution

  14. object EqualityCond extends AnyRef

  15. object False extends Prop with Product with Serializable

  16. object Havoc extends Cond with Product with Serializable

  17. def Lit(sym: Sym, pos: Boolean = true): Lit

    Definition Classes
    DPLLSolverCNF
  18. object NoExample extends CounterExample with Product with Serializable

  19. val NoModel: Model

    Definition Classes
    DPLLSolverLogic
  20. object NonNullCond extends AnyRef

  21. object NullConst extends Const with Product with Serializable

  22. lazy val NullTp: ConstantType

    Definition Classes
    SymbolicMatchAnalysis
  23. object ReusedCondTreeMaker extends AnyRef

  24. object Substitution extends AnyRef

  25. object Test extends Serializable

  26. object Top extends Cond with Product with Serializable

  27. object True extends Prop with Product with Serializable

  28. object TypeCond extends AnyRef

  29. object TypeConst extends AnyRef

  30. object TypeTestTreeMaker extends Serializable

  31. object ValueConst extends AnyRef

  32. object Var extends AnyRef

  33. object WildcardExample extends CounterExample with Product with Serializable

  34. def \/(props: Iterable[Prop]): Prop

    Definition Classes
    Logic
    Annotations
    @inline()
  35. def alignAcrossRows(xss: List[List[AnyRef]], sep: String, lineSep: String = "\n"): String

    Definition Classes
    Prettification
  36. def alignedColumns(cols: Seq[AnyRef]): Seq[String]

    Definition Classes
    Prettification
  37. def andFormula(a: Formula, b: Formula): Formula

    Definition Classes
    CNFLogic
  38. def approximateMatch(root: Symbol, cases: List[List[TreeMaker]]): List[List[Test]]

    Definition Classes
    TreeMakerApproximation
  39. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  40. def checkableType(tp: Type): Type

    Definition Classes
    SymbolicMatchAnalysis
  41. def clause(l: Lit*): Clause

    Definition Classes
    CNF
  42. def clone(): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  43. def cnfString(f: Formula): String

    Definition Classes
    DPLLSolverLogic
  44. def codegen: AbsCodegen

    Definition Classes
    OptimizedCodegenCodegenCore
  45. def combineCases(scrut: Tree, scrutSym: Symbol, casesRaw: List[List[TreeMaker]], pt: Type, owner: Symbol, matchFailGenOverride: Option[(Tree) ⇒ Tree]): Tree

    Definition Classes
    TreeMakers
  46. def combineCasesNoSubstOnly(scrut: Tree, scrutSym: Symbol, casesNoSubstOnly: List[List[TreeMaker]], pt: Type, owner: Symbol, matchFailGenOverride: Option[(Tree) ⇒ Tree]): Tree

    Definition Classes
    TreeMakers
  47. def combineExtractors(treeMakers: List[TreeMaker])(casegen: Casegen): Tree

    Definition Classes
    TreeMakers
  48. def doCSE(prevBinder: Symbol, cases: List[List[TreeMaker]], pt: Type): List[List[TreeMaker]]

    a flow-sensitive, generalised, common sub-expression elimination reuse knowledge from performed tests the only sub-expressions we consider are the conditions and results of the three tests (type, type&equality, equality) when a sub-expression is shared, it is stored in a mutable variable the variable is floated up so that its scope includes all of the program that shares it we generalize sharing to implication, where b reuses a if a => b and priors(a) => priors(b) (the priors of a sub expression form the path through the decision tree)

    a flow-sensitive, generalised, common sub-expression elimination reuse knowledge from performed tests the only sub-expressions we consider are the conditions and results of the three tests (type, type&equality, equality) when a sub-expression is shared, it is stored in a mutable variable the variable is floated up so that its scope includes all of the program that shares it we generalize sharing to implication, where b reuses a if a => b and priors(a) => priors(b) (the priors of a sub expression form the path through the decision tree)

    Definition Classes
    CommonSubconditionElimination
  49. def doDCE(prevBinder: Symbol, cases: List[List[TreeMaker]], pt: Type): List[List[TreeMaker]]

    Definition Classes
    DeadCodeElimination
  50. def emitSwitch(scrut: Tree, scrutSym: Symbol, cases: List[List[TreeMaker]], pt: Type, matchFailGenOverride: Option[(Tree) ⇒ Tree]): Option[Tree]

    Definition Classes
    SwitchEmissionTreeMakers
  51. def emitTypeSwitch(bindersAndCases: List[(Symbol, List[TreeMaker])], pt: Type): Option[List[CaseDef]]

    Definition Classes
    SwitchEmissionTreeMakers
  52. def ensuring(cond: (MatchOptimizations) ⇒ Boolean, msg: ⇒ Any): MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to Ensuring[MatchOptimizations] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  53. def ensuring(cond: (MatchOptimizations) ⇒ Boolean): MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to Ensuring[MatchOptimizations] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  54. def ensuring(cond: Boolean, msg: ⇒ Any): MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to Ensuring[MatchOptimizations] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  55. def ensuring(cond: Boolean): MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to Ensuring[MatchOptimizations] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  56. def enumerateSubtypes(tp: Type): Option[List[Type]]

    Definition Classes
    SymbolicMatchAnalysis
  57. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  58. def eqFreePropToSolvable(p: Prop): Formula

    Definition Classes
    CNFLogic
  59. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  60. def exhaustive(prevBinder: Symbol, cases: List[List[TreeMaker]], pt: Type): List[String]

    Definition Classes
    SymbolicMatchAnalysis
  61. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  62. def findAllModelsFor(f: Formula): List[Model]

    Definition Classes
    DPLLSolverLogic
  63. def findModelFor(f: Formula): Model

    Definition Classes
    DPLLSolverLogic
  64. def fixerUpper(origOwner: Symbol, pos: Position): Traverser

    Attributes
    protected
    Definition Classes
    TreeMakers
  65. def formatted(fmtstr: String): String

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  66. def formula(c: Clause*): Formula

    Definition Classes
    CNF
  67. def freshName(prefix: String): TermName

    Definition Classes
    CodegenCore
  68. def freshSym(pos: Position, tp: Type = NoType, prefix: String = "x"): TermSymbol

    Definition Classes
    CodegenCore
  69. def gatherVariables(p: Prop): Set[Var]

    Definition Classes
    Logic
  70. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  71. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  72. def inMatchMonad(tp: Type): Type

  73. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  74. final def matchMonadResult(tp: Type): Type

    Definition Classes
    MatchMonadInterface
  75. def matchMonadSym: ClassSymbol

    Attributes
    protected
    Definition Classes
    OptimizedMatchMonadInterfaceMatchMonadInterface
  76. val matchOwner: Symbol

    Definition Classes
    MatchMonadInterface
  77. def modelString(model: Model): String

    Definition Classes
    SymbolicMatchAnalysis
  78. def modelToCounterExample(scrutVar: Var)(model: Model): CounterExample

    Definition Classes
    SymbolicMatchAnalysis
  79. def modelToVarAssignment(model: Model): Map[Var, (Seq[Const], Seq[Const])]

    Definition Classes
    SymbolicMatchAnalysis
    Annotations
    @inline()
  80. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  81. def needsTypeTest(tp: Type, pt: Type): Boolean

    Definition Classes
    TreeMakers
  82. final def notify(): Unit

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

    Definition Classes
    AnyRef
  84. def optimizeCases(prevBinder: Symbol, cases: List[List[TreeMaker]], pt: Type, unchecked: Boolean): (List[List[TreeMaker]], List[Tree])

    Definition Classes
    MatchOptimizationsTreeMakers
  85. object optimizedCodegen extends CommonCodegen

  86. def prepareNewAnalysis(): Unit

    Definition Classes
    SymbolicMatchAnalysis
  87. def propToSolvable(p: Prop): Formula

    Definition Classes
    Logic
  88. def propagateSubstitution(treeMakers: List[TreeMaker], initial: Substitution): List[TreeMaker]

    Definition Classes
    TreeMakers
  89. def pureType(tp: Type): Type

  90. def removeSubstOnly(makers: List[TreeMaker]): List[TreeMaker]

    Definition Classes
    TreeMakers
  91. def removeVarEq(props: List[Prop], considerNull: Boolean = false): (Prop, List[Prop])

    Definition Classes
    Logic
  92. def sameValue(a: Tree, b: Tree): Boolean

    Definition Classes
    TreeMakerApproximation
  93. val self: Any

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to StringAdd performed by method any2stringadd in scala.Predef.
    Definition Classes
    StringAdd
  94. val self: Any

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to StringFormat performed by method any2stringfmt in scala.Predef.
    Definition Classes
    StringFormat
  95. def showTests(testss: List[List[Test]]): Unit

    Definition Classes
    TreeMakerApproximation
  96. def showTreeMakers(cases: List[List[TreeMaker]]): Unit

    Definition Classes
    TreeMakerApproximation
  97. def symbolicCase(tests: List[Test], modelNull: Boolean = false): Prop

    Definition Classes
    SymbolicMatchAnalysis
  98. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  99. def toString(): String

    Definition Classes
    AnyRef → Any
  100. def typesConform(tp: Type, pt: Type): Boolean

    Definition Classes
    CodegenCore
  101. def uncheckableType(tp: Type): Boolean

    Definition Classes
    SymbolicMatchAnalysis
  102. def unreachableCase(prevBinder: Symbol, cases: List[List[TreeMaker]], pt: Type): Option[Int]

    Definition Classes
    SymbolicMatchAnalysis
  103. def varAssignmentString(varAssignment: Map[Var, (Seq[Const], Seq[Const])]): String

    Definition Classes
    SymbolicMatchAnalysis
  104. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  107. def [B](y: B): (MatchOptimizations, B)

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to ArrowAssoc[MatchOptimizations] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Deprecated Value Members

  1. def x: MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to ArrowAssoc[MatchOptimizations] performed by method any2ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use leftOfArrow instead

  2. def x: MatchOptimizations

    Implicit information
    This member is added by an implicit conversion from MatchOptimizations to Ensuring[MatchOptimizations] performed by method any2Ensuring in scala.Predef.
    Definition Classes
    Ensuring
    Annotations
    @deprecated
    Deprecated

    (Since version 2.10.0) Use resultOfEnsuring instead

Inherited from DPLLSolver

Inherited from CNF

Inherited from SymbolicMatchAnalysis

Inherited from Logic

Inherited from OptimizedCodegen

Inherited from CodegenCore

Inherited from SwitchEmission

Inherited from DeadCodeElimination

Inherited from TreeMakerApproximation

Inherited from Prettification

Inherited from TreeMakers

Inherited from TypedSubstitution

Inherited from MatchMonadInterface

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from MatchOptimizations to StringAdd

Inherited by implicit conversion any2stringfmt from MatchOptimizations to StringFormat

Inherited by implicit conversion any2ArrowAssoc from MatchOptimizations to ArrowAssoc[MatchOptimizations]

Inherited by implicit conversion any2Ensuring from MatchOptimizations to Ensuring[MatchOptimizations]