コード例 #1
0
ファイル: nonrecursive.py プロジェクト: hougangliu/congress
 def insert(self, rule):
     changes = self.update([Event(formula=rule, insert=True)])
     return [event.formula for event in changes]
コード例 #2
0
ファイル: database.py プロジェクト: hougangliu/congress
 def delete(self, atom, proofs=None):
     """Deletes ATOM from the DB.  Returns changes."""
     return self.modify(Event(formula=atom, insert=False, proofs=proofs))
コード例 #3
0
ファイル: nonrecursive.py プロジェクト: hougangliu/congress
 def define(self, rules):
     """Empties and then inserts RULES."""
     self.empty()
     return self.update(
         [Event(formula=rule, insert=True) for rule in rules])
コード例 #4
0
ファイル: database.py プロジェクト: hougangliu/congress
 def insert(self, atom, proofs=None):
     """Inserts ATOM into the DB.  Returns changes."""
     return self.modify(Event(formula=atom, insert=True, proofs=proofs))
コード例 #5
0
ファイル: runtime.py プロジェクト: mirzawaqasahmed/congress
 def delete_obj(self, formula, theory_string):
     return self.update_obj([Event(formula=formula, insert=False,
                                   target=theory_string)])
コード例 #6
0
ファイル: runtime.py プロジェクト: mirzawaqasahmed/congress
 def delete_string(self, policy_string, theory_string):
     policy = self.parse(policy_string)
     return self.update_obj(
         [Event(formula=x, insert=False, target=theory_string)
          for x in policy])
コード例 #7
0
ファイル: runtime.py プロジェクト: mirzawaqasahmed/congress
 def insert_obj(self, formula, theory_string):
     return self.update_obj([Event(formula=formula, insert=True,
                                   target=theory_string)])
コード例 #8
0
 def delete(self, rule):
     changes = self.update([Event(formula=rule, insert=False)])
     return [event.formula for event in changes]