Skip to content

ebmc: fix -p command line option #264

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

Merged
merged 1 commit into from
Dec 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CORE
p-command-line-option1.v
--bound 1 -p "some_value >= 1"
^EXIT=0$
^SIGNAL=0$
^\[command-line assertion\] always main\.some_value >= 1: SUCCESS$
--
^warning: ignoring
10 changes: 10 additions & 0 deletions regression/ebmc/p-command-line-option/p-command-line-option1.v
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
module main(input clk);

reg [31:0] some_value;

initial some_value = 1;

always @(posedge clk)
some_value = some_value + 1;

endmodule
2 changes: 2 additions & 0 deletions src/ebmc/ebmc_properties.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ ebmc_propertiest ebmc_propertiest::from_command_line(

auto property_string = cmdline.get_value('p');

language->set_message_handler(message_handler);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we should get diffblue/cbmc#4050 merged to avoid this kind of problem?


exprt expr;
if(language->to_expr(
property_string,
Expand Down