dafny-vmc
Dafny-VMC: a Library for Verified Monte Carlo Algorithms
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (8.9%) to scientific vocabulary
Repository
Dafny-VMC: a Library for Verified Monte Carlo Algorithms
Basic Info
Statistics
- Stars: 15
- Watchers: 5
- Forks: 2
- Open Issues: 1
- Releases: 15
Metadata Files
README.md
Dafny-VMC: a Library for Verified Monte Carlo Algorithms
The DafnyVMC module introduces utils for probabilistic reasoning in Dafny. At the moment, the API is intentionally limited in scope, and only supports compilation to Java and Python. For the future, we plan to extend both the functionality and the range of supported languages.
The main developers of Dafny-VMC are Stefan Zetzsche and Jean-Baptiste Tristan.
Many other people have contributed to it (in no particular order): Aws Albharghouti, Anjali Joshi, Tancrede Lepoint, Mikael Mayer, Muhammad Naveed, Tristan Ravitch, Fabian Zaiser.
To cite Dafny-VMC you can currently use the following reference:
@software{Zetzsche_Dafny-VMC_a_Library_2023,
author = {Zetzsche, Stefan and Tristan, Jean-Baptiste},
title = {{Dafny-VMC: a Library for Verified Monte Carlo Algorithms}},
url = {https://github.com/dafny-lang/Dafny-VMC},
year = {2023}
}
Java
Java API
```java import DafnyVMC.Random; import java.math.BigInteger; import java.util.Arrays;
class Test { public static void main(String[] args) { DafnyVMC.Random r = new DafnyVMC.Random();
System.out.println("Example of Fisher-Yates shuffling");
char[] arr = {'a', 'b', 'c'};
r.Shuffle(arr);
System.out.println(Arrays.toString(arr));
System.out.println("Example of Bernoulli sampling");
BigInteger num = BigInteger.valueOf(3);
BigInteger den = BigInteger.valueOf(5);
System.out.println(r.BernoulliSample(num,den));
} } ```
Java Examples
To run the examples in the docs/java directory, use the following commands:
bash
$ export TARGET_LANG=java
$ bash scripts/build.sh
$ bash build/java/run_samplers.sh
$ bash build/java/run_shuffling.sh
To run the tests in the docs/dafny directory, use the following commands:
bash
$ dafny build docs/dafny/ExamplesRandom.dfy --target:java src/interop/java/Full/Random.java src/interop/java/Part/Random.java dfyconfig.toml --no-verify
$ java -jar docs/dafny/ExamplesRandom.jar
To run the statistical tests in the tests directory, use the following commands:
bash
$ dafny test --target:java src/interop/java/Full/Random.java src/interop/java/Part/Random.java tests/TestsRandom.dfy tests/Tests.dfy dfyconfig.toml --no-verify
Python
Python API
```py import DafnyVMC
def main(): r = DafnyVMC.Random()
print("Example of Fisher-Yates shuffling") arr = ['a', 'b', 'c'] arr = r.Shuffle(arr) print(arr)
print("Example of Bernoulli sampling") print(r.BernoulliSample(3, 5)) ```
Python Examples
To run the examples in the docs/java directory, use the following commands:
bash
$ export TARGET_LANG=py
$ bash scripts/build.sh
$ bash build/py/run_samplers.sh
$ bash build/py/run_shuffling.sh
To run the tests in the docs/dafny directory, use the following commands:
bash
$ dafny build docs/dafny/ExamplesRandom.dfy --target:py src/interop/py/Full/Random.py src/interop/py/Part/Random.py dfyconfig.toml --no-verify
$ python3 docs/dafny/ExamplesRandom-py/__main__.py
To run the statistical tests in the tests directory, use the following commands:
bash
$ dafny test --target:py src/interop/py/Full/Random.py src/interop/py/Part/Random.py tests/TestsRandom.dfy tests/Tests.dfy dfyconfig.toml --no-verify
Owner
- Name: Dafny
- Login: dafny-lang
- Kind: organization
- Repositories: 13
- Profile: https://github.com/dafny-lang
Dafny is a verification-aware programming language
Citation (CITATION.cff)
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Zetzsche"
given-names: "Stefan"
- family-names: "Tristan"
given-names: "Jean-Baptiste"
title: "Dafny-VMC: a Library for Verified Monte Carlo Algorithms"
url: "https://github.com/dafny-lang/Dafny-VMC"
preferred-citation:
type: software
authors:
- family-names: "Zetzsche"
given-names: "Stefan"
- family-names: "Tristan"
given-names: "Jean-Baptiste"
title: "Dafny-VMC: a Library for Verified Monte Carlo Algorithms"
url: "https://github.com/dafny-lang/Dafny-VMC"
year: 2023
GitHub Events
Total
- Watch event: 2
- Push event: 4
- Pull request review event: 3
- Pull request event: 7
- Create event: 3
Last Year
- Watch event: 2
- Push event: 4
- Pull request review event: 3
- Pull request event: 7
- Create event: 3
Issues and Pull Requests
Last synced: 12 months ago
All Time
- Total issues: 4
- Total pull requests: 162
- Average time to close issues: 22 days
- Average time to close pull requests: 2 days
- Total issue authors: 1
- Total pull request authors: 4
- Average comments per issue: 0.5
- Average comments per pull request: 0.04
- Merged pull requests: 138
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- fzaiser (2)
Pull Request Authors
- stefan-aws (82)
- fzaiser (38)
- jtristan (25)
- barghouthi (1)