Skip to content

[circt-bmc] Include bound in violation and success messages#10051

Open
AnmolM-777 wants to merge 1 commit intollvm:mainfrom
AnmolM-777:improve-bmc-violation-message
Open

[circt-bmc] Include bound in violation and success messages#10051
AnmolM-777 wants to merge 1 commit intollvm:mainfrom
AnmolM-777:improve-bmc-violation-message

Conversation

@AnmolM-777
Copy link
Copy Markdown

@AnmolM-777 AnmolM-777 commented Mar 26, 2026

This patch improves the user-facing output of circt-bmc by including
the bound count in both the success and failure messages.

Previously:
"Assertion can be violated!"
"Bound reached with no violations!"

Now:
"Assertion can be violated within 10 clock cycle(s)!"
"Bound reached with no violations within 10 clock cycle(s)."

This makes the output more informative for users debugging hardware
designs, as they immediately know the bound at which the check was run.

This is part of the GSoC 2026 project: "Generate Counter Examples for
Bounded Model Checks in CIRCT".
I am a GSoC applicant working on the counterexample feature and this is my first contribution, would love to make any changes or improvements given the chance !

Previously, circt-bmc printed generic messages with no context about
at which bound a violation was found. This patch includes the bound
count in both the success and failure messages, making the output
more informative for users debugging hardware designs.
Copy link
Copy Markdown
Contributor

@TaoBi22 TaoBi22 left a comment

Choose a reason for hiding this comment

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

Hi @AnmolM-777, thanks for taking a look at this. I think this change could be slightly misleading in its current form - a user could reasonably expect that the message indicates that the assertions were first violated after the given number of cycles (whereas the output will obviously actually just be the maximal bound). Not the end of the world, but given the only information we're feeding back to the user is a command line argument they provided themselves anyway, I wonder if it's worth the tradeoff? Happy to discuss if you have a use-case for this though!

Comment on lines +212 to +217
auto successStrAddr = createUniqueStringGlobal(
"Bound reached with no violations within " + std::to_string(bound) +
" clock cycle(s).\n");
auto failureStrAddr = createUniqueStringGlobal(
"Assertion can be violated within " + std::to_string(bound) +
" clock cycle(s)!\n");
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This probably needs corresponding integration tests changed too.

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