remaro-network / dlToPlanning

small tool to insert OWL axioms into PDDL files
Apache License 2.0
1 stars 0 forks source link

Some of the generated derived rules are not needed #19

Open Rezenders opened 1 month ago

Rezenders commented 1 month ago

I am not sure why the following derived predicates are being generated:

(:derived (inferred-Component ?y)
        (exists (?x)
            (and
                (inferred-RequiresC ?x ?y)
            )
        )
    )

(:derived (inferred-Component ?x)
        (exists (?y)
            (and
                (inferred-C_status ?x ?y)
            )
        )
    )

    (:derived (inferred-Function ?y)
        (exists (?x)
            (and
                (inferred-SolvesF ?x ?y)
            )
        )
    )

(:derived (inferred-Function ?y)
        (exists (?x)
            (and
                (inferred-TypeF ?x ?y)
            )
        )
    )

These are just some example, the same applies to other derived predicates for other Classes

Rezenders commented 1 month ago

It would be better to remove all derived predicates that are not strictly needed as the resolution of derived predicates in PlanSys is not very fast, I didn't implement it in a very good way hehe

tobiaswjohn commented 1 month ago

Those derived predicates are generated, because in the ontology, there are definitions of domains and ranges of relations. For example: the range for the owl-relation "solvesF" is the owl-class "Function". Hence, whenever we can infer that something is the second argument in a "solvesF"-relation, we can infer that it is a function. I would propose to not change the translation tool but to adjust the ontology (deleting domain / range declarations that are not needed). A second option would be to add a flag to the translation tool, whether those axioms should be translated or not, but this seems to be less elegant to me. What do you think?

tobiaswjohn commented 1 month ago

Sorry, I think I did not fully understood that your referring to a more general problem than the specific predicates you mentioned. I will look into applying some kind of filter for predicates that are not needed.