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

Metadata in decorators #30

Closed
alcides opened this issue Mar 2, 2024 · 0 comments · Fixed by #31
Closed

Metadata in decorators #30

alcides opened this issue Mar 2, 2024 · 0 comments · Fixed by #31
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed

Comments

@alcides
Copy link
Owner

alcides commented Mar 2, 2024

The idea of this feature is two-fold:

Firstly, we want to support multiple decorators (e.g., multiple minimize targets that just append to a list of objectives).

@dec1(...)
@dec2(...)
def f : Int := 3;

Secondly, we want to save information together with the AST ("eg: what is the list of fitness functions, what functions to ignore, etc).

How to implement:

  • Decorators need to accept a metadata dictionary, and return the new metadata dictionary.
  • When decorators are being applied for each function, the new metadata is passed to the next decorator.
  • Between function definitions, the metadata dictionary is also passed on to the next one.
  • Metadata needs to be passed on to the synthesis procedure.
@alcides alcides added the good first issue Good for newcomers label Mar 2, 2024
@alcides alcides linked a pull request Mar 2, 2024 that will close this issue
4 tasks
@alcides alcides added enhancement New feature or request help wanted Extra attention is needed labels Mar 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant