aig-upf / tarski

Tarski - An AI Planning Modeling Framework
Apache License 2.0
59 stars 20 forks source link

FSTRIPS Writer Cannot Handle Term References #35

Closed miquelramirez closed 5 years ago

miquelramirez commented 5 years ago

Problem: @emilkeyder is running into trouble using the FSTRIPS printing functions in tarski.io.fstrips due to print_init being out of step with the implementation of predicate and function extensions. The issue is that we needed to define as tuples of TermReferences the entries in the extensions of declared functions and predicates, but the print_init method is expecting raw terms in lines 88 to 96.

Proposed fix: change the calls to print_term_list to print_term_ref_list in print_init.

gfrances commented 5 years ago

I ran into a similar issue a couple of days, perhaps the method list_all_extensions that I pushed into the lite branch might be of use here? It is not particularly geared towards performance, truth to be told :-)

gfrances commented 5 years ago

Ops, you're too fast, Miquel :-)

miquelramirez commented 5 years ago

Hi @gfrances - a method like that would probably help simplifying print_init significantly. In any case, the issue was very localised once I understood @emilkeyder explanation of the problem.