Class GenericTripleMatchFrame

  • Direct Known Subclasses:
    ConsumerChoicePointFrame, TripleMatchFrame

    public class GenericTripleMatchFrame
    extends GenericChoiceFrame
    Frame on the choice point stack used to represent the state of some form of triple match - this is either a direct graph query or a query to a cached set of results.

    This is used in the inner loop of the interpreter and so is a pure data structure not an abstract data type and assumes privileged access to the interpreter state.

    • Constructor Detail

      • GenericTripleMatchFrame

        public GenericTripleMatchFrame()
    • Method Detail

      • bindResult

        public boolean bindResult​(Triple triple,
                                  LPInterpreter interpreter)
        Bind the goal variables to the given result triple. Returns false if the triple doesn't match the goal (due to a functor match failure).
      • functorMatch

        public boolean functorMatch​(Triple t,
                                    LPInterpreter interpreter)
        Check that the object of a triple match corresponds to the given functor pattern. Side effects the variable bindings.
      • init

        public void init​(LPInterpreter interpreter)
        Initialize the triple match to preserve the current context of the given LPInterpreter and search for the match defined by the current argument registers
        Overrides:
        init in class GenericChoiceFrame
        Parameters:
        interpreter - the interpreter instance whose env, trail and arg values are to be preserved