Skip to content

Commit

Permalink
Fixed issue with fluentness propagation
Browse files Browse the repository at this point in the history
 - Fluentness propagation is no longer being applied on the wrong kind
of formulas
  • Loading branch information
miquelramirez committed Feb 28, 2018
1 parent 42169a0 commit 6fd1a73
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/tarski/fstrips/visitors.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,13 @@ def visit(self, phi):
for f in phi.subformulas: f.accept(self)
self.under_next = old_value
elif isinstance(phi, CompoundFormula):
for f in phi.subformulas : f.accept(self)
elif isinstance(phi, QuantifiedFormula):
old_visited = self.visited.copy()
phi.formula.accept(self)
for f in phi.subformulas : f.accept(self)
delta = self.visited - old_visited
if any( f in self.fluents for f in delta) :
for f in delta : self.fluents.add(f)
elif isinstance(phi, QuantifiedFormula):
phi.formula.accept(self)
elif isinstance(phi, Atom):
if not phi.predicate.builtin:
self.visited.add(SymbolReference(phi))
Expand Down

0 comments on commit 6fd1a73

Please sign in to comment.