use local dataflow instead of type-inference for mayHaveBooleanValue

This commit is contained in:
Erik Krogh Kristensen
2021-03-02 14:06:38 +01:00
parent ae56285331
commit 47f4faa4e2

View File

@@ -106,7 +106,11 @@ module DataFlow {
/** Holds if this node may evaluate to the Boolean value `b`. */
predicate mayHaveBooleanValue(boolean b) {
b = analyze().getAValue().(AbstractBoolean).getBooleanValue()
getAPredecessor().mayHaveBooleanValue(b) // needed stage 31 + stage 26 + stage 22 (unfixable)
or
b = true and asExpr().(BooleanLiteral).getValue() = "true"
or
b = false and asExpr().(BooleanLiteral).getValue() = "false"
}
/** Gets the integer value of this node, if it is an integer constant. */