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

Allow ask-parameters to be used as operands #767

Open
rensink opened this issue Jan 31, 2024 · 1 comment
Open

Allow ask-parameters to be used as operands #767

rensink opened this issue Jan 31, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@rensink
Copy link
Collaborator

rensink commented Jan 31, 2024

Currently, ask-parameters can only be used as-is; within the rule, no operation is allowed on them. This is more restricting than it should be from a user point of view. Implementation-wise, the main issue standing in the way of using ask-values in calculations is that divide-by-zero is undefined, hence if a user were to input zero and that is used as a divisor, the rule would not be applicable. Currently there is no way to declare a rule to be non-applicable once a match has been found.

The set of partially defined operations may increase at some point, e.g., user-defined operations cannot be statically guaranteed to be complete.

Probably the best solution would be to change the treatment of partial operations so that they generate an error value rather than stopping the rule from being applicable (essentially making them complete operations on an extended domain), and marking any state with an error node as erroneous.

Reported by: rensink

@rensink rensink self-assigned this Mar 7, 2024
@rensink rensink added enhancement New feature or request and removed feature-request labels Mar 7, 2024
@rensink
Copy link
Collaborator Author

rensink commented Dec 18, 2024

The suggestion in the last paragraph has been implemented: operations are partially defined, an undefined application leads to an error state - see this rule system

dividebyzero.gps.zip

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