summaryrefslogtreecommitdiff
path: root/Source/Dafny/DafnyAst.cs
diff options
context:
space:
mode:
authorGravatar Rustan Leino <leino@microsoft.com>2012-01-05 18:01:38 -0800
committerGravatar Rustan Leino <leino@microsoft.com>2012-01-05 18:01:38 -0800
commit7cd74a6c41a90023ba1c33fa00b2a140fc4c935d (patch)
tree1dc9afa48ce46342c193d4c8f57fd80e9e2bf2d8 /Source/Dafny/DafnyAst.cs
parentf0d4dfe6f1525d9d345bddef1be5d48c3f63720b (diff)
Dafny: fully qualify (with module names) names of types in the translation into Boogie
Dafny: started cloning of refined classes Dafny: added /rprint switch to print the (syntax of the) resolved Dafny program
Diffstat (limited to 'Source/Dafny/DafnyAst.cs')
-rw-r--r--Source/Dafny/DafnyAst.cs11
1 files changed, 8 insertions, 3 deletions
diff --git a/Source/Dafny/DafnyAst.cs b/Source/Dafny/DafnyAst.cs
index 7884b40c..357b2b60 100644
--- a/Source/Dafny/DafnyAst.cs
+++ b/Source/Dafny/DafnyAst.cs
@@ -570,7 +570,6 @@ namespace Microsoft.Dafny {
[Pure]
public override string ToString() {
Contract.Ensures(Contract.Result<string>() != null);
-
return Name;
}
}
@@ -668,6 +667,12 @@ namespace Microsoft.Dafny {
Module = module;
TypeArgs = typeArgs;
}
+
+ public string FullName {
+ get {
+ return Module.Name + "." + Name;
+ }
+ }
}
public class ClassDecl : TopLevelDecl {
@@ -776,7 +781,7 @@ namespace Microsoft.Dafny {
Contract.Requires(EnclosingDatatype != null);
Contract.Ensures(Contract.Result<string>() != null);
- return "#" + EnclosingDatatype.Name + "." + Name;
+ return "#" + EnclosingDatatype.FullName + "." + Name;
}
}
}
@@ -799,7 +804,7 @@ namespace Microsoft.Dafny {
Contract.Requires(EnclosingClass != null);
Contract.Ensures(Contract.Result<string>() != null);
- return EnclosingClass.Name + "." + Name;
+ return EnclosingClass.FullName + "." + Name;
}
}
}