Closed gfrances closed 10 months 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.
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.
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 sortReal
. It would be great to have a better type deduction system, perhaps involving several arithmetic functions linked to the same symbol.