Skip to content

How to idiomatically extract all fluents present in a formula? #600

Answered by Framba-Luca
JoanEspasa asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @JoanEspasa , for the simplification and substitution we made a "shortcut" (like pre.simplify()), but not for the extraction of variables; this might be a useful shortcut to add even if I am not entirely sure due to the complex and not immediate naming of that functionality.

Currently, the cleanest way to do it is to store the free_vars_extractor of the environment in a variable and call it.

For example:

fve = problem.environment.free_vars_extractor
...
pre_free_variables = fve.get(pre)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@JoanEspasa
Comment options

Answer selected by JoanEspasa
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants