Open luketpeterson opened 1 year ago
Issue is correct in a sense that we should have method to assign non-deterministic types to grounded atoms as well.
There is a plan to try alternative implementation of grounded functions in which grounded functions are called via equality expressions. In such case types of the grounded grounded functions can be added into space in the same manner as they are added for the pure functions. Thus I would postpone resolving this issue until we try the alternative implementation. For grounded values it can still be valid though.
Currently the Rust
GroundedAtom
trait has the following method function:However, in conversations it sounds like we actually want to be capable of returning a set of atoms for the type.
Additionally, the Rust interface allows a grounded atom to implement a function to return the type atom(s). It's unclear to me if this is because Rust doesn't support storage associated with abstract interfaces, or whether we want to provide different grounded atoms backed by the same implementation the ability to assert different types. This flexibility seems useful to me.
If atom-specific dynamic typing function is intended, then the C & Python APIs should also support this functionality.