CASCI-lab / CANA

CANAlization: Control & Redundancy in Boolean Networks
https://casci-lab.github.io/CANA/
MIT License
22 stars 15 forks source link

Constant nodes with value of 1 yeild primary implicant of '22' (corresponding to number of inputs) #9

Closed hsizek closed 3 years ago

hsizek commented 4 years ago

Minor issue:

If you have a node that has a few input nodes, but is a constant of 1, the primary implicates will be calculated as '222' instead of the behavior of constant of 0 where it doesn't generate any pi. This normally isn't an issue, as most networks don't have constants in them, but if you do have networks with constants it could throw off subsequent calculations and analysis.

Fix would be to make constant of 1 operate like constant of 0.

rionbr commented 4 years ago

Thank for submitting the ticket @hsizek! Can you generate a simple case and perhaps suggest a possible fix? I guess in the past we never ran into this particular case. We would be happy to include a pull-request. Adding @xuan-w to follow this too.