fun update()

in reactor/Core/src/jetbrains/mps/logic/reactor/core/RuleIndex.kt [168:184]


        fun update(cst: Constraint, ruleBit: Int, headPos: Int) {
            symbolSelector.add(ruleBit)
            for ((argIdx, arg) in cst.arguments().withIndex()) {
                val value2indices = anySelectors[argIdx]
                when (arg) {
                    is MetaLogical<*> ->
                        // all values should be accepted by a meta logical
                        wildcardSelectors[argIdx].add(ruleBit)
                    is Term             ->
                        termSelectors[argIdx].put(arg, ruleBit, headPos)
                    is Any              ->
                        value2indices.getOrPut(arg) { hashSetOf() }.add(ruleBit to headPos)
                    else                ->
                        throw NullPointerException()  // never happens
                }
            }
        }