summaryrefslogtreecommitdiff
path: root/Source/AIFramework/VariableMap
diff options
context:
space:
mode:
authorGravatar rustanleino <unknown>2010-02-18 01:58:27 +0000
committerGravatar rustanleino <unknown>2010-02-18 01:58:27 +0000
commit36bda629c0083590c5e4d17f06e769f822617033 (patch)
tree1591f3b47a97f4bd3cc0333b0a0dc8eeb40c20de /Source/AIFramework/VariableMap
parent0549304b5beaf553ba3e5fa6550a6b8e43e31553 (diff)
* Added "deprecated" comment in help message about /interprocInfer switch. The functionality is currently broken.
* Adjust procedure summaries also after processing call returns (used only in interprocedural inference, which is currently not really supported, but this change would be needed if we ever decide to support it) * Some other code clean-up, like removing unnecessary [Reads(...Owned)] attributes on [Pure] methods
Diffstat (limited to 'Source/AIFramework/VariableMap')
-rw-r--r--Source/AIFramework/VariableMap/ConstantAbstraction.ssc2
-rw-r--r--Source/AIFramework/VariableMap/DynamicTypeLattice.ssc2
-rw-r--r--Source/AIFramework/VariableMap/Intervals.ssc10
-rw-r--r--Source/AIFramework/VariableMap/Nullness.ssc2
-rw-r--r--Source/AIFramework/VariableMap/VariableMapLattice.ssc19
5 files changed, 25 insertions, 10 deletions
diff --git a/Source/AIFramework/VariableMap/ConstantAbstraction.ssc b/Source/AIFramework/VariableMap/ConstantAbstraction.ssc
index 7b7fd87e..97fb57ce 100644
--- a/Source/AIFramework/VariableMap/ConstantAbstraction.ssc
+++ b/Source/AIFramework/VariableMap/ConstantAbstraction.ssc
@@ -31,7 +31,7 @@ namespace Microsoft.AbstractInterpretationFramework
public BigNum Constant { get { return this.constantValue; } } // only when IsConstant
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override System.Collections.Generic.ICollection<IVariable!>! FreeVariables()
{
return (!) (new System.Collections.Generic.List<IVariable!>()).AsReadOnly();
diff --git a/Source/AIFramework/VariableMap/DynamicTypeLattice.ssc b/Source/AIFramework/VariableMap/DynamicTypeLattice.ssc
index b9d1a7a4..8161cb3e 100644
--- a/Source/AIFramework/VariableMap/DynamicTypeLattice.ssc
+++ b/Source/AIFramework/VariableMap/DynamicTypeLattice.ssc
@@ -114,7 +114,7 @@ namespace Microsoft.AbstractInterpretationFramework
}
}
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override System.Collections.Generic.ICollection<IVariable!>! FreeVariables()
{
return (!) (new System.Collections.Generic.List<IVariable!>()).AsReadOnly();
diff --git a/Source/AIFramework/VariableMap/Intervals.ssc b/Source/AIFramework/VariableMap/Intervals.ssc
index 721b175d..7f6211ba 100644
--- a/Source/AIFramework/VariableMap/Intervals.ssc
+++ b/Source/AIFramework/VariableMap/Intervals.ssc
@@ -466,13 +466,13 @@ namespace Microsoft.AbstractInterpretationFramework
*/
}
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override System.Collections.Generic.ICollection<IVariable!>! FreeVariables()
{
return (!) (new System.Collections.Generic.List<IVariable!>()).AsReadOnly();
}
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override string! ToString()
{
return "[" + this.inf + ", " + this.sup + "]";
@@ -704,7 +704,7 @@ namespace Microsoft.AbstractInterpretationFramework
this.val = i;
}
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override string! ToString()
{
return this.Value.ToString();
@@ -746,7 +746,7 @@ namespace Microsoft.AbstractInterpretationFramework
class PlusInfinity : InfinitaryInt
{
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override string! ToString()
{
return "+oo";
@@ -768,7 +768,7 @@ namespace Microsoft.AbstractInterpretationFramework
class MinusInfinity : InfinitaryInt
{
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override string! ToString()
{
return "-oo";
diff --git a/Source/AIFramework/VariableMap/Nullness.ssc b/Source/AIFramework/VariableMap/Nullness.ssc
index 63d637ce..bbd1da70 100644
--- a/Source/AIFramework/VariableMap/Nullness.ssc
+++ b/Source/AIFramework/VariableMap/Nullness.ssc
@@ -27,7 +27,7 @@ namespace Microsoft.AbstractInterpretationFramework
public Elt (Value v) { this.value = v; }
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override System.Collections.Generic.ICollection<IVariable!>! FreeVariables()
{
return (!) (new System.Collections.Generic.List<IVariable!>()).AsReadOnly();
diff --git a/Source/AIFramework/VariableMap/VariableMapLattice.ssc b/Source/AIFramework/VariableMap/VariableMapLattice.ssc
index aa15f1e6..34f876f5 100644
--- a/Source/AIFramework/VariableMap/VariableMapLattice.ssc
+++ b/Source/AIFramework/VariableMap/VariableMapLattice.ssc
@@ -51,6 +51,22 @@ namespace Microsoft.AbstractInterpretationFramework
{
return new Elt(this.constraints);
}
+
+ [Pure]
+ public override string! ToString()
+ {
+ if (constraints == null) {
+ return "<bottom>";
+ }
+ string s = "[";
+ string sep = "";
+ foreach (IVariable! v in (!)constraints.Keys) {
+ Element m = (Element)constraints[v];
+ s += sep + v.Name + " -> " + m;
+ sep = ", ";
+ }
+ return s + "]";
+ }
public static Elt! Top = new Elt(true);
public static Elt! Bottom = new Elt(false);
@@ -61,7 +77,6 @@ namespace Microsoft.AbstractInterpretationFramework
}
public bool IsBottom {
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
get {
return this.constraints == null;
}
@@ -158,7 +173,7 @@ namespace Microsoft.AbstractInterpretationFramework
return new Elt(newMap);
}
- [Pure][Reads(ReadsAttribute.Reads.Owned)]
+ [Pure]
public override ICollection<IVariable!>! FreeVariables()
{
throw new System.NotImplementedException();