-
Notifications
You must be signed in to change notification settings - Fork 365
Backstage OCaml: Gospel Ecosystem: Tools Ready to Try, Language Evolving #3352
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
24290ce
backstage: The Gospel Ecosystem is Ready for Early Adopters
sabine dab6e20
addressing feedback
sabine e58c62e
reword, and clarify Try Today section
sabine 213622c
rename gospel announcement
sabine f469993
add email link + pleasing the markdown linter a little before I updat…
sabine e2ba44d
mention best tool paper award
sabine ac1be3b
remove repeated update on the tools' status
sabine 9105d96
rearrange the 'toolkit' section
sabine c4936dd
add a paragraph explaining that we're doing similar things as ACSL an…
sabine File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| --- | ||
| title: "The Gospel Ecosystem is Ready for Early Adopters" | ||
| tags: [gospel, platform] | ||
| --- | ||
|
|
||
| [Gospel](https://github.com/ocaml-gospel/gospel), the behavioral specification language for OCaml, has reached a milestone where early adopters can meaningfully engage with the tools. After years of development and research, parts of the ecosystem are stable enough to try on real codebases, with the goal of gathering feedback as the project works toward production readiness. | ||
|
|
||
| ## Making Formal Methods Accessible | ||
|
|
||
| Traditional formal verification delivers strong correctness guarantees but requires significant expertise and resources. Gospel takes a different approach: one specification language that supports multiple verification strategies, from lightweight runtime testing to full mathematical proofs. This enables gradual adoption—start with automated testing, add focused verification for critical components, and scale to complete proofs where needed. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| Gospel provides a non-invasive syntax for annotating OCaml interfaces with formal contracts in special comments beginning with `@`, describing type invariants, mutability, pre-conditions, post-conditions, effects, and exceptions. The specifications use logical models to represent abstract types—for example, modeling a queue as a mathematical sequence to specify how operations transform its contents. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## The Verification Toolkit | ||
|
|
||
| Gospel's tool-agnostic design powers an ecosystem of verification tools at different maturity levels: | ||
|
|
||
| **[Ortac](https://github.com/ocaml-gospel/ortac)** (released, ready for production codebases) provides dynamic verification through runtime assertion checking and automated test generation. Ortac/QCheck-STM generates black-box state-machine tests, while Ortac/Wrapper instruments functions with runtime assertions. Ortac/Monolith provides fuzzing integration and remains experimental. These tools have already found real bugs including missing bounds checks in [varray](https://github.com/art-w/varray), integer overflows causing segfaults in [bitv](https://github.com/backtracking/bitv), inconsistent behavior with zero-length vectors in bitv, and unexpected behavior in the standard library's Hashtbl.create. | ||
|
|
||
| **[Cameleer](https://github.com/ocaml-gospel/cameleer)** (working toward first release) translates Gospel into [Why3](https://why3.lri.fr/) for deductive verification using automated theorem provers. | ||
|
|
||
| **[Peter](https://github.com/ocaml-gospel/peter)** (ongoing research) explores separation logic verification through [CFML](https://gitlab.inria.fr/charguer/cfml) integration with [Coq](https://coq.inria.fr/) for complex heap manipulation proofs. | ||
|
|
||
| **[Gospel language](https://github.com/ocaml-gospel/gospel)** (experimental, stabilizing) continues to evolve with ongoing design decisions, but the core concepts are established and the type-checker ensures specifications stay synchronized with code. | ||
|
|
||
| ## Open Source Infrastructure Strategy | ||
|
|
||
| Gospel development is funded by [ANR grant ANR-22-CE48-0013](https://anr.fr/Project-ANR-22-CE48-0013), executed through collaboration between [Nomadic Labs](https://www.nomadic-labs.com/), [Tarides](https://tarides.com/), [Inria](https://www.inria.fr/), and [LMF (Laboratoire Méthodes Formelles)](https://lmf.cnrs.fr/) at Université Paris-Saclay. The project demonstrates how open source can transform formal verification economics: rather than each organization independently funding expensive verification efforts, shared open tooling and verified libraries benefit the entire ecosystem. | ||
|
|
||
| ## Current State and Platform Integration | ||
|
|
||
| Ortac/QCheck-STM and Ortac/Wrapper are released and have proven effective on real codebases. Test runs complete in hundreds of milliseconds, making them practical for CI pipelines. Gospel itself remains experimental with language design still evolving, but it's mature enough for early adopters to write specifications and provide valuable feedback. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The [OCaml Platform roadmap](https://ocaml.org/tools/platform-roadmap#w22-formal-verification) through 2026 includes formal verification as a first-class workflow. The vision: when specifications are defined, `dune test` will automatically report verification failures alongside regular test results, with failures surfaced in editors through the LSP server. [Dune](https://dune.build/) will orchestrate verification tools transparently, making formal methods as accessible as formatting or linting. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| ## Try It Today | ||
|
|
||
| Gospel is available via opam (`opam install gospel`). Integration requires minimal setup: Gospel annotations in `.mli` files, a small configuration file, and a Dune rule to generate tests. The [Ortac tutorial](https://tarides.com/blog/2025-09-10-dynamic-formal-verification-in-ocaml-an-ortac-qcheck-stm-tutorial/) walks through the complete workflow. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| The project needs early adopters to: | ||
| - Try Ortac on production codebases and report bugs found | ||
|
Check failure on line 41 in data/backstage/gospel/2025-10-15-gospel.md
|
||
| - Provide feedback on Gospel's specification language design | ||
| - Share use cases that could benefit from formal verification | ||
| - Contribute to the growing ecosystem of verified libraries | ||
|
|
||
| The [VOCaL (Verified OCaml Library)](https://github.com/vocal-project/vocal) project demonstrates Gospel's potential with formally verified data structures serving as both reference implementations and reusable components. | ||
|
|
||
| ## What to Expect | ||
|
|
||
| Gospel language design is still evolving—expect changes as design decisions solidify. Ortac plugins are mature enough for serious use, though with some limitations around higher-order functions and OCaml feature coverage. The verification infrastructure is proven: bugs are being found, specifications provide value as documentation, and the path from testing to formal proofs is established. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| For teams evaluating formal methods, now is the time to experiment. Early adopter feedback will directly shape how Gospel integrates into the OCaml Platform and becomes part of everyday development workflows. | ||
|
|
||
| The ecosystem is open source and actively developed. Explore the [Gospel GitHub organization](https://github.com/ocaml-gospel), review [research](https://inria.hal.science/hal-02157484/file/final.pdf) [papers](https://arxiv.org/pdf/2407.17289) demonstrating collaborative verification workflows, or try Ortac to start finding bugs in your code today. | ||
sabine marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.