You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Part of: #905
In #905, we are implementing a Python binding for the backend's function
evaluator: given a function label and list of argument `Pattern`s,
construct runtime terms for the arguments, evaluate the function with
the given label, and return the result as an AST pattern.
To safely reify the runtime term produced by the function call to an AST
pattern, we need to know its sort (so that the machinery in #907, #908
can be used correctly). In some places in the bindings, we have to
require that callers provide a sort when reifying terms back to
patterns. However, when calling a function, the label of the function
determines precisely the correct sort to use.
This PR emits a new table of global data into compiled interpreters that
maps tags to declared return sorts, along with a function that abstracts
away indexing into this table. This change is similar to (but simpler
than) an existing table of _argument sorts_ for each symbol that we
already emit.
Testing is handled by binding the new function to Python.
0 commit comments