repo stringclasses 966
values | path stringlengths 5 283 | license stringclasses 13
values | stars int64 0 3.47k | default_branch stringclasses 15
values | commit_sha stringclasses 966
values | pushed_at stringdate 2015-04-17 10:56:12 2026-07-22 05:29:38 | size_bytes int64 0 1.91M | sha256 stringlengths 64 64 | content stringlengths 0 1.91M |
|---|---|---|---|---|---|---|---|---|---|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-151.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,010 | fe421f0154eb7b36a1e4b7eec38b5cd96523c8595f4f4d3172a488130d0d6fdb | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
type T = int
type U = int
type V = int
type W = int
type X = x: int | x > -10
type Y = x: int | x > -10
newtype Z = int
newtype K = int
}
module B {
type U = real
type V = int
type W = nat
type X = x: int... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1514.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 713 | ea162a641857b73f8a47a8238d29f1864dc00d07bdccc6fab309004db05caaf5 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-axioms --standard-libraries --relax-definite-assignment
import opened Std.Wrappers
trait Foo<C, D> {
function Bar(a: C): (r: D)
}
type FooWithResult<A, B> = Foo<A, Option<B>>
method Bar<E, F>(
a: E,
foo: FooWithResult<E, F>
)... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1514b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 749 | d54eb42ad9fe39f010892960fc62ccf108a1a57550a0aab32c363eae6c5f4875 | // RUN: %testDafnyForEachCompiler "%s" -- --type-system-refresh=false --general-newtypes=false --standard-libraries --relax-definite-assignment
import opened Std.Wrappers
trait Foo<C, D> {
method Bar(a: C) returns (r: D)
}
type FooWithResult<A, B> = Foo<A, Option<B>>
method Bar<E, F>(
a: E,
foo: F... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1514c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 435 | 5c79d71b8690c7b22b7329ed5367ea6a6d0db9d896fd25e36471de808aa508b6 | // RUN: %testDafnyForEachCompiler "%s" -- --standard-libraries --relax-definite-assignment
import opened Std.Wrappers
method id<T>(r: T) returns (r2: T) {
r2 := r;
}
method test(s: string) returns (r: Option<string>) {
r := None;
var x :- id<Option<string>>(Some(s));
r := Some(x);
}
method Ma... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-151b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 553 | 1fb16a8c4ad23bad5f33f74f6d751d06fcf721d055bb79c79a4abbd6035c8481 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
method m() {}
method p() {}
ghost function f(): int { 0 }
ghost function g(): int { 0 }
}
module B {
method m() {}
ghost function f(): int { 0 }
ghost function g(): int { 0 }
}
module C {
import opened A
impor... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1545.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,335 | 01169f1e23c51568a380b3faf552ba2ebb3b9d03205097fafad47364424dc4e3 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 --refresh-exit-code=4 "%s"
ghost predicate Foo(s: seq<int>) {
// Under the legacy resolver, a type test for a subset type is not allowed
forall i :: 0 <= i < |s| ==> i is nat // error (legacy resolver)
}
type Not3 = x: int | x != 3
lemma Tests(s: se... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1553.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 473 | b25cd0c3e2aa072fa0cc37ff2f73172039c87fdb238b08381f174563cf9ba8d6 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method Main() { }
method Test<R>() {
var r: R;
var s: seq<R>;
var t: array?<R>;
var u: array<R>;
var v: (R, int);
}
method Test0<R(0)>() {
var r: R;
var s: seq<R>;
var t: array?<R>;
var u: arra... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1564-3.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 530 | d666220fe96e4d728eef9b08d3077dd36fe4dd5fad4c16d50283e24728b4693a | // RUN: %verify --function-syntax:3 --print:- "%s" > "%t"
// RUN: %verify --function-syntax:experimentalDefaultGhost --print:- "%s" >> "%t"
// RUN: %verify --function-syntax:experimentalDefaultCompiled --print:- "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
function F0(): int
function method F1(): int
twostate ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1564-3to4.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 554 | e43e7c655183fb8ba1eb566d17a678f53ef837e1895d3736e2299943d37592a2 | // RUN: %verify --function-syntax:migration3to4 --print:- "%s" > "%t"
// RUN: %verify --function-syntax:experimentalDefaultGhost --print:- "%s" >> "%t"
// RUN: %verify --function-syntax:experimentalDefaultCompiled --print:- "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
ghost function F0(): int
function method F1()... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1564-4.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 528 | 2ae916912d7fa8bd38f575ca3c09f249a80076f4483c4c6eea755d55d91101c3 | // RUN: %verify --function-syntax:4 --print:- "%s" > "%t"
// RUN: %verify --function-syntax:experimentalDefaultGhost --print:- "%s" >> "%t"
// RUN: %verify --function-syntax:experimentalDefaultCompiled --print:- "%s" >> "%t"
// RUN: %diff "%s.expect" "%t"
ghost function F0(): int
function F1(): int
twostate f... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1564-eag.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 368 | f862faa78f1f993f84085e1483aa4f02386f8e24934ac54c9504c95b8293ef56 | // RUN: %verify --function-syntax:experimentalPredicateAlwaysGhost --print:- "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
ghost function F0(): int
function F1(): int
twostate function G0(): int
function H0(): int {
2
} by method {
return 2;
}
predicate P1()
twostate predicate Q0()
predicate R0... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1564.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,667 | 6ec7a819049da65728868220501ba3591c3632ca84f3ec5cd59651edcd1f4c32 | // RUN: ! %verify --function-syntax:3 "%s" > "%t"
// RUN: ! %verify --function-syntax:migration3to4 "%s" >> "%t"
// RUN: ! %verify --function-syntax:4 "%s" >> "%t"
// RUN: ! %verify --function-syntax:experimentalDefaultGhost "%s" >> "%t"
// RUN: ! %verify --function-syntax:experimentalDefaultCompiled "%s" >> "%t"
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1587.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 145 | 38adeb1a2d4e71b164391e24c6ea86f2a35fe42e6939e8725cd80265b6916383 | // RUN: %testDafnyForEachResolver "%s"
datatype Foo = Foo(Keys: (), Values: (), Items: (), IsLimit: (), IsSucc: (), Offset: (), IsNat: ())
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1604.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 849 | f7af3ce338738fd0ae66969b92a39d030b12293ebf7e2b6584146420efae2165 | // RUN: %testDafnyForEachCompiler "%s"
trait Tr extends object { }
class A extends Tr { }
class B extends Tr { }
ghost predicate SpecialA(a: A)
{
false
}
type Ap = x : A | SpecialA(x) witness *
function testSpecial(x: Tr): bool
requires x is A && SpecialA(x as A)
{
1/0 == 0
}
function test(... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1604b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,133 | 1a03e34f4e40232918beba8185f038341b2679c5c9637df8433cfd17035e29b7 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --error-limit:0 --relax-definite-assignment
// Double constraints. Will this still work?
datatype Cell = Cell(x: int)
// Compilable constraint
type CompilableNaturalCell = cn: Cell | cn.x >= 0 witness Cell(0)
// Compilable constraint
type Com... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1604c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,093 | 05a72138411fc522cf040d190f627cbb7e875172dbb0b0ab7d8fb015d1bc2707 | // RUN: %exits-with 4 %build --error-limit 0 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
ghost predicate EvenNat(n: nat) { n % 2 == 0 }
ghost predicate TrueInt(x: int) { true }
method NatTypeInferenceType() {
// These behave as they had before
assert forall n: nat :: EvenNat(n) ==> TrueInt(n); // correct, si... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1607.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 331 | 1bc3bbb6fb3eea9dbd57633260d5c6f67d57948c691eb8dfb81d40efd86edb36 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
module M {
datatype D = D_1(a: bool) | D_2(b: bool)
method DoIt (d: D)
{
if (d.D_1?) {
print "1 ", d.a;
}
else {
print "2 ", d.b;
}
}
}
method Main(){
var x : M.D := M.D_2(true);
M.DoIt(x);
print... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1618.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 159 | b58b2164b1ed117d7e6abff4ea155fcf204c7d5189620db1439b3f740e338cc7 | // RUN: %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function {:opaque} mul(a: int, b: int): int
{
a * b
}
method M()
{
reveal mul;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1619.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,693 | 5374a4ec194c6549045c9e1727cebbabfa4fcc91de22cb4d0310d8b6bb41a38a | // RUN: %exits-with 4 %build "%s" --relax-definite-assignment --allow-axioms > "%t"
// RUN: %diff "%s.expect" "%t"
opaque predicate P<W>(w: W) {
true
}
method GimmieOne<W>(s: seq<W>) returns (c: W)
requires s != []
{
return s[0];
}
method M0<W>(s: seq<W>) returns (ghost r: W)
{
var b := exists... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1637.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 410 | 949ccdb7cd82a7144ecc8e619b4d02de88a68df70d1ff4aa9641c85b2ab0505b | // RUN: %exits-with 2 %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type uint8 = i | 0 <= i <= 255
datatype Thing = Thing
type Foo = s: seq<uint8> | |s| < 10 witness *
type Fii = real
function {:axiom} Bar(t: Thing): Foo
function {:axiom} Bii(t: Thing): Fii
predicate {:axiom} Baz(f: Thing -> se... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1639.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 184 | ec763c792cec214caeb9371def64ddd9f77c805800f807f45761387105d9b246 | // RUN: %testDafnyForEachResolver "%s"
module Foo {
ghost function Fun(): () {
calc { 0; }
()
}
}
abstract module Bar {
import Foo' : Foo
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1665.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,733 | 00ee39ba07fc9031a6f05176fd2033f1cb619caff9348160d8b3af80740f66e4 | // Check that Rprinted program is generated as expected:
// RUN: %resolve --rprint "%t".raw.dfy "%s"
// RUN: %diff "%s.expect" "%t".raw.dfy
// Check that original program successfully verifies (exit code 0):
// RUN: %verify --relax-definite-assignment "%s" > "%t".1
// Check that produced rprinted program also ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1665a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 806 | a23b7e900da868924d58de0cc93f892a85dc363297e514cfaf1c10ebb2d65ba3 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// Additional tests
module TypeCasts {
method P(x: int) {
match x
case m =>
}
method M0(x: int) {
match x
case n: nat => // error: x may be negative
print n, "\n";
}
method M1(x: int) {
match x
ca... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1676.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,839 | 49e906771800cd6dc6a30e63f03fa3c2e5100750cbb2c4343eea4acfad6cf9ca | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M0 {
lemma NonNegative(x: nat)
ensures 0 <= x
{
}
method Test0() {
var a: seq<nat> := [0];
var b: seq<int> := [-1];
var s: seq<nat>;
if * {
s := a + b; // error: RHS is a seq<int>, but not a... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1682.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 145 | 8191eefee7664dfb0083d49c07df91dfbb93511db0f341f79543ea3ee96055e6 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
method IsUnique(str: array<char>) returns (ret: bool)
{
ret := multiset
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1700.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 285 | d2d3e241f5da874950f3d2126d0731d189a8d9e570e60fdbcfd66c423789d729 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module A {
class E {}
class D { var e: E constructor(e: E) { this.e := e; } }
}
module B {
datatype E = E
datatype Box = Boxed(e: E)
}
method testF(a: A.D) {
var b := B.Boxed(a.e);
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1714.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 350 | 0972742499f0586ad94fab34880f4fcbd2e646bfd1da9282fb852ef15f8ca082 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
trait Base {}
class Derived extends Base { var n: int constructor() { n := 0; } }
method f(b: Base) {
if (b is Derived) {
print "(b as Derived).n == ", (b as Derived).n, "\n";
}
}
method Main() {
var d :... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1731.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,982 | b24897a483d38bea6ab85bebbe297c9b827069fd3d6799f4000b426bfde00b20 | // RUN: %build --type-system-refresh "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module PreviouslyAProblem {
trait Base {
}
class Derived extends Base {
var n: int
constructor(n: int)
ensures this.n == n
{
this.n := n;
}
}
function Upcast(d: Derived): Base {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1761.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 285 | 22c56662209a91020967175ded9f5173474daf9898ff5dce8acf91893f2487d6 | // RUN: %baredafny run %args "%s" --input %S/git-issue-1761-extern.cs > "%t"
// RUN: %diff "%s.expect" "%t"
class {:extern "ABC"} XYZ {
var y: bool
constructor {:extern} (x: bool) {
y := x;
}
}
method Main() {
var xyz := new XYZ(true);
print xyz.y, "\n";
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1762.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 414 | 6b9baeb0d8240174e8d3dc3d7a739c09b22f949f02e45f3fdc70f937c9544176 | // RUN: %run "%s" --input %S/git-issue-1761-extern.cs > "%t"
// RUN: %diff "%s.expect" "%t"
class {:extern "ABC"} XYZ {
var y: bool
constructor {:extern} Init(x: bool) {
y := x;
}
constructor {:extern} Create(x: bool, z: bool) {
y := x && z;
}
}
method Main() {
var xyz := new XYZ.Ini... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-179.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 616 | d6aed0d8b587340578147f8ab38261998e6bf078c90dccb05ad09b3e0c40a33d | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108
// RUN: %verify --relax-definite-assignment "%s" > "%t"
// RUN: %run --no-verify --target cs "%s" >> "%t"
// RUN: %run --no-verify --target js "%s" >> "%t"
// RUN: %run --no-verify --target go "%s" >> "%t"
// RUN: %run --no-verify --target java "%s" >>... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-181.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,255 | 62f1213a47b1d6ef7bf80153d2a4376a53ba839f0a364b0a847dd7004822d0e8 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype Result<T> = Failure(error: string) | Success(value: T)
datatype ResultN<T(!new)> = Failure(error: string) | Success(value: T)
class C {}
method m() {
var x1: Result<int>;
var x2: ResultN<int>;
var x3: Result<C>;
var... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1812.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 763 | e6512d82272b05ba5dd6221073091aa2c6c5b80f3dd69945ed81552bc5eec6bb | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
ghost function Max(s: set<int>): (m: int)
requires s != {}
{
var x :| x in s;
if s == {x} then
x
else
var s' := s - {x};
var y := Max(s');
y
}
method IncorrectLoop0(m: int)
{
var r := {m};
while r != {}
// ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1815a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 336 | 1d4eac56e49aeb194753d316fddd363523a4eba52e320df70d61b3c0c4c176e5 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype Dt<+U> = Dt(x: U, i: int)
trait Tr {}
class Cl extends Tr {
constructor () {}
}
method Main() {
var cl: Cl := new Cl();
var e: Dt<Tr> := Dt(cl, 1815);
match e {
case Dt(tr, _) =>
}
prin... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1815b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 376 | 301ad61d2f7c6b3a7bc2c2c57e59c9fb59152ab177b22f9d2afc3772301c4db0 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
datatype Y<+U> = Y(y: U)
trait Tr {}
class Cl extends Tr {
constructor () {}
}
method Main() {
// Because Y is an erasable type wrapper, it gets compiled as its argument,
// so even Java supports this one.
var cl := new Cl();
var e: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1838.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 147 | 48194019c3e5464efcdd0e83a2a00cfe64728ef2d415cc45244574bce701a414 | // RUN: %verify %S/git-issue-1838.dfy > "%t"
// RUN: %diff "%s.expect" "%t"
module A.B {
type u64 = x | 0 <= x <= 0xffff_ffff_ffff_ffff
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1852.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 562 | 25c6dc2d16055c6e6f71b6116ceb0aaa94bec33e7ff1c6731706e1984adf83cf | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
module A {
export
reveals F, G
ghost function G(): int { 5 }
function F(): int {
G()
} by method {
return 5;
}
}
module B {
export
provides F
ghost function G(): int { 5 }
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1875.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,798 | a41406266446a1afc86df9a12980f4f88abfe4e37f1906827f56f930aadb08f2 | // RUN: %testDafnyForEachResolver "%s"
/// This file checks whether sufficient axioms are generated to compare
/// datatypes constructed using subset types over sequences.
module Datatype {
datatype Box_<T> = Box(t: T)
type Box<T> = b: Box_<T> | true witness *
datatype List<T> = Nil | Cons(t: T, Box... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1887.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 394 | b2f773b0ce895b80ddd14091e8ebd8b4ab620c2d81663d680f29ca378795540c | // RUN: %exits-with 2 %build --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function selectOneConstraint<T>(s: seq<T>): seq<string> {
if |s| == 0 then []
else [s[0]] + selectOneConstraint(s[1..])
}
function selectManyConstraint<T>(s: seq<T>): seq<string> {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1903.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 197 | d2c3b6d479de4ffb7162c0a6930098d5c6cb3bce39fe6d905c13c5e514b2540a | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
method g<T>(x : seq<T> := [])
{
print "worked!\n";
}
method Main() {
g<nat>();
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1909.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,283 | 859bbf58c8b05296f48186a364bc5d1bcc5eb316d45ddeed83f11289e7ef80c4 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype ABC = ABC(nameonly a: int, nameonly b: int, nameonly c: int)
function JustChangeB(abc: ABC): ABC {
// The following line once gave an error, complaining 'a' wasn't specified by name. That's been fixed.
abc.(... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1957.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 163 | 016109c149d781a01cd48cdac4eba5280dc051cdaf331afe4970dbb79ea028bc | // RUN: %verify --show-hints "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
class {:autocontracts} Thing {
ghost predicate Valid() {
true
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1958.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,229 | da1182f56d1c4b63bc8d20f6e842153f78dddbd0403266fa48d99c78900c8a76 | // RUN: %exits-with 4 %verify --type-system-refresh --general-traits=datatype "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Example0 {
datatype BaseType = Ctor(x: int)
{
predicate i()
}
type R = r: BaseType | r.i() witness *
function F0(v: nat): R { // anonymous result value
var o: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1963a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 408 | 9d006910882b2a0ca5b6482bec35b66b1ace8e95ee6f808482b219b00cd90404 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
/// This file checks that refinement is forbidden for newtypes
module A {
newtype NT = x: int | x >= 0 witness 0
lemma P(x: NT) ensures x >= 0 {}
}
module B refines A {
newtype NT = ... x: int | x < 0 witness -1 // Error: Change (or repeat... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1963b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 376 | a941ba622f401aff5d2eac78fc6e06fa43ff574cd6bda4aab5deb4d9a93412da | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
/// This file checks that refinement is forbidden for datatypes
module A {
datatype D = D
lemma P(d: D) ensures d == D {}
}
module B refines A {
datatype D = ... D | D' // Error: Cannot change (or repeat) constructors
}
method M() ensu... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1963c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 988 | 1613ab66d02864a0c0bce1f6441996ee9c714b6914bcf9b9ad8037c1d8488854 | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
/// This file checks that refinement works for members of newtypes and
/// datatypes.
abstract module A {
datatype D = D {
function f(): int
function g(): int { 1 }
}
newtype NT0 = int {
function f(): int
function g(): int... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1966.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 284 | 54648d7eb951de5b9334f0e8cfbb7da85c47ebe3521e9781643a25557ec516e6 | // RUN: %exits-with 2 %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// {:compile false}: no error
module {:compile false} {:extern "M"} M1 {}
module {:compile false} {:extern "M"} M2 {}
// {:compile true}: error
module {:extern "P"} P1 {}
module {:extern "P"} P2 {}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1984.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 181 | 17f643161ccd4f5e0499ac61e435ad13c9c1e6480e70316474a560ad94c65b5b | // RUN: %testDafnyForEachResolver "%s"
method {:extern "test"} testInt(i: int)
method {:extern "test"} testBool(b: bool) // Previously the verifier reported a name collision
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1989.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,635 | 60ae040030642c6199de8212013b2fae805a0b119ef3bb079699527d5ed6df30 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// ---------------------------------------
module Test {
class C {
}
ghost function arrSet(a: array<C>): set<object>
reads a
{
set i : int | 0 <= i < a.Length :: a[i]
}
method test(a: array<C>, i: int, x: C)
modifie... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1992.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 213 | 310f62dbdfbe2b0127537cb7e2186eb1ef92c67df8b4f7b811074950d0372136 | // RUN: %exits-with 4 %baredafny verify --use-basename-for-filename --show-snippets:false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function foo(x: int): int {
match x // Error here
case 0 => 1
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-1996.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,769 | 6bbe63a94cf9c0896cf3c4766601669e7f8864b2c44db904269696efd37a72de | // RUN: %exits-with 2 %verify --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module M {
datatype M = C // note, top-level declaration has same name as enclosing module
datatype SomethingElse = SE
}
module N {
datatype M = D
datatype Record = R
}
m... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,655 | 1ff8cb150cc880b5b55f8bdcdde2084abcc4f51daf15e678ba448ca693db92d0 | // RUN: %exits-with 2 %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// Resolution (for verification, see git-issue-19b.dfy)
module M0 {
// This is the original example from Issue 19. It has been fixed by the resolution
// check that forbids functions that would depend on the allocation ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,888 | 300800c25e8b1249a6c7c86bb82092d8ae1b5ed3102861c8773357452474f147 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
// Verification (for resolution, see git-issue-19a.dfy)
module M0 {
class Basic {
var data: int
}
class Cell {
const x: int
var y: int
constructor (x: int, y: int)
decreases if x == y == 0 then 0 else 1
{
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-19c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,770 | 7432de87dcb0bf78eeb337cca400a3205a85d8ad91b12cd95a1828791801de76 | // RUN: %exits-with 2 %dafny "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// Resolution checks for functions appearing in reads clauses
module Types {
class Basic {
var data: int
}
datatype Record<X> = Record(X)
}
module A {
import opened Types
function F0(f: int ~> real): real
req... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2013.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,304 | a71bcf51d3a1483a4bd501a65fc46e852d0000543a01c97a68e1ca4526c91d95 | // RUN: %testDafnyForEachCompiler "%s" -- --relax-definite-assignment --type-system-refresh=false --general-traits=legacy --general-newtypes=false
method Main() {
TestTraits();
TestSiblings();
TestException();
MoreTests.Test();
Conveyance.Test();
Regression.Test();
}
// ----- reference types ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2016.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 177 | 7fa9dbb0b2b03eeb3656acf43dab31ddfb05b3f6f73668f94996f28325ef2f87 | // RUN: %testDafnyForEachResolver "%s"
module M {
datatype D = D() {
static function f(): (res: int) {
5
} by method {
return 5;
}
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2019.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 476 | 8b14cffb97ef5340a48e0d9736cd3266007c342ae5f7fdc9426679f9e94843ea | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
method f(x: seq<int>) returns (res: seq<int>)
ensures x == res
{
var y := [];
for i := 0 to |x|
invariant |y| == i
invariant x[..i] == y[..i]
{
y := y + [x[i]];
}
return y;
}
function f(x: seq<int>): seq<int> {
x
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-202.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 236 | 1590732fe9bbc77339600da497518beb8e13df6ee04b7f725367bd27f3f5dac4 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
method push<T>(sequence: seq<T>, element: T) returns (new_sequence: seq<T>)
ensures sequence == new_sequence[..|new_sequence|-1]
{
return sequence + [element];
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2022.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 205 | deda6a79e86048b41cc8791c1e7a1f03b9ad248a869e5b9783ffe2dbb3882323 | // RUN: %testDafnyForEachResolver "%s"
module M {
export
provides
Opened,
f
module Opened {
type T = int
}
ghost function f(x: Opened.T): int {
5
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2026.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,096 | c94cab8162c196dd7eda32880b6b94b06eabb9e40ce4d617d241e4c0fd18ef56 | // RUN: %exits-with 4 %verify --extract-counterexample "%s" > "%t".raw
// RUN: grep -E "Error:|Related counterexample|Dafny program verifier finished" "%t".raw > "%t"
// RUN: %diff "%s.expect" "%t"
// NB: with recent Z3 versions (e.g., 4.12.1), this program no longer
// results in the minimal counterexample that ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2040.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 271 | ed1195d1e2a096c2ddbba4bb1be1614429601c52b00c58eaa8b4122d6bd76960 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
class C {
var x: int
}
datatype D = B(c: C)
predicate P(d: D)
// the following line once caused a crash in the resolver
reads B.c // error: wrong number of arguments to B
{
d.c.x >= 0
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2064.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,922 | e800449d50930f9f05a40c87697cac7c7285356cf095bef0787ddce7749b92f1 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module CoreTests {
abstract module UnitTestParent {
type T(!new)
type U(==)
type V(0)
type W(00)
}
module OpaqueType refines UnitTestParent {
type A
type T = A // error: A is not (!new)
type U = A // error: A is... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2068.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 269 | 840bc152af114583bd1d978dc47678c098b172825ba049a5c82a191b14e0fecb | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type A = s: object | true witness this
const x: object := this
type St_ = map<nat,Ob>
type Ob {
ghost predicate i(s:St_)
}
type St = s:St_ | (forall o | o in s.Values :: o.i(this))
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2071.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 561 | 1c28dc5ce3a6e0a0b741176747a468a2dea5ab3ba8765765ff37b738c14b049d | // RUN: %translate java %trargs "%s" > "%t"
// RUN: javac -cp %binaryDir/DafnyRuntime.jar%{pathsep}%S/git-issue-2071-java %S/git-issue-2071-java/git_issue_2071.java %S/git-issue-2071-java/*/*.java >> "%t"
// RUN: java -ea -cp %binaryDir/DafnyRuntime.jar%{pathsep}%S/git-issue-2071-java git_issue_2071 >> "%t"
// RUN: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2074.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 129 | f837dbe94ad28de9323aa109c1ea728008fafb9bc7c305b83386596f4bed9cff | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method m() {
var f := st => set x | x in st;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2100.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 556 | 5578f3790628227e923a0cd26bfb89381a263970c129180b9813574667002261 | // RUN: %testDafnyForEachResolver "%s"
module Library {
export
provides Cl
trait Tr { }
class Cl extends Tr { }
}
module Client {
import Library
// The mention of the export-provided Cl below (in the case where
// its parent type, Tr, is not exported) once generated malformed
// B... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2103.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 200 | 839b01ff967b5dbcdbffade30ea4ae4a0471b9979fea80ab923d5fb498c3bbe8 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
datatype DT_<+A> = DT(ret: A)
type DT<A> = r: DT_<A> | true witness *
method Main() {
var d := DT(3);
print d, "\n"; // 3
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2106.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 130 | d93125de3d8f67df71514848454cfee9cfafe76e92bf5c7cf08ad32dcb90929e | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
predicate P(x: bool)
type WE = e: (int, int) | P()
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2108.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 145 | d6a75def0df313d06c3f6ab0472a31b3d023849c5c48bd8172cd7eae4bf0a886 | // RUN: %testDafnyForEachResolver "%s"
module M0.M1.Base {}
module M0.M2 {
import M1.Base
module Derived refines Base {
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2111.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 153 | 5c881f3d37785dba420f670b1c70ec99bdf5a48df4eba7252e8bb50c786847d2 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
datatype DT = C(s: string) {
ghost predicate F() {
C.XYZ()
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2134.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,379 | fda1becda98831f2b2e63a303497b2cd966aaa5aaefb13e562678e38b148471e | // RUN: %exits-with 2 %build --type-system-refresh "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module NewtypeCycle0 {
newtype A = b | P(b)
newtype B = a: A | true
predicate P(b: B) // error: cycle in definition
}
module NewtypeCycle1 {
newtype A = b | P(b)
newtype B = a | Q(a)
predicate P(b... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2139.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 597 | 7d26dd4bb4a52c050f8d7b8be69e4c92acdd4a0581ff020b6c0a94c1b67209ef | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module A {
datatype T = T(T, T)
{
ghost predicate P() {
match this
case T(0, 1) => false // error (x2): neither constant pattern of constructor pattern has the right type
}
}
method M() {
var tok :=... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-216.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 474 | ab035e7d8095788ac35f16bf4cdcd6c0c8fc894c38f0b93c9a1a8310911276b3 | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module Comparator {
datatype Comparator = Comparator(int)
}
abstract module ADT {
import C: Comparator
}
abstract module CC {
import C: Comparator
}
abstract module IntADT {
import ADT
import CC
method m()
{
var cmp... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2173.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 242 | 34dd9a26d4722f48d945dd16a6c6290d7e4cc8b16eaba358833039ba8d083009 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
datatype T = Leaf(x: int) | T(t: T) {
function {:tailrecursion} TR() : int {
if Leaf? then 0
else t.TR()
}
}
method Main() {
print Leaf(0).TR(), "\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2197.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 485 | c3443457109f58b8ab9ba3891d84906208c064c54db336f6f2bce44ea85f2eb3 | // RUN: %exits-with 4 %baredafny verify --use-basename-for-filename --show-snippets "%s" > "%t".raw
// RUN: %sed 's/^.*[\/\\]//' "%t".raw > "%t"
// RUN: %diff "%s.expect" "%t"
ghost predicate Test(y: int) {
y >= 1
}
method f(b: bool) returns (y: int)
ensures Test(y)
{
y := 0;
}
method g(b: bool, ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2200.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 142 | dd9b0bdb214d17408c78606dede92c6d10b8a6cff2e6d00343277ce69db512b3 | // RUN: %exits-with 2 %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
function f(i: int): int { 42 }
function g(): int { f(1,2) }
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 360 | f78ec0e457039d858be23c628f8f0eb85a72fc60933c5bb1af545e9216b244b3 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
predicate P1(a: int)
predicate P2(a: int)
predicate Q(s: seq<int>) {
forall i | 0 <= i < |s| ::
&& P1(s[i])
&& P2(s[i])
}
method M(s: seq<int>)
requires forall i | 0 <= i < |s| :: P1(s[i])
// requires forall i | 0 <=... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2211a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 406 | e81011d75c7343dfa472c8358dd2e82e735748c4410b29aeba07804c5c8e67d1 | // RUN: %exits-with 4 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
predicate P1(a: int)
predicate P2(a: int)
predicate P3(a: int)
predicate Q(s: seq<int>) {
exists i | 0 <= i < |s| ::
|| P1(s[i])
|| P2(s[i])
}
method M(s: seq<int>)
requires exists i | 0 <= i < |s| :: P1(s[i]) || P2(s[... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2216.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 993 | 4fe4f2eb87f68bac2c907171922727214368f1612e8edb719505d2ab7c8cfc31 | // NONUNIFORM: Too slow on other backends
// RUN: %run --no-verify --target cs "%s" >> "%t"
const REPEAT := 100_000
method NoPhysicalEqualityOnSequences(s: seq<int>) {
for i := 0 to REPEAT {
var b := s == s; // No physical equality makes this take linear time
}
}
method EqualityAtLeastLinear(s: se... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2265.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 331 | 4a4802e4be4c122c9ae7d43234d1a1bc3712398e2b3934441bc15dc44f2262e5 | // RUN: %testDafnyForEachResolver "%s" -- --allow-warnings
module DefaultModule {
class DefaultClass {
static ghost function BrokenFunction(): nat {
var y := 0;
assert true by {
if foobarquux: bool :| true {
assert true || foobarquux;
}
}
0
}
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2266.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 213 | 230104d6f7a3358a1a021736d250028d47ade1ccfc0f31a2b8c2365f4aabc58e | // RUN: %verify --bprint "%t.bpl" "%s"
// RUN: %boogie "%t.bpl" > "%t"
// RUN: %diff "%s.expect" "%t"
function Test(f: (int ~> bool)): (b:bool) requires forall x: int :: f.requires(x) reads f.reads { true }
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-227.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,128 | dc34f3e6072dd5e01bf36eb3fe365ecb0a23eb2064a3c18aa478d73a83c74133 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
/* This is a trimmed down version of the original bug. The original program can be found in Issue #227.
This trimmed version is only for the purpose of testing the type-checking error messages. */
module AbstractMap {
datatype Consta... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2299.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,521 | 75a3672a22287746e4efce0aeae723cbd0eefb8f3e2fc667bbb85b9adb147def | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class Twostate {
var z: int
twostate predicate Increase()
reads this
{
old(z) <= z
}
twostate predicate NoChange()
reads this
{
unchanged(this)
}
static twostate predicate IsFresh(new c: Twostate)
{
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2301.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,667 | 8faab1560044237a4ee44bb37b9a6ecc21e58636bc07b382ec919699e832c612 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
class Twostate {
var z: int
twostate predicate NoChange_ReadsThis()
reads this
{
unchanged(this)
}
twostate predicate NoChange_ReadsNothing()
{
unchanged(this) // error: insufficient reads clause
}
method Test0... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2303.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 451 | 854527ac98950b2c539752256e1da3685991fe2b1181dd2e03c752dd761e398c | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module A {
newtype int0 = x | true // newtype's base type is not fully determined; add an explicit type for 'x'
}
module B {
newtype int0 = y | true
const x: int0 := 0 // type for constant 'x' is 'int0', but its initialization value type is '... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2307.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,119 | 57f0e5ba91f1de81ea84ce727cfd1a20b364db3d7e802f61a2b92eb87d0c6d87 | // RUN: %testDafnyForEachResolver "%s" -- --allow-deprecation
module A {
newtype int0 = x: int | true
type int1 = x: int0 | true
const x: int0 := 0;
const y: int1 := 0 as int1;
// It was once the case that Dafny inferred the type of 0 in the next line as 'int', which is bad.
const z: int1 := 0;... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2367.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 252 | 5b662e7b8a7ae579b892d6b12cc24e3cd857e93a47f76bbae58f80b310f32792 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s"
newtype IntSubset = i:int | true
method Main() {
if 2 != (-6 as IntSubset % -4) as int {
print 1 / 0;
}
if -2 != (-6 as IntSubset / 4) as int {
print 1 / 0;
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2380.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 631 | 459c91cf5ee66dd59006449eb7da4d7096950a8edf01ce108d8b21911db8cb88 | // RUN: %testDafnyForEachResolver "%s"
method M0(t: map<int, int>, k: int)
requires k in t
{
if * {
assert |t| == |t - {k}| + 1;
} else if * {
assume t.Items == {(1, 2), (3, 4)};
assert |t| == 2;
} else {
assume t.Values == {2, 3, 4};
assert |t| >= 2;
}
}
method M0'(t: ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2384.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 532 | a6ecf8dc4c29f9daa9bf6110753d7f810bac51742dd801bf929a9f12c4de24da | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
trait T {
method M()
ghost predicate P()
ghost function F(): int
}
class C extends T {
method M() // method might modify an object not in the parent trait context's modifies clause
modifies this
ghost predicate P() // predicate m... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2429.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,125 | 09b75e028d91e9aa9e4deb0daa107dee8782d508d56454b47664bd12463db198 | // RUN: %verify --allow-axioms --type-system-refresh=false --general-newtypes=false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
ghost predicate P<A>(s: seq<A>)
trait T<A> extends object {
method M(a: A)
requires Q([a][0 := a])
modifies if P([a][0 := a]) then {} else {this}
ensures P([a][0 := a])... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2441.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 133 | 5201eac242890e12d09510be7be982671e4f91dca8718671caf7dee590687e7d | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
datatype A = A(B: B)
datatype B = X
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2477.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 401 | 3a66eb06f005a3c2e292ed566c92c0c62238877c60511e6dd76a58bf169ddd9a | // RUN: %exits-with 4 %baredafny verify --show-snippets:false --use-basename-for-filename --cores:2 --verification-time-limit:300 --resource-limit:5e6 "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
trait T extends object {
predicate P()
reads {this}
}
class C extends T {
predicate P() // predicate's decr... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2496.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 109 | acb4a8285f404d83f2c93fc6c34d597c0bed19e3c5b5d750157b982233f01595 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method M() {
b1 :| true;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2500.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,168 | 62f7cf023bdb37a600c9f87753be311d561b89e01b74928953e5e9ab9505b7bc | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
module M {
trait {:termination false} Top {
predicate ActuallyTrue() ensures ActuallyTrue()
}
trait {:termination false} Tr extends Top {
predicate True(): (ret: bool) ensures ret
predicate True'() ensures True'()
predicate Ac... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2506.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,753 | 3f6867bffa6c0137b125a432f7bbeeca702939f48b51663f3eaf947fe11880ab | // RUN: %testDafnyForEachResolver --expect-exit-code=2 "%s"
module Class {
class T {
static const a := 1 + b
static const b := 2
static ghost predicate F() decreases 0 { !L() }
static least predicate L() { F() }
// a recursive call from a least predicate can go only to other least p... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2507.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 196 | 4a3e94fd925a7bbe98f322ec9e0d27ad4c1adc0789d39bb354d413a529e797ea | // RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename --show-snippets:false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method Test(i: int) {
assert i >= 0
var j := 2;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2510.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 465 | 9bd429f1eb2a16264b14199ceb80e250ae8b373fd4dc4f2e2db12f6727e9f138 | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment
/// Check that the compiler accepts `:- assume {:axiom} …`.
datatype Result<+T> = | Success(value: T) | Failure {
predicate IsFailure() { Failure? }
function PropagateFailure<U>(): Result<U> requires Failure? { Failu... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2511.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,026 | 6f6ff46ee738c3091370fadb78022e8dcebe777277c3b8633baa89929c37c556 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
module WhileLoops {
lemma false_lemma()
ensures false
{
var tmp: bv64 := 1;
while tmp != 0
decreases tmp
{
tmp := tmp >> 1;
}
assert false; // Assertion failure
}
}
module Recursion {
method Infl... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2550.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 144 | 165e9aa0dcf73c85703fbe140f871f7d29713626561718364e1c2c71b9a8eb0b | // RUN: %exits-with 2 %resolve "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
type Foo
module bar {
class C {
var baz : Foo
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-256.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 451 | 360ef641e14a75640d77996c1ee9f679ed29e1c6f20a65542b008d609bd4a9d3 | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s"
module List {
datatype t<A> = Nil | Cons(A, t<A>)
}
module String_Utils {
import List
lemma compareNth(A : List.t<char>, B : List.t<char>) {
match (A, B)
case (Nil, Cons(_, _)) =>
}
lemma compare(A : List.t<char>, B : List.... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.