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/dafnydoc/doc0/Doc.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 261 | ed83fcbb210735fbfcbe4ea7ff7bcfce8de6af43f2f82ecb6df5ac2e4517ddf1 | // RUN: %baredafny doc "%S"/doc.toml
// RUN: %diff "%S"/documentation/index.html "%S"/docs-expected/index.html
// RUN: %diff "%S"/documentation/__95.html "%S"/docs-expected/__95.html
// RUN: %diff "%S"/documentation/styles.css "%S"/docs-expected/styles.css
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafnydoc/doc1/TestDafnyDoc.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,794 | dbb2236d268c3420df178ae1147501592b328cef38c43af0a2f1ae46effac32d | // RUN: %baredafny doc --use-basename-for-filename "%s" > "%t"
// RUN: %diff "%S"/docs-expected/index.html ./docs/index.html
// RUN: %diff "%S"/docs-expected/TestModule_214638566.html ./docs/TestModule_214638566.html
/** Test module. More about this test module. */
module {:options "--function-syntax:4"} TestMo... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafnydoc/doc2/Test.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 397 | 5b30e6a03eb7fdf9b0234b1231be429473215120fcca1d1b9f1e4b681104ee0d | // RUN: rm -rf "%S/docs2"
// RUN: %baredafny doc --use-basename-for-filename --program-name=TestProgram --output:"%S/docs2" "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// RUN: %diff "%S/docs2/index.html" "%S/docs-expected/index.html"
// RUN: %diff "%S/docs2/__95.html" "%S/docs-expected/__95.html"
// RUN: %diff "%S/... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/dafnydoc/doc4/Test.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 124 | b054dbed654fd0b5439cb2c861590de4c52dfd9ebe2f45eddcc9f6c67df906e1 | // RUN: %baredafny doc --use-basename-for-filename --verbose "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Test {}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/DafnyTests/RunAllTests/RunAllTestsOption.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,202 | fd8e2d72318cc593d491e66f6fb1574b230a97bf80ecaf35c87d66799ce9a191 | // RUN: %verify "%s" > "%t"
// RUN: %translate cs %trargs %s --include-runtime --include-test-runner --no-verify --output %S/Output/manual/program.cs >> "%t"
// RUN: ! dotnet run -v q --property WarningLevel=0 --project %S/RunAllTests.csproj >> "%t"
// RUN: ! %baredafny test %args --no-verify --target:cs "%s" >> "%t... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/DafnyTests/TestAttribute/TestAttribute.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,210 | 1cd300c1695c1022ece41ed45070db482ea1bb048a66e22782dfaad03a637c5e | // RUN: %translate cs %trargs --include-runtime --allow-warnings "%s" > "%t"
// RUN: ! dotnet test -v:q %S/TestAttribute.csproj 2>> %t
//
// RUN: %OutputCheck --file-to-check "%t" "%s"
// CHECK: .*Warning: Post-conditions on function Identity might be unsatisfied when synthesizing code for method mockUnsafe.*
// C... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/doofiles/Inputs/generatesUnderscoreVariables.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 158 | fc4e3ef96f5ef23c8dcb66dcd0b756aaeb5e0a2427fd17760fc835be3e55bc99 | ghost predicate Injective<X(!new), Y>(f: X --> Y)
reads f.reads
requires forall x :: f.requires(x)
{
forall x1, x2 :: f(x1) == f(x2) ==> x1 == x2
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/doofiles/Inputs/readsOnMethodsLibrary.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 61 | 0f87c665ee53f31b205b1783a8e69a664ab410be6159c7a49a73b18d7b330661 | module Library {
method Foo()
reads {}
{
}
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/AST.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,704 | 60b048e58acc16d63be1c514c96c76a4afb6c7f4cdfdbc3859b5926d72889dc7 | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
module AST {
import opened Utils
datatype BinOp =
| Add
| Sub
| Mul
datatype Expr_Raw =
| Var(name: string)
| Literal(n: int)
| Bind(bvars: seq<string>, bvals: seq<Expr_Raw>, body: Expr_Raw... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/EliminateMulZero.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,500 | 9af82746c6cc499477b5689086ab90f8ecb85aed9184aad8f1465f260cc93175 | // RUN: %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
include "Induction.dfy"
include "Pure.dfy"
module EliminateMulZero refines Induction {
// This small transformation eliminates multiplications by 0:
//
// `x * 0 --> ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/Equiv.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,815 | 2ed50d12d6c4234aefafec10ec5970a961873647047ee88b61fe264ecc78fa50 | // RUN: %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
include "Induction.dfy"
module Equiv refines Induction {
// A trivial example of the induction principle - mostly a sanity check.
import opened Interp
// Introducin... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/Induction.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,470 | e861095a97626780adc1a0fc2ba0b012726618bf46b697f7367747d3aff9ea23 | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
abstract module Induction {
import opened Utils
import opened AST
// A state
type S(!new)
// A value
type V(!new)
// A sequence of values
type VS(!new)
ghost ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/Interp.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,669 | f7efdd9cb29b6c7a1a43b3ec56870716beadb887e66018e936baf81a5f37363c | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
module Interp {
import opened Utils
import opened AST
type Context = map<string, int>
type InterpResult = Result<(int, Context)>
type InterpResultSeq = Result<(seq<int>, Context)>
function In... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/Pure.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,835 | 04c418be8ea996ae49367f45a6b22779e96391253ba44b253b3804ca961b9429 | // RUN: %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
include "Induction.dfy"
module Pure refines Induction {
// We write a small analysis which checks if an expression is pure (i.e., doesn't
// have side effects).
impor... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/PureNoInductionPrinciple.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,536 | 67c0b5afb89454702bbec9a4c32049531141aa09b328e5e09277bcca948c5bc7 | // RUN: %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
include "Pure.dfy"
module PureNoInductionPrinciple {
// This module does the same proof as ``IsPure``, but without using the induction
// principle. We do this to allow co... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/Utils.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,004 | 7f2011d30f0bd822bcd6846dbf5d8ddae0729a76e0b6715cb01a1c91afdb4497 | // RUN: %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
module Utils {
function Max(x: int, y: int): int
{
if x > y then x else y
}
function {:opaque} MaxF<T(!new)>(f: T ~> int, ts: seq<T>, default: int) : (m: int)
reads set x, y | x in ts && y in f.reads(x) :: y
requires forall t : ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/induction-principle-code/VarUnchanged.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,598 | d860530f9c828bee25f7b84c1d218adcaa9e565e357d14a250df50a67d4d779a | // RUN: %verify --allow-axioms "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
include "Utils.dfy"
include "AST.dfy"
include "Interp.dfy"
include "Induction.dfy"
module VarUnchanged refines Induction {
// We write a small analysis which checks if a variable appears in an assignment in
// an expression (we ta... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/examples/Simple_compiler/Compiler.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 23,644 | 60a0863368e603501cc45679ce53ee9f4428018d9a0207364c5f06eb0d65dd16 | // RUN: cp %S/Simple.g4 %S/csharp/Simple.g4
// RUN: %translate cs %trargs --include-runtime --allow-warnings --output:%S/csharp/Compiler.cs "%s"
// RUN: dotnet run --project %S/csharp/SimpleCompiler.csproj -- %S/example_input.calc > "%t"
// RUN: %diff "%s.expect" "%t"
/// A simple compiler pipeline
/// =========... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2827a/A.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 167 | 4ddae92d685028ec3d26c911ac68e89a3aa5cd09ea3d531770cd691f899a7209 | // RUN: %baredafny build -t:java "%s" > "%t"
// RUN: java -jar "%S/A.jar" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
print "Hello, World!\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2827b/B.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 274 | 76b870c5127617693312b5542d618a94578df0913a14295fa44e9bfc452224f9 | // RUN: %baredafny build -t:java "%s" "%S"/org/D.java > "%t"
// RUN: java -cp "%S"/B.jar org.D >> "%t"
// RUN: %diff "%s.expect" "%t"
// Fails on integration tests because the file org/D.java is not put in the right place.
method m() {
print "Hello, World!\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2827c/A.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 187 | 56ab0466017b79b265444907b8755428f7183f886ad78bb2a609e2aa59975142 | // RUN: %baredafny build -t:java --output "%S/Q.jar" "%s" > "%t"
// RUN: java -jar "%S/Q.jar" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
print "Hello, World!\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-2827d/A.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 195 | 06400c15c462c89985ec1accaf3a690149be1bb17b41d3c8c2b780994e1d4663 | // RUN: %baredafny build -t:java --output "%S/zzz/Q.jar" "%s" > "%t"
// RUN: java -jar "%S/zzz/Q.jar" >> "%t"
// RUN: %diff "%s.expect" "%t"
method Main() {
print "Hello, World!\n";
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3451/git-issue-3451.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 239 | a907373c239743c97105c5b3b885a94c9e7b0a234d07b771840e69bbe909e288 | // RUN: %exits-with 2 %baredafny resolve --show-snippets:false --use-basename-for-filename "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// The #line should no longer be special
const s := @"
#line 5
"
const k = 6 // error
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3451/git-issue-3451a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 205 | 6c59db66b9081a14b4eb347b3778389d3f20b772894bd880e6f40cbea512ffbc | // RUN: %exits-with 2 %baredafny resolve --use-basename-for-filename --show-snippets:false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
// The #line should no longer be special
#line Q
#zzzz
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3513/git-issue-3513.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 458 | 618f39c0d20c6cf6d0f54f20b4047d33b2f98667d40cad64e3ab55fe5b8d3736 | // RUN: %exits-with 2 %resolve --allow-warnings "%s" > "%t"
// RUN: %exits-with 2 %resolve --allow-warnings --library:"%S/src/A.dfy" "%s" >> "%t"
// RUN: %resolve --allow-warnings --library:"%S/src/A.dfy,%S/src/sub/B.dfy" "%s" >> "%t"
// RUN: %resolve --allow-warnings --library:"%S/src/A.dfy , %S/src/sub/B.dfy" "%s"... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3839/git-issue-3839a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 636 | 60b978a70aa6c19bb08bf8e4f5b0c2d27b240fb024c7a04dcea5fd7efe15e555 | // RUN: ! %baredafny test --use-basename-for-filename --show-snippets:false "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method {:test} M(x: int) returns (r: int) // error: in-parameters not supported
{
expect x != x;
return x;
}
method {:test} MethodWithTypeParameters<X(0)>() returns (y: X) { // error: ty... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3839/git-issue-3839b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 179 | 44b09560b033c8c3c49166d6878d3836034469cc0b6a29f1e57ae3656330e0f7 | // RUN: ! %baredafny test --use-basename-for-filename "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method {:test} M() returns (r: int)
{
expect 0 != 0;
return 0;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3839/git-issue-3839c.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 200 | 7d9c253e90593442c6c39404f270344377fce9bda5c47c742357aa76189342e4 | // RUN: ! %baredafny test --use-basename-for-filename "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method {:test} M() returns (r: int)
{
expect 0 != 0, "Expected equality";
return 0;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3839/git-issue-3839d.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 157 | a17d28a54f711962ab0280a9843d202cabd77a918698477f6c19d8f4abef46fd | // RUN: %baredafny test --use-basename-for-filename "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method {:test} M() returns (r: int)
{
return 0;
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4471/git-issue-4471a.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 122 | 6b16d8e21f03866248852c9775c0b7bef70eed2c70349758276ff0f2c7247423 | // RUN: %exits-with 0 %verify "%s"
trait YT<W> extends object {
const f: W
}
class Y extends YT<Y -> nat> {
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-4471/git-issue-4471b.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 410 | 1f795f9775372c11efeb320c4617b3778c6b6a884b71e4b31dcd3ba339c740a5 | // RUN: %exits-with 2 %verify "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
trait YT<W> {
const f: W
}
class Y extends YT<Y -> nat> {
constructor(f: Y -> nat)
ensures this.f == f
{
this.f := f;
}
}
method Main()
ensures false
{
// error: knot.f calls itself without decreasing
va... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5184/git-issue-5184.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 289 | 2e487b6fdfe6fff043b4b4838b3f09d14a679826b12d4d70c95714f94e8f70a6 | // NONUNIFORM: %testDafnyForEachCompiler doesn't support main arguments :(
// RUN: %run -t:py "%s" Hello > %t
// RUN: %diff "%s.expect" "%t"
method Main(args: seq<string>)
{
expect 1 < |args|;
print Foo(args[1], "World"), "\n";
}
datatype Foo = Foo(t: string, x: string)
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5730/git-issue-5730-include.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 129 | a2b995098c241a0d292008c0d1f6647ba03255942fd5de07b5e39e78b44b912f | // RUN: echo 'lit should ignore this file'
method VerifyMe() {
assert false; // It should display this as not verified.
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-5730/git-issue-5730.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 276 | c5ba42cf219366543343cd24eba4217b1cb92b40b7ede6df0e1789f254b0e986 | // RUN: %exits-with -any %verify "%S/dfyconfig.toml" > "%t"
// RUN: %diff "%s.expect" "%t"
module X {
@VerifyOnly method VerifyMe() {
assert false; // Should display an error
}
method DontVerifyMe() {
assert false; // Should not show any error
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3513/src/A.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 76 | 7cecab3d0380eba1efb7310e1e3a1dac6427c38a0da8a9d0ff89fd54751176f4 | // RUN: %exits-with 2 %baredafny resolve "%s"
module A {
import B
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/git-issues/git-issue-3513/src/sub/B.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 50 | 56160c1b6b479a404143064a8f92b5d170b43cdf60ce7fef033ac35a175cd492 | // RUN: %baredafny resolve "%s"
module B {
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/multimodule/DerivedModule.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 567 | 54752b16ad27db483740d21ba41f4535343cbf0758ebe1d430eb1c821018af08 | // RUN: %baredafny translate go --go-module-name=GoModule2 --library="%S/test.doo" --translation-record "%S/test-go.dtr" --output "%S/test3" "%s"
// RUN: %cp -rf "%S/go.mod" "%S/test3-go/go.mod"
// RUN: %cp -rf "%S/go.sum" "%S/test3-go/go.sum"
// RUN: %cp -rf "%S/../../../../../../../../../DafnyRuntime/DafnyRuntime... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/publishedruntime/helloworld.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 848 | aa06522ce12862b9b62ca1d0f45da1a48478fb23ff97482e9f468e2d9abeb26f | // This test consciously depends on the published version of the Go runtime
// at https://github.com/dafny-lang/DafnyRuntimeGo/v4,
// to ensure that copy works correctly.
// The other tests use `replace` directives to test against the local copy.
// That means if this test fails at some point because Dafny changes
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/multimodule/dafnysource/helloworld.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 186 | 733a6cf1a1558f93c4f6ca2f0383ff1fc7eb12da65640cba86379d2d461b6598 | // This file is used to regenerate PythonModule1.doo
// RUN: echo 'lit should ignore this file'
module DafnyModule1 {
method HelloWorld()
{
print "Hello World";
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/gomodule/singlemodule/dafnysource/helloworld.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 434 | ead2134ac9417531e2d1737018f664e68d32e80ddc0f6bee2d31206b91c8b608 | // RUN: %baredafny translate go --go-module-name=GoModule1 "%s" --output "%S/test"
// RUN: %cp -rf "%S/go.mod" "%S/test-go/go.mod"
// RUN: %cp -rf "%S/go.sum" "%S/test-go/go.sum"
// RUN: %cp -rf "%S/../../../../../../../../../../DafnyRuntime/DafnyRuntimeGo-gomod" "%S"
// RUN: go run -C %S/test-go/ test.go > %t
//... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/printing/Inputs/included.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 17 | 15f5badca287a13da4a33c4980a784c64fbf5b723f23e77d5ab061aa116a34ec | method Foo() {
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/pythonmodule/multimodule/DerivedModule.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 509 | 0d6fe45d97b8a48afab1b26f51c2f39f972d28b06d7463ef8facd0b740539bf4 | // RUN: %baredafny translate py --python-module-name=PythonModule2 --library="%S/PythonModule1.doo" --translation-record "%S/PythonModule1-py.dtr" --output "%S/PythonModule2" "%s" --include-runtime
// RUN: %exits-with -any %rm -rf "%S/PythonModule2"
// RUN: %mv "%S/PythonModule2-py" "%S/PythonModule2"
// RUN: pip3 ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/pythonmodule/nestedmodule/SomeTestModule.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 417 | 57f28b5ad335c346d78649838d1b128d91bbee68199d57e6b8f113c626f31e2b | // RUN: pip3 install "%S"
// RUN: %baredafny translate py --output "%S/SomeTestModule" --library="%S/SomeNestedModule.doo" --translation-record "%S/SomeNestedModule/SomeNestedModule-py.dtr" "%s" --include-runtime
// RUN: %S/python3 SomeTestModule-py/ > %t
// RUN: %diff "%s.expect" "%t"
module SomeTestModule {
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/pythonmodule/nestedmodule/dafnysource/SomeNestedModule.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 195 | ee552ff2fabde775b4d3ff1d0a1d1a0f8cc5de6aa5892b173dea66626bc5ddd1 | // This file is used to regenerate SomeNestedModule.doo
// RUN: echo 'lit should ignore this file'
module Some.Nested.Module {
method HelloWorld()
{
print "Hello World";
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/pythonmodule/singlemodule/dafnysource/helloworld.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 415 | 89e7fc44ff8ac8ca4c72033bc776dd7da7dfbd3abe8236dac2b0714d524b7eee | // RUN: %baredafny translate py --python-module-name=PythonModule1 "%s" --output "%S/PythonModule1" --include-runtime
// RUN: %exits-with -any %rm -rf "%S/PythonModule1"
// RUN: %mv "%S/PythonModule1-py/" "%S/PythonModule1"
// RUN: pip3 install "%S"
// RUN: %S/python3 PythonModule1/ > %t
// RUN: %diff "%s.expect"... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/separate-verification/Inputs/seq.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 669 | f1f8e8c50ccbf2610f99c31f9267f4cf894327bc765efd7bba86e08a62fdddc0 |
module Seq {
import opened Wrappers
/* explains associative property of sequences in addition */
lemma LemmaConcatIsAssociative<T>(a: seq<T>, b: seq<T>, c: seq<T>)
ensures a + (b + c) == (a + b) + c
{
}
opaque function IndexOfOption<T(==)>(s: seq<T>, v: T): (o: Option<nat>)
ensures i... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/separate-verification/Inputs/wrappers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 193 | e9bc75cac8d706b985e34ef1760d8fef39fa2eaf3740088ba94be57b236e351c | module Wrappers {
datatype Option<T> = Some(value: T) | None {
function UnwrapOr(default: T): T {
match this
case Some(v) => v
case None() => default
}
}
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/separate-verification/Inputs/wrappers3.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 202 | 8c8efba46abb28fc20c5058ac8dce2bee4fd2f33a65a1061cbdbdb92a3ed4f01 | module Wrappers {
datatype Option<T> = Some(value: T) | None {
function method UnwrapOr(default: T): T {
match this
case Some(v) => v
case None() => default
}
}
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/Arrays.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 224 | 28f7af1b3a2b796997f7d10dcf715674cdb297730d06bf907d2cbc8e2878bc3d | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/2582
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-warnings --unicode-char false --verify-included-files
include "../../comp/Arrays.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/Collections.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 280 | 8b20491c7420a630d49eda15ab1d69bdff6b37b89cbc5261f7864559e67702b3 | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment --allow-deprecation --unicode-char false --spill-translation --verify-included-files
include "../../comp/Collections.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/CompileWithArguments.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,082 | 0ea48a0727f60943e387ef52230bc63f96e5cd8fa78a76c1904abc3195ec18ea | // NONUNIFORM: Multiple testing scenarios, highly backend sensitive, testing CLI
// Note that C++ is not supported yet
// RUN: %verify "%s" > "%t"
// RUN: %baredafny run %args --allow-deprecation --unicode-char false --no-verify --target:cs "%s" Csharp 1 >> "%t"
// RUN: %run --no-verify --target:cpp --allow-depre... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/Comprehensions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 284 | 157a6162ccd711c6b4b0201279daf6bffe33d63d5996839273dcc72d23716b79 | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment --spill-translation --allow-deprecation --unicode-char false --verify-included-files
include "../../comp/Comprehensions.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/ExternDafnyString.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 752 | aa325ef4a4ad01003e1fd824f846428e7d18bfeb3bed688d0c3ab6831f12c55b | // RUN: %run --allow-deprecation --unicode-char false --target java "%s" --input %S/ExternDafnyString.java > "%t"
// RUN: %diff "%s.expect" "%t"
// In this example, the extern method obtains a Java string and returns it as a Dafny string.
class {:extern "java.lang.String"} JavaString {
ghost const value: string... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/ExternJavaString.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,360 | bb5d31b52a049017be12598e48d1bf9f9e5b060493998ffbde32c415e6cdc4b8 | // RUN: %run --allow-deprecation --unicode-char false --target java "%s" --input %S/Conversions.java --input %S/ExternJavaString.java > "%t"
// RUN: %diff "%s.expect" "%t"
// In this example, the extern method obtains a Java string and returns it as such.
// The Dafny code converts that Java string to a Dafny string... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/NativeNumbers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 294 | 28770c707b66265a4ada219f1686654a930e0b66d07058e5705b6ec8a46d1d1b | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --relax-definite-assignment --spill-translation --allow-deprecation --unicode-char false --verify-included-files
// Skip JavaScript because JavaScript doesn't have the same native types
include "../../comp/NativeNumbers.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/Numbers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 309 | 6a58b17b330ef44d7cea341ece37bdbca8cfe5d7c617af1de1a96b1c3c97a6c2 | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4174
// RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --type-system-refresh=false --general-newtypes=false --allow-deprecation --relax-definite-assignment --unicode-char false --verify-included-files
include "../../comp/Numbers.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/comp/Print.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 616 | ed5224d172e45505ef109c72e6ba2dab767bf2119f72ec5f485ba89e20eca133 | // NONUNIFORM: https://github.com/dafny-lang/dafny/issues/4108 and https://github.com/dafny-lang/dafny/issues/2582
// RUN: %verify --allow-deprecation --unicode-char false --relax-definite-assignment "%s" > "%t"
// RUN: %run --no-verify --allow-deprecation --unicode-char false --target cs "%s" >> "%t"
// RUN: %run -... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/dafny0/Char.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,036 | b9cb3432f9127bebabd808cb7a4065aa6dd6970eaae304040a517d58a708012f | // RUN: %testDafnyForEachResolver --expect-exit-code=4 "%s" -- --allow-deprecation --unicode-char false
class CharChar {
var c: char;
var d: char;
method Order()
modifies this;
ensures c <= d;
{
if d < c {
c, d := d, c;
}
}
ghost function Recurse(ch: char): bool
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/DafnyTests/RunAllTestsOption.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 746 | 17420313c2ab05b509932b800151340f55a431104485cb5ecb128c42d731bafb | // RUN: %verify --allow-deprecation --unicode-char false --verify-included-files "%s" > "%t"
// RUN: ! %baredafny test %args --allow-deprecation --unicode-char false --no-verify --target:cs "%s" >> "%t"
// RUN: ! %baredafny test %args --allow-deprecation --unicode-char false --no-verify --target:java "%s" >> "%t"
//... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/expectations/Expect.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 564 | ad4b11415e1840dd29384070831e970c593715d4547574f2529fda6aae4bb73a | // RUN: ! %baredafny run --target=cs --allow-deprecation --unicode-char false %args "%s" > "%t"
// RUN: ! %baredafny run --target=go --allow-deprecation --unicode-char false %args "%s" >> "%t"
// RUN: ! %baredafny run --target=java --allow-deprecation --unicode-char false %args "%s" >> "%t"
// RUN: ! %baredafny run ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/expectations/ExpectAndExceptions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 497 | 8e6703c4dc1b4afd764a4767e073506d45618d608f5e7a9bc99fc879fb503406 | // RUN: ! %run --target cs --allow-deprecation --unicode-char false "%s" > "%t"
// RUN: ! %run --target go --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --target java --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --target js --allow-deprecation --unicode-char false "%s" ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/expectations/ExpectWithMessage.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 495 | 6ec1d885e1a56f4711b7f542209bb60ec457df8fc9cfbcaf9aca04a888e45c60 | // RUN: ! %run --target cs --allow-deprecation --unicode-char false "%s" > "%t"
// RUN: ! %run --target go --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --target java --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --target js --allow-deprecation --unicode-char false "%s" ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/expectations/ExpectWithNonStringMessage.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 792 | 79a20fca652a01344e3af01e73fc358d79123ac7e2a27a30b207615574362db9 | // RUN: %verify --verify-included-files --allow-deprecation --unicode-char false "%s" > "%t"
// RUN: ! %run --no-verify --target cs --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --no-verify --target go --allow-deprecation --unicode-char false "%s" >> "%t"
// RUN: ! %run --no-verify --target ja... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/unicodecharsFalse/git-issues/github-issue-2928.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 158 | e912c6fe53a2724fd99eed096cc19bc2d25db78343946ec23a88f5995bc0832d | // RUN: %testDafnyForEachCompiler --refresh-exit-code=0 "%s" -- --allow-deprecation --unicode-char false
include "../../git-issues/github-issue-2928.dfy"
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/Inputs/single-file.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 336 | 2a12d1fb8932fbd3486fdf00b8e5c9b0ea540ddd0af6c0cf767f3e593085a902 | method Succeeds()
ensures true {
}
method Fails()
ensures false {
assert false by {
assert false;
assert false;
}
}
method Loop() {
var b := true;
while(b)
invariant false
{
b := false;
}
assert false;
}
method DoubleAssertOneLine(x: int) {
assert x > 2; ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/proofDivision/isolateAllAssertions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 401 | a70c6d3a716a6e31b86e9b10b5d9a70cb45f49f6aee1f49df9fa522a812866c5 | // RUN: ! %verify --progress Batch --cores=1 %s &> %t.raw
// RUN: %sed 's#\(time.*\)#<redacted>#g' %t.raw > %t
// RUN: %diff "%s.expect" "%t"
method {:isolate_assertions} Foo(x: int) returns (r: int)
ensures r > 3
ensures r < 10
{
assert true;
assert true;
if (x == 3) {
return 7;
} else... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/proofDivision/isolateAssertionOrJump.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,001 | 9f24d63f233d2ee2e2db771026a12a7dbcfc7e3f5b4c21a8f4b07f34e707f05d | // RUN: ! %verify --progress Batch --cores=1 %s &> %t.raw
// RUN: %sed 's#\(time.*\)#<redacted>#g' %t.raw > %t
// RUN: %diff "%s.expect" "%t"
method Assertion(x: int, y: int) returns (r: int) {
r := 0;
if x > 0
{
r := r + 1;
} else
{
r := r + 2;
}
assert {:isolate} r > 2;
r := ... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/proofDivision/isolatePaths.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 674 | da6c2a20f16729f956a332716d16fbd3f74a0d3aa2bcdc8055536a323664905d | // RUN: ! %verify --progress Batch --cores=1 %s &> %t.raw
// RUN: %sed 's#\(time.*\)#<redacted>#g' %t.raw > %t
// RUN: %diff "%s.expect" "%t"
method Assertion(x: int, y: int) returns (r: int) {
r := 0;
if x > 0
{
r := r + 1;
} else
{
r := r + 2;
}
r := if r == 0 then r else r;
... |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/Inputs/src/source1.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 79 | fd1195c4eb8c681a41f418920dc34acd754ffe0a3965f5aaf9857682eab2a082 | method Succeeds()
ensures true {
}
method Fails()
ensures false {
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/verification/Inputs/src/source2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 81 | ec2fb35a6844b604797cdc216282499ed40e052eb2a107fe7c7d4ffa5043d444 | method Succeeds2()
ensures true {
}
method Fails2()
ensures false {
} |
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/wishlist/granted/strings.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 118 | 11c7504caba0a9e175c09da26ddd1ebdfa99dbb450ea597f3a0455e65e75a87e | // RUN: %testDafnyForEachResolver "%s"
method EqualityOfStrings() {
assert "a" != "b"; // WISH -- granted
}
|
dafny-lang/dafny | Source/IntegrationTests/TestFiles/LitTests/LitTest/wishlist/granted/useless-casts-in-decreases-clauses.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 225 | 30c32299e452f00863236c2e46d881177782cec5d1283c4fa37c85c8bed169af | // RUN: %verify --show-hints "%s" > "%t"
// RUN: %diff "%s.expect" "%t"
method M() {
var pos := 10;
while (pos > 0) { // This shouldn't print int(pos) - int(0); pos - 0 would be better
pos := pos - 1;
}
}
|
dafny-lang/dafny | Source/Jennisys/examples/jennisys-synth_List.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,141 | 70e919fe706657c517f7b6825117cd6b7033f5896152cbe6530f9d59e4868d40 | class List<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var root: Node<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
rea... |
dafny-lang/dafny | Source/Jennisys/examples/jennisys-synth_List2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,758 | 42fea85ad5fe7710e693a39d7cf98b536577a196978f5e5d97567b30f27ae28d | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/jennisys-synth_List3.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,913 | d543ed5aaa56777dff4653beff9051581812bd308ad56fd2cd832366d492842f | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/jennisys-synth_Number.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,070 | b698f15058e6b3c96e388caff141d23f681ff95b706fd6c6e0ebe34e491d6f3e | class Number {
ghost var Repr: set<object>;
ghost var num: int;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr
}
function Valid_self(): bool
reads *;
{
Valid_repr() &&
true
}
function Valid(): bool
reads *;
{
this.Valid_... |
dafny-lang/dafny | Source/Jennisys/examples/jennisys-synth_Set.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 9,730 | 8b5c6a093cef4a1a5ec50f83bf8775a1944a388cfde1983b82f0dfe0146a2dee | class Set {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var root: SetNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
read... |
dafny-lang/dafny | Source/Jennisys/examples/set.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,430 | f9e4b2221994742c25bb7e444e616b56a3a3631596b40c4e0a0ec7176fdfc8fd | class Set {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var root: SetNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
read... |
dafny-lang/dafny | Source/Jennisys/examples/mod/jennisys-synth_List.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,184 | 4e728bcd7873e167bbf0043731ee3e0f0f23c07710564f04dbe951ee1d301aa3 | class List<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var root: Node<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
rea... |
dafny-lang/dafny | Source/Jennisys/examples/mod/jennisys-synth_List2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,135 | cdf45cfb54dfa371c24675020484b23076a142f12e647dc5fba8cf6af95d369b | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/mod/jennisys-synth_List3.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,706 | b140a98cb0b1660fb53e332c9e084343fbe8ecbd711f25837f64882fae32eb9d | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/mod/jennisys-synth_Number.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,585 | 93a1271f239b30138b0850d4a71d6109968e522b4647190e62bcc50c8f7f5ac3 | class Number {
ghost var Repr: set<object>;
ghost var num: int;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr
}
function Valid_self(): bool
reads *;
{
Valid_repr() &&
true
}
function Valid(): bool
reads *;
{
this.Valid_... |
dafny-lang/dafny | Source/Jennisys/examples/mod/jennisys-synth_Set.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,011 | 8bb3e6d41b158dd5a55ecd688ab4cea6790a15f8e6c9a0de957cdbffc79a3282 | class Set {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var root: SetNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
read... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_DList.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,538 | 146102245bfc83245a8780f3caf878c81301f1a8a2da6eda66362aa422ba72d1 | class DList<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var root: DNode<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_List.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,236 | 7db6b98c00ac19ad362496500ca4f78d9340bd526656f9e05c2bd3f4747f1307 | class List<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var root: Node<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
rea... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_List2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,584 | 7f5a01cf7de5004b5f08fd96c85ad5ffac65f9c3c93f6de3c9fc30e1ff7490b7 | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_List3.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,536 | 407407832c7f72c45f25425168cde06a545673015c06ddd264a1e825787c7a58 | class IntList {
ghost var Repr: set<object>;
ghost var list: seq<int>;
var root: IntNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
r... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_Number.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,208 | 4d20fe8014aac46af4379165b27e48cece2175f1ef0a4c8a130305208db4f071 | class Number {
ghost var Repr: set<object>;
ghost var num: int;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr
}
function Valid_self(): bool
reads *;
{
Valid_repr() &&
true
}
function Valid(): bool
reads *;
{
this.Valid_... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_NumberMethods.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,168 | 9eacfa2754100ba51973f607506b3f0be468f4374f0cd8102497416a4b295192 | class NumberMethods {
ghost var Repr: set<object>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr
}
function Valid_self(): bool
reads *;
{
Valid_repr() &&
true
}
function Valid(): bool
reads *;
{
this.Valid_self() &&
t... |
dafny-lang/dafny | Source/Jennisys/examples/mod2/jennisys-synth_Set.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,293 | 736f1c5aabaa11dcbb56626328d0fd02945e5359cf3422e40e6cbf80cbc11d4b | class Set {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var root: SetNode;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(root != null ==> root in Repr && root.Repr <= Repr && this !in root.Repr)
}
function Valid_self(): bool
read... |
dafny-lang/dafny | Source/Jennisys/examples/oopsla12/BHeap_synth.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,294 | 82bfb8534b01d0141fa8d74349754a7026581db42f1cc4b759824a780e4b1e3c | class BHeap {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var data: int;
var left: BHeap;
var right: BHeap;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(left != null ==> left in Repr && left.Repr <= Repr && this !in left.Repr) &&
... |
dafny-lang/dafny | Source/Jennisys/examples/oopsla12/DList_synth.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,304 | 945ed5e55f71aa22802f053794936dc977e57d33fa83941b04dcef746234eaed | class DList<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var data: T;
var next: DList<T>;
var prev: DList<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(next != null ==> next in Repr && next.Repr <= Repr && this !in next.Repr)
}
... |
dafny-lang/dafny | Source/Jennisys/examples/oopsla12/IntSet_synth.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,443 | 0c8eb7fcde8d420937d97a93e524bae18a9d25fff151461f0997a88b20215184 | class IntSet {
ghost var Repr: set<object>;
ghost var elems: set<int>;
var data: int;
var left: IntSet;
var right: IntSet;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(left != null ==> left in Repr && left.Repr <= Repr && this !in left.Repr) &&
... |
dafny-lang/dafny | Source/Jennisys/examples/oopsla12/List_synth.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,063 | 2ce1137c86225f7aba6900e0a3d86257d75c0d86e01dea7b04a57c6680cb4a69 | class List<T> {
ghost var Repr: set<object>;
ghost var list: seq<T>;
var data: T;
var next: List<T>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr &&
(next != null ==> next in Repr && next.Repr <= Repr && this !in next.Repr)
}
function Valid_self(... |
dafny-lang/dafny | Source/Jennisys/examples/oopsla12/Math_synth.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,888 | 3d59c6eda5e5a8e08d2056a84a456f881fcb4c4812032f24f60fbbab4dda916e | class Math {
ghost var Repr: set<object>;
function Valid_repr(): bool
reads *;
{
this in Repr &&
null !in Repr
}
function Valid_self(): bool
reads *;
{
Valid_repr() &&
true
}
function Valid(): bool
reads *;
{
this.Valid_self() &&
true
}
... |
audreyt/ethercalc | lemma/xlsx-a1.dfy | NOASSERTION | 3,038 | main | b160b7df96c64ad2962bce35b170ba6b0fc98112 | 2026-07-18T01:28:42Z | 2,519 | 69f3ba6b2f8efe14e5d583289e8306d3cd573291c6c32b42297a137ee74a0bdf | // Generated by lsc from xlsx-a1.ts
function JSFloorDiv(a: int, b: int): int
requires b != 0
{
if b > 0 then
if a >= 0 then a / b
else -((-a - 1) / b) - 1
else
if a <= 0 then (-a) / (-b)
else -((a - 1) / (-b)) - 1
}
function JSRem(a: int, b: int): int
requires b != 0
{
var r ... |
CakeML/cakeml | compiler/dafny/examples/abs.dfy | BSD-3-Clause | 1,169 | master | d4ce405e105cef3b7901d0f89694c41597bb8b22 | 2026-07-21T20:16:07Z | 394 | 1125ff51d3aa3a673dd26d1efdbddda80cb54f88b67d25978f8f5ce32c8cd3ce | // Extended https://dafny.org/dafny/OnlineTutorial/guide
method Abs(x: int) returns (y: int)
ensures 0 <= y && (y == x || y == -x)
{
if x < 0 {
return -x;
} else {
return x;
}
}
method Main() {
TestAbs(-5);
TestAbs(-1);
TestAbs(0);
TestAbs(1);
TestAbs(7);
}
method TestAb... |
CakeML/cakeml | compiler/dafny/examples/add_mul.dfy | BSD-3-Clause | 1,169 | master | d4ce405e105cef3b7901d0f89694c41597bb8b22 | 2026-07-21T20:16:07Z | 1,141 | 81cdb5cf9f65a0fd100d590106bc1c9b5d34e5cd65d63cfc35be1c91bd0dcb09 | // Copied from Dafny (MIT License): https://github.com/dafny-lang/dafny
method Add(x: int, y: int) returns (r: int)
ensures r == x+y
{
r := x;
if (y < 0) {
var n := y;
while (n != 0)
invariant r == x+y-n && 0 <= -n
{
r := r - 1;
n := n + 1;
}
} else {
var n ... |
CakeML/cakeml | compiler/dafny/examples/add_one_n_times.dfy | BSD-3-Clause | 1,169 | master | d4ce405e105cef3b7901d0f89694c41597bb8b22 | 2026-07-21T20:16:07Z | 399 | 81cac9f3c7470e1eff4555f3d65b9c66466ba65749adfcd47bccb8d11e806e46 | method AddOneNTimes(n: int) returns (r: int)
requires n >= 0
ensures r == n
ensures n >= 0
{
r := 0;
while r < n
invariant 0 <= r <= n
{
r := r + 1;
}
}
method Main() {
TestAddOneNTimes(0);
TestAddOneNTimes(1);
TestAddOneNTimes(5);
}
method TestAddOneNTimes(n: int)
{
... |
CakeML/cakeml | compiler/dafny/examples/assert.dfy | BSD-3-Clause | 1,169 | master | d4ce405e105cef3b7901d0f89694c41597bb8b22 | 2026-07-21T20:16:07Z | 36 | 8343899673a38574270a6713a43950ba08152dab8ee60a81a3c63ee5d3e1b518 | method Main() {
assert 0 != 1;
} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.