public final class ShortCircuitOrNode extends LogicNode implements IterableNodeType, Canonicalizable.Binary<LogicNode>
Node.ConstantNodeParameter, Node.InjectedNodeParameter, Node.Input, Node.NodeIntrinsic, Node.OptionalInput, Node.Successor, Node.ValueNumberable
Canonicalizable.Binary<T extends Node>, Canonicalizable.BinaryCommutative<T extends Node>, Canonicalizable.Unary<T extends Node>
Modifier and Type | Field and Description |
---|---|
protected double |
shortCircuitProbability |
static NodeClass<ShortCircuitOrNode> |
TYPE |
(package private) LogicNode |
x |
protected boolean |
xNegated |
(package private) LogicNode |
y |
protected boolean |
yNegated |
NODE_LIST, NOT_ITERABLE, USE_UNSAFE_TO_CLONE, WithAllEdges, WithNoEdges, WithOnlyInputEdges, WithOnlySucessorEdges
Constructor and Description |
---|
ShortCircuitOrNode(LogicNode x,
boolean xNegated,
LogicNode y,
boolean yNegated,
double shortCircuitProbability) |
Modifier and Type | Method and Description |
---|---|
LogicNode |
canonical(CanonicalizerTool tool,
LogicNode forX,
LogicNode forY)
Similar to
Canonicalizable.canonical(CanonicalizerTool) , except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer. |
protected ShortCircuitOrNode |
canonicalizeNegation(LogicNode forX,
LogicNode forY) |
double |
getShortCircuitProbability()
Gets the probability that the
y part of this binary node is not
evaluated. |
LogicNode |
getX()
Gets the current value of the input, so that calling
Canonicalizable.Binary.canonical(CanonicalizerTool, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool) . |
LogicNode |
getY()
Gets the current value of the input, so that calling
Canonicalizable.Binary.canonical(CanonicalizerTool, Node, Node) with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool) . |
boolean |
isXNegated() |
boolean |
isYNegated() |
and, and, isContradiction, isTautology, or, or
asNode
asConstant, asJavaConstant, getKind, graph, inferStamp, isAllowedUsageType, isConstant, isConstantPredicate, isNullConstant, setStamp, stamp, updateStamp
acceptInputs, acceptSuccessors, afterClone, assertFalse, assertTrue, cfgPredecessors, cfgSuccessors, clearInputs, clearSuccessors, copyWithInputs, copyWithInputs, equals, fail, formatTo, getDebugProperties, getDebugProperties, getId, getNodeClass, getUsageAt, getUsageCount, hashCode, hasNoUsages, hasUsages, inputs, isAlive, isDeleted, markDeleted, modCount, newIdentityMap, newIdentityMap, newIdentityMap, newMap, newMap, newMap, newSet, newSet, predecessor, pushInputs, removeUsage, replaceAndDelete, replaceAtMatchingUsages, replaceAtPredecessor, replaceAtUsages, replaceAtUsages, replaceAtUsages, replaceFirstInput, replaceFirstSuccessor, safeDelete, simplify, successors, toString, toString, updatePredecessor, updateUsages, updateUsagesInterface, usages, valueEquals, verify, verifyEdges, verifyInputs
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
canonical
public static final NodeClass<ShortCircuitOrNode> TYPE
protected boolean xNegated
protected boolean yNegated
protected double shortCircuitProbability
public ShortCircuitOrNode(LogicNode x, boolean xNegated, LogicNode y, boolean yNegated, double shortCircuitProbability)
public LogicNode getX()
Canonicalizable.Binary
Canonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool)
.getX
in interface Canonicalizable.Binary<LogicNode>
public LogicNode getY()
Canonicalizable.Binary
Canonicalizable.Binary.canonical(CanonicalizerTool, Node, Node)
with the value returned from this
method should behave exactly like Canonicalizable.canonical(CanonicalizerTool)
.getY
in interface Canonicalizable.Binary<LogicNode>
public boolean isXNegated()
public boolean isYNegated()
public double getShortCircuitProbability()
y
part of this binary node is not
evaluated. This is the probability that this operator will short-circuit its execution.protected ShortCircuitOrNode canonicalizeNegation(LogicNode forX, LogicNode forY)
public LogicNode canonical(CanonicalizerTool tool, LogicNode forX, LogicNode forY)
Canonicalizable.Binary
Canonicalizable.canonical(CanonicalizerTool)
, except that
implementations should act as if the current input of the node was the given one, i.e.,
they should never look at the inputs via the this pointer.canonical
in interface Canonicalizable.Binary<LogicNode>