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/DafnyStandardLibraries/examples/Base64Examples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,302 | 0788c18bd0b5e6acce55f170a569e5e1e49c65c1094b2cd1fc6a01fe6d06c19b | module Base64Examples {
import opened Std.Base64
import opened Std.BoundedInts
import opened Std.Wrappers
method CheckEncodeDecode(uints: seq<uint8>, bytes: seq<bv8>) {
expect Decode(Encode(uints)) == Success(uints);
expect DecodeBV(EncodeBV(bytes)) == Success(bytes);
}
@Test
method T... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/BoundedIntExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 621 | 72bfa1a749ee023557260b7c92df85dcfbb8f2044910a8272ed0dc69684b4104 | import opened Std.BoundedInts
lemma BoundedIntUser(x: uint32, z: nat16)
ensures TWO_TO_THE_15 * 2 == TWO_TO_THE_16
ensures 0 <= (x as int) < TWO_TO_THE_32
{
var y: uint64 := x as int as uint64;
var int16 := z as int as int16;
var uint16 := z as int as uint16;
}
@Test
method UseExterns() {
var... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/CollectionsExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,637 | 17098c474f30e2ea4bd6ce9052f623fd7bc61b693e18ff7849152a9f33e60ef4 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module CollectionsExamples {
// These examples focus mainl... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/ConcurrentExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,255 | 6de22aa809fe359f27aafac6eafc1043e71471b9c982f284fbd83544aa524fed | module ConcurrentExamples {
import opened Std.Concurrent
import opened Std.Wrappers
import opened Std.BoundedInts
import opened Helpers
const p1: nat -> bool := _ => true
const p2: (nat, nat) -> bool := (_, _) => true
const p3: (char, nat) -> bool := (_, _) => true
const p4: (Copy, nat) -> b... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/DynamicArrayExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 840 | 26112a573dfdde3dac7e023eee68ccb8b8c80d61d8eeb62794a1ac628341ea54 | module DynamicArrayExamples {
import opened Std.DynamicArray
import opened Std.BoundedInts
@Test
method Ensure() {
var arr := new DynamicArray<int>();
arr.Ensure(100, 3);
for i: int := 0 to 100
invariant fresh(arr.Repr)
invariant arr.Valid?()
invariant arr.size as int =... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FramesExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,581 | 0399cc6b5bf24d378c83f78fa90dbae353ef9b1443adce7c2ca0b36e6ee71c62 | module FramesExamples {
import opened Std.Frames
import opened Std.Wrappers
// A non-trivial example of a recursive data strucutre
// using the Validatable trait.
// In particular, expressing the Node class invariant
// necessary in order to prove termination of recursive methods
// is much sim... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FunctionsExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 668 | 4cee1dc1a9c5b5b46717e0fb5da7c51ae1a3d715c7197539999a5faf89615a62 | module FunctionExamples {
import opened Std.Functions
const square := (x: int) => x * x
lemma TestInjective()
ensures Injective<int, int>((x) => x + 2)
ensures !Injective<int, int>((x) => x * x)
{
assert square(-1) == square(1);
}
const subtract := (x: int, y: int) => x - y
lem... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Helpers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 612 | 89c249e224e28f2b36c8912fcc1063a1ef3099365f1d71e446547c139471d6f2 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Helpers {
import opened Std.Wrappers
// TODO: cons... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/RelationExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,279 | a81ce4b89dd456e245673528b487db6ff088350ed9333aeb06e1a8696bbbcb43 | module RelationExamples {
import opened Std.Relations
const partialOrdering := (a: int, b: int) => !(a == 9 && b == 10) && a <= b
lemma TestRelationProperties()
ensures Reflexive<int>((a,b) => a == b)
ensures Irreflexive<int>((a,b) => a != b)
ensures Symmetric((a,b) => a && b)
ensures A... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/StringsExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,716 | 10cb33d7a3918d1929c7736f47437957de3e7a1f5b30dda2073a31f540cb1351 | module StringsExamples {
import opened Std.Strings
import opened Std.Wrappers
@Test
method TestOfInt() {
expect OfInt(0) == "0";
expect OfInt(3) == "3";
expect OfInt(302) == "302";
expect OfInt(-3) == "-3";
expect OfInt(-302) == "-302";
}
@Test
method TestToInt() {
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TerminationExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,377 | 7b59af6e027a7b8f4448586b28ec5bc3054f931907b56dc7856af029b1f33fbc |
module TerminationExample {
import opened Std.Termination
import opened Std.Ordinal
@ResourceLimit("1e7")
@IsolateAssertions
method Test() {
var tm := TMNat(7);
var tm2 := TMNat(8);
assert tm2.Ordinal() > tm.Ordinal() by {
reveal TerminationMetric.Ordinal();
}
var ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/UnicodeExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 7,198 | 11cc54525538bf34124a25f9de651fd9d0772b077306afc61d5f528242f9de8f |
/*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module UnicodeExamples {
module BaseExamples {
import... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/WrappersExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,500 | 7f6bac0f194db6ac9f637b497d43e66f37cf90185951da470082b832daf75b20 | import opened Std.Wrappers
// ------ Demo for Option ----------------------------
// We use Option when we don't need to pass around a reason for the failure,
// ie when just 'None' is sufficient:
class MyMap<K(==), V> {
var m: map<K, V>
constructor () {
m := map[];
}
function Get(k: K): Option... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Actions/ActionsExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 17,139 | 77482069d4ba2d2a6c8be27214ba4a526589f61acab4c25c9ef1f3f589da5e45 | module ActionsExamples {
import opened Std.Actions
import opened Std.ActionsExterns
import opened Std.BulkActions
import opened Std.BoundedInts
import opened Std.Producers
import opened Std.Consumers
import opened Std.Wrappers
import opened Std.Frames
import opened Std.Termination
// Dem... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Arithmetic/ArithmeticExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,536 | dc4f8deb88ac5330030019fe8917396c0a38074d05202d63ec1b82e1823f236b | module ArithmeticExamples {
import opened Std.Arithmetic.Logarithm
import opened Std.Arithmetic.Power
import opened Std.Arithmetic.Mul
/* log_b(m * n) = log_b(m) + log_b(n) if m and n are also powers of b */
lemma LogProductRule(b: nat, x: nat, y: nat)
requires b > 1
ensures (
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Arithmetic/ArithmeticTests.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 977 | ddb987943afe70f8a197656044f85ffb669d66e6b7abdff5d5b238f688646c85 | module ArithmeticTests {
import opened Std.Arithmetic.Logarithm
import opened Std.Arithmetic.Power
import opened Std.Arithmetic.Mul
import opened Std.Arithmetic.Power2
import opened Std.Arithmetic.MulInternals
import opened Std.Arithmetic.ModInternals
import opened Std.Arithmetic.DivInternals
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FileIO/ReadBytesFromFile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,492 | eea9ab0b9264f5bfb8e18d0e4967fc58951c66d3a85909fe28a7e5a153f50ad1 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module ReadBytesFromFile {
import Std.FileIO
@Test
m... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FileIO/ReadUTF8FromFile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,538 | 3bf44ff4768de24e4e897de6151a0968587a97fb0ef6922bfbea16413ca1e8dc | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module ReadFromFile {
import Std.FileIO
@Test
method... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FileIO/WriteBytesToFile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,583 | 5ecf63b2da5eea27147d4c4a0a2459f4ab7d7cd6c01ce43c3f73a955940e5adb | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module WriteBytesToFile {
import Std.FileIO
@Test
me... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/FileIO/WriteUTF8ToFile.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,936 | adf97610e379a0c0c61a557477fab9cdb5625099f006449f71766f19f449fe15 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module WriteToFile {
import Std.FileIO
@Test
method ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/JSON/JSONExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,691 | f3bddf8b50103402f5118082c96b52e2bcc29cdcc28014475d43abd14a82a973 | /**
This library offers two APIs: a high-level one (giving abstract value trees
with no concrete syntactic details) and a low-level one (including all
information about blanks, separator positions, character escapes, etc.).
*/
/** High-level API (JSON values) */
@Options("-functionSyntax:4")
module Abstra... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/JSON/JSONTests.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,211 | d84fc6c599decb2fbb40a50b150f5b8bb0d640d16a18ffd2800494522f19cee0 | abstract module AbstractWrapper {
import Std.Strings
import opened Std.BoundedInts
import opened Std.Unicode.UnicodeStringsWithUnicodeChar
import opened Std.JSON.Errors
type JSON
method Deserialize(bs: bytes) returns (js: DeserializationResult<JSON>)
method SpecSerialize(js: JSON) returns (bs: ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/nondeterministic/ActionsExamples.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 13,363 | f4f666e558fb0f03ec4301b3f4c18a535106dd1f5f758d6ba86568b4675723da | module ActionsExamples {
import opened Std.Actions
import opened Std.Consumers
import opened Std.Producers
import opened Std.Termination
import opened Std.Wrappers
// Adapting an iterator to a producer
iterator FibonacciIterator() yields (current: nat)
ensures false
{
current := ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/AdventOfCode1.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,026 | 85be8599eb785ee7740b42c9cb55f5c1fb71bc7a11baed207981d9679c7c3fb2 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module ExampleParsers.AdventOfCode1 {
import opened Std.Par... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/DafnyParser.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,496 | 868bca8c36c0d607f1763465bcc7a4e35307e698ae7040413ffc9c239eee4f72 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** A parser that can be used to parse Dafny programs. For now... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/JsonParser.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,279 | 97ae2720ea17ed94cd16c53147e72c79110e37e9821cdc34c62012074aeb762f | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** A parser that can parse a JSON-like structure
* Strings... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/ParserGenerator.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,944 | 42317281a691bc16afc375a6a12087cd8490d7f3d272a1b2a1101fa0ba74f6fd | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** A small regex-like language that can be turned into a stra... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/PolynomialParser.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,166 | c16c2a76630123f840283e6f080fdfdc9679c7fe6938ee50b1e207f6c44a6a80 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** Definition of a single-variable polynomial expression */
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/SmtParser.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,640 | 6449b182242cb3a340e15f81c1803aca45d9b1463d41867ede30f16506d606b8 | /**
This example demonstrates how to use Rec to create an SMT parser,
and RecNoStack to create an SMT parser that does not consume any stack.
*/
module ExampleParsers.SmtParser {
import Std.Collections.Seq
import opened Std.Parsers.StringBuilders
function SeqToString<T>(s: seq<T>, f: T --> string, sepa... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/Parsers/Tutorial.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,766 | 666019404c00ce8698a133ef08c33513342162ad6eb1d5a534149ec826c2973a | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module ExampleParsers.Tutorial {
import opened Std.Parsers.... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/ActionsExternsExamples-cs-java.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,832 | 26a3a2461b1c2f362c9c6a12517f476cfa7cdd884a759b8192e2dc0badf941cb | module ActionsExternsExamples {
import opened Std.Actions
import opened Std.ActionsExterns
import opened Std.BulkActions
import opened Std.Producers
import opened Std.Consumers
import opened Std.Wrappers
import opened Std.Frames
import opened Std.Termination
@IsolateAssertions
@Test
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/ActionsExternsExamples-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 91 | 0d265f081877f8deee00090b6d962fc4d25b6fb04fc9c93ba0eb8c098fe0e75e | module ActionsExternsExamples {
// Externs not yet implemented for these backends
} |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/DurationExamples-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,397 | d64a210e4dce47110b228a6220acc31aa4d9567f84bf91b016aeb0c94313afb0 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Includes comprehensive test methods for validating the fu... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/LocalDateTimeExamples-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 25,762 | 8a66871c8aa9d183d30f752249f2451d638916313f9d565091f92dfa4875ed89 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Includes comprehensive test methods for validating the... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/StatisticsExamples-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,430 | f587e446e5dd64cf9bfa15713327663b6ee2551981fd40873b70446a1c0413e2 |
module TestStatistics {
import opened Std.Statistics
import opened Helpers
method {:test} TestSum() {
AssertAndExpect(Sum([1.0, 2.0, 3.0, 4.0, 5.0]) == 15.0);
AssertAndExpect(Sum([1.5, 2.5, 3.5]) == 7.5);
AssertAndExpect(Sum([100.0]) == 100.0);
AssertAndExpect(Sum([-10.0, 0.0, 10.0, 2... |
dafny-lang/dafny | Source/DafnyStandardLibraries/examples/TargetSpecific/ZonedDateTimeExamples-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 15,287 | 16dbb3ba02316c6bd091d8408fc31d13659fd17e215cb0a43e1a4dca9c3935ca | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Includes comprehensive test methods for validating the fu... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Base64.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 41,834 | cfaff73167038696e892113ec34382b029b82f55b3213c7ea4dde5a5d133b4c1 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** An encoder and decoder for the Base64 encoding scheme. */
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/BoundedInts.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,930 | fd0ff3d9d42b525fd3c6264fec260401a131a0c3e5599bee396c328c0b041b66 | /**
Defines symbolic names for various powers of 2 and newtypes for various common restricted-range int types.
*/
module Std.BoundedInts {
const TWO_TO_THE_0: int := 1
const TWO_TO_THE_1: int := 2
const TWO_TO_THE_2: int := 4
const TWO_TO_THE_4: int := 16
const TWO_TO_THE_5: int := 32
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/DynamicArray.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,295 | a972f311f7f660e609bd9597426713a964cafca584d76e2ea30740c5baaa45c2 | module Std.DynamicArray {
import opened BoundedInts
import opened Wrappers
export
reveals DynamicArray
provides
BoundedInts,
DynamicArray.items,
DynamicArray.capacity,
DynamicArray.Repr,
DynamicArray.Valid?,
DynamicArray.size,
DynamicArray.At,
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Frames.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,064 | 05921c7986b5c50c6ae95f79e9b22b7ad5ffd700c72897319f9865934612c845 | module Std.Frames {
import opened Termination
// A trait for objects with a Valid() predicate. Necessary in order to
// generalize some proofs, but also useful for reducing the boilerplate
// that most such objects need to include.
trait Validatable extends object {
// Ghost state tracking the c... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Functions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,088 | 1939281aea7e8e3563eef23d5fa90c816712dc8c87bbe721f2f8dd9ac74868ad | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
A collection of predicates that establish whether commonly ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Math.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 919 | af9c82f8ce1e8f85c7bd39ce49c5b37405b86c983aa928bde57a993039029859 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** Defines various integer-math functions */
module Std.Math ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Ordinal.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,673 | 2b8b1b0efc68ad7ac0cfe6cc243a34fed7a7ddca0d766aeb299df7d080a46c57 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.Ordinal {
ghost function {:axiom} Omega(): ORDI... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Relations.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,733 | a921581bcb8be02bbc5271c74a92b7bf5d859293b4d536661c07cb5dc9db9939 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
A collection of predicates that establish whether commonly ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Strings.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 8,358 | 299fabf8bace4c6e9f2aa1e7726bb873c143c28c3dc91c93ef1181fb9a17d18f | /**
The Strings module enables converting between numbers such as nat and int, and String
*/
@DisableNonlinearArithmetic
module Std.Strings {
import opened Wrappers
import opened Arithmetic.Power
import opened Arithmetic.Logarithm
import Arithmetic
/**
Refine this module to use it.
The refin... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Termination.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 11,767 | d11bf46acaed316c357b0b9c5d270087eca5a9349a20e5567e980c8dc4739e15 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.Termination {
import opened Collections.Set
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Wrappers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,946 | b0f63533341767ab6fbf03da0c5702daf4753ea0d50ba3ce9947deec4907e2ff | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/** This module provides various kinds of failure-compatible da... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Actions/Actions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 15,250 | 514c4e830456304623986b0001460ed14da1eb7c93a09c3266a8b4f39bd45fed | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.Actions {
import opened Wrappers
import open... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Actions/BulkActions.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 15,467 | 2351d7ec74b3b059b652796cc601764bc983f0bd1befe0e4f2eef36f7149af06 | module Std.BulkActions {
import opened Actions
import opened Consumers
import opened Producers
import opened Wrappers
import opened BoundedInts
import opened Termination
// A wrapper type useful as the output type of producers that may encounter errors.
// Equivalent to Option<Result<T, E>> ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Actions/Consumers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 22,920 | 354ba5236f9c6cb7b14b3965256e44c704a7dd1d55057c03b838a1b426032bd9 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.Consumers {
import opened Actions
import ope... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Actions/GenericAction.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,242 | f15d3f9dcb93d739ca42b287b9d3346f3bcd42cf1465de4514adb595723eeb26 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.GenericActions {
import opened Termination
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Actions/Producers.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 78,709 | 2cd1363a08294d939a8e005ffab3dcc4de3f9ab8e9e37da089e80eb7022bae21 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.Producers {
import opened Actions
import ope... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/DivMod.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 54,138 | 3a0ad5302d842c4bdabaabefd96b236c976230994bfc03cb694042604dc75d4c | /*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*************************... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/LittleEndianNat.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 19,685 | 48dbc84e8dd1397f78305cbf69d5a2e56daae42424cb7fa36e9f3a9399004396 | /*******************************************************************************
* Original: Copyright (c) 2020 Secure Foundations Lab
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/Logarithm.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,743 | 9b637b7a67a54a3e5c271f216f77131cc741f69ad52c7860ba1d3031fca5fde1 | @DisableNonlinearArithmetic
module Std.Arithmetic.Logarithm {
import opened Mul
import opened DivMod
import opened Power
function Log(base: nat, pow: nat): nat
requires base > 1
decreases pow
{
if pow < base then 0
else
LemmaDivPosIsPosAuto(); LemmaDivDecreasesAuto();
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/Mul.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 20,350 | 196ab10461d5c49e57e34ea051c89ba5acc8ec6ccf277b6415289edf547b8089 | /*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*************************... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/Power.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 18,097 | 10ece3debc9f3c89dea78a65c8788508ba8fde744b73943b7a98f02295c4795e | /*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*************************... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Arithmetic/Power2.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,483 | e409c9fad55d2f3d7739e9ef476dfa6a771a05fdda9e6cbb36c0aa4945f2d52c | /*******************************************************************************
* Original: Copyright (c) Microsoft Corporation
* SPDX-License-Identifier: MIT
*
* Modifications and Extensions: Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*************************... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Array.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,211 | 4f145c74486460e3aeb991de97b9f4a10a45d8925768ca06d83a46322e55d80f | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
This module defines useful properties and functions relat... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Collections.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 558 | 1cb452fc36f91cde60b2adb3937b3583103d266473795311f5ac9e68ca0e21b7 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
This module contains submodules each defining useful prop... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Imap.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,881 | 7fc51f1ddb11b0acee6e7cd6424d537fe023c472c02710c952494ba0d783f530 | /*******************************************************************************
* Original: Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Modifications and Extensions: Copyright by the c... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Iset.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,833 | 107432360e20afa663d4ad4d7529bf3f7f2c8648efedba0c68e3f814118ffd61 | /*******************************************************************************
* Original Copyright under the following:
* Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c)... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Map.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,404 | 0e69875d6ab7f320ed3b53fd7416507b2df754b75c84d1efe732dbac35386285 | /*******************************************************************************
* Original: Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Modifications and Extensions: Copyright by the c... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Multiset.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,350 | d91eb85e8b59bc10369c23033e4c852c4e012d57df4b2805fbac2780c3bb564e | /*******************************************************************************
* Original Copyright under the following:
* Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c)... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Seq.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 46,708 | cc11f18a84a8d2dfff89e20d49ffe61573ef7d208883738be3ee91025f6f71ac | /*******************************************************************************
* Original Copyright under the following:
* Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c)... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Set.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 10,491 | 6d995a82401a3cc586819014ef7373e402fd1efb93dfd56b127e9cf9d9a3bff5 | /*******************************************************************************
* Original Copyright under the following:
* Copyright 2018-2021 VMware, Inc., Microsoft Inc., Carnegie Mellon University,
* ETH Zurich, and University of Washington
* SPDX-License-Identifier: BSD-2-Clause
*
* Copyright (c)... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Collections/Tuple.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 640 | d1f9efcc7cdee6b1463ea170531d5420f000de5147482d46d85b22d979f686f3 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
This module defines useful properties and functions relat... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/API.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,530 | 8756a9a3cbb98995b51d0ad0fff533949ebf7d282cf24d0d3189070f5ca23e9b | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
The high-level API of the JSON library. This version is ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/ByteStrConversion.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,078 | d43809c42567b9e62fd0cb2a91badb86dada6b553b707a051caf2ab2a20ee4de | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Derives conversions to and from sequences of bytes.
*/... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/ConcreteSyntax.Spec.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,775 | 48057e09a440dacc2af0004de92749ebd31edf542916ed591521cac474016d67 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines a low-level specification of a JSON serializer.
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/ConcreteSyntax.SpecProperties.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,065 | 9db14d91d608e12ae6c28e3a0055faf2d163243502bfed207fd0d41922620409 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines a simple functional specification of a JSON seri... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Deserializer.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 6,928 | 99082fee60757ece8036d6bd5c80ddb96712a53c4588382e034b382dce470b38 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Implements high-level deserialization (utf-8 bytes to JS... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Errors.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,385 | b418c47053bbc8c0c95c21e8b36b9a4ff85db53c9094d08b994986b4a0fc9dc6 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines different types of errors that can occur during ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Grammar.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,575 | ec731cec2490991ba7f0916c6d7d8c97163912090b74902f0d1e5b2d36be9210 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines concrete syntax trees that capture details of pu... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Serializer.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,433 | 5cf38047cc8f74e1ee246999eed4f44316a0584e9d34d174ac9187ad959af860 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Implements high-level serialization (JSON values to utf-... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Spec.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,492 | 8f10f1846d2a0a43284c9f11dc3bd3b756020fe8c662b726d92ddfc4d9378a79 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines a high-level specification of a JSON serializer.... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/JSON/Values.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 700 | 136504b6311cd4836f9218596b9ff86f2875506ce759595b2e5fa2b5c35eaf31 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines abstract datatype value trees that represent str... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/ActionsExterns-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 644 | 95c1442b26264120151566f42fb247e4e21e97d1acd13265641b5e2bcba4d6a4 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module Std.JavaCsActionsExterns replaces ActionsExterns {
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/ActionsExterns-notarget-java-cs-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 318 | 3fd2781f5f3fee9b308f16a7bb55759e4d965dce43a8cc690fcda19bb7a28f1f | replaceable module Std.ActionsExterns {
import opened Producers
method MakeSetReader<T>(s: set<T>) returns (p: Producer<T>, ghost proof: ProducerOfSetProof<T>)
ensures p.Valid()
ensures fresh(p.Repr)
ensures p.history == []
ensures proof.Producer() == p
ensures proof.Set() == s
} |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/ActionsExterns-notarget-java-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 591 | aebfc26b943da618b45ec17d661446f1affed62ff387beb315f33c7e699dc032 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
module {:extern} Std.JavaCsActionsExterns replaces ActionsExter... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-go.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,249 | 2a7c437684ff1403635b64932a9483ceca0884640a71efb1e81426476d127417 | @Compile(false)
module
{:dummyImportMember "Dummy__", true}
Std.GoConcurrent replaces Concurrent {
class {:extern} MutableMap<K(==), V(==)> ... {
@Axiom
constructor {:extern} (ghost inv: (K, V) -> bool, bytesKeys: bool)
ghost predicate Valid()
{
true
}
@Axiom
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-java.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,220 | db67592defb1f05e7ba3a9e6c76b9af21697d5b9f2b21d988c369b5501e39d84 | module {:extern} Std.JavaConcurrent replaces Concurrent {
class {:extern} MutableMap<K(==), V(==)> ... {
@Axiom
constructor {:extern} (ghost inv: (K, V) -> bool, bytesKeys: bool)
ghost predicate Valid()
{
true
}
@Axiom
method {:extern} Keys() returns (keys: set<K>)
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-js.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,879 | c9ce50219c6ece9b04c1d3ed1376091f1e3f8917ff34bab46b43a0cbf20f7c19 | @Compile(false)
module Std.JavaScriptConcurrent replaces Concurrent {
class {:extern} MutableMap<K(==), V(==)> ... {
@Axiom
constructor {:extern} (ghost inv: (K, V) -> bool, bytesKeys: bool)
ghost predicate Valid()
{
true
}
@Axiom
method {:extern} Keys() returns (ke... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,220 | c210061dd95e5eb570f3af2a16fab106c42bf7411eacfb3d4cce1b2a5644930e | @Compile(false)
module {:extern} Std.CSharpConcurrent replaces Concurrent {
class {:extern} MutableMap<K(==), V(==)> ... {
@Axiom
constructor {:extern} (ghost inv: (K, V) -> bool, bytesKeys: bool)
ghost predicate Valid()
{
true
}
@Axiom
method {:extern} Keys() retur... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-notarget-java-cs-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 3,037 | 87aed489f52e464c37d4e795965d97617c5f556a1d471355c233d4cbb1920f05 | replaceable module Std.Concurrent {
import opened Wrappers
/**
* A lock to provide mutual exclusion.
*
* Note this lock is not reentrant, and its methods have preconditions
* to ensure they are called in matching pairs.
*/
class Lock {
// This is really "thread-local" state.... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Concurrent-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,210 | 9f23d46e3ea21824f23188739a73de43bb669cc6b430733c94e3775ce4786f95 | @Compile(false)
module Std.PythonConcurrent replaces Concurrent {
class {:extern} MutableMap<K(==), V(==)> ... {
@Axiom
constructor {:extern} (ghost inv: (K, V) -> bool, bytesKeys: bool)
ghost predicate Valid()
{
true
}
@Axiom
method {:extern} Keys() returns (keys: ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/DateTimeConstant-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 1,614 | 617278bec8f8154220f9936b25acd5e5eaef31e5e543be9c05db7ca9712510ab | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Defines time-related constants and bounded integer types ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/DateTimeUtils-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 5,303 | 26f227742ddf1f4f6e3ed53b32722372ead841747b07864812e6990df28637a8 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Contains utility functions for date validation, day calcu... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Duration-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 9,137 | 29e0bff29889cea98a85e606d996a5d07a5c0cfb7fa1876454a30f473d04dc1c | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Contains the full implementation of Duration operation... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/FileIO1InternalExterns-go.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 978 | a0d2794ba201a2c8a8b10127eac2c66f71ac10a6e6ed8f698d3b4e33d683ee76 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/*
* Private API - these should not be used elsewhere
*/
@... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/FileIO2InternalExterns-java-cs-js.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 660 | 116909d324819a23938d08759e5c12327dbca8b3254cc6d0bf705999ad47157a | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/*
* Private API - these should not be used elsewhere
*/
m... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/FileIO3InternalExterns-notarget-java-cs-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 613 | 6f774908b1c95bf76648dff414cf70419ce0ca8149e8316ad3c5f34e9d85f55c | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/*
* Private API - these should not be used elsewhere
*/
r... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/FileIO4InternalExterns-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 877 | 15b9d8d0d2f44b8717308f03013b30221dae629cbdb7f922d226ff9353bf3282 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/*
* Private API - these should not be used elsewhere
*/
/... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/FileIO5-notarget-java-cs-js-go-py.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,982 | f94382af6326edddbc30775ba5c76055559ffa979019d7efd534d2ff9359b5e0 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
* This module provides basic file I/O operations: readin... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/LocalDateTime-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 17,243 | 8ed041f7d568f0c58f4e208c30768e841b33e65402a17bc3b46d2ada0f337aa5 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Contains the full implementation of LocalDateTime oper... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/Statistics-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 4,418 | 696c8cd85c0d274ee8e9d96306cafb3593b1564ec7a45f47a4085f2efe5a6236 | module ExternalMath {
function {:extern}{:axiom} Sqrt(x: real): real
requires x >= 0.0
ensures Sqrt(x) >= 0.0
}
module Std.Statistics {
import opened ExternalMath
import opened Collections.Seq
// A function to sum the elements of a sequence
function Sum(s: seq<real>): real
{
SumHe... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/TargetSpecific/ZonedDateTime-notarget-cs.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 18,968 | 33d7d68c67aa0f98fc8e088d952570a1db8d6f1dd9ba2651af1b7eb9649edbd9 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
Contains the full implementation of ZonedDateTime oper... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Unicode/Unicode.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 853 | 076ad7f687e3b6e528365c0c3b297576154fdfd23793891059f94c33b9e62976 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
This module defines concepts from the core specification
... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Unicode/UnicodeBase.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 2,274 | 7c5ad2b9276e318f1c873a589a6646928a5742b22c947c30f358c5e0ecb933f9 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
* This module implements basic functionality of Unicode ... |
dafny-lang/dafny | Source/DafnyStandardLibraries/src/Std/Unicode/UnicodeEncodingForm.dfy | NOASSERTION | 3,473 | master | 368adac6150e6a3825fe2f605dca71353badc779 | 2026-07-21T22:46:38Z | 13,955 | 817cb75b89b7522e9d69fca098e18159550d83d2696e426d70f8354230307c90 | /*******************************************************************************
* Copyright by the contributors to the Dafny Project
* SPDX-License-Identifier: MIT
*******************************************************************************/
/**
* A Unicode encoding form assigns each Unicode scalar va... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.