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
docs/HowToFAQ/ERROR_CloseParen.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
23
f03acd7238950aaeceb6276a14e7aaaf5059e5bb240c3cc546e8b0af276975a2
method test(int i) {}
dafny-lang/dafny
docs/HowToFAQ/ERROR_Covariance.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
706
9f72404b470dab6ad78ca1b385aab5bc70a5edfc135356470e43de38f5c9e373
type neg = r : real | r <= 0.0 datatype formula<T> = | Var(z: T) | Plus(x: formula<T>, y: formula<T>) | Minus(x: formula<T>, y: formula<T>) | Mult(x: formula<T>, y: formula<T>) | Divide(x: formula<T>, y: formula<T>) function method toReal(x: formula<real>) : real { match x case Var...
dafny-lang/dafny
docs/HowToFAQ/ERROR_InsufficientReads.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
365
2c13e671789a9ff9074376e10526f30efe0a95eaa69d2dc59ca627a57244fd36
class {:autocontracts} A { ghost predicate Valid() { true } constructor() { // no-op } } class {:autocontracts} B { var things: set<A> ghost predicate Valid() reads things { forall thing | thing in things :: thing.Valid() } const...
dafny-lang/dafny
docs/HowToFAQ/ERROR_InsufficientReads1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
336
59971dbdf231be618a068229471d73a5319b6f7aa18e665c5ef09152e6f717f1
class A { predicate Valid() reads this { true } constructor() { // no-op } } class B { var things: set<A> predicate Valid() reads this, things { forall thing | thing in things :: thing.Valid() } constructor() { things :=...
dafny-lang/dafny
docs/HowToFAQ/ERROR_ModifiesValue.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
62
2f4f2e5d4d5155065071b37201fbe034e35fb81cc3d01b0fd37ba36638c8a607
class A {} method test(m: map<int,A>) modifies m; { }
dafny-lang/dafny
docs/HowToFAQ/ERROR_ModifiesValue1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
69
456212771aa01a64558380299ab97a93d179e1039c943bd3f42a17af63292b89
class A {} method test(m: map<int,A>) modifies m.Values; { }
dafny-lang/dafny
docs/HowToFAQ/ERROR_MutableField.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
335
f7364afbc69e0a1b8ac9396df5ea6fc8522bf60646b3e7503648c4e03093ce59
module M { export provides A, A.foo, // want to export foo, which refers to x A.x // to make export set self-consistent, need to export x class A { var x: int function method foo(): int reads this { x ...
dafny-lang/dafny
docs/HowToFAQ/ERROR_MutableField1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
352
75f45bffaff17d4e862c86da3e48e568e2dd5dedb2f3ce1960a36b4d9e88116c
module M { export reveals A provides A.foo, // want to export foo, which refers to x A.x // to make export set self-consistent, need to export x class A { var x: int function method foo(): int reads this { ...
dafny-lang/dafny
docs/HowToFAQ/ERROR_NoLHS.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
91
a84f582e9a069102aa3ae1bf67f1d601a24417c1db3a84c6dba5be70e89c310b
method PickKey<K, V>(m: map<K, V>) returns (ret: K) { var k :| k in m; return k; }
dafny-lang/dafny
docs/HowToFAQ/ERROR_NoLHS1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
118
f1a0c31a46782b0384b951ecaeca736813fd34784702882d5f48f7c0c3699644
method PickKey<K, V>(m: map<K, V>) returns (ret: K) requires |m.Keys| > 0 { var k :| k in m; return k; }
dafny-lang/dafny
docs/HowToFAQ/ERROR_PostconditionLemma.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
59
ee30502ac6ab759ed2d9bbff689b6bfb58db0c1d1a2bc02c5fd02c52bdf003ec
lemma L() {} method test() ensures L(); true { }
dafny-lang/dafny
docs/HowToFAQ/ERROR_Rbrace1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
36
3e7e934a89c6067a0cebfa9459ad010bd59f6a144635feb633c6fc72cb659e3d
module A { const x: int= 4; }
dafny-lang/dafny
docs/HowToFAQ/ERROR_Rbrace2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
33
462c72cd250c861aab259328e3f398700463ba22123e471ef84ffaeb75d9937f
class A { var x: int = 5; }
dafny-lang/dafny
docs/HowToFAQ/ERROR_Rbrace3.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
33
77905795d69fa2c50e3fede3ad53934656a12362d1b1baf787541f0888588aae
class B { var x: int := 5 }
dafny-lang/dafny
docs/HowToFAQ/ERROR_Rbrace4.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
49
72846e38e7017efbc61ded462e585ad7be08205f3b7e32de8c781ed448b43f72
module A { method m() {} mthod n() {} }
dafny-lang/dafny
docs/HowToFAQ/ERROR_SeqComp.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
109
8917cbfa64e011c019c563c89c8dac90d3eb1d2969af077b98eb92807db69899
function f(i: int): int requires i < 10 { i } method test() { var s := seq(5, i => f(i)); }
dafny-lang/dafny
docs/HowToFAQ/ERROR_SeqComp1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
125
641d127b773eb1dd06374ab0ee4fffae142748aa25180441e34c4bc15ddda5c3
function f(i: int): int requires i < 10 { i } method test() { var s := seq(5, i requires i < 10 => f(i)); }
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionByMethodProof1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
334
769f65395ca843e388cb9f4f9d4e8f28a37efc2b15725d9ad8d77fb7795a6290
function Sum(s: seq<int>): (result: int) { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } by method { result := 0; for i := 0 to |s| invariant result == Sum(s[0..i]) // ^^^^^^^^^^^^^^^^^^^^^^ // Cannot be proved { result := result + s[i]; } assert s[0....
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionByMethodProof2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
799
7f05674d8a48804c191efee71408e0a2e51a0648d401ab1d77890b0cf16db895
function Sum(s: seq<int>): (result: int) { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } by method { result := 0; for i := 0 to |s| invariant result + Sum(s[i..]) == Sum(s) // New invariant { result := result + s[i]; } } // No hint needed at the end lemma IntermediateProperty(r...
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionByMethodProof3.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
423
5b8644ab58e60fe4dc88e62b7bb95dfb578142081bf48018079cf965365764c7
function Sum(s: seq<int>): (result: int) { if |s| == 0 then 0 else Sum(s[0..|s|-1]) + s[|s| - 1] // We add the last element to the sum of the first } by method { result := 0; for i := 0 to |s| invariant result == Sum(s[0..i]) { assert s[0..i+1][0..i] == s[0..i]; // Minimum...
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionByMethodProof4.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
386
9af224cb9a3dc98976ddbf7109f13a53741bb9706525d1244fc92f6ba21b0ecc
function Sum(s: seq<int>): (result: int) { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } by method { result := 0; for i := |s| downto 0 // Reverse. First i == |s| - 1 invariant result == Sum(s[i..]) // The invariant looks like the function { result := s[i] + result; // Note h...
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionUnroll0.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
463
879dbdf3a4fb2ccf6fdcd7653da1989fb30ac65b5b0a71d7c0d6085b68766003
function Sum(s: seq<nat>): nat { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } lemma Sum1(s: seq<nat>) requires |s| == 1 ensures Sum(s) == s[0] { // trivial } lemma Sum2(s: seq<nat>) requires |s| == 2 ensures Sum(s) == s[0] + s[1] { // Doesn't work. I need... // Sum1(s[1..]); } ...
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionUnroll1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
474
fb1fcea8dd1fe7e263db63f6d42f326759b25a376dedae5042ae796b6dcb11b4
function {:fuel 10} Sum(s: seq<nat>): nat { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } lemma Sum1(s: seq<nat>) requires |s| == 1 ensures Sum(s) == s[0] { // trivial } lemma Sum2(s: seq<nat>) requires |s| == 2 ensures Sum(s) == s[0] + s[1] { // Doesn't work. I need... // Sum1(s[1....
dafny-lang/dafny
docs/HowToFAQ/FAQFunctionUnroll2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
678
44301badf9286dafa0b0a43faa1ce1c0d0be7f2026d1df3f6a0590664739c92e
function Sum(s: seq<nat>): nat { if |s| == 0 then 0 else s[0] + Sum(s[1..]) } function Sum_(s: seq<nat>, n: nat): nat ensures Sum(s) == Sum_(s,n) ensures |s| > 0 && n > 0 ==> Sum_(s,n) == s[0] + Sum_(s[1..], n-1) { if |s| == 0 || n == 0 then Sum(s) else s[0] + Sum_(s[1..], n-1) } lemma Sum1(s...
dafny-lang/dafny
docs/HowToFAQ/FAQModuleImport.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
144
124c509d2710aa2b36d0d96a553d97f19af8e6c866501b471a360612f71c3166
module A { type D = string } module Y { import opened A module X { type X = D } module Z { type Z = D } }
dafny-lang/dafny
docs/HowToFAQ/FAQModuleImport1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
167
5af4afb66e05e8c6bc90b3136b5cafa0917305a9fae79159acae6b681c2369fd
module A { type D = string } module Y { module X { import opened A type X = D } module Z { import opened A type Z = D } }
dafny-lang/dafny
docs/HowToFAQ/FAQModuleNames.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
207
127c0d3fee9ef467aeef3ac0e36365c0ee4f47be72a27c863b5ef91e1c613a72
module util { const x: nat := 0 } module util_ { import util } module java { module util { import util_ const y: nat := util_.util.x method test() { assert y == 0; } } }
dafny-lang/dafny
docs/HowToFAQ/FAQModuleNames0.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
147
de2314f21e7ab7456f74c6089400ab8ec0b61790051fbf525d28f3bcdd8d1acc
module util { const x: nat := 0 } module java { module util { const y: nat := util.x method test() { assert y == 0; } } }
dafny-lang/dafny
docs/HowToFAQ/FAQNameConflict.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
183
dc3ca9a8229bc8b61f0dfbbca54937e0dbe25aed6ea20849e7af48037fff1976
module Result { datatype Result<T> = Success(x: T) | Failure(e: string) } module Test { import opened Result function method f(): Result<int> { Success(0) } }
dafny-lang/dafny
docs/HowToFAQ/FAQNameConflict1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
299
6a9d14d49da8b5f08ccf538158d9b4231aa1fa890a2a11c6f7c293e655f45961
module Result { datatype Result<T> = Success(x: T) | Failure(e: string) } module Test { import opened Result function method f(): Result.Result<int> { Success(0) } } module Test1 { import opened R = Result function method f(): Result<int> { Success(0) } }
dafny-lang/dafny
docs/HowToFAQ/FAQNestedModule.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
82
f60ca5e3b0ef03de45fea11c9ed774fd968ce6d9818e0bdbd0c68fb7747a7fbf
module A { const SIZE := 10 module B { const MYSIZE := SIZE } }
dafny-lang/dafny
docs/HowToFAQ/FAQNewtype.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
406
9914357025295c10ed4f5007a7bf68a5ccb236f7fc931a2ab9bc638001c8eeac
type int8 = x: int | -256 <= x < 256 newtype nint8 = x : int | -256 <= x < 256 method test(i: int, i8: int8, ni8: nint8) { var j: int, j8: int8, nj8: nint8; if -256 <= i < 256 { j8 := i; } // implicit conversion OK if in range if -256 <= i < 256 { nj8 := i as nint8; } // explicit conversion required j :...
dafny-lang/dafny
docs/HowToFAQ/FAQPreconditionLabels.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
412
6923d7e8bda0cd61a4fdc25419349e288cce855aa647b4d613d9326c21c0a8aa
method M0(x: int) requires x == 0 { assert x < 10; // verifies } method M1(x: int) requires Zero: x == 0 { // the following assertion does not verify, because labeled // preconditions are hidden assert x < 10; // error } method M2(x: int) requires Zero: x == 0 { // by revealing the hi...
dafny-lang/dafny
docs/HowToFAQ/FAQReadsClause.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
103
4015164f73492504c8737cd46b31b1110b56acc0a551bc3c56524797afd1be39
// dafny Example.dfy class A { var x: string } type AA = a: A | a.x == "" witness * reads a
dafny-lang/dafny
docs/HowToFAQ/FAQTypeCompare.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
213
e645db2b7e3421733150da80bf8c52f4b40e855e3c5eed102cc0f23481ffd1cf
abstract module Mixin1 { type T = int } abstract module Mixin2 { type T = int } abstract module Mixins1and2 { import M1 : Mixin1 import M2 : Mixin2 lemma typeConstraint() ensures M1.T == M2.T }
dafny-lang/dafny
docs/HowToFAQ/text1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
59
d2b742ee4febabe1218e2379da00cb74a1c1b024f44c37da577e4337f9bcbfc0
module M{ method {:test} m() {} method Main() {} }
dafny-lang/dafny
docs/HowToFAQ/text2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
150
9553f27983842b2836cc8e83825d5573ab7c9be6da372ae6d563debf1947fb13
datatype D = A | B | ghost C method m(d: D) returns (r: bool) { r := match d { case A =>true case B =>true case C =>true }; }
dafny-lang/dafny
docs/HowToFAQ/text3.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
71
6b5d3c4f3ae723bb369743e4b965791c26d83a5578834f1df739762b457c5c30
class A { static const f: int } method m(a: A) { var i := A.f; }
dafny-lang/dafny
docs/HowToFAQ/text4.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
55
44836fa621a09adc080e7fa3e848aaf4cfe1eb4f4b05ef292748e64a517c93e0
function f(i: int, j: int): int const c := f(2,3,4)
dafny-lang/dafny
docs/HowToFAQ/text5.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
37
80c56a027328d80a4700527c7460d424887f5f41147b19f15cf79e28b96df006
const z := 1 as bv4 | 1 as bv2 << 2
dafny-lang/dafny
docs/HowToFAQ/text6.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
115
22a07283843f09ef81c5ca24f67a0c9a37219ffef2e2eba534ef7689374beb96
datatype Record = Record(x: int, ghost y: int) method m(r: Record) returns (rr: Record) { rr := r.(y:=43); }
dafny-lang/dafny
docs/images/DutchFlag.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,028
7110a98ff5959ec428166e4d2db2c6143ee48f7d37718093a5d34b085f79ffc2
method Main() { var a := new Color[3]; a[0] := White; a[1] := Blue; a[2] := Red; assert a[..] == [White, Blue, Red]; DutchFlag(a); assert Ordered(a[0], a[1]); assert Ordered(a[1], a[2]); assert a[..] == [Red, White, Blue]; } datatype Color = Red | White | Blue predicate Ordered(c: Col...
dafny-lang/dafny
docs/HowToFAQ/testfiles/a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
0
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855
dafny-lang/dafny
docs/HowToFAQ/testsource/test1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
42
8bcece96648576a584a5d959ed75a3f3d9b2c01716caeb16bd5ec3e1fc066742
method m(i: int) { assert i := -1; }
dafny-lang/dafny
docs/HowToFAQ/testsource/test2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
30
8006c672ba771c3b99f3cecc8560cc3ad088bb1cd6094deca0db459194f31dd5
const c := 6 const d := 7
dafny-lang/dafny
docs/HowToFAQ/testsource/TestA.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
44
fa5f8da013d19dcb521213610ae81601e8da9f838c9107699870c05074c67c66
// Intentional error const k: int := true
dafny-lang/dafny
Source/AutoExtern/CSharpModel.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,645
c05d8414b4be938d569e1120254774a0632ebe8e758311cefbcf5470ed6cf7ec
module {:compile false} {:extern "System"} System { trait {:compile false} {:termination false} {:extern} IComparable {} trait {:compile false} {:termination false} {:extern} Attribute {} newtype {:compile false} {:extern} {:nativeType "int"} int32 = x: int | -0x8000_0000 <= x < 0x8000_0000 class {...
dafny-lang/dafny
Source/DafnyPipeline.Test/testFile2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
36
1f9cd4016aa83d5e0e1c1f569375eb4e3b6f1ac0d742e49d81e4faf4b1b5a50c
method f(x: int) { var x := 0; }
dafny-lang/dafny
Source/DafnyRuntime/systemModulePopulator.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,506
3db38efa4eb020db9cd1124b793071ae83fd56f7eb42852773726a32c44ea32c
method HasTuples() { var b := true; var has0 := (); var has1 := (b, ghost b); // Just (b) is a bool in parentheses instead var has2 := (b,b); var has3 := (b,b,b); var has4 := (b,b,b,b); var has5 := (b,b,b,b,b); var has6 := (b,b,b,b,b,b); var has7 := (b,b,b,b,b,b,b); var has8 := (b,b,b,b...
dafny-lang/dafny
Source/AutoExtern.Test/Tutorial/ClientApp/GroceryListPrinter.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,634
12612247db7225a621025f97568e835679321c10442952ec40d30fa1b7f75905
/// # C#/Dafny interop: Dafny side /// /// See README.md for details. This file receives a C# value and prints it. /// We start by including the model generated by AutoExtern (this file does not /// exist in the repository; it must be created by running ``make``). include "LibraryModel.dfy" /// Then we def...
dafny-lang/dafny
Source/DafnyCore/AST/DafnyInterface.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,968
d5f12ba9d7a5dfd59360c5dde1032d62e150661d2b388f079f1df3246a0f0283
include "System.dfy" // Interface with existing Dafny code (IOrigin) @Compile(false) @Options("-functionSyntax:4") module {:extern "Microsoft.Dafny"} MicrosoftDafny { import opened System @Compile(false) trait {:extern "Token"} Token extends object { var val: CsString var LeadingTrivia: CsStr...
dafny-lang/dafny
Source/DafnyCore/AST/Formatting.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,165
792e7e19733566fbbbc077fc1e4bf30efd5d00b53ce5617087583f705ec0edd9
/// To compile this program, execute Source/DafnyCore/DafnyGeneratedFromDafny.sh manually for now /// Microsoft.Dafny.Formatting.ReindentProgramFromFirstToken() takes /// - A first token, from which an entire program is available /// - A IIndentationFormatter, that knows how to indent every token /// It then prin...
dafny-lang/dafny
Source/DafnyCore/AST/System.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,470
5d15dbe42496c40532907a10f6b05cda407b08126854934ba0b854ae4dfc5fb1
// Interface with the System namespace @Options("-functionSyntax:4") @Compile(false) module {:extern "System"} System { @Compile(false) class {:extern "Text.StringBuilder"} CsStringBuilder { ghost var built: CsString constructor {:extern} () @Axiom method {:extern "Append"} Append(s: CsSt...
dafny-lang/dafny
Source/DafnyCore/Prelude/Boxes.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,755
0e8ae8a5e854ec78c66b753bc8344fe2c882a96df060873c0bfa84c88a5242f4
module Boxes { export provides Box, arbitrary provides Below, Reflexive, Antisymmetric, Transitive, Total reveals Less provides LessIrreflexive, LessAsymmetric, LessBelowAsymmetric, LessTransitive, LessBelowTransitive, Connected provides BelowIsNonStrictLess, NotLess type Box(==,0,!new)...
dafny-lang/dafny
Source/DafnyCore/Prelude/Lists.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
4,677
d13ecdc2f91caf63a5a8d1564ed93e1b4cea61cb8ec02300fe2dd32aee215562
module Lists { export reveals List, List.Length, List.At, List.Contains, List.Append, List.Take, List.Drop, List.Split provides List.HeadTailAt, List.ContainsAt, List.AtContains, List.LengthAppend, List.AppendAt, List.AboutDrop provides List.AppendTake, List.TakeFromAppend, List.AppendDrop, List.DropF...
dafny-lang/dafny
Source/DafnyCore/Prelude/Math.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
1,537
f3ebb0426658296e73cf7672067ad49daa03d470bb575bcae6631108c6bcab7a
module {:extract_boogie} Math { export provides Min, Clip provides Min0, Min1, MinEither provides ClipId, ClipZero // boogie: // function Math#min(a: int, b: int): int; function {:extract_boogie_name "Math#min"} Min(a: int, b: int): int { if a <= b then a else b } // boogie: ...
dafny-lang/dafny
Source/DafnyCore/Prelude/Multisets.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
55,697
c9f6be0bbb52e1156a30c38a44ef66f7a2d27e5683cd4b6853704a9fbb2152e2
module {:extract_boogie} Multisets { import opened Boxes import opened Lists import Math import Sets`Friends import Sequences`Friends // type MultiSet = [Box]int; // The manually authored Boogie type "MultiSet" is defined as a Boogie map from Box to int. // The reason for doing so was to obtai...
dafny-lang/dafny
Source/DafnyCore/Prelude/Sequences.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
27,667
bed17bed35f9b1a2f1f28b3d92de9e33cb724e168fb754f05fde65b145fb164b
module {:extract_boogie} Sequences { export provides Boxes provides Seq, Length, AboutLength provides Empty, LengthEmpty0, LengthEmpty1 provides Index, Append, IndexAppend provides Build, BuildInv0, BuildInv1, BuildInjective, LengthBuild provides Update, IndexUpdate, LengthUpdate p...
dafny-lang/dafny
Source/DafnyCore/Prelude/Sets.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
30,052
11b4e087595b0e418757ddfb7967a3b706849e072a31a6ad932bdebcc80405df
module {:extract_boogie} Sets { import opened Boxes import opened Lists export provides Set, IsMember provides Card, AboutCard provides Empty, EmptyHasNoMembers, CardVsEmpty provides UnionOne, UnionOneAddsElement, UnionOneAddsSelf, UnionOneMaintainsMembership, UnionOneCardIdempotent, Card...
dafny-lang/dafny
Source/DafnyCore/Backends/Dafny/AST.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
20,701
9fc029facf99de31b3d3a24a229bd0b959cbb964b8d757c16b25df0444821b0e
module {:extern "DAST.Format"} DAST.Format /* Cues about how to format different AST elements if necessary, e.g. to generate idiomatic code when needed. */ { // Dafny AST compilation tenets: // - The Compiled Dafny AST should be minimal // - The generated code should look idiomatic and close to the origi...
dafny-lang/dafny
Source/DafnyCore/Backends/Dafny/PrettyPrinter.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
242
2f0c69e18fc16e09b750142c3af525c102f74d420a211246bc8ae0e4b6b0bf05
module {:extern "D2DPrettyPrinter"} PrettyPrinter { import DAST import UnsupportedFeature method PrettyPrint(d: seq<DAST.Module>) returns (s: string) { UnsupportedFeature.Throw(); s := "Not Implemented Yet"; } }
dafny-lang/dafny
Source/DafnyCore/Backends/Dafny/UnsupportedFeatureException.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
115
9d87228b0ceb48f5284a1ae1ac05080c441ead6d7ce6e7db597db35170a62b4d
module UnsupportedFeature { method {:extern "Microsoft.Dafny.Compilers.WrapException", "Throw"} Throw() }
dafny-lang/dafny
Source/DafnyCore/Backends/ResolvedDesugaredExecutableDafny/Dafny-compiler-fdafny.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
420
9c9b90d9674ed9b954b66600c5112bb41b29ca8d23fb4f70dd04f0c3f51e64c5
module {:extern "ResolvedDesugaredExecutableDafnyPlugin"} ResolvedDesugaredExecutableDafnyPlugin { import opened DAST import PrettyPrinter import UnsupportedFeature class COMP { static method Compile(p: seq<Module>) returns (s: string) { s := PrettyPrinter.PrettyPrint(p); } stati...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-coverage.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
13,562
75254a6a23252c9ea0e7dd26e033fcbaecf58e5baf55eb3b933d23315245af8b
/*These modules exists to increase code coverage of the generated code and test it as well. All modules ending with "Coverage" will be compiled to DafnyCore.Test */ module DafnyToRustCompilerCoverage { import opened DafnyToRustCompiler import opened DAST import opened DafnyToRustCompilerDefinitions me...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-definitions-coverage.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
4,016
726bbba2a648ccce666011530f559be2bd7a0174588a2a6e29db44b06d955d5a
// Tests module {:extern "DefsCoverage"} DafnyToRustCompilerDefinitionsCoverage { import opened DafnyToRustCompilerDefinitions import opened DAST import Strings = Std.Strings import Std import opened Std.Wrappers import R = RAST import opened DafnyCompilerRustUtils const IND := R.IND type ...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-definitions.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
40,529
17d9bc2a373d1bfd276b3363bfa56cc8720a55bb6418ee1bac1e5501d120fa22
module {:extern "Defs"} DafnyToRustCompilerDefinitions { import FactorPathsOptimization import ExpressionOptimization import opened DAST import Strings = Std.Strings import Std import opened Std.Wrappers import R = RAST import opened DafnyCompilerRustUtils const IND := R.IND type Typ...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-expression-optimization.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,451
0217af7604cd77bf21d37ffc472237f2662b0cd7b97bc40d604b055c31342d44
// Tests in Dafny-compiler-rust-coverage module ExpressionOptimization { import Std import opened RAST import opened DAST.Format import opened Std.Wrappers function apply(mod: Mod): Mod { ExprSimplifier().ReplaceMod(mod, crate.MSel(mod.name)) } function ExprSimplifier(): RASTBottomUpRepla...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-path-simplification.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
12,042
b5af9a7818ceab8c4b51af1b8aa5f84842a95a177be2ff6810d3463d72c50d3f
module FactorPathsOptimizationTest { export provides TestApply import opened RAST import opened FactorPathsOptimization import opened Std.Wrappers method ShouldBeEqual(a: Mod, b: Mod) { var sA := a.ToString(""); var sB := b.ToString(""); if sA != sB { print "Got:\n" + sA + "\n"; ...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-proofs.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
13,083
528b0f47af3b82b88a4f63b36bb2134266be5f32a3f42ece2495711555099cf0
include "../Dafny/AST.dfy" /*These modules do not contain any compiled code because they only proves properties about DCOMP. In a sense, it's a test file. */ @Compile(false) module {:extern "RASTProofs"} RASTProofs { import opened RAST lemma AboutGatherSimpleQuotes(docstring: string, acc: string) ens...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-rast.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
82,966
5effd67d15c53124d9a807676795aa3c100c3faabb8104db558431e05efc816f
// Rust AST module RAST // All ToString methods should produce well-formed Rust code { import opened Std.Wrappers import Std import opened DAST.Format import Strings = Std.Strings // Rust tuples support some traits like Default only till arity 12 // Past that, we use Dafny system tuples (see ht...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust-utils.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3,661
d9fc333de105457a1a519f57e3702b784b041ea4a09a5171e512f1611fcec253
module DafnyCompilerRustUtils { import Std import opened Std.Wrappers import opened DAST import R = RAST // Split a Dafny name along dots function DafnyNameToContainingPathAndName(n: Name, acc: seq<Ident> := []): (seq<Ident>, Name) decreases |n.dafny_name| { var s := n.dafny_name; ...
dafny-lang/dafny
Source/DafnyCore/Backends/Rust/Dafny-compiler-rust.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
194,223
8d3213ae3608e2d05548a7f510b3a702dc1cdd5d315c71756091fb9474f473ee
include "../Dafny/AST.dfy" // Dafny to Rust compilation tenets: // - The Compiled Dafny AST should be minimal // - The generated code should look idiomatic and close to the original Dafny file if possible module {:extern "DCOMP"} DafnyToRustCompiler { import opened DafnyToRustCompilerDefinitions import Fact...
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Formatting/TestFiles/empty.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
3
f1945cd6c19e56b3c1c78943ef5ec18116907a4ca1efc40a57d48ab1db7adfc5

dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/defines-foo.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
48
9d167cedef998fedf8d25523ac07470142d5327a5302f069f34eb1bda23ee33c
method foo() returns (x: int) { x := 42; }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/find-refs-a.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
40
b2b5c8489ac97bd6714e4dd8fe0203d6d1ce7a6c40669857f46802b5ec59f324
include "find-refs-b.dfy" module A {}
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/find-refs-b.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
54
3caf1806310bf19af9084e88e551a96e80c2d46bf8703d26ab4fc962220026b6
include "find-refs-a.dfy" module B { import A }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/foreign-verify.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
34
7d2c4aa3f606d1f76368ce46bd197b2420f29dbee07ec66144b5a656a497dab2
predicate P(i: int) { i >= 0 }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/foreign.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
118
b52492045ed49754db0286518a969cdd4aa146d25e04f0429041bfaa5cd5e7d4
class A { var x: int; constructor() {} function GetX(): int reads this { this.x } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/includes-foo.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
107
59fc111b19ed0a5c634e4b3cb7a3b4e078b0c5c7e34cfdd04a3868d3c4d35a29
include "defines-foo.dfy" method bar() returns (x: int) { var temp := foo(); x := temp + 2; }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Lookup/TestFiles/ProofDependencies/LSPProofDependencyTest.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
341
9aadb90bce6db97afb128e595d0e1b1055cde847e9951973c05c21e27c4d8886
method RedundantAssumeMethod(n: int) { // either one or the other assumption shouldn't be covered assume n > 4; assume n > 3; assert n > 1; } method ContradictoryAssumeMethod(n: int) { assume n > 0; assume n < 0; assume n == 5; // shouldn't be covered assert n < 10; // shou...
dafny-lang/dafny
Source/DafnyLanguageServer.Test/ProjectFiles/TestFiles/noWarnShadowing.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
73
78df2f01b46f09fca81e80b261ab6329b6682d267ca897fd61d7d23ac5e3bd55
method Foo() { var x := 3; if (true) { var x := 4; } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/ProjectFiles/TestFiles/Nesting/src/foo.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
69
40efcf78b8ed390f58d7e93a8201e7e1fb42d713c047fce7f18101acd9af1c65
method Foo() { var x := 3; if (true) { var x := 4; } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/A.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
490
c4d93c04f5a1ffed6e75c55c4d4df55be04a53b950b077ebfa872d504b93917f
module ModA { const x: int := 3 function TakesIdentityAndAppliesIt<T>(f: (T, T) -> T, x: T): T { f(x, x) } const tuple3 := (2,3,4) const tuple2 := (2,3) module FilledWithPrefixes { } module FilledWithPrefixes.PrefixContent { const x := 3 } module StandalonePr...
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/B.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
219
1c1715940a110d9f5fe8dbed77faa933a02653e2f55f6d14e946953f2e0b87a1
include "./A.dfy" module ModB { import ModA const y := ModA.x + 2 const calledModAFunction := ModA.TakesIdentityAndAppliesIt((x, _) => x, 3) } module SpreadOverMultipleFiles.Child2 { const x := 3 }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/cycleA.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
22
bc68467c9e5af8e9920b66ec253a1ba06ac12deea328009d9a54eb65fff59c9e
include "./cycleB.dfy"
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/cycleB.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
46
6f091e30b7093ac546cfc27292a0ab28986a23188c5f37fbe182126f9e3a8009
include "./cycleA.dfy" const x: int := true
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/importFromRefinedModuleUsingField.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
224
a1fec26820ef85254f2e47dcdb6afd2213bbcc47c4e3c62ae2f658080cfb7eec
module Library { datatype Datatype = True | False } module Refined { import opened Library } module Refiner refines Refined { function Foo(dt: Datatype) : int { if (dt.True?) then 3 else 2 } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/includesSemanticError.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
153
ba68e57e0aafc81da39a07ba607308d6260dab30b3925d4a5bc28f8571e83eef
include "./semanticError.dfy" module IncludesSyntaxError { import SemanticError method Caller() { SemanticError.WithSemanticError(); } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/includesSyntaxError.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
63
051336a7767483799ced13440abe558a35d085d33529826e83b74ab5eee58264
include "./syntaxError.dfy" module IncludesSyntaxError {}
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/multi1.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
16
b0e0257662c993f23c7733759bb2cc6ed150154800bd926193c06070000978f3
module M {}
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/multi2.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
25
39489f73157ccdaa517a75eacd4545719071d3d97ce1e0e6d65dd361179a054f
include "multi1.dfy"
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/notCached.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
99
c2130ccde8a3a1d2ff8c8c2e054477c26b314cedfe709fdd67519fd6e6251b4a
// Needs to exist for the test to pass since language server doesn't have a virtual filesystem yet.
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/potentialImportOpenedConflict.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
695
622b4211066ca2a73ba39ed3a40f98775c16b95e868929e10f917304f0d89dc2
include "./notCached.dfy" module ContainsPotentialImportOpenedConflict { import Conflict = ConflictOptionB import opened ExposesConflictOptionA import ChangedClonedId // This causes KeyResolution to miss the cache, but its import declarations don't miss it, so they're copied into KeyResolution const...
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/semanticError.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
134
125d673a24b615dd10ab9b8a8b5d4d574314361fed826c53fd37c7302f222e5a
module SemanticError { const untypedExport := 3 + "hello" method WithSemanticError() { var x: int := "1"; } }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Synchronization/TestFiles/syntaxError.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
39
c925aebc76252554134fb946c9ee7f796a87a1655127e410d532458653576ffb
method WithSyntaxError() { " }
dafny-lang/dafny
Source/DafnyLanguageServer.Test/Various/TestFiles/3048.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
2,891
d0823db6a4c109c49415dbfe20ffdee21ca5822e8de7202dba2497a654b80c9f
/* Repro test case for https://github.com/dafny-lang/dafny/issues/3048 * author: Nathan Taylor <ntaylor@cs.utexas.edu> * * This file should not pass the resolver and provide a counterexample, * but should not crash the language server either. */ /* Types */ newtype{:nativeType "ulong"} uint64 = i:int | ...
dafny-lang/dafny
Source/DafnyRuntime/DafnyRuntimeDafny/src/dafnyRuntime.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
33,054
31d4152637ae20d0c67819a59a955982f3e30a20356521da7dede7c9d077edb2
// Internal implementation of runtime datatypes and algorithms in Dafny. // Although some of the code in here is likely useful for other codebases, // it is NOT intended to be used as such in its current state. abstract module {:options "/functionSyntax:4"} Dafny { // Note that the T type parameters on some typ...
dafny-lang/dafny
Source/DafnyRuntime/DafnyRuntimeDafny/src/dafnyRuntimeGo.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
410
67c7db32915e10778780df96aac69519bcafcadd7499aeca7b7535c7e2263a23
include "dafnyRuntime.dfy" module {:extern "dafny"} {:options "/functionSyntax:4"} DafnyGo refines Dafny { const SIZE_T_LIMIT: nat := 0x8000_0000 lemma EnsureSizeTLimitAboveMinimum() ensures 128 <= SIZE_T_LIMIT {} trait {:extern} Sequence<T> ... { method SetString() returns (ret: Sequence<T>)...
dafny-lang/dafny
Source/DafnyRuntime/DafnyRuntimeDafny/test/dafnyRuntimeFeasibility.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
6,018
c320faa4c44bb185cb05f9a563665b32fc82659ec809811e418f1347dd67750d
include "../src/dafnyRuntime.dfy" // Implementing a subset of the external traits in Dafny to guard against inconsistent specifications module {:options "/functionSyntax:4"} FeasibilityImplementation refines Dafny { const SIZE_T_LIMIT: nat := 256 lemma EnsureSizeTLimitAboveMinimum() ensures 128 <= SIZE_T_...
dafny-lang/dafny
Source/DafnyRuntime/DafnyRuntimeDafny/test/dafnyRuntimeFeasibilityTest.dfy
NOASSERTION
3,473
master
368adac6150e6a3825fe2f605dca71353badc779
2026-07-21T22:46:38Z
889
c699255125a109e6cc66ca437b1c48c2d28ee89b6d1fe7902612dfb88c071721
include "../test/dafnyRuntimeFeasibility.dfy" // TODO: This isn't actually executable yet because we don't have feasibility // implementations for the complete set of externs, // but at least we get some benefit from verification. module DafnyRuntimeFeasibilityTest { import opened FeasibilityImplementation...