Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parser lhs #135

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Parser lhs #135

wants to merge 4 commits into from

Conversation

racs4
Copy link
Contributor

@racs4 racs4 commented Aug 30, 2022

This PR:

  • parse lhs in Rule structure as a Vec<Term> (only the args of rules are parsed now)
  • raises error if rule name is different of function name

closes #124

@steinerkelvin
Copy link
Contributor

steinerkelvin commented Aug 30, 2022

As this changes the serialization that is part of the prococol (here) — as I'm realizing now — I'm gonna cc @VictorTaelin to check if this is ok.

To clarify the problem:

We should have a type-safe Term::Fun that can only ever stores small names (72-bit names that can be called directly). But the current Funcs are represented as a list of pairs (rules) (Term, Term) and the LHS's would not be able to store big names (as it should be).

So we propose changing the Rule type to be:

  • a list of Term arguments, instead of an intire Term::Func — that would include it's name);
  • plus the Term body;

It's serialization as in here — on would only have to update the Whitebook.

@steinerkelvin
Copy link
Contributor

So, actually, funs will name will be limited to 72-bits. Names will universally be limited to 72-bits. There would be no such thing as big names.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Specific parser for rules LHS
2 participants