Skip to content

Casts of one-bit BIR values in SMT-LIB - #226

Open
didriklundberg wants to merge 1 commit into
masterfrom
smt_bool_cast
Open

didriklundberg wants to merge 1 commit into
masterfrom
smt_bool_cast

Conversation

@didriklundberg

Copy link
Copy Markdown
Member

The SMT-LIB export did not properly implement casts of one-bit BIR values (Imm1 constants, Bit1 variables, comparison results). This fix is needed to export proof obligations related to e.g. sltiu rd, rs, 1.

The SMT-LIB export now emits (ite b (_ bv1 N) (_ bv0 N)) for a Bool cast to N > 1 bits (the N=1 case is just the Bool unchanged).

A new test file has also been added to validate the fix and to use in CI.

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.

1 participant