[PATCH] gnu: Add dedukti.

  • Done
  • quality assurance status badge
Details
2 participants
  • Gabriel Hondet
  • Julien Lepiller
Owner
unassigned
Submitted by
Gabriel Hondet
Severity
normal

Debbugs page

Gabriel Hondet wrote 6 years ago
(address . guix-patches@gnu.org)
871s65ykf7.fsf@gmail.com
* gnu/packages/ocaml.scm (dedukti): New variable.
---
gnu/packages/ocaml.scm | 55 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 55 insertions(+)

Toggle diff (65 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3b1ddcb5b..28e223e75 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4989,3 +4989,58 @@ provides BigN, BigZ, BigQ that used to be part of Coq standard library.")
simplifying the proofs of inequalities on expressions of real numbers for the
Coq proof assistant.")
(license license:cecill-c)))
+
+(define-public dedukti
+ (package
+ (name "dedukti")
+ (version "2.6.0")
+ (home-page "https://deducteam.github.io/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/deducteam/dedukti.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
+ (inputs
+ `(("ocaml" ,ocaml)
+ ("menhir" ,ocaml-menhir)))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)
+ ("ocamlfind" ,ocaml-findlib)
+ ("which" ,which)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; Set ocamlfind environment vars
+ (lambda _
+ (let ((out (assoc-ref %outputs "out"))
+ (libpath "/lib/ocaml/site-lib"))
+ (begin
+ (setenv "OCAMLFIND_DESTDIR" (string-append out libpath))
+ (mkdir-p (string-append out libpath "/dedukti"))
+ (setenv "PREFIX" out)
+ #t))))
+ (replace 'build
+ (lambda _
+ (invoke "make")))
+ (replace 'check
+ (lambda _
+ (invoke "make" "tests")))
+ ;; (delete 'check)
+ (add-before 'install 'set-binpath
+ ;; Change binary path in the makefile
+ (lambda _
+ (let ((out (assoc-ref %outputs "out")))
+ (substitute* "GNUmakefile"
+ (("BINDIR = (.*)$")
+ (string-append "BINDIR = " out "/bin")))))))))
+ (synopsis "Implementation of the ΛΠ-calculus modulo rewriting")
+ (description "Dedukti is a logical framework based on the
+ΛΠ-calculus modulo in which many theories and logics can be expressed.")
+ (license license:cecill-c)))
--
2.20.1
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlwiBRwACgkQMbyBBfZZ
1CUfrRAAoFhfPNQnIPgMG4ajAte/bhALhqdeLxswjQKHjcMRNpcZObnC73npPUGo
MjGO9yIWmnsl+TIb9LzK9S+248XVzka+RMI4giePbn3GsAuYPZgJW59DbwdVLeP5
jkiQFh+D66wuKbM/EUL1D1ARBaMcrSVCL5CBTBFkoOhsg+j9xWEwhNXEeExYXggy
YZK6juwUd3if9bPwNaue+0VmnaD5Ulvsyl1ovqhywEveOmpbO1xa9Ee0LRJScB32
1d7dvkcymSnQOixISfCgRIFjsHRxUXoU6YGVclWCcjlO2xJ27T1T6bZsO/DTjX1/
72/hyen8h2y8UpUmQ2uzgZfydPog//xkQAxUh+idaNKBiLl4z77+XQ7w20lHl8jx
sTwJP1Y6TJUOz/DKXYXfMbuTHI3aIt3213zyiX5R3MiWz5mUJzRhHr2Bxkgsq1Hr
ZSH2PW6r9qBhvqP//Fu0PUsDyiT721D/MlcMbe1WkD+VVHUDdPCG3JqH2oyWr/Al
bmBzjbPfCP9ILCByy8qpG8WV5Aou5rrwRRrJX2DkmUMzTCKBoeVnU0PlVg1VSKzR
k/t+SJ4I1N9pzX30rgXtvFD7R4vzK+xM80b3MhDQ8G+vkBueWoVrpUCfcr40QWcn
VMfRmKK5hSpv1rht1FRwdM4beFfTuYWuoHWRXjUQt4EeuJ/mEhM=
=2xtu
-----END PGP SIGNATURE-----

Julien Lepiller wrote 6 years ago
(name . Gabriel Hondet)(address . gabrielhondet@gmail.com)(address . 33865@debbugs.gnu.org)
20181225123219.3c10f4ad@lepiller.eu
Le Tue, 25 Dec 2018 11:16:13 +0100,
Gabriel Hondet <gabrielhondet@gmail.com> a écrit :

Toggle quote (2 lines)
> * gnu/packages/ocaml.scm (dedukti): New variable.

Nice! Thank you!

Toggle quote (38 lines)
> ---
> gnu/packages/ocaml.scm | 55
> ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55
> insertions(+)
>
> diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
> index 3b1ddcb5b..28e223e75 100644
> --- a/gnu/packages/ocaml.scm
> +++ b/gnu/packages/ocaml.scm
> @@ -4989,3 +4989,58 @@ provides BigN, BigZ, BigQ that used to be part
> of Coq standard library.") simplifying the proofs of inequalities on
> expressions of real numbers for the Coq proof assistant.")
> (license license:cecill-c)))
> +
> +(define-public dedukti
> + (package
> + (name "dedukti")
> + (version "2.6.0")
> + (home-page "https://deducteam.github.io/")
> + (source
> + (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/deducteam/dedukti.git")
> + (commit (string-append "v" version))))
> + (file-name (git-file-name name version))
> + (sha256
> + (base32
> + "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
> + (inputs
> + `(("ocaml" ,ocaml)
> + ("menhir" ,ocaml-menhir)))
> + (native-inputs
> + `(("ocamlbuild" ,ocamlbuild)
> + ("ocamlfind" ,ocaml-findlib)
> + ("which" ,which)))
> + (build-system gnu-build-system)

I wonder why you didn't use the ocaml-build-system...

Toggle quote (15 lines)
> + (arguments
> + `(#:phases
> + (modify-phases %standard-phases
> + (replace 'configure
> + ;; Set ocamlfind environment vars
> + (lambda _
> + (let ((out (assoc-ref %outputs "out"))
> + (libpath "/lib/ocaml/site-lib"))
> + (begin
> + (setenv "OCAMLFIND_DESTDIR" (string-append out
> libpath))
> + (mkdir-p (string-append out libpath "/dedukti"))
> + (setenv "PREFIX" out)
> + #t))))

It should automates all of this

Toggle quote (10 lines)
> + (replace 'build
> + (lambda _
> + (invoke "make")))
> + (replace 'check
> + (lambda _
> + (invoke "make" "tests")))


> + ;; (delete 'check)

Be carefull not to let this kind of thing slip through ;)

Toggle quote (9 lines)
> + (add-before 'install 'set-binpath
> + ;; Change binary path in the makefile
> + (lambda _
> + (let ((out (assoc-ref %outputs "out")))
> + (substitute* "GNUmakefile"
> + (("BINDIR = (.*)$")
> + (string-append "BINDIR = " out "/bin")))))))))
> + (synopsis "Implementation of the ΛΠ-calculus modulo rewriting")

I don't think this synpsis is understandable to everyone. Could you use
instead a more general sentence that give an impression of what
ΛΠ-calculus modulo rewriting is?

Toggle quote (4 lines)
> + (description "Dedukti is a logical framework based on the
> +ΛΠ-calculus modulo in which many theories and logics can be
> expressed.")

Or if you can't, please explain it with a sentence or two in the
description ;)

Toggle quote (2 lines)
> + (license license:cecill-c)))

Other than that, looks good to me. I'll have to test it once you answer
my questions, and if it works, I'll push the patch for you. Thanks
again!
Gabriel Hondet wrote 6 years ago
(name . Julien Lepiller)(address . julien@lepiller.eu)(address . 33865@debbugs.gnu.org)
87y38dwrlt.fsf@gmail.com
* gnu/packages/ocaml.scm (dedukti): New variable.
---
gnu/packages/ocaml.scm | 58 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 58 insertions(+)

Toggle diff (91 lines)
diff --git a/gnu/packages/ocaml.scm b/gnu/packages/ocaml.scm
index 3b1ddcb5b..8962a7339 100644
--- a/gnu/packages/ocaml.scm
+++ b/gnu/packages/ocaml.scm
@@ -4989,3 +4989,61 @@ provides BigN, BigZ, BigQ that used to be part of Coq standard library.")
simplifying the proofs of inequalities on expressions of real numbers for the
Coq proof assistant.")
(license license:cecill-c)))
+
+(define-public dedukti
+ (package
+ (name "dedukti")
+ (version "2.6.0")
+ (home-page "https://deducteam.github.io/")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/deducteam/dedukti.git")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0frl3diff033i4fmq304b8wbsdnc9mvlhmwd7a3zd699ng2lzbxb"))))
+ (inputs
+ `(("ocaml" ,ocaml)
+ ("menhir" ,ocaml-menhir)))
+ (native-inputs
+ `(("ocamlbuild" ,ocamlbuild)
+ ("ocamlfind" ,ocaml-findlib)))
+ (build-system gnu-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (replace 'configure
+ ;; Set ocamlfind environment vars
+ (lambda _
+ (let ((out (assoc-ref %outputs "out"))
+ (libpath "/lib/ocaml/site-lib"))
+ (begin
+ (setenv "OCAMLFIND_DESTDIR" (string-append out libpath))
+ (mkdir-p (string-append out libpath "/dedukti"))
+ (setenv "PREFIX" out)
+ #t))))
+ (replace 'build
+ (lambda _
+ (invoke "make")))
+ (replace 'check
+ (lambda _
+ (invoke "make" "tests")))
+ (add-before 'install 'set-binpath
+ ;; Change binary path in the makefile
+ (lambda _
+ (let ((out (assoc-ref %outputs "out")))
+ (substitute* "GNUmakefile"
+ (("BINDIR = (.*)$")
+ (string-append "BINDIR = " out "/bin")))))))))
+ (synopsis "Proof-checker for the λΠ-calculus modulo theory, an extension of
+the λ-calculus")
+ (description "Dedukti is a proof-checker for the λΠ-calculus modulo
+theory. The λΠ-calculus is an extension of the simply typed λ-calculus with
+dependent types. The λΠ-calculus modulo theory is itself an extension of the
+λΠ-calculus where the context contains variable declaration as well as rewrite
+rules. This system is not designed to develop proofs, but to check proofs
+developed in other systems. In particular, it enjoys a minimalistic syntax.")
+ (license license:cecill-c)))
--
2.20.1

On Tue 25 Dec 2018 at 12:32 Julien Lepiller wrote:

> I wonder why you didn't use the ocaml-build-system...

I'm not an expert yet regarding the different build systems, but the
current package essentially relies on a ~make~ and ~make install~
process, and is not linked with oasis or dune things (and using
ocaml-build-system failed as well, but perhaps I should investigate
more).

> I don't think this synpsis is understandable to everyone. Could you use
> instead a more general sentence that give an impression of what
> ΛΠ-calculus modulo rewriting is?
>
>> + (description "Dedukti is a logical framework based on the
>> +ΛΠ-calculus modulo in which many theories and logics can be
>> expressed.")
>
> Or if you can't, please explain it with a sentence or two in the
> description ;)

I hope the new one is clearer...
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEE5ercJXBcjd3P1FcAMbyBBfZZ1CUFAlwiTT4ACgkQMbyBBfZZ
1CXLwA/+NYedwZNafW0Fo2n8NtdbvhV71YVs4L9pkhTcutCwMvjc6qxAtBC72XcJ
EGfx7hWe456P1uTf36xSWWuZ0NfMWlShddnOciQedDizJsek5OxJoKDD2iTk96G+
lv5lQkj4pRWXLwsQbhi5qJjr51zEaiv+4kPvx/AuU1TKjfpv8ukWRjklVGqfBKLV
dDIXcVMVnCTCQbTTcsQ8EFk+RD9knWfN+vCo3h/gqsCFRvrlgUzK6B4vHwNuwQ9F
nGJJkfOjy2kz2jQUUaO7rnw9uqIk137IFAIr1tYy+I+9356AMCJe82db4PVy61n7
zVn/szPukBf2bvMeI5ePIvAHfLWsrAxg2rP39Nk/YKDJoevNQT4qvg3VPe6fKLMh
zh8i57ZFWyffiLUijrYLxYPymSG5MZqNUK2iRAqCayiaraZ+ZC8AT92BbEIOSHaa
TilfVVCj/jolXjspqF2OXYln7IjeYv6mvIT60vHkN9XIuY0uxlW2F7p1lh6wMlw3
GfayEdtyXMrunjysmljeh5OijUvCjB0TFtEbJu9wK7+6tIp5m+GjEF//zHEx1kr9
Lui3XIQuTiEA1UyfJNJoS1J8Qq1W0DyeB5wcu1dyT6QdypARheZYp1R+EumCWKiW
itXVS04xROPeh0uDd/ELifEi3rVx1THf+j2AvFnuLt1aWk1G8LU=
=xFDL
-----END PGP SIGNATURE-----

Julien Lepiller wrote 6 years ago
(address . 33865-done@debbugs.gnu.org)
20181225185005.2177deb3@lepiller.eu
Pushed as 5895696e4c28938d9201e4527d3a007dd8b47e32.

I've slightly modified your patch to add a copyright line for yourself
and use the ocaml-build-system.
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEtfrmKFtBNyiyoPrtQxEfRSAIagwFAlwibc0ACgkQQxEfRSAI
agzdeg/8DtWpAXlWAYmX8LW1ydK2Cap7REgDa5nrr3TH3mcYtvdNYBjoAKWQAT2c
j8GbKqCDxUHt3ZRAC67Zs9LnuWQhe/jMyntcl1yoqDm9Bv/a0oIwiF04KtmZJ/mZ
02otgC2QGqGl9nd8LTqxeYEhEVg0zUshMzhsT0YmY7HGHUuYZ2MLLh5gW351HmpA
55Mtz6RFjpxgalxCqEHj9lKRCj5NJ+fyBeQespYvFKfVv4XfJ3eIqD3IJLQKsTWg
GImvLmauXlnVUvgeiZHg6fn+sy38KTfghGDwt1hZutAfNem/jqllm2fapa2ZA69a
1goULtiU9bDAX/AFihLLLaVFZ/N+Yx9Iumf6YWpPJNSy2tbV8fY+DNdigyVzXae2
vOBPwx3mW5FDWFOEcuI07yMZDALnM3J6zDRZl4k1VhHP73Bw8FbvU/XZQUzh3KjO
PrwsR25TyT7n+aIQHJ0Tlo2bnou7hvE/XepdZkGt1RPGd2/QS2Pn0icL0Vp0cX4W
Pk2jKsqMoRy9BCowNpVVHUw+JKm3lXfV86GFXrE3Np13mPQLHf24a1Q3WK2l20Ah
LK3d265faF/c+R26yQv+hbV94pvZpg1OVa3waPQlWQXVbtq8vE0d0bLTSM3TzA+w
ObSSHj7CWCWSedph/SlhZi9Q0qn3K1n+tvjNgee6UuuC+GhtkZc=
=tccb
-----END PGP SIGNATURE-----


Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 33865@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 33865
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help