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

Fix some access levels in MainSolver and add some checks to public … #689

Merged
merged 3 commits into from
Mar 26, 2024

Conversation

Tomaqa
Copy link
Member

@Tomaqa Tomaqa commented Mar 25, 2024

…member functions.

Related to #688 (does not fully resolve)

@Tomaqa Tomaqa linked an issue Mar 25, 2024 that may be closed by this pull request
@Tomaqa
Copy link
Member Author

Tomaqa commented Mar 25, 2024

Making getSMTSolver protected and also THandler is not possible at the moment, some classes such as BitBlaster are using it. I am afraid it would require more thorough refactoring.

Copy link
Member

@blishko blishko left a comment

Choose a reason for hiding this comment

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

The changes in MainSolver are good, but I suggest to deal with UFInterpolationTest differently and make it consistent with how LRAInterpolationTest works.

@@ -11,6 +11,12 @@ bool verifyInterpolant(PTRef itp, PartitionManager & pManager, ipartitions_t con
return VerificationUtils(logic).verifyInterpolantInternal(pManager.getPartition(Amask, PartitionManager::part::A), pManager.getPartition(Amask, PartitionManager::part::B), itp);
}

struct TestMainSolver : MainSolver {
Copy link
Member

Choose a reason for hiding this comment

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

I don't particularly like the approach of creating subclasses solely for the purpose being able to access some protected member.

I think a better solution here would be to do what LRAInterpolationTest is doing, i.e., explicitly track the partitions in each test.
That way the public API is sufficient.

Copy link
Member

@blishko blishko left a comment

Choose a reason for hiding this comment

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

LGTM!

@blishko
Copy link
Member

blishko commented Mar 26, 2024

Please, next time, make sure that the title of git commit is limited to 72 characters, so that GitHub does not split it when creating a PR.
Having the sentence split between title and description like in this PR is weird.

@Tomaqa Tomaqa merged commit 8533008 into master Mar 26, 2024
8 checks passed
@Tomaqa Tomaqa deleted the 688-fix-mainsolver-api branch March 26, 2024 17:00
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.

Fix MainSolver API
2 participants