Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ void EmitExpr(Expression e2, ConcreteSyntaxTree wr2, bool inLetExpr, ConcreteSyn
}

TrAssignSuchThat(new List<IVariable>(e.BoundVars).ConvertAll(bv => (IVariable)bv), e.RHSs[0],
e.Constraint_Bounds, e.tok.line, w, inLetExprBody);
e.Constraint_Bounds, w, inLetExprBody);
EmitReturnExpr(e.Body, e.Body.Type, true, w);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ protected void TrStmt(Statement stmt, ConcreteSyntaxTree wr, ConcreteSyntaxTree
}
} else {
Contract.Assert(s.Bounds != null);
TrAssignSuchThat(lhss, s.Expr, s.Bounds, s.Tok.line, wr, false);
TrAssignSuchThat(lhss, s.Expr, s.Bounds, wr, false);
}

break;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3538,7 +3538,7 @@ private void IntroduceAndAssignBoundVars(ExistsExpr exists, ConcreteSyntaxTree w
TrLocalVar(bv, false, wr);
}
var ivars = exists.BoundVars.ConvertAll(bv => (IVariable)bv);
TrAssignSuchThat(ivars, exists.Term, exists.Bounds, exists.tok.line, wr, false);
TrAssignSuchThat(ivars, exists.Term, exists.Bounds, wr, false);
}

private bool CanSequentializeForall(List<BoundVar> bvs, List<BoundedPool> bounds, Expression range, Expression lhs, Expression rhs) {
Expand Down Expand Up @@ -3665,7 +3665,7 @@ protected override bool VisitOneExpr(Expression expr, ref object st) {
}
}

private void TrAssignSuchThat(List<IVariable> lhss, Expression constraint, List<BoundedPool> bounds, int debuginfoLine, ConcreteSyntaxTree wr, bool inLetExprBody) {
private void TrAssignSuchThat(List<IVariable> lhss, Expression constraint, List<BoundedPool> bounds, ConcreteSyntaxTree wr, bool inLetExprBody) {
Contract.Requires(lhss != null);
Contract.Requires(constraint != null);
Contract.Requires(bounds != null);
Expand Down Expand Up @@ -3741,7 +3741,7 @@ private void TrAssignSuchThat(List<IVariable> lhss, Expression constraint, List<
copyInstrWriters.Pop();

// Java compiler throws unreachable error when absurd statement is written after unbounded for-loop, so we don't write it then.
EmitAbsurd(string.Format("assign-such-that search produced no value (line {0})", debuginfoLine), wrOuter, needIterLimit);
EmitAbsurd("assign-such-that search produced no value", wrOuter, needIterLimit);
}

protected interface ILvalue {
Expand Down
4 changes: 2 additions & 2 deletions Source/DafnyCore/GeneratedFromDafny/DCOMP.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5691,7 +5691,7 @@ public void GenExpr(DAST._IExpression e, DCOMP._ISelfInfo selfIdent, DCOMP._IEnv
goto after__ASSIGN_SUCH_THAT_0;
}
}
throw new System.Exception("assign-such-that search produced no value (line 4771)");
throw new System.Exception("assign-such-that search produced no value");
after__ASSIGN_SUCH_THAT_0: ;
_63_allReadCloned = Dafny.Sequence<Dafny.Rune>.Concat(Dafny.Sequence<Dafny.Rune>.Concat(Dafny.Sequence<Dafny.Rune>.Concat(Dafny.Sequence<Dafny.Rune>.Concat(Dafny.Sequence<Dafny.Rune>.Concat(_63_allReadCloned, Dafny.Sequence<Dafny.Rune>.UnicodeFromString("let ")), _64_next), Dafny.Sequence<Dafny.Rune>.UnicodeFromString(" = ")), _64_next), Dafny.Sequence<Dafny.Rune>.UnicodeFromString(".clone();\n"));
_62_recIdents = Dafny.Set<Dafny.ISequence<Dafny.Rune>>.Difference(_62_recIdents, Dafny.Set<Dafny.ISequence<Dafny.Rune>>.FromElements(_64_next));
Expand Down Expand Up @@ -7047,7 +7047,7 @@ public void GenExpr(DAST._IExpression e, DCOMP._ISelfInfo selfIdent, DCOMP._IEnv
goto after__ASSIGN_SUCH_THAT_1;
}
}
throw new System.Exception("assign-such-that search produced no value (line 5307)");
throw new System.Exception("assign-such-that search produced no value");
after__ASSIGN_SUCH_THAT_1: ;
if ((!object.Equals(selfIdent, DCOMP.SelfInfo.create_NoSelf())) && ((_310_next).Equals(Dafny.Sequence<Dafny.Rune>.UnicodeFromString("_this")))) {
RAST._IExpr _311_selfCloned;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public static __T UniqueElementOf<__T>(Dafny.ISet<__T> s) {
goto after__ASSIGN_SUCH_THAT_0;
}
}
throw new System.Exception("assign-such-that search produced no value (line 105)");
throw new System.Exception("assign-such-that search produced no value");
after__ASSIGN_SUCH_THAT_0: ;
return _0_e;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/DafnyCore/GeneratedFromDafny/Std_Collections_Seq.cs
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ public static Dafny.ISequence<__T> SetToSeq<__T>(Dafny.ISet<__T> s)
goto after__ASSIGN_SUCH_THAT_0;
}
}
throw new System.Exception("assign-such-that search produced no value (line 7245)");
throw new System.Exception("assign-such-that search produced no value");
after__ASSIGN_SUCH_THAT_0: ;
_0_left = Dafny.Set<__T>.Difference(_0_left, Dafny.Set<__T>.FromElements(_1_x));
xs = Dafny.Sequence<__T>.Concat(xs, Dafny.Sequence<__T>.FromElements(_1_x));
Expand Down