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

X/Z bits in property mishandled by btor backend #295

Open
nakengelhardt opened this issue Aug 23, 2024 · 0 comments
Open

X/Z bits in property mishandled by btor backend #295

nakengelhardt opened this issue Aug 23, 2024 · 0 comments

Comments

@nakengelhardt
Copy link
Member

Consider this example:

[options]
mode cover

[engines]
btor btormc

[script]
read -formal compare_x.sv
hierarchy -top compare_x
proc

[file compare_x.sv]
`define pat 	16'b100000????????01
module compare_x(input clk, input [15:0] a);
    always @(posedge clk) cover (a == `pat);
endmodule

According to standard a == comparison operation with a Z operand results in X output, so this is probably undefined behavior. Currently the smtbmc engine accepts this (I'm not sure if the result is what is intended in this code) but the btor engine produces an invalid btor file and crashes.
Can we do something to detect cases like this and error out with a meaningful message?

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

No branches or pull requests

1 participant