diff options
Diffstat (limited to 'Source/AIFramework/Expr.ssc')
-rw-r--r-- | Source/AIFramework/Expr.ssc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/AIFramework/Expr.ssc b/Source/AIFramework/Expr.ssc index 42621239..1f21f84a 100644 --- a/Source/AIFramework/Expr.ssc +++ b/Source/AIFramework/Expr.ssc @@ -26,7 +26,7 @@ namespace Microsoft.AbstractInterpretationFramework /// AST nodes as AIF expressions.
///
/// This only serves as a place for operations on expressions. Clients
- /// should implement directly either IVariable or IFunApp.
+ /// should implement directly IVariable, IFunApp, ...
/// </summary>
public interface IExpr
{
@@ -90,6 +90,14 @@ namespace Microsoft.AbstractInterpretationFramework }
/// <summary>
+ /// An interface representing an expression that at any moment could, in principle, evaluate
+ /// to a different value. That is, the abstract interpreter should treat these IExpr's
+ /// as unknown values. They are used when there is no other IExpr corresponding to the
+ /// expression to be modeled.
+ /// </summary>
+ public interface IUnknown : IExpr {}
+
+ /// <summary>
/// An abstract class that provides an interface for expression visitors.
/// </summary>
public abstract class ExprVisitor
@@ -147,6 +155,10 @@ namespace Microsoft.AbstractInterpretationFramework else
result = fun.CloneWithBody(Substitute(subst, var, fun.Body));
}
+ else if (inexpr is IUnknown)
+ {
+ result = inexpr;
+ }
else
{
assert false;
|