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

:guard's should be applicable to an entire file #265

Open
OlivierBBB opened this issue Oct 14, 2024 · 1 comment
Open

:guard's should be applicable to an entire file #265

OlivierBBB opened this issue Oct 14, 2024 · 1 comment

Comments

@OlivierBBB
Copy link
Collaborator

Consider e.g. the hub/instruction_handling/copy files. They are split into

  • generalities
  • and 1 file per opcode:
    • CALLDATACOPY
    • RETURNDATACOPY
    • CODECOPY
    • EXTCODECOPY

Every constraint in these opcode sections is of the form

(defconstraint copy-instruction---OPCODE---purpose-of-the-constraint    (:guard (copy-instruction---standard-OPCODE))

i.e. we have to repeat the guard every time. However in the spec the guard is mentioned once at the start e.g.

image

It would be more in line with the spec if we could declare a local (to the file) guard and have a special way of declaring constraints, say (defguardedconstraint bla ...) or so.

@DavePearce
Copy link
Collaborator

Some options:

  • This could be a "module guard", perhaps declared as part of the module declaration.
  • Or, we could have a new declaration (guard xxx) which then applies the guard to all following constraints.

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

No branches or pull requests

2 participants