From: Julien Lepiller <julien@lepiller.eu>
To: 38635@debbugs.gnu.org
Subject: [bug#38635] [PATCH v3] Add why3 and frama-c
Date: Thu, 29 Apr 2021 22:39:18 +0200 [thread overview]
Message-ID: <20210429223850.7659957a@tachikoma.lepiller.eu> (raw)
In-Reply-To: <20200902150508.5c4a45e8@tachikoma.lepiller.eu>
[-- Attachment #1: Type: text/plain, Size: 253 bytes --]
Hi Guix!
I updated my patches to the latest version of frama-c, and the issue is
gone now! Frama-c is working, as long as ocaml is in the environment
(because it's calling ocaml-findlib that needs an environment variable
defined by the ocaml package).
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-Add-why3.patch --]
[-- Type: text/x-patch, Size: 4639 bytes --]
From 103afc0730fda2b27a103bc66f1ff283b7883e8b Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 16 Dec 2019 12:09:16 +0100
Subject: [PATCH 1/2] gnu: Add why3.
* gnu/packages/maths.scm (why3): New variable.
---
gnu/packages/maths.scm | 66 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 65 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a79e128955..a214b5d780 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -28,7 +28,7 @@
;;; Copyright © 2018 Adam Massmann <massmannak@gmail.com>
;;; Copyright © 2018, 2020 Marius Bakke <mbakke@fastmail.com>
;;; Copyright © 2018 Eric Brown <brown@fastmail.com>
-;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu>
+;;; Copyright © 2018, 2021 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2018 Amin Bandali <bandali@gnu.org>
;;; Copyright © 2019, 2021 Nicolas Goaziou <mail@nicolasgoaziou.fr>
;;; Copyright © 2019 Steve Sprang <scs@stevesprang.com>
@@ -74,6 +74,7 @@
#:use-module (guix build-system cmake)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
+ #:use-module (guix build-system ocaml)
#:use-module (guix build-system python)
#:use-module (guix build-system ruby)
#:use-module (gnu packages algebra)
@@ -85,11 +86,13 @@
#:use-module (gnu packages check)
#:use-module (gnu packages cmake)
#:use-module (gnu packages compression)
+ #:use-module (gnu packages coq)
#:use-module (gnu packages curl)
#:use-module (gnu packages cyrus-sasl)
#:use-module (gnu packages dbm)
#:use-module (gnu packages documentation)
#:use-module (gnu packages elf)
+ #:use-module (gnu packages emacs)
#:use-module (gnu packages file)
#:use-module (gnu packages flex)
#:use-module (gnu packages fltk)
@@ -6190,3 +6193,64 @@ and conversions, physical constants, symbolic calculations (including
integrals and equations), arbitrary precision, uncertainty propagation,
interval arithmetic, plotting.")
(license license:gpl2+)))
+
+(define-public why3
+ (package
+ (name "why3")
+ (version "1.3.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://gforge.inria.fr/frs/download.php/file"
+ "/38291/why3-" version ".tar.gz"))
+ (sha256
+ (base32
+ "16zcrc60zz2j3gd3ww93z2z9x2jkxb3kr57y8i5rcgmacy7mw3bv"))))
+ (build-system ocaml-build-system)
+ (native-inputs
+ `(("coq" ,coq)
+ ("ocaml" ,ocaml)
+ ("which" ,which)))
+ (propagated-inputs
+ `(("camlzip" ,camlzip)
+ ("ocaml-graph" ,ocaml-graph)
+ ("ocaml-menhir" ,ocaml-menhir)
+ ("ocaml-num" ,ocaml-num)
+ ("ocaml-zarith" ,ocaml-zarith)))
+ (inputs
+ `(("coq-flocq" ,coq-flocq)
+ ("emacs-minimal" ,emacs-minimal)
+ ("zlib" ,zlib)))
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'fix-configure
+ (lambda _
+ (setenv "CONFIG_SHELL" (which "sh"))
+ (substitute* "configure"
+ ;; find ocaml-num in the correct directory
+ (("\\$DIR/nums.cma") "$DIR/../nums.cma")
+ (("\\$DIR/num.cmi") "$DIR/../num.cmi"))
+ #t))
+ (add-after 'configure 'fix-makefile
+ (lambda _
+ (substitute* "Makefile"
+ ;; find ocaml-num in the correct directory
+ (("site-lib/num") "site-lib"))
+ #t))
+ (add-after 'install 'install-lib
+ (lambda _
+ (invoke "make" "byte")
+ (invoke "make" "install-lib")
+ #t)))))
+ (home-page "http://why3.lri.fr")
+ (synopsis "Deductive program verification")
+ (description "Why3 provides a language for specification and programming,
+called WhyML, and relies on external theorem provers, both automated and
+interactive, to discharge verification conditions. Why3 comes with a standard
+library of logical theories (integer and real arithmetic, Boolean operations,
+sets and maps, etc.) and basic programming data structures (arrays, queues,
+hash tables, etc.). A user can write WhyML programs directly and get
+correct-by-construction OCaml programs through an automated extraction
+mechanism. WhyML is also used as an intermediate language for the verification
+of C, Java, or Ada programs.")
+ (license license:lgpl2.1)))
--
2.26.3
[-- Attachment #3: 0002-gnu-Add-frama-c.patch --]
[-- Type: text/x-patch, Size: 2608 bytes --]
From 431dc3f0212c53b60f075e4e2719531f2ad4d84a Mon Sep 17 00:00:00 2001
From: Julien Lepiller <julien@lepiller.eu>
Date: Mon, 16 Dec 2019 12:40:18 +0100
Subject: [PATCH 2/2] gnu: Add frama-c.
* gnu/packages/maths.scm (frama-c): New variable.
---
gnu/packages/maths.scm | 47 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 47 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index a214b5d780..49a3fd3904 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -6254,3 +6254,50 @@ correct-by-construction OCaml programs through an automated extraction
mechanism. WhyML is also used as an intermediate language for the verification
of C, Java, or Ada programs.")
(license license:lgpl2.1)))
+
+(define-public frama-c
+ (package
+ (name "frama-c")
+ (version "22.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "http://frama-c.com/download/frama-c-"
+ version "-Titanium.tar.gz"))
+ (sha256
+ (base32
+ "1mq1fijka95ydrla486yr4w6wdl9l7vmp512s1q00b0p6lmfwmkh"))))
+ (build-system ocaml-build-system)
+ (arguments
+ `(#:tests? #f; no test target in Makefile
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'export-shell
+ (lambda* (#:key inputs #:allow-other-keys)
+ (setenv "CONFIG_SHELL" (string-append (assoc-ref inputs "bash")
+ "/bin/sh"))
+ #t)))))
+ (inputs
+ `(("gmp" ,gmp)))
+ (propagated-inputs
+ `(("ocaml-biniou" ,ocaml-biniou)
+ ("ocaml-easy-format" ,ocaml-easy-format)
+ ("ocaml-graph" ,ocaml-graph)
+ ("ocaml-yojson" ,ocaml-yojson)
+ ("ocaml-zarith" ,ocaml-zarith)
+ ("why3" ,why3)))
+ (native-search-paths
+ (list (search-path-specification
+ (variable "FRAMAC_SHARE")
+ (files '("share/frama-c"))
+ (separator #f))
+ (search-path-specification
+ (variable "FRAMAC_LIB")
+ (files '("lib/frama-c"))
+ (separator #f))))
+ (home-page "http://frama-c.com")
+ (synopsis "C source code analysis platform")
+ (description "Frama-C is an extensible and collaborative platform dedicated
+to source-code analysis of C software. The Frama-C analyzers assist you in
+various source-code-related activities, from the navigation through unfamiliar
+projects up to the certification of critical software.")
+ (license license:lgpl2.1+)))
--
2.26.3
next prev parent reply other threads:[~2021-04-29 20:40 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-16 11:46 [bug#38635] [WIP PATCH] Add why3 and frama-c Julien Lepiller
2019-12-25 7:01 ` Brett Gilio
2020-09-02 13:05 ` [bug#38635] [WIP PATCH v2] " Julien Lepiller
2021-04-29 20:39 ` Julien Lepiller [this message]
2021-06-02 1:11 ` bug#38635: [PATCH v3] " Julien Lepiller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210429223850.7659957a@tachikoma.lepiller.eu \
--to=julien@lepiller.eu \
--cc=38635@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.