Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kiranandcode/othudd
OCaml Theorem driven development - Tests are for losers.
https://github.com/kiranandcode/othudd
Last synced: 26 days ago
JSON representation
OCaml Theorem driven development - Tests are for losers.
- Host: GitHub
- URL: https://github.com/kiranandcode/othudd
- Owner: kiranandcode
- Created: 2019-11-05T13:03:27.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-06T13:55:13.000Z (almost 5 years ago)
- Last Synced: 2024-07-20T19:13:03.694Z (4 months ago)
- Language: Coq
- Homepage:
- Size: 5.86 KB
- Stars: 3
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# OThudd - Ocaml Theorem Driven Development
Template for software development workflow using theorems instead of tests.## Requirements
- Coq - 8.9
- Ssreflect - 1.9
- Ocaml
- Dune
- Core## Setup
1. Clone this repository```
git clone /thudd.git
```2. Edit dune file to name project to liking.
3. Run make
```
make
```4. Verify it works with
```
make run
```## Development Workflow
See `lib/examplecoq.ml`,`lib/examplecoqinst.ml` for concrete examples of the following.
1. For experimental library stuff, build it first in `src/` and figure out a good abstract interface for the core logic.
2. Construct an abstract version of this interface in `lib/` in Coq as a Module Type, capturing any pre/postconditions as axioms of the module type.
3. Implement and prove core logic given the preconditions/postconditions in abstract form, taking a module conforming to the type specified in 2. as a parameter.
4. At the end of the file add `Extract "" `.
5. Run `make` to build an ocaml version of the code.
6. Define a concrete Ocaml module in the `lib/` directory that imports the constructed abstract core logic and instantiates it with a concrete type.
7. Use verified module in `src/` and repeat.Will add more if more comes up
## Note: Updates
If you are reading this from micro$oft's github, then be advised that
updates will be first pushed to the version hosted on Gitlab, and
only then, maybe will they be pushed to micro$oft's github.