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
{{ message }}
This repository was archived by the owner on Aug 2, 2024. It is now read-only.
Two main things to decide on: the types available in our language and our type checking approach.
For types, maybe:
String
VecString or just Vec if we do not anticipate Vec<T> being needed.
(I just realized that fixed size array types might not be not very useful.)
Possible dynamic type checking approach: during SLD resolution, whenever we resolve and see a type mismatch with the expected signature we throw a ResolutionError (I may rename this error type in this case) that's labelled as an exception. The caller(s) should be able to see it's an exception and just pass it up without further exploring the SLD tree.
This assumes that we should never encounter type errors during SLD resolution. Specifically, given some selected goal goal_pred/n if we find a rule with a matching head goal_pred/n then it must match the associated types.
Type definitions could be something like:
goal_pred(X: String, Y: VecString) :- [body].
If the body contains variables not present in the head literal, their types would still be defined since there is some associated head literal (or builtin) that would define that variable type.
(Notably DDlog uses some other way to define types that seems unnecessary for our purposes.)
Two main things to decide on: the types available in our language and our type checking approach.
For types, maybe:
StringVecStringor just Vec if we do not anticipate Vec<T> being needed.(I just realized that fixed size array types might not be not very useful.)
Possible dynamic type checking approach: during SLD resolution, whenever we resolve and see a type mismatch with the expected signature we throw a
ResolutionError(I may rename this error type in this case) that's labelled as an exception. The caller(s) should be able to see it's an exception and just pass it up without further exploring the SLD tree.This assumes that we should never encounter type errors during SLD resolution. Specifically, given some selected goal
goal_pred/nif we find a rule with a matching headgoal_pred/nthen it must match the associated types.Type definitions could be something like:
If the body contains variables not present in the head literal, their types would still be defined since there is some associated head literal (or builtin) that would define that variable type.
(Notably DDlog uses some other way to define types that seems unnecessary for our purposes.)
Related literature: