Beispiel #1
0
 def persist_arity_or_facts(self, agent):
     """Return either a list of facts (sequences of argument
     values) to be persisted or the number of arguments of the
     predicate (to generate the facts)"""
     raise Unimplemented(
         "Persistable predicate implementation for %s must define persist_arity_or_facts"
         % self.__class__.__name__)
Beispiel #2
0
 def solution(self, agent, bindings, zitems):
     if self.solutions == PredImpInt.solutions:
         raise Unimplemented()
     for x in self.solutions(agent, bindings, zitems):
         if x:
             return SOLVED
     return NOT_SOLVED
Beispiel #3
0
 def solutions(self, agent, bindings, zitems):
     """Generator - of solutions to the predicate, return True for
     each solution after matching the zitems."""
     if self.solution == PredImpInt.solution:
         raise Unimplemented()
     if self.solution(agent, bindings, zitems):
         return ONE_SOLUTION
     else:
         return NO_SOLUTIONS
Beispiel #4
0
    def resume_conclude(self, agent, bindings, zexpr):
        """conclude as part of a resume operation. If the conclude is
        successful, return None.  If the conclude cannot be
        successfully completed, return a tuple (Bindings, ValuesZexpr)
        representing a new set of values to be concluded after the
        resume operation completes. This new set of values will
        trigger newfact: events"""

        raise Unimplemented(
            "Persistable predicate implementation for %s must define resume_conclude"
            % self.__class__.__name__)
Beispiel #5
0
 def find_tframes(self, agent):
     raise Unimplemented()
Beispiel #6
0
 def tfcont(self, agent):
     raise Unimplemented()
Beispiel #7
0
 def append_tframes(self, agent, event, bindings, zexpr, list):
     raise Unimplemented()
Beispiel #8
0
 def bEntity(self, agent, zitem):
     "Find the fully qualified symbol name for zitem"
     raise Unimplemented()
Beispiel #9
0
 def bQuotedEval(self, agent, zitem):
     "Evaluated zitem as being quoted"
     raise Unimplemented()
Beispiel #10
0
 def bTermEvalP(self, agent, zitem):
     "Is zitem evaluable in its normal execution context"
     raise Unimplemented()
Beispiel #11
0
 def retractall(self, agent, bindings, zexpr):
     """Retract anything matching this predicate and return whether
     the datadase has been changed."""
     raise Unimplemented("Predicate implementation must define retractall")
Beispiel #12
0
 def conclude(self, agent, bindings, zexpr):
     """Conclude this predicate and return whether the database has
     been changed."""
     raise Unimplemented(
         "Predicate implementation for %s must define conclude" %
         self.__class__.__name__)
Beispiel #13
0
 def base_event(self):
     raise Unimplemented()
Beispiel #14
0
 def call(self, agent, bindings, zexpr):
     """Calls the function on the given arguments"""
     raise Unimplemented("Function implementation must define call")
Beispiel #15
0
 def tframes(self, agent, event, bindings, zexpr):
     "return a list of tframes to handle the task"
     raise Unimplemented("Task implementation must define tframes")
Beispiel #16
0
 def match_inverse(self, agent, bindings, zexpr, obj):
     """Attempt to match the inverse function applied to obj"""
     raise Unimplemented("Function implementation must define inverse")
Beispiel #17
0
 def enter(self, agent, tf, zexpr):
     raise Unimplemented()
Beispiel #18
0
 def bTermEval(self, agent, zitem):
     "Evaluate zitem assuming it is evaluable, either because it is always evaluable, or because it has now been bound."
     raise Unimplemented()
Beispiel #19
0
 def subgoal_complete(self, agent, tf, zexpr, subgoal, result):
     raise Unimplemented()
Beispiel #20
0
 def bTermMatch(self, agent, zitem, value):
     "Match zitem to value, save any bindings, return whether the match succeeded"
     raise Unimplemented()
Beispiel #21
0
 def resume(self, agent, tf, zexpr):
     raise Unimplemented()
Beispiel #22
0
 def bQuotedMatch(self, agent, zitem, value):
     "Match zitem considering it to be quoted, return whether the match succeeded"
     raise Unimplemented()
Beispiel #23
0
 def child_complete(self, agent, tf, zexpr, index, result):
     raise Unimplemented()
Beispiel #24
0
 def bImp(self, agent, zitem):
     "Return the implementation to use for processing zitem"
     raise Unimplemented()
Beispiel #25
0
 def generateInfo(self):
     """Create an info for use with the implementation if none exists"""
     raise Unimplemented("Implementation must define generateInfo")
Beispiel #26
0
 def name(self):
     raise Unimplemented()
Beispiel #27
0
 def __call__(self, decl):
     """Construct an instance of ImpInt"""
     raise Unimplemented("Implementation generator must define __call__")
Beispiel #28
0
 def _tenter_no_match(self, ignore_agent, ignore_tframe):
     raise Unimplemented()
Beispiel #29
0
 def goalsym(self):
     raise Unimplemented("subclass must define goalsym method")