summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorGravatar leino <unknown>2015-01-03 00:41:35 -0800
committerGravatar leino <unknown>2015-01-03 00:41:35 -0800
commiteaf920c4580d2e2ffb5ad4ba3bf21c820ff3f085 (patch)
tree985581ae03731b94d05a492afbbd504af68085b7 /Source
parentbcb2910254f5e108e65f8f6ff5ab4efe03728f6c (diff)
parentc332e0e3e198940c8566f4a8e1985904956fc808 (diff)
Merge
Diffstat (limited to 'Source')
-rw-r--r--Source/Dafny/DafnyMain.cs4
-rw-r--r--Source/Dafny/Resolver.cs4
-rw-r--r--Source/DafnyDriver/DafnyDriver.cs2
3 files changed, 5 insertions, 5 deletions
diff --git a/Source/Dafny/DafnyMain.cs b/Source/Dafny/DafnyMain.cs
index 7c522bd8..012ca4df 100644
--- a/Source/Dafny/DafnyMain.cs
+++ b/Source/Dafny/DafnyMain.cs
@@ -29,7 +29,7 @@ namespace Microsoft.Dafny {
/// <summary>
/// Returns null on success, or an error string otherwise.
/// </summary>
- public static string ParseCheck(List<string/*!*/>/*!*/ fileNames, string/*!*/ programName, out Program program)
+ public static string ParseCheck(IList<string/*!*/>/*!*/ fileNames, string/*!*/ programName, out Program program)
//modifies Bpl.CommandLineOptions.Clo.XmlSink.*;
{
Contract.Requires(programName != null);
@@ -84,7 +84,7 @@ namespace Microsoft.Dafny {
}
}
- public static string ParseIncludes(ModuleDecl module, BuiltIns builtIns, List<string> excludeFiles, Errors errs) {
+ public static string ParseIncludes(ModuleDecl module, BuiltIns builtIns, IList<string> excludeFiles, Errors errs) {
SortedSet<Include> includes = new SortedSet<Include>(new IncludeComparer());
foreach (string fileName in excludeFiles) {
includes.Add(new Include(null, fileName, Path.GetFullPath(fileName)));
diff --git a/Source/Dafny/Resolver.cs b/Source/Dafny/Resolver.cs
index f1e0f315..23f6bc6c 100644
--- a/Source/Dafny/Resolver.cs
+++ b/Source/Dafny/Resolver.cs
@@ -4879,7 +4879,7 @@ namespace Microsoft.Dafny
if (e is WildcardExpr) {
if (bodyMustBeSpecOnly) {
Error(e, "'decreases *' is not allowed on ghost loops");
- } else if (!codeContext.AllowsNontermination) {
+ } else if (!codeContext.AllowsNontermination && !DafnyOptions.O.Dafnycc) {
Error(e, "a possibly infinite loop is allowed only if the enclosing method is declared (with 'decreases *') to be possibly non-terminating");
}
}
@@ -4931,7 +4931,7 @@ namespace Microsoft.Dafny
if (e is WildcardExpr) {
if (s.IsGhost) {
Error(e, "'decreases *' is not allowed on ghost loops");
- } else if (!codeContext.AllowsNontermination) {
+ } else if (!codeContext.AllowsNontermination && !DafnyOptions.O.Dafnycc) {
Error(e, "a possibly infinite loop is allowed only if the enclosing method is declared (with 'decreases *') to be possibly non-terminating");
}
}
diff --git a/Source/DafnyDriver/DafnyDriver.cs b/Source/DafnyDriver/DafnyDriver.cs
index 5918fcfa..854269c1 100644
--- a/Source/DafnyDriver/DafnyDriver.cs
+++ b/Source/DafnyDriver/DafnyDriver.cs
@@ -114,7 +114,7 @@ namespace Microsoft.Dafny
}
- static ExitValue ProcessFiles(List<string/*!*/>/*!*/ fileNames, bool lookForSnapshots = true, string programId = null)
+ static ExitValue ProcessFiles(IList<string/*!*/>/*!*/ fileNames, bool lookForSnapshots = true, string programId = null)
{
Contract.Requires(cce.NonNullElements(fileNames));