We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Currently, we can only pick from a fixed set of objects:
pick (symbol x in { A, B, C}) print(x)
We often want to pick an object with a certain restriction, e.g.,
pick (symbol x in {A, B, C}) test(!exists (symbol y) on(x,y)) grab(x)
However, this will fail because this is executed online and x is picked greedily. This can be circumvented by doing offline search, e.g.,
x
number function one() { return 1; } solve (5, one()) { pick (symbol x in {A, B, C}) test(!exists (symbol y) on(x,y)) grab(x) }
But running a solver every time is a workaround that results in cluttered code. Also, as we can't nest solve, we can't nest such constrained picks.
solve
A possible solution would be to a have a pick that accepts a formula instead of a fixed set, e.g.,
pick
pick symbol x with !exists (symbol y) on(x, y)) grab(x)
In conjunction with #10, this would also allow picking an object of a certain type:
pick symbol x with has_type(x, block) grab(x)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Currently, we can only pick from a fixed set of objects:
We often want to pick an object with a certain restriction, e.g.,
However, this will fail because this is executed online and
x
is picked greedily. This can be circumvented by doing offline search, e.g.,But running a solver every time is a workaround that results in cluttered code. Also, as we can't nest
solve
, we can't nest such constrained picks.A possible solution would be to a have a
pick
that accepts a formula instead of a fixed set, e.g.,In conjunction with #10, this would also allow picking an object of a certain type:
The text was updated successfully, but these errors were encountered: