Skip to content

Define rty::Formula and replace UnboundAssumption and Refinement with it#3

Merged
coord-e merged 3 commits into
mainfrom
unify-formula
Aug 28, 2025
Merged

Define rty::Formula and replace UnboundAssumption and Refinement with it#3
coord-e merged 3 commits into
mainfrom
unify-formula

Conversation

@coord-e
Copy link
Copy Markdown
Owner

@coord-e coord-e commented Aug 28, 2025

  • chc::Body: atoms with chc::Formula (formerly rty::FormulaWithAtoms)
  • rty::Formula: chc::Body with existentials
  • UnboundAssumption -> Assumption = rty::Formula
  • Refinement = rty::Formula

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.

@coord-e coord-e merged commit 583f66a into main Aug 28, 2025
3 checks passed
@coord-e coord-e deleted the unify-formula branch August 28, 2025 12:56
@coord-e coord-e requested a review from Copilot August 30, 2025 05:00
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 a chc::Body
  • Replaces FormulaWithAtoms with chc::Body
  • Converts UnboundAssumption and Refinement to type aliases of rty::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.

Comment thread src/refine/env.rs
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants