Sometimes TSL synthesizes code that contains unreachable transitions. We can prune these to drastically improve code readability for larger specs!
For example, take this generated state written in JavaScript:
if (currentState === 0) {
if (!x && !y) {
w = w
currentState = 1
}
else if (!x && y) {
w = w
currentState = 1
}
else if (!x && y) {
w = z
currentState = 1
}
else if (x && y) {
currentState = 2
}
}
The body of the second else if (!x && y) will never be executed, so we can prune that code. This should be done at the HOA level before code gen.
Sometimes TSL synthesizes code that contains unreachable transitions. We can prune these to drastically improve code readability for larger specs!
For example, take this generated state written in JavaScript:
The body of the second
else if (!x && y)
will never be executed, so we can prune that code. This should be done at the HOA level before code gen.