Changes have been pushed for the repository "fawkesrobotics/fawkes".

Clone:  https://github.com/fawkesrobotics/fawkes.git
Gitweb: https://github.com/fawkesrobotics/fawkes

The branch, tviehmann/cx-precondition-removal-fix has been updated
  discards  4f601854cf05ecad4668e86b9a9b9992d63e4067 (commit)
  discards  87c7705881a59784ca1fb5aaa384bf2ea90a6e22 (commit)
        to  eebf6d18b682e6488ce1a9d4f18e962a079419ea (commit)

This update added new revisions after undoing existing revisions.  That is
to say, the old revision is not a strict subset of the new revision.  This
situation occurs when you --force push a change and generate a repository
containing something like this:

 * -- * -- B -- O -- O -- O (4f601854cf05ecad4668e86b9a9b9992d63e4067)
            \
             N -- N -- N (eebf6d18b682e6488ce1a9d4f18e962a079419ea)

When this happens we assume that you've already had alert emails for all
of the O revisions, and so we here report only the revisions in the N
branch from the common base, B.

https://github.com/fawkesrobotics/fawkes/tree/tviehmann/cx-precondition-removal-fix

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit eebf6d18b682e6488ce1a9d4f18e962a079419ea
Author:     Tarik Viehmann <[email protected]>
AuthorDate: Sun Nov 15 20:44:09 2020 +0100
Commit:     Tarik Viehmann <[email protected]>
CommitDate: Sun Nov 15 20:50:04 2020 +0100

    clips-executive: properly delete preconditions recursively
    
    Previously the recursive removal of preconditions did not work as the
    argument was expected to be the name of an atomic precondition. The
    parent of an atomic precondition is not atomic, hence nothing was
    deleted.
    Also the check for an empty disjunction was missing.
    
    While fixing the problems above it prove convenient to change the
    argument from the precondition name to the corresponding fact
    id/address.

https://github.com/fawkesrobotics/fawkes/commit/eebf6d18b

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/libs/blackboard/net/handler.cpp            | 19 +++++-------
 src/libs/blackboard/net/interface_listener.cpp | 21 -------------
 src/libs/blackboard/net/interface_listener.h   |  1 -
 src/libs/blackboard/net/interface_proxy.cpp    |  2 +-
 src/libs/blackboard/net/interface_proxy.h      |  2 +-
 src/libs/blackboard/remote.cpp                 |  4 +--
 src/libs/interface/interface.cpp               | 17 ++---------
 src/libs/interface/interface.h                 |  1 -
 src/plugins/clips-executive/clips/domain.clp   | 42 +++++++++++---------------
 9 files changed, 31 insertions(+), 78 deletions(-)


- *Diffs* -------------------------------------------------------------

- *commit* eebf6d18b682e6488ce1a9d4f18e962a079419ea - - - - - - - - - -
Author:  Tarik Viehmann <[email protected]>
Date:    Sun Nov 15 20:44:09 2020 +0100
Subject: clips-executive: properly delete preconditions recursively

 src/plugins/clips-executive/clips/domain.clp | 26 ++++++++++++++++----------
 1 file changed, 16 insertions(+), 10 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/clips-executive/clips/domain.clp 
b/src/plugins/clips-executive/clips/domain.clp
index 7acfa8c69..b518da01f 100644
--- a/src/plugins/clips-executive/clips/domain.clp
+++ b/src/plugins/clips-executive/clips/domain.clp
@@ -248,14 +248,19 @@
    tree. If the parent is a disjunction with no other disjunct, simplify it to
    true by removing it recursively. If it is a negation, remove it recursively.
    If it's a conjunction, only remove the conjunct."
-  (?precond-name)
-  (do-for-fact
-    ((?precond domain-atomic-precondition) (?parent domain-precondition))
-    (and (eq ?precond:name ?precond-name) (eq ?precond:part-of ?parent:name))
-    (if (or (eq ?parent:type disjunction) (eq ?parent:type negation)) then
-      (remove-precondition ?parent:name)
+  (?precond-fact)
+  (do-for-fact ((?parent domain-precondition))
+    (eq (fact-slot-value ?precond-fact part-of) ?parent:name)
+    (if (or (eq ?parent:type negation)
+            (and (eq ?parent:type disjunction)
+                 (not (any-factp ((?sibling domain-precondition))
+                       (eq ?parent:name ?sibling:part-of)))
+                 (not (any-factp ((?sibling domain-atomic-precondition))
+                       (eq ?parent:name ?sibling:part-of)))))
+     then
+      (remove-precondition ?parent)
     )
-    (retract ?precond)
+    (retract ?precond-fact)
   )
 )
 
@@ -296,10 +301,11 @@
   (domain-predicate (name ?pred) (sensed TRUE) (value-predicate FALSE))
   (domain-effect (part-of ?op) (predicate ?pred)
     (param-names $?params) (param-constants $?constants))
-  (domain-atomic-precondition (name ?precond) (operator ?op) (grounded FALSE)
-    (predicate ?pred) (param-names $?params) (param-constants $?constants))
+  ?pre <- (domain-atomic-precondition (name ?precond) (operator ?op)
+    (grounded FALSE) (predicate ?pred) (param-names $?params)
+    (param-constants $?constants))
 =>
-  (remove-precondition ?precond)
+  (remove-precondition ?pre)
   ; If there are any grounded preconditions, we need to recompute them.
   (domain-retract-grounding)
 )



_______________________________________________
fawkes-commits mailing list
[email protected]
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to