Skip to content

[issue1222] Add translator option for representing disjunctive formulas using derived variables - #297

Open
speckdavid wants to merge 8 commits into
aibasel:mainfrom
speckdavid:issue1222
Open

[issue1222] Add translator option for representing disjunctive formulas using derived variables#297
speckdavid wants to merge 8 commits into
aibasel:mainfrom
speckdavid:issue1222

Conversation

@speckdavid

@speckdavid speckdavid commented Jul 22, 2026

Copy link
Copy Markdown
Contributor

The translator has now an option condition-normalization-strategy which allows to choice between the following two options.

  • dnf (default): The previous strategy to handle disjunctions in conditions. It produces a dnf and splits the condition. For the goal it may substitute at the highest level using axioms.
  • axioms_based (new): Decompose disjunctive formulas using derived predicates. It replaces each disjunctive subformula with a derived predicate and add a corresponding axiom defining that predicate. The transformation proceeds bottom-up so nested disjunctions are eliminated first.

Comment thread src/translate/normalize.py Outdated
Comment thread src/translate/normalize.py Outdated
Comment thread src/translate/normalize.py
Comment thread src/translate/normalize.py Outdated
Comment thread src/translate/normalize.py Outdated
Comment thread src/translate/main.py Outdated
def eliminate_disjunctive_conditions(task):
condition_strategy = get_options().condition_normalization_strategy
if condition_strategy == "dnf":
substitute_complicated_goal(task)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not convinced that this should be encapsulated in something called eliminate_disjunctive_conditions. It's not only about this. For example, it would also replace an existential condition with a (derived) atom.

Your strategy would not transform such a goal and it seems to be handled fine by a later stage of the normalization. But in this case, we probably also should restrict substitute_complicated_goal to disjunctive formulas. Are there other corner cases of goal formulas that need to be considered?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point.

We (@SimonDold and I) looked into it again and realized that the existential quantifiers were not handled as expected. In fact, they are also a form of "or" and later in the pipeline pulled out where the variables then are used as parameters. This process is not in the spirit of the axiom_based approach. Furthermore, this is not possible for the goal.

So, we changed the method to not only move disjunctions but also existential quantifiers into axioms.

Accordingly, we renamed eliminate_disjunctive_conditions to simplyfy_conditions because after the process only "simple conditions", i.e., conjuncitons and existential conditions, remain (+ truth values, literals).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Top-level existential quantifiers of operators and axioms behave the same way semantically as parameters. For axioms, they have exactly the same semantics; for operators, the only difference is whether the parameters are part of the action name or not. Is there a good argument for compiling them into axioms? It potentially means that grounding cannot be as efficient any more because we have a smaller space of choices for the join tree decomposition, and we get axiom-based tasks in what could be a STRIPS/SAS+ tasks.

(For the goal it's different because the goal cannot have parameters.)

Perhaps something we should discuss live?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants