C++: add isStrict to RelationalInstruction

This commit is contained in:
Robert Marsh
2018-09-14 10:50:10 -07:00
parent 27a83e65b2
commit 4e1a37cd6e

View File

@@ -974,6 +974,7 @@ class RelationalInstruction extends CompareInstruction {
abstract Instruction getGreaterOperand();
abstract Instruction getLesserOperand();
abstract predicate isStrict();
}
class CompareLTInstruction extends RelationalInstruction {
@@ -988,6 +989,10 @@ class CompareLTInstruction extends RelationalInstruction {
override Instruction getGreaterOperand() {
result = getRightOperand()
}
override predicate isStrict() {
any()
}
}
class CompareGTInstruction extends RelationalInstruction {
@@ -1002,6 +1007,10 @@ class CompareGTInstruction extends RelationalInstruction {
override Instruction getGreaterOperand() {
result = getLeftOperand()
}
override predicate isStrict() {
any()
}
}
class CompareLEInstruction extends RelationalInstruction {
@@ -1016,6 +1025,10 @@ class CompareLEInstruction extends RelationalInstruction {
override Instruction getGreaterOperand() {
result = getRightOperand()
}
override predicate isStrict() {
none()
}
}
class CompareGEInstruction extends RelationalInstruction {
@@ -1030,6 +1043,10 @@ class CompareGEInstruction extends RelationalInstruction {
override Instruction getGreaterOperand() {
result = getLeftOperand()
}
override predicate isStrict() {
none()
}
}
class SwitchInstruction extends Instruction {