Skip to content

Commit

Permalink
Cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
balhoff committed Jan 10, 2018
1 parent 728b6c5 commit ef26f3b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/main/scala/org/geneontology/rules/engine/ReteNodes.scala
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ final class ProductionNode(rule: Rule, parent: BetaNode, engine: RuleEngine) ext
for {
pattern <- rule.head
} {
//FIXME get rid of casting
val newTriple = Triple(
produceNode(pattern.s, token).asInstanceOf[Resource],
produceNode(pattern.p, token).asInstanceOf[URI],
Expand All @@ -233,7 +232,7 @@ final class ProductionNode(rule: Rule, parent: BetaNode, engine: RuleEngine) ext
private def produceNode(node: Node, token: Token): ConcreteNode = node match {
case c: ConcreteNode => c
case v: Variable => token.bindings(v)
//case AnyNode => error
case AnyNode => throw new RuntimeException("Invalid rule head containing AnyNode")
}

def addChild(node: BetaNode): Unit = ()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import scala.collection.immutable.Queue
import scala.collection.mutable
import scala.collection.mutable.AnyRefMap

final class WorkingMemory(var asserted: Set[Triple]) {
final class WorkingMemory(val asserted: Set[Triple]) {

var agenda: Queue[Triple] = Queue.empty
val facts: mutable.Set[Triple] = mutable.Set.empty ++ asserted
Expand Down Expand Up @@ -60,7 +60,6 @@ final class BetaMemory(val spec: JoinNodeSpec, initialLinkedChildren: List[BetaN
var tokens: List[Token] = Nil
var checkRightLink: Boolean = true
var checkLeftLink: Boolean = false
//val tokenIndex: mutable.Map[(Variable, ConcreteNode), mutable.Set[Token]] = AnyRefMap.empty
val tokenIndex: mutable.Map[Variable, mutable.Map[ConcreteNode, List[Token]]] = AnyRefMap.empty
var linkedChildren: List[BetaNode] = initialLinkedChildren

Expand Down

0 comments on commit ef26f3b

Please sign in to comment.