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.
|
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.
Currently, the code inside
BinaryAlgorithm::toST(...)has a bug in it - when the algorithm isT->T, F->F(z := z), it is erroneously displayed asz := NOT z.fbSAT/fbsat-core/src/main/kotlin/ru/ifmo/fbsat/core/automaton/Algorithm.kt
Lines 35 to 47 in 13450c4
The correct behavior is to display such algorithms as
z := zor, as we convert to ST, not to display them at all, asz := zis a no-op.