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

Boolean negation doesn't work deep inside a requirement #286

Closed
3 tasks done
dfremont opened this issue Jul 4, 2024 · 1 comment
Closed
3 tasks done

Boolean negation doesn't work deep inside a requirement #286

dfremont opened this issue Jul 4, 2024 · 1 comment
Labels
status: valid Issue is valid and will be worked on type: bug Something isn't working

Comments

@dfremont
Copy link
Collaborator

dfremont commented Jul 4, 2024

System Details

  1. Python 3.11.1
  2. Scenic 3.0.0 (on main)
  3. macOS

Detailed Description

When the not operator is used inside a require statement but inside a more complex expression (not consisting only of temporal/Boolean operators), the resulting requirement does not evaluate correctly. Looking at the compiled AST, the problem is that the not is being compiled to a PropositionNot object even though it's already inside an atomic proposition.

Thanks to Daniel Genin for discovering this issue!

Steps To Reproduce

Running the following scenario (with no options) shows that the requirement is not enforced:

ego = new Object
other = new Object at (Range(-1, 1), 5)
require all([not other.x > 0])

Issue Submission Checklist

  • I am reporting an issue, not asking a question
  • I checked the open and closed issues, forum, etc. and have not found any solution
  • I have provided all necessary code, etc. to reproduce the issue
@dfremont dfremont added type: bug Something isn't working status: triage Issue needs to be assessed labels Jul 4, 2024
@Eric-Vin Eric-Vin added status: valid Issue is valid and will be worked on and removed status: triage Issue needs to be assessed labels Jul 7, 2024
@dfremont
Copy link
Collaborator Author

Fixed in #289.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: valid Issue is valid and will be worked on type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants