{"id":18470849,"url":"https://github.com/inria/velus","last_synced_at":"2025-07-05T06:32:55.732Z","repository":{"id":48181863,"uuid":"216652056","full_name":"INRIA/velus","owner":"INRIA","description":"A Lustre compiler in Coq","archived":false,"fork":false,"pushed_at":"2025-04-04T14:04:46.000Z","size":10234,"stargazers_count":70,"open_issues_count":0,"forks_count":6,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-06-10T11:12:33.089Z","etag":null,"topics":["compcert","coq-formalization","lustre","synchronous-language"],"latest_commit_sha":null,"homepage":"https://velus.inria.fr","language":"Coq","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/INRIA.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":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-10-21T19:45:14.000Z","updated_at":"2025-05-24T05:22:25.000Z","dependencies_parsed_at":"2024-01-23T17:21:21.228Z","dependency_job_id":"529533db-df55-4a1e-856b-e776f24c63f3","html_url":"https://github.com/INRIA/velus","commit_stats":{"total_commits":1504,"total_committers":10,"mean_commits":150.4,"dds":0.6349734042553192,"last_synced_commit":"f2a941fd02403da05ed5bed136a340bb73c6b025"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/INRIA/velus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INRIA%2Fvelus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INRIA%2Fvelus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INRIA%2Fvelus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INRIA%2Fvelus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/INRIA","download_url":"https://codeload.github.com/INRIA/velus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/INRIA%2Fvelus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263696714,"owners_count":23497622,"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":["compcert","coq-formalization","lustre","synchronous-language"],"created_at":"2024-11-06T10:15:01.392Z","updated_at":"2025-07-05T06:32:55.727Z","avatar_url":"https://github.com/INRIA.png","language":"Coq","readme":"# A Formally Verified Compiler for Lustre\n\nThese source files contain the implementation, models, and proof of\ncorrectness of a formally verified Lustre compiler\n\nThis file contains instructions for (i) using the compiler from (ii) a local \nopam installation.\n\nThe `examples/` subdirectory contains another readme file presenting several\nexample programs that can be used to test the compiler.\n\nThe `pre` operator used in many Lustre programs is not yet treated.\nAn uninitialized delay `pre e` must be replaced by an initialized one `0 fby e`.\n\nCompiler error messages are still very brutal. In particular the parser only\nreports syntax errors with a line number and character offset. We will\nimplement more helpful messages when we have finalized one or two remaining\ndetails of the final language.\n\n## Using the compiler\n\nTo run the compiler:\n\n    ./velus -h\n\nIn particular, typing\n\n    ./velus examples/count.lus\n\nwill compile the Lustre program in examples/count.lus into an assembler\nprogram examples/count.s.\n\nThe compiler also accepts the options\n\n* `-dnolast`\n  Output the Lustre code after compilation of last declarations into \u003cfile\u003e.nolast.lus\n\n* `-dnoauto`\n  Output the Lustre code after compilation of state machines into \u003cfile\u003e.noauto.lus\n\n* `-dnoswitch`\n  Output the Lustre code after compilation of switch blocks into \u003cfile\u003e.noswitch.lus\n\n* `-dnolocal`\n  Output the Lustre code after inlining of local scopes into \u003cfile\u003e.nolocal.lus\n\n* `-dnlustre`\n  Output the normalized NLustre code into \u003cfile\u003e.n.lus\n\n* `-dstc`\n  Output the Stc intermediate code into \u003cfile\u003e.stc\n\n* `-dsch`\n  Output the scheduled code into \u003cfile\u003e.sch.stc\n\n* `-dobc`\n  Output the Obc intermediate code into \u003cfile\u003e.obc\n\n* `-dclight`\n  Output the generated Clight code into \u003cfile\u003e.light.c\n\n* -`nofusion`\n  Disable the if/then/else fusion optimization.\n\n* -`sync`\n  Generate an optional `main_sync` entry point and a \u003cfile\u003e.sync.c\n  containing a simulation that prints the outputs at each cycle and requests\n  inputs. In contrast to `main_proved`, this entry point is not formally verified\n  but it is useful for testing the dynamic behaviour of compiled programs.\n  See `examples/Makefile` for examples.\n\n## Local installation\n\n### Using opam\n\nVélus has been implemented in Coq.8.20.1. It includes a\nmodified version of CompCert and depends on menhir.\n\nTo build a self-contained installation for compiling and running\nVélus, we recommend installing an ad-hoc [opam](https://opam.ocaml.org/)\ndirectory:\n\n```bash\n$ git clone https://github.com/INRIA/velus\n$ cd velus\n$ git submodule --init --recursive\n$ opam switch create velus --packages=ocaml.4.14.2,coq.8.20.1\n$ eval $(opam env --switch=velus --set-switch)\n$ opam install -j ocamlbuild menhir ocamlgraph\n```\n\nTo check the proofs and build Vélus:\n\n```bash\n$ ./configure [options] \u003ctarget\u003e\n$ make -j # Uses all the available cores\n```\n\nThe `\u003ctarget\u003e` must be one of the [supported target platforms](https://compcert.org/man/manual001.html#target-platforms)\nof CompCert.\n\n#### Configuration options\n\nThe configuration script has the same options as CompCert's with\nthe following specfic to Vélus:\n\n* `-velus-only`\n  Only compile Vélus (and not CompCert). This option may be useful with\n  `-compcertdir`.\n\n* `-compcertdir`\n  Overrides the default path to the directory containing your local version of\n  CompCert.\n\n* `-flocqdir`\n  Set the path to the directory containing `Flocq` if you're not using the one\n  packaged in CompCert.\n\n* `-menhirlibdir`\n  Set the path to the directory containing `MenhirLib` if you're not using the\n  one packaged in CompCert.\n\n### Using nix\n\nIf you are using the [nix package manager](https://nixos.org/), you can\ndirectly compile Vélus using the flake with the command `nix build`. This does\nnot require a local version of CompCert to build.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finria%2Fvelus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finria%2Fvelus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finria%2Fvelus/lists"}