Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds first-class formula negation support (via not(...) and .not()) by introducing a syntactic formula layer (ltl::Syntax) and pushing negation into negation-normal-form (NNF), including through thunks during evaluation. It also makes eventually bounds optional and adds optional time bounds to always to restore dualities.
Changes:
- Introduces
ltl::Syntaxparsing from JS values and converts formulas to NNF (Syntax::nnf()), tracking thunk polarity withFormula::Thunk { negated }. - Extends temporal operators so
alwaysandeventuallyaccept optional bounds, and updates evaluation/residual/violation structures accordingly. - Adds verifier tests for
.not(), boundedalways, unboundedeventually, and boundedeventually, plus updates rendering for bounded-alwaysviolations.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
src/specification/verifier.rs |
Switches property initialization to Syntax::from_value(...).nnf() and adds tests for negation and bounded/unbounded temporal operators. |
src/specification/render.rs |
Updates formula/violation rendering for new Formula shape and bounded Always violations. |
src/specification/ltl.rs |
Adds Syntax + NNF conversion, updates Formula representation, and extends evaluation logic to support optional bounds and thunk negation. |
src/specification/index.ts |
Adds .not() method and updates always/eventually API to support optional time bounds with .within(...). |
src/specification/bombadil_exports.rs |
Exposes the new Not runtime class export to Rust. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
not(...)function and.not()method for formula. Negation is pushed down into NNF, through thunks as they're evaluated.Also adds a time bound on
alwaysto make it dual witheventually, and both those bounds are now optional.Closes #13.