+
Skip to content

Dune support #219

@Alizter

Description

@Alizter

Hi, would you be interested in getting a dedicated Dune stanza for coq-of-ocaml?

I suppose it would be somewhat dual to the coq.extraction stanza. You could have something like this:

(coq.of-ocaml
 (name my_program))

(coq.theory
 (name my_proofs)
 (theories my_program))

The coq.of-ocaml stanza could convert all .ml files in scope of the stanza and make a coq theory with the specified name. (We could of course allow for some restriction of which ml files are chosen too).

Dune would call coq-of-ocaml to generate this theory. It is not clear to me if it is a good idea to allow to .v files to be promoted and included as part of the build directory. However it would be possible to treat these generated .v files as a coq theory that can be reasoned about in a separate theory.

However whether or not the produced .v files are available for the user to further modify poses an interesting restriction. It would be difficult to keep updating the .v files for instance every time the ml files are updated. Keeping the theories separate doesn't have this problem, however would suffer from visibility issues. The user would have to inspect _build to see what the theory actually contains.

Let me know if this is something you might find useful, it wouldn't be very difficult to write for Dune IMO.

cc @rgrinberg who might be interested

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载