A little documentation for RuleMatcher.
This commit is contained in:
parent
d5bdcc971f
commit
6b2a14511f
|
|
@ -22,6 +22,9 @@ import jetbrains.mps.logic.reactor.program.Rule
|
||||||
/**
|
/**
|
||||||
* Abstracts a rule matching algorithm.
|
* Abstracts a rule matching algorithm.
|
||||||
*
|
*
|
||||||
|
* A RuleMatcher corresponds to a single rule.
|
||||||
|
* The method [probe] provides a factory of [RuleMatchingProbe], which is the main handler of match operations.
|
||||||
|
*
|
||||||
* @author Fedor Isakov
|
* @author Fedor Isakov
|
||||||
*/
|
*/
|
||||||
interface RuleMatcher {
|
interface RuleMatcher {
|
||||||
|
|
|
||||||
|
|
@ -36,6 +36,12 @@ fun IntArray.toSignature() = TIntArrayList(this)
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
* This implementation of [RuleMatcher] is based on a simple algorithm which enumerates all possible
|
||||||
|
* permutations of occurrences potentially matching the rule's head.
|
||||||
|
*
|
||||||
|
* Optimizations are in place to cut out permutations that don't fit for the reason that the arguments are mismatched
|
||||||
|
* and/or logical variables are not unifiable with the substitutions calculated previously.
|
||||||
|
*
|
||||||
* @author Fedor Isakov
|
* @author Fedor Isakov
|
||||||
*/
|
*/
|
||||||
internal class RuleMatcherImpl(private val ruleLookup: RuleLookup,
|
internal class RuleMatcherImpl(private val ruleLookup: RuleLookup,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue