{"id":14966275,"url":"https://github.com/wasmcert/wasmcert-coq","last_synced_at":"2025-04-06T00:09:25.654Z","repository":{"id":38099545,"uuid":"273323921","full_name":"WasmCert/WasmCert-Coq","owner":"WasmCert","description":"A mechanisation of Wasm in Coq","archived":false,"fork":false,"pushed_at":"2024-10-17T17:34:14.000Z","size":4695,"stargazers_count":94,"open_issues_count":6,"forks_count":11,"subscribers_count":12,"default_branch":"master","last_synced_at":"2024-10-30T01:43:37.363Z","etag":null,"topics":["coq","wasm","webassembly"],"latest_commit_sha":null,"homepage":"","language":"Coq","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/WasmCert.png","metadata":{"files":{"readme":"README.md","changelog":"changelogs/v2.0.md","contributing":null,"funding":null,"license":"LICENSE.txt","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":"2020-06-18T19:32:31.000Z","updated_at":"2024-10-28T13:18:58.000Z","dependencies_parsed_at":"2023-09-27T15:40:20.503Z","dependency_job_id":"ea703a3a-21df-4a9d-ba4f-03cc540f8fed","html_url":"https://github.com/WasmCert/WasmCert-Coq","commit_stats":{"total_commits":1123,"total_committers":11,"mean_commits":102.0909090909091,"dds":0.5903829029385574,"last_synced_commit":"995cdce2da23cb80e111ccf6a4164363c438a445"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WasmCert%2FWasmCert-Coq","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WasmCert%2FWasmCert-Coq/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WasmCert%2FWasmCert-Coq/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WasmCert%2FWasmCert-Coq/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WasmCert","download_url":"https://codeload.github.com/WasmCert/WasmCert-Coq/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247415967,"owners_count":20935387,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["coq","wasm","webassembly"],"created_at":"2024-09-24T13:36:08.579Z","updated_at":"2025-04-06T00:09:25.636Z","avatar_url":"https://github.com/WasmCert.png","language":"Coq","funding_links":[],"categories":[],"sub_categories":[],"readme":"# wasm_coq\nA WebAssembly (aka Wasm) formalisation in Coq, based on the [official specification](https://webassembly.github.io/spec/core/).\n\n(C) M. Bodin, P. Gardner, J. Pichon, C. Watt, X. Rao 2019-2025 - see LICENSE.txt\n\nThe quotes from the WebAssembly standard (starting with `std-doc`) are (C) their respective authors.\n\nThe current master branch formalises Wasm version 2.0, plus additional subtyping systems from the future funcref/GC extension proposals. A large part of the old Wasm 1.0 formalisation has been published at [FM'21](https://link.springer.com/chapter/10.1007/978-3-030-90870-6_4), with many additions to the repository since then.\n\n# Components of the Repository\n\n## In Publication\n\n- [x] Core definitions of WasmCert-Coq and WasmRef-Coq.\n- [x] Soundness results for WasmRef-Coq (interpreter) with respect to WasmCert-Coq.\n- [x] Type safety results for Wasm typing system.\n- [x] Soundness and completeness results for the type checker with respect to the typing system.\n- [x] Implementing Wasm numerics (via CompCert numerics).\n- [x] Soundness results for module instantiation.\n- [x] Proof carrying interpreter deriving progress.\n- [x] Interpreter with optimised context representations.\n\n## Merged\n- [x] Updates for Wasm 2.0 (except SIMD and new numerics ops) + subtyping systems.\n\n## Ongoing\n- [ ] Validate WasmRef-Coq (conformance tests).\n\n# Program Logic\n\nThis repository contains a mechanised Wasm program logic using the Iris framework: [iris branch](https://github.com/WasmCert/WasmCert-Coq/tree/iris-wasm-opam).\n\nThis is migrated from an older build for the [artefact](https://zenodo.org/records/7808708) submitted along with the Iris-Wasm publication at [PLDI'23](https://dl.acm.org/doi/10.1145/3591265).\n\nA new version working with `opam` can be found [here](https://github.com/logsem/iriswasm).\n\n# Binary Parser (experimental)\nThis repository contains some experimental work on a parser for the binary format which is currently unverified.\nAs the parser forms a part of the extracted interpreter, any error in the parser would result in the interpreter reporting `syntax error` for some valid Wasm binaries. Bug reports are appreciated!\n\n# Usage\n\n## Installation and Compilation\n\nThe project can be installed using opam.\n\nCompiling the dependencies and codebase requires having at least 8 GB of RAM on your computer.\n```bash\nopam repo add coq-released https://coq.inria.fr/opam/released\nopam install .\n```\n\n## Testing the Installation\n\nThe project comes with a small set of tests for the extracted interpreter:\n```bash\ndune test\n```\n\n## Using the project\n\nA file `wasm_coq_interpreter` will have been generated under `_build/install`.\nIt takes as argument a list of Wasm files, followed by a function name to run (with the `-r` flag).\nFor instance, to interpret the function `main` defined in [tests/add.wasm](tests/add.wasm), run:\n```bash\ndune exec -- wasm_coq_interpreter tests/add.wasm -r main\n```\n\nThe project has experimental support on passing arguments to function calls in the CLI via the `-a` flag. For example:\n```bash\ndune exec -- wasm_coq_interpreter tests/add2.wasm -r main -a \"i32.const 6\" -a \"i32.const 36\"\n```\nwould produce\n```bash\ni32.const 42\n```\n\nThe interpreter can also display intermediate states of the operational semantics:\n```bash\ndune exec -- wasm_coq_interpreter tests/add.wasm -r main --vi\n```\nwould produce:\n```bash\nparsing OK                            \ninstantiation OK\n\nPost-instantiation stage for table and memory initialisers...\nstep 1:\n(empty)\n\nstep 2:\nValue:\n(empty)\nsuccess after 2 steps\n\nInstantiation success\ninterpreting OK\nstep 0:\n\nExecuting configuration:\nframe 0\nwith values (empty)\n  invoke 0\nend frame\n\nstep 1:\nframe 0\nwith values (empty)\n  frame 1\n  with values (empty)\n    label 1\n    label_cont\n      i32.const 40\n      i32.const 2\n      i32.add\n    end label\n  end frame\nend frame\n\nstep 2:\nframe 0\nwith values (empty)\n  frame 1\n  with values (empty)\n    label 1\n    label_cont\n      i32.const 42\n    end label\n  end frame\nend frame\n\nstep 3:\nframe 0\nwith values (empty)\n  frame 1\n  with values (empty)\n    i32.const 42\n  end frame\nend frame\n\nstep 4:\nframe 0\nwith values (empty)\n  i32.const 42\nend frame\n\nstep 5:\nValue:\ni32.const 42\n\nsuccess after 5 steps\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcert%2Fwasmcert-coq","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwasmcert%2Fwasmcert-coq","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwasmcert%2Fwasmcert-coq/lists"}