@@ -87,7 +87,7 @@ trait Logic extends Debugging {
87
87
def mayBeNull : Boolean
88
88
89
89
// compute the domain and return it (call registerNull first!)
90
- def domainSyms : Option [mutable. LinkedHashSet [Sym ]]
90
+ def domainSyms : Option [Set [Sym ]]
91
91
92
92
// the symbol for this variable being equal to its statically known type
93
93
// (only available if registerEquality has been called for that type before)
@@ -205,7 +205,7 @@ trait Logic extends Debugging {
205
205
def removeVarEq (props : List [Prop ], modelNull : Boolean = false ): (Formula , List [Formula ]) = {
206
206
val start = if (Statistics .canEnable) Statistics .startTimer(patmatAnaVarEq) else null
207
207
208
- val vars = mutable.LinkedHashSet [Var ]()
208
+ val vars = new mutable.HashSet [Var ]
209
209
210
210
object gatherEqualities extends PropTraverser {
211
211
override def apply (p : Prop ) = p match {
@@ -292,7 +292,7 @@ trait Logic extends Debugging {
292
292
def eqFreePropToSolvable (p : Prop ): Formula
293
293
def cnfString (f : Formula ): String
294
294
295
- type Model = collection.immutable. SortedMap [Sym , Boolean ]
295
+ type Model = Map [Sym , Boolean ]
296
296
val EmptyModel : Model
297
297
val NoModel : Model
298
298
@@ -342,9 +342,9 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis {
342
342
// we enumerate the subtypes of the full type, as that allows us to filter out more types statically,
343
343
// once we go to run-time checks (on Const's), convert them to checkable types
344
344
// TODO: there seems to be bug for singleton domains (variable does not show up in model)
345
- lazy val domain : Option [mutable. LinkedHashSet [Const ]] = {
346
- val subConsts : Option [mutable. LinkedHashSet [ Const ]] = enumerateSubtypes(staticTp).map { tps =>
347
- mutable. LinkedHashSet ( tps : _* ) .map{ tp =>
345
+ lazy val domain : Option [Set [Const ]] = {
346
+ val subConsts = enumerateSubtypes(staticTp).map{ tps =>
347
+ tps.toSet[ Type ] .map{ tp =>
348
348
val domainC = TypeConst (tp)
349
349
registerEquality(domainC)
350
350
domainC
@@ -487,7 +487,7 @@ trait ScalaLogic extends Interface with Logic with TreeAndTypeAnalysis {
487
487
}
488
488
489
489
// accessing after calling registerNull will result in inconsistencies
490
- lazy val domainSyms : Option [collection.mutable. LinkedHashSet [Sym ]] = domain map { _ map symForEqualsTo }
490
+ lazy val domainSyms : Option [Set [Sym ]] = domain map { _ map symForEqualsTo }
491
491
492
492
lazy val symForStaticTp : Option [Sym ] = symForEqualsTo.get(TypeConst (staticTpCheckable))
493
493
0 commit comments