{"id":50872112,"url":"https://github.com/epfl-systemf/camltac","last_synced_at":"2026-06-15T06:05:46.271Z","repository":{"id":360893545,"uuid":"1240759158","full_name":"epfl-systemf/camltac","owner":"epfl-systemf","description":"OCaml as a Tactic Language for the Rocq Prover","archived":false,"fork":false,"pushed_at":"2026-06-08T11:26:26.000Z","size":295,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-08T13:19:27.327Z","etag":null,"topics":["ltac2","ocaml","rocq","rocq-prover"],"latest_commit_sha":null,"homepage":"","language":"OCaml","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/epfl-systemf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-16T14:34:14.000Z","updated_at":"2026-06-08T11:26:30.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/epfl-systemf/camltac","commit_stats":null,"previous_names":["epfl-systemf/camltac"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/epfl-systemf/camltac","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-systemf%2Fcamltac","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-systemf%2Fcamltac/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-systemf%2Fcamltac/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-systemf%2Fcamltac/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/epfl-systemf","download_url":"https://codeload.github.com/epfl-systemf/camltac/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/epfl-systemf%2Fcamltac/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34349965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-15T02:00:07.085Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["ltac2","ocaml","rocq","rocq-prover"],"created_at":"2026-06-15T06:05:45.400Z","updated_at":"2026-06-15T06:05:46.265Z","avatar_url":"https://github.com/epfl-systemf.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Camltac: OCaml as a Tactic Language\n\nCamltac allows OCaml to be written directly with Rocq scripts. It supports most constructs from Ltac2, including term construction (`constr:(…)`), pattern matching, and antiquotations using [`ppx_rocq`](https://github.com/epfl-systemf/ppx_rocq), and more. Moreover, Camltac ships with most of the [Ltac2 API](https://rocq-prover.org/doc/master/corelib/index.html#Ltac2), which guarantee stability across Rocq versions.\n\n\u003ccenter\u003e\n  \u003cimg src=\"etc/showcase.svg\" width=\"75%\" alt=\"Showcase image of Camltac\" /\u003e\n\u003c/center\u003e\n\nSee the [quickstart](#quickstart) section for quick examples, or the [`examples`](./examples/) directory for more complete examples of using Camltac.\n\n## Setup\n\nTo install Camltac from sources, clone the repo and run `opam install .`, as follows:\n\n```sh\ngit clone git@github.com:epfl-systemf/camltac.git\ncd camltac\nopam install ./camltac.opam\n# Optional: opam install ./camltac-examples.opam\n```\n\nThen, add `From Camltac Require Import Camltac.` to the top of your Rocq files, and you're ready to go!\n\n## Quickstart\n\n### Running OCaml code\n\nThe most primitive command provided by Camltac is `Camltac Run`, which runs an arbitrary OCaml snippet between parentheses or brackets:\n```coq\nFrom Camltac Require Import Camltac.\n\nCamltac Run ocaml:{{ let _ = Feedback.msg_notice (Pp.str \"Hello world!\") }}.\n(* Hello world! *)\n```\n\nCamltac also allows to define new modules, which can be used to reuse definitions:\n```coq\nCamltac Module M := ocaml:(let one = 1).\n\nCamltac Run ocaml:{{\n  Feedback.msg_notice (Pp.int (M.one + M.one))\n}}.\n(* 2 *)\n```\n\n### Creating new tactics\n\nTo expose new tactics to Ltac2, use the `Ltac2.FFI` module:\n```coq\nFrom Ltac2 Require Import Ltac2.\n\nCamltac Run ocaml:{{\n  let say_hello () =\n    Feedback.msg_notice (Pp.str \"Hello from OCaml!\")\n\n  let _ = Ltac2.FFI.(define \"say_hello\" (unit @-\u003e ret unit) say_hello)\n}}.\n\nLtac2 @external say_hello : unit -\u003e unit := \"camltac.plugin.runtime\" \"say_hello\".\n\nLtac2 Eval say_hello (). (* Hello from OCaml! *)\n```\n\nCamltac can also run in tactic-in-term mode, similarly to `ltac:(…)` and `ltac2:(…)`:\n```\nDefinition zero := ocaml:(let* z = {%constr| 0 |} in exact_no_check z).\nPrint zero.\n(* zero = 0 : nat *)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-systemf%2Fcamltac","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fepfl-systemf%2Fcamltac","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fepfl-systemf%2Fcamltac/lists"}