Skip to content

New Types in UP #508

Answered by Framba-Luca
JoanEspasa asked this question in Q&A
Oct 26, 2023 · 2 comments · 5 replies
Discussion options

You must be logged in to vote

At glance I would say you have to create a new FNode that contains the new type, then specify how the new FNode interacts with other types on every operand (in the unified_planning/model/walkers/type_checker.py), add checks around the code that the type is not the new one (where it can't be) and, in every walker, specify how it should behave on the new expression.

So, yes, adding complex numbers (for example) is not trivial and requires knowledge about how every walker should behave. Some might be trivial and might not even need a new function (the default one works), but others require effort and testing.

Adding sets would be like #44, which I am not certain what would be needed in order…

Replies: 2 comments 5 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
5 replies
@Framba-Luca
Comment options

@Framba-Luca
Comment options

@JoanEspasa
Comment options

@Framba-Luca
Comment options

Answer selected by JoanEspasa
@JoanEspasa
Comment options

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