Define rty::Formula and replace UnboundAssumption and Refinement with it#3
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR refactors the formula representation by defining rty::Formula and replacing UnboundAssumption and Refinement with type aliases to this new structure. The refactoring consolidates different formula representations under a unified type hierarchy.
- Introduces
rty::Formula<V>containing existentials and achc::Body - Replaces
FormulaWithAtomswithchc::Body - Converts
UnboundAssumptionandRefinementto type aliases ofrty::Formula
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/rty/params.rs | Updates refinement extension to use push_conj method |
| src/rty/clause_builder.rs | Updates import and method calls to use new chc::Body structure |
| src/rty.rs | Major refactor introducing Formula<V> and removing old types |
| src/refine/template.rs | Updates field access from formula to body |
| src/refine/env.rs | Replaces UnboundAssumption with Assumption type alias |
| src/refine.rs | Updates public exports to use new Assumption type |
| src/chc/unbox.rs | Adds unbox_body function and updates clause handling |
| src/chc/smtlib2.rs | Adds Body formatter and updates clause formatting |
| src/chc/format_context.rs | Updates atom iteration to use new iter_atoms method |
| src/chc/clause_builder.rs | Consolidates body handling into single add_body method |
| src/chc.rs | Introduces Body<V> struct and updates Clause structure |
| src/analyze/basic_block.rs | Updates to use new Assumption type and field names |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
coeff-aij
pushed a commit
to coeff-aij/thrust
that referenced
this pull request
Jan 12, 2026
Define rty::Formula and replace UnboundAssumption and Refinement with it
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.
It may be confusing that chc::Formula and rty::Formula have the same name but have different roles; however, I couldn't come up with a better name.