{"id":15168737,"url":"https://github.com/appliedfm/coq-vsu","last_synced_at":"2026-01-20T09:34:55.113Z","repository":{"id":77583409,"uuid":"448720857","full_name":"appliedfm/coq-vsu","owner":"appliedfm","description":"Tools for working with Verified Software Units","archived":false,"fork":false,"pushed_at":"2022-01-19T10:55:30.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-14T05:44:37.179Z","etag":null,"topics":["appliedfm","c","compcert","coq","coq-vst","formal-methods","formal-specification","formal-verification","verification"],"latest_commit_sha":null,"homepage":"https://coq-vsu.readthedocs.io","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/appliedfm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-17T01:42:47.000Z","updated_at":"2022-01-19T00:55:37.000Z","dependencies_parsed_at":"2023-09-06T08:15:35.702Z","dependency_job_id":null,"html_url":"https://github.com/appliedfm/coq-vsu","commit_stats":{"total_commits":23,"total_committers":1,"mean_commits":23.0,"dds":0.0,"last_synced_commit":"39642578e69839684b0bff2ee6f429c90f4532ef"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/appliedfm/coq-vsu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appliedfm%2Fcoq-vsu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appliedfm%2Fcoq-vsu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appliedfm%2Fcoq-vsu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appliedfm%2Fcoq-vsu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/appliedfm","download_url":"https://codeload.github.com/appliedfm/coq-vsu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/appliedfm%2Fcoq-vsu/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28600713,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T08:51:33.170Z","status":"ssl_error","status_checked_at":"2026-01-20T08:51:10.855Z","response_time":117,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["appliedfm","c","compcert","coq","coq-vst","formal-methods","formal-specification","formal-verification","verification"],"created_at":"2024-09-27T06:41:11.532Z","updated_at":"2026-01-20T09:34:55.098Z","avatar_url":"https://github.com/appliedfm.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# coq-vsu\n\n![Website](https://img.shields.io/website?url=https%3A%2F%2Fcoq-vsu.readthedocs.io)\n![Documentation Status](https://readthedocs.org/projects/coq-vsu/badge/?version=latest)\n![GitHub](https://img.shields.io/github/license/appliedfm/coq-vsu)\n\nTools for working with [Verified Software Units](https://softwarefoundations.cis.upenn.edu/vc-current/VSU_intro.html) in the [Coq](https://coq.inria.fr/) ecosystem.\n\n\n## What is a Verified Software Unit?\n\nA *verified software unit* (VSU) is a C library that has been proven correct using the [Verified Software Toolchain](https://vst.cs.princeton.edu/).\n\nThe theory of VSUs was introduced by *[Verified Software Units](https://link.springer.com/chapter/10.1007/978-3-030-72019-3_5)* ([Beringer](https://www.cs.princeton.edu/~eberinge/) 2021). Examples of how to use VST to build VSUs are given in [Software Foundations Volume 5: Verifiable C](https://softwarefoundations.cis.upenn.edu/vc-current/toc.html).\n\n\n## What is `coq-vsu`?\n\nA typical VSU consists of a library written in Coq that proves functional correctness of a library written in C.\n\nThis unique project structure is not natively supported by `opam`. In particular, `opam` provides no guidance on questions such as *Where should the C library be installed to?* and *How will users configure their compiler to find it?*\n\n`coq-vsu` answers these questions with a single tool: `vsu`, which has the magic ability to locate paths.\n\nFor a simple example of `coq-vsu` in action, see [coq-vsu-int63](https://github.com/appliedfm/coq-vsu-int63).\n\n\n## Example: C library paths\n\nThe `vsu -I` command prints a path within the current `opam` switch that is suitable for installing VSU libraries.\n\n```console\n$ echo `vsu -I`\n/home/tcarstens/.opam/coq-8.14/lib/coq-vsu/lib/include\n$\n```\n\nOne important feature of this design is that it is compatible with the `-I` flag found in `compcert`, `clang`, and `gcc`. For example, the following brings *all* VSU libraries into scope when compiling `main.c`:\n\n    $(CC) -I`vsu -I` main.c\n\n\n## Example: Coq library paths\n\n### compcert\n\n```console\n$ echo `vsu --show-coq-variant-path=coq-compcert`\n/home/tcarstens/.opam/coq-8.14/lib/coq/user-contrib/compcert\n$ echo `vsu --show-coq-variant-path=coq-compcert-32`\n/home/tcarstens/.opam/coq-8.14/lib/coq-variant/compcert32/compcert\n```\n\n### vst\n\n```console\n$ echo `vsu --show-coq-variant-path=coq-vst`\n/home/tcarstens/.opam/coq-8.14/lib/coq/user-contrib/VST\n$ echo `vsu --show-coq-variant-path=coq-vst-32`\n/home/tcarstens/.opam/coq-8.14/lib/coq-variant/VST32/VST\n$\n```\n\n### certigraph\n\n```console\n$ echo `vsu --show-coq-variant-path=coq-certigraph`\n/home/tcarstens/.opam/coq-8.14/lib/coq/user-contrib/CertiGraph\n$ echo `vsu --show-coq-variant-path=coq-certigraph-32`\n/home/tcarstens/.opam/coq-8.14/lib/coq-variant/CertiGraph32/CertiGraph\n$\n```\n\n\n## Example: Coq runtime arguments\n\nThe `--show-coq-q-arg` flag prints arguments suitable for `coqc`, `coqtop`, etc. For packages which are installed to \"default\" locations, it silently prints nothing (allowing the default to simply work). For package variants, which are typically *not* installed to a \"default\" location, it prints the appropriate flag to set the variant path.\n\n### compcert\n\n```console\n$ echo `vsu -Q coq-compcert`\n\n$ echo `vsu -Q coq-compcert-32`\n-Q /home/tcarstens/.opam/coq-8.14/lib/coq-variant/compcert32/compcert compcert\n$\n```\n\n### vst\n\n```console\n$ echo `vsu -Q coq-vst`\n\n$ echo `vsu -Q coq-vst-32`\n-Q /home/tcarstens/.opam/coq-8.14/lib/coq-variant/VST32/VST VST\n$\n```\n\n### certigraph\n\n```console\n$ echo `vsu -Q coq-certigraph`\n\n$ echo `vsu -Q coq-certigraph-32`\n-Q /home/tcarstens/.opam/coq-8.14/lib/coq-variant/CertiGraph32/CertiGraph CertiGraph\n$\n```\n\n\n## Example: finding tools\n\n### compcert/ccomp\n\n```console\n$ echo `vsu --show-tool-path=coq-compcert/ccomp`\n/home/tcarstens/.opam/coq-8.14/bin/ccomp\n$ echo `vsu --show-tool-path=coq-compcert-32/ccomp`\n/home/tcarstens/.opam/coq-8.14/variants/compcert32/bin/ccomp\n$\n```\n\n### compcert/clightgen\n\n```console\n$ echo `vsu --show-tool-path=coq-compcert/clightgen`\n/home/tcarstens/.opam/coq-8.14/bin/clightgen\n$ echo `vsu --show-tool-path=coq-compcert-32/clightgen`\n/home/tcarstens/.opam/coq-8.14/variants/compcert32/bin/clightgen\n$\n```\n\n## Example: show VSU package metadata path\n\n```console\n$ echo `vsu --show-unit-metadata-path`\n/home/tcarstens/.opam/coq-8.14/lib/coq-vsu/unit-metadata\n$\n```\n\n\n## Installing\n\n```console\n$ opam pin -n -y .\n$ opam install coq-vsu\n$ vsu --help\n```\n\n\n## Uninstalling\n\nTo remove the pin *and* uninstall in one step, simply run\n\n```console\n$ opam unpin coq-vsu\n```\n\n## Building \u0026 running without installing\n\n```console\n$ dune exec ./src/vsu.exe -- --help\n```\n\n#\n\n[![Coq](https://img.shields.io/badge/-Coq-royalblue)](https://github.com/coq/coq)\n[![compcert](https://img.shields.io/badge/-compcert-pink)](https://compcert.org/)\n[![VST](https://img.shields.io/badge/-VST-palevioletred)](https://vst.cs.princeton.edu/)\n[![Sphinx](https://img.shields.io/badge/-Sphinx-navy)](https://www.sphinx-doc.org)\n[![readthedocs](https://img.shields.io/badge/-readthedocs-slateblue)](https://readthedocs.org)\n\n[![applied.fm](https://img.shields.io/badge/-applied.fm-orchid)](https://applied.fm)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappliedfm%2Fcoq-vsu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fappliedfm%2Fcoq-vsu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fappliedfm%2Fcoq-vsu/lists"}