aig-upf / tarski

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

Sort out overloaded arithmetic symbols #93

Closed gfrances closed 10 months ago

gfrances commented 3 years ago

Arithmetic symbols like "+", "-", etc. currently have a single sort: Real x Real -> Real. While simple, this has the incovenient that a term such as Constant(1, lang.Integer) + 1 has sort Real. It would be great to have a better type deduction system, perhaps involving several arithmetic functions linked to the same symbol.

gfrances commented 3 years ago

Note that part of this is implemented in branch set_types, see e.g. commit ad782869a3c1730308a6152b64d76fb1e57cdb72, but still need to see how to integrate that.

miquelramirez commented 10 months ago

Given the limitations of the programming language that tarski is implemented on, I think that "overloading" needs to be implemented as coercion into the types supported by whatever is the target representation for computing plans. After all, all integer numbers are real numbers.