-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Currently, the code inside BinaryAlgorithm::toST(...) has a bug in it - when the algorithm is T->T, F->F (z := z), it is erroneously displayed as z := NOT z.
fbSAT/fbsat-core/src/main/kotlin/ru/ifmo/fbsat/core/automaton/Algorithm.kt
Lines 35 to 47 in 13450c4
| fun toST(outputNames: List<String>): String { | |
| require(outputNames.size == algorithm0.size) { "Wrong number of output names" } | |
| return outputNames.indices.joinToString("") { i -> | |
| val name = outputNames[i] | |
| val a0 = algorithm0[i] | |
| val a1 = algorithm1[i] | |
| if (a0 == a1) | |
| "$name:=${a0.toString().toUpperCase()};" | |
| else | |
| "$name:=NOT $name;" | |
| } | |
| } |
The correct behavior is to display such algorithms as z := z or, as we convert to ST, not to display them at all, as z := z is a no-op.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working