Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5c1275e

Browse files
committed
C++: Add an interface for exprs that can contribute to range analysis
1 parent 993506d commit 5c1275e

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/**
2+
* Provides a class for modeling `Expr`s with a restricted range.
3+
*/
4+
import cpp
5+
6+
/**
7+
* An expression for which a range can be deduced.
8+
*/
9+
abstract class RangeAnalysisExpr extends Expr {
10+
/** Gets the lower bound of the expression. */
11+
abstract float getLowerBounds();
12+
/** Gets the upper bound of the expression. */
13+
abstract float getUpperBounds();
14+
/** Holds if this expression depends on the definition `srcDef` for StackVariable `srcVar`. */
15+
predicate dependsOnDef(RangeSsaDefinition srcDef, StackVariable srcVar) { none() }
16+
}

0 commit comments

Comments
 (0)