lsils / mockturtle

C++ logic network library
MIT License
212 stars 140 forks source link

Make `lbool` explicitly signed #650

Closed rocallahan closed 4 months ago

rocallahan commented 5 months ago

This avoids issues due to some platforms making char signed and others unsigned. In particular, on platforms where char is unsigned, https://github.com/lsils/mockturtle/blob/50ffa108484ba65b44eee4a713832b7ee821d6d8/lib/bill/bill/sat/interface/abc_bsat2.hpp#L156 promotes an lbool to int and compares to -1 ... but promoting (unsigned char)-1 to int produces 255.

costamag commented 4 months ago

Verified correct behavior on experiments Thanks for catching the issue