summary refs log tree commit diff
path: root/gnu/packages/klee.scm
blob: ea4d4ff439d06922d56bb382090fa55f94d6141c (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2023 Nguyễn Gia Phong <cnx@loang.net>
;;;
;;; This file is part of GNU Guix.
;;;
;;; GNU Guix is free software; you can redistribute it and/or modify it
;;; under the terms of the GNU General Public License as published by
;;; the Free Software Foundation; either version 3 of the License, or (at
;;; your option) any later version.
;;;
;;; GNU Guix is distributed in the hope that it will be useful, but
;;; WITHOUT ANY WARRANTY; without even the implied warranty of
;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
;;; GNU General Public License for more details.
;;;
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.

(define-module (gnu packages klee)
  #:use-module (guix build-system cmake)
  #:use-module (guix gexp)
  #:use-module (guix git-download)
  #:use-module (guix packages)
  #:use-module (gnu packages check)
  #:use-module (gnu packages cpp)
  #:use-module (gnu packages llvm)
  #:use-module (gnu packages maths)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages sqlite)
  #:use-module (guix licenses))

(define-public klee
  (package
    (name "klee")
    (version "3.0")
    (source
      (origin
        (method git-fetch)
        (uri (git-reference (url "https://github.com/klee/klee")
                            (commit (string-append "v" version))))
        (file-name (git-file-name name version))
        (sha256
          (base32 "0dj20nazkcq84ryr87dihvjznapsbl1n21sa8dhhnb0wsad5d6fb"))))
    (build-system cmake-build-system)
    (arguments
      (list
        #:configure-flags
        #~(list "-DCMAKE_BUILD_TYPE=Release"
                "-DKLEE_RUNTIME_BUILD_TYPE=Release"
                (string-append "-DLLVMCC="
                               #$(this-package-native-input "clang")
                               "/bin/clang")
                (string-append "-DLLVMCXX="
                               #$(this-package-native-input "clang")
                               "/bin/clang++")
                "-DKLEE_ENABLE_TIMESTAMP=OFF"
                "-DENABLE_KLEE_ASSERTS=ON"
                "-DENABLE_POSIX_RUNTIME=ON"
                "-DENABLE_UNIT_TESTS=ON"
                "-DENABLE_SYSTEM_TESTS=ON"
                "-Wno-dev")
        #:test-target "check"))
    (native-inputs
      `(("clang" ,clang-toolchain-12)
        ("googletest" ,googletest)
        ("python-lit" ,python-lit)))
    (inputs (list cryptominisat gperftools llvm-12
                  python python-tabulate sqlite stp z3))
    (home-page "https://klee.github.io")
    (synopsis "Symbolic execution engine")
    (description "@code{KLEE} is a symbolic virtual machine built on top of the LLVM compiler infrastructure.")
    (license ncsa)))