Permalink
Browse files

use ArrayBuffer instead of Array to build Formulae

  • Loading branch information...
1 parent f539781 commit 964776f528a8ec4da889638ab41e5dbc8a9164a1 @adriaanm adriaanm committed Jan 17, 2013
Showing with 3 additions and 3 deletions.
  1. +3 −3 src/compiler/scala/tools/nsc/typechecker/PatternMatching.scala
@@ -2064,11 +2064,11 @@ trait PatternMatching extends Transform with TypingTransformers with ast.TreeDSL
type FormulaBuilder = ArrayBuffer[Clause]
def formulaBuilder = ArrayBuffer[Clause]()
def addFormula(buff: FormulaBuilder, f: Formula): Unit = buff ++= f
- def toFormula(buff: FormulaBuilder): Formula = buff.toArray
+ def toFormula(buff: FormulaBuilder): Formula = buff
// CNF: a formula is a conjunction of clauses
- type Formula = Array[Clause]
- def formula(c: Clause*): Formula = c.toArray
+ type Formula = FormulaBuilder
+ def formula(c: Clause*): Formula = ArrayBuffer(c: _*)
type Clause = Set[Lit]
// a clause is a disjunction of distinct literals

0 comments on commit 964776f

Please sign in to comment.