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: check infeasible errors #445

Merged
merged 3 commits into from
Jan 22, 2025
Merged

fix: check infeasible errors #445

merged 3 commits into from
Jan 22, 2025

Conversation

daejunpark
Copy link
Collaborator

@daejunpark daejunpark commented Jan 21, 2025

infeasible (halmos) errors may be reported if the branching timeout is not enough to prune infeasible error paths during path exploration. this pr adds checks to ensure error conditions are feasible.

if args.print_blocked_states:
traces[idx] = f"{hexify(ex.path)}\n{rendered_trace(ex.context)}"
debug(f"Potential error path (id: {idx+1})")
res, _, _ = solve(ex.path.to_smt2(args), args)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

performance concern: this may block the path exploration thread.

an alternative approach is to add this into the assertion-solving thread pool, but it requires further code refactoring. not sure it's worth it at this point.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah that would be a big change, and would break some assumptions in the assertion-solving thread pool (sincewe collect/triage/print counterexamples). If necessary we could add a separation branch-solving thread pool, but I don't think it would interact well with the z3 context push/pop mechanism (can't really keep exploring another branch until this one is done)

@daejunpark daejunpark marked this pull request as ready for review January 21, 2025 21:47
Copy link
Collaborator

@0xkarmacoma 0xkarmacoma left a comment

Choose a reason for hiding this comment

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

good trade-off IMO 👌

@daejunpark daejunpark merged commit 028d726 into main Jan 22, 2025
45 checks passed
@daejunpark daejunpark deleted the ci/snekmate branch January 22, 2025 01:13
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