Closed lthms closed 3 years ago
I understand nothing is publically available yet, and that the name conflicts with this project by @maximedenes . I don't know of the status of that project. https://github.com/maximedenes/coqFFI
I can provide a public remote if that is necessary, prior to the initial publication in coq-community
. As far the name, I have to admit I assumed the project was no longer underway due to the age of the latest commits, and I was already use to coqffi
. Don’t hesitate to let me know if this is an important issue!
I'm generally supportive, but the description is a bit brief for me to understand what coqffi does. Others may know more. In any case, it seems interesting.
You are right, I should have taken a bit more time to write the issue. I have edited it to add the beginning of the README, and will probably set-up a temporary public repo so interested folks may have a look.
Cool!
There seem to be some overlap in goals with http://coq.io/.
I understand nothing is publically available yet, and that the name conflicts with this project by @maximedenes . I don't know of the status of that project. https://github.com/maximedenes/coqFFI
That project is indeed not very active, feel free to use the same name.
@maximedenes thanks for the feedback!
@spitters coq-io
could be made compatible with coqffi
quite easily (i.e., uses the file generated by coqffi
); the tool has been conceived to that end, and provides the necessary abstractions.
@lthms sounds good. @clarus, the author of coq-io might be interested.
@spitters Thanks for the notification! I did not know about the project coqffi
, looking forward for the publication!
@lthms please consider the license for this project carefully. With GPLv3, the applicability and audience of the library/tool will be limited due to the reciprocal nature of the license. If I understand the intended usage correctly, anyone who relies on coqffi
for extraction will be unable to distribute their extracted code under anything but GPLv3. And anyone who uses coqffi
Coq code in a project will be forced to change the license of the project to be GPLv3.
While we accept any open source license in the end, our FAQ includes some recommendations about licensing of coq-community projects.
Thanks for the remark, @palmskog. I don’t think what you are saying is true. AFAICT, the license of coqffi
applies to coqffi
only, not the code generated by coqffi
, so I don’t think there is a problem here (similarly to gcc
being GPL does not implies your binary code is GPL).
@lthms GCC has a special exception for generated code to not fall under GPL when it gets linked with GCC's runtime libraries. As far as I can tell, if you don't have a similar exception for linking with coqffi
libraries in extracted code, the whole thing (extracted code + coqffi
OCaml side) will automatically have to be licensed under the GPL.
See also the GCC special exception FAQ which states:
These [runtime libraries] are automatically used by the object code that GCC produces. Because of that, if these libraries were simply distributed only under the terms of the GPL, all the object code that GCC produces would have to be distributed under the same terms.
I think about this this night, and:
coqffi
is a standalone OCaml tool which happens to produce a text output that is (most of the time I hope :D) a valid Coq program. I really don’t think the GPL applies to this text output. The exception of GCC you link refers to a code licensed under GPL injected into programs generated by GCC (a “runtime”) as far as I understand it.I will have to rethink this. I would like to keep coqffi
(the tool) GPL, but I guess I can either use a similar exception for the CoqFFI
library or use a different license… or see if we should go for a different license for the entire bundle, I guess.
Again, thank you for pointing that out. I hadn’t think this as much as I thought!
@MSoegtropIMC may be interested in this licensing discussion.
@lthms just because a GPL program is generating code, this doesn't necessarily mean the generated code is exempt from the GPL. For example, the GNU Bison parser generator copies large pieces of GPL code into its output, and thus has a special license exception for generated code. Before Bison version 1.24, any use of Bison in a software project forced the project to be GPL-licensed.
Absent any explicit statement that output is owned by the user, I would argue that only experts well-versed in both a program's implementation and the legal framework around software licensing can determine with any certainty whether a given GPL-licensed program which generates code will make everything it touches GPL or not.
Since I really wish coqffi
will eventually be accepted by the community, and in order to let things remain as simple as possible, we will publish coqffi
under the MIT license. Thanks for pointing this potential issue really quickly!
Is there any additional things we want to discuss? Do I need to make a first remote publicly available prior to the creation (or refusal of creation) of a coq-community/coqffi
repo?
@lthms our community is small and we are generally trusting, so it would be fine with me to do either of:
However, it may save some time if you let me take a look at your repo before transferring it, so that adding our usual metadata and automation is going to be straightforward.
Let me know what you prefer.
I can definitely set-up a repo, configure the CI, then give you enough time (and maybe push rights?) to it prior to transferring it!
Then please go ahead and set up the repo in your account, but no need to add CI or give me push rights.
It took me some time, but I am now ready to transfer ownership of https://github.com/lthms/coqffi to the coq-community
organization!
@lthms I invited you to join the coq-community organization, so you can transfer the repo. Either check your email or go to https://github.com/coq-community
Neat! I have transferred the repo accordingly.
Since the repo is now transferred (https://github.com/coq-community/coqffi), I'm closing this issue. Let's continue any discussion as repo issues.
Project name:
coqffi
Initial author(s): Thomas Letan (@lthms), with contributions from Li-yao Xia (@lysxia), Yann Régis-Gianas (@yurug), and Yannick Zakowski (@YaZko)
Current URL: None, it would be an initial publication
Kind: extractable program, Coq tooling
License: MIT
Description:
coqffi
automatically generates FFI binding to OCaml libraries for Coq. For instance, given the following.mli
filecoqffi
generates the necessary Coq boilerplate to use these functions in a Coq development, and to configure the extraction mechanism accordingly, delegating impurity tocoq-simple-io
.Status: Maintained, not yet publlished.
New maintainer: @lthms