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

Support iseval rules #69

Open
ReubenJ opened this issue Apr 25, 2024 · 0 comments
Open

Support iseval rules #69

ReubenJ opened this issue Apr 25, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@ReubenJ
Copy link
Member

ReubenJ commented Apr 25, 2024

While adding PSB2, @IssaHanou and I have encountered multiple situations where an immediately evaluated expression in the grammar would be useful.

In the benchmark, they add random integers and strings to the grammar quite often, meaning the following would be nice to have working

g_with_eval = @csgrammar begin
    Int = ...
    Int = _(rand(1:100))
end

Which would add a single random integer to the grammar that would be the same throughout the entire synthesis process. Currently, we can do something like:

some_rand = rand(1:100)
g_with_eval = @csgrammar begin
    Int = ...
    Int = some_rand
end

Which is fine, but the first implementation would be cleaner.

@ReubenJ ReubenJ added the enhancement New feature or request label Sep 13, 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
Projects
None yet
Development

No branches or pull requests

1 participant