[PATCH 0/2] Add scasp

  • Open
  • quality assurance status badge
Details
One participant
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Liliana Marie Prikler
Severity
normal
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:23
(address . guix-patches@gnu.org)
095fec576dec88a59197f5275c21721c28992cfe.camel@gmail.com
Hi Guix,

this series adds scasp (the SWI Prolog implementation anyway), a
prolog-based ASP interpreter/solver.

Cheers

Liliana Marie Prikler (2):
gnu: swi-prolog: Update to 9.1.0.
gnu: Add scasp.

gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
gnu/packages/prolog.scm | 4 ++--
2 files changed, 39 insertions(+), 2 deletions(-)


base-commit: 9e9204958d3e0ecfe8fd024d8f06068b84f52ba1
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:15
[PATCH 1/2] gnu: swi-prolog: Update to 9.1.0.
(address . 59799@debbugs.gnu.org)
3bf4538a0537866293e8ded8bbaa8b8b4c4b86bc.camel@gmail.com
* gnu/packages/prolog.scm (swi-prolog): Update to 9.1.0.
---
gnu/packages/prolog.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (24 lines)
diff --git a/gnu/packages/prolog.scm b/gnu/packages/prolog.scm
index 6aa01ce871..9291da617d 100644
--- a/gnu/packages/prolog.scm
+++ b/gnu/packages/prolog.scm
@@ -87,7 +87,7 @@ (define-public gprolog
(define-public swi-prolog
(package
(name "swi-prolog")
- (version "8.3.20")
+ (version "9.1.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -97,7 +97,7 @@ (define-public swi-prolog
(file-name (git-file-name name version))
(sha256
(base32
- "1g0v9cmz8zvzc1n0si7sn6522xwzbhj2b8967ibs6prinrpjc8d6"))))
+ "0an3wgiapr1h2ifjpm59snqx1vd2m9hnn9hawl3xdc2ch4lml2i0"))))
(build-system cmake-build-system)
(arguments
`(#:parallel-build? #t
--
2.38.1
L
L
Liliana Marie Prikler wrote on 3 Dec 2022 10:18
[PATCH 2/2] gnu: Add scasp.
(address . 59799@debbugs.gnu.org)
2f3301a7745c71e6422511e38b3f358fb1ab8bdf.camel@gmail.com
* gnu/packages/maths.scm (scasp): New variable.
---
gnu/packages/maths.scm | 37 +++++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)

Toggle diff (64 lines)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index c0bc07977b..dd41072b5d 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -86,6 +86,7 @@ (define-module (gnu packages maths)
#:use-module (guix utils)
#:use-module ((guix build utils) #:select (alist-replace))
#:use-module (guix build-system cmake)
+ #:use-module (guix build-system copy)
#:use-module (guix build-system glib-or-gtk)
#:use-module (guix build-system gnu)
#:use-module (guix build-system meson)
@@ -147,6 +148,7 @@ (define-module (gnu packages maths)
#:use-module (gnu packages pcre)
#:use-module (gnu packages popt)
#:use-module (gnu packages perl)
+ #:use-module (gnu packages prolog)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages pulseaudio)
#:use-module (gnu packages python)
@@ -2686,6 +2688,41 @@ (define-public clingo
(description "Clingo computes answer sets for a given logic program.")
(license license:expat)))
+(define-public scasp
+ (let ((commit "89a427aa04ec6346425a40111c99b310901ffe51")
+ (revision "1"))
+ (package
+ (name "scasp")
+ (version (git-version "0.21.11.26" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/SWI-Prolog/sCASP")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1ijqv9xr3imrdmz6nq7zqwsmmaxn638icig19m8900m7mjfpizs4"))))
+ (build-system copy-build-system)
+ (arguments
+ (list
+ #:install-plan #~`(("scasp" "bin/")
+ ("prolog" "lib/swipl/library"))
+ #:modules `((guix build copy-build-system)
+ ((guix build gnu-build-system) #:prefix gnu:)
+ (guix build utils)
+ (ice-9 regex))
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-before 'install 'build (assoc-ref gnu:%standard-phases 'build))
+ (add-after 'build 'check (assoc-ref gnu:%standard-phases 'check)))))
+ (native-inputs (list swi-prolog))
+ (home-page "https://github.com/SWI-Prolog/sCASP")
+ (synopsis "Interpreter for ASP programs with constraints")
+ (description "@code{s(CASP)} is a top-down interpreter for ASP programs
+with constraints.")
+ (license license:asl2.0))))
+
(define-public ceres
(package
(name "ceres-solver")
--
2.38.1
?