Class EnvironmentFrame

  • Direct Known Subclasses:
    EnvironmentFrameWithDerivation

    public class EnvironmentFrame
    extends FrameObject
    Represents a single frame in the LP interpreter's environment stack. The environment stack represents the AND part of the search tree - it is a sequence of nested predicate calls.

    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.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void allocate​(int n)
      Allocate a vector of permanent variables for use in the rule execution.
      Rule getRule()
      Return the rule associated with this environment, null if no such rule.
      java.lang.String toString()
      Printable string for debugging.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • EnvironmentFrame

        public EnvironmentFrame​(RuleClauseCode clause)
        Constructor
        Parameters:
        clause - the compiled code being interpreted by this env frame
    • Method Detail

      • allocate

        public void allocate​(int n)
        Allocate a vector of permanent variables for use in the rule execution.
      • getRule

        public Rule getRule()
        Return the rule associated with this environment, null if no such rule.
      • toString

        public java.lang.String toString()
        Printable string for debugging.
        Overrides:
        toString in class java.lang.Object