GNU bug report logs -
#50933
[PATCH 0/3] Add clingo
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 50933 in the body.
You can then email your comments to 50933 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#50933
; Package
guix-patches
.
(Fri, 01 Oct 2021 09:57:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 01 Oct 2021 09:57:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
This patch adds a package for clingo ad its dependencies. I haven't
tested clingo itself (I did test clasp however) and the test suite has
two failing assertion in the solver category, but as far as I can see
it ought to work mostly.
Regards,
Liliana
Liliana Marie Prikler (3):
gnu: Add libpotassco.
gnu: Add clasp.
gnu: Add clingo.
gnu/packages/maths.scm | 157 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 157 insertions(+)
--
2.33.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50933
; Package
guix-patches
.
(Fri, 01 Oct 2021 10:17:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 50933 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/maths.scm (libpotassco): New variable.
---
gnu/packages/maths.scm | 49 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 164924b6af..dbb149db53 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2194,6 +2194,55 @@ Computational Engineering and Sciences} at The University of Texas at Austin.
includes a complete LAPACK implementation.")
(license license:bsd-3)))
+(define-public libpotassco
+ ;; No public release, update together with clasp
+ (let ((revision "1")
+ (commit "2f9fb7ca2c202f1b47643aa414054f2f4f9c1821"))
+ (package
+ (name "libpotassco")
+ (version (git-version "0.0" revision commit))
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/potassco/libpotassco")
+ (commit commit)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1c32f9gqclf7qx07lpx8wd720vfhkjqhzc6nyy8mjmgwpmb3iyyn"))))
+ (arguments
+ `(#:configure-flags '("-DLIB_POTASSCO_BUILD_TESTS=on"
+ "-DLIB_POTASSCO_INSTALL_LIB=on"
+ "-DBUILD_SHARED_LIBS=on")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ ;; clasp expects lowercase potassco and include directory is
+ ;; lowercase as well, so let's use that
+ (("\"cmake/Potassco\"") "\"cmake/potassco\"")
+ (("PotasscoConfig\\.cmake") "potassco-config.cmake")
+ (("PotasscoConfigVersion\\.cmake")
+ "potassco-config-version.cmake"))
+ (rename-file "cmake/PotasscoConfig.cmake.in"
+ "cmake/potassco-config.cmake.in"))))))
+ (build-system cmake-build-system)
+ (home-page "https://potassco.org/")
+ (synopsis "Utility library for Potassco's projects")
+ (description "@code{libpotassco} is a utility library providing functions
+and datatypes for
+@itemize
+@item parsing, writing, and converting logic programs in aspif and smodels
+format,
+@item passing information between a grounder and a solver,
+@item and defining and parsing command-line options and for creating
+command-line applications.
+@end itemize
+Furthermore, it comes with the tool @command{lpconvert} that converts either
+between aspif and smodels format or to a human-readable text format.")
+ (license license:expat))))
+
(define-public ceres
(package
(name "ceres-solver")
--
2.33.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50933
; Package
guix-patches
.
(Fri, 01 Oct 2021 10:17:01 GMT)
Full text and
rfc822 format available.
Message #11 received at 50933 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/maths.scm (clingo): New variable.
---
gnu/packages/maths.scm | 65 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f9790dd64a..4baca52007 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2286,6 +2286,71 @@ conflict-driven nogood learning, a technique that proved very successful for
satisfiability checking (SAT).")
(license license:expat)))
+(define-public clingo
+ (package
+ (name "clingo")
+ (version "5.5.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/potassco/clingo")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rfjwkcwm0mmf3r4i7asyjwb6cia4i7px7fn2kdbi9j85qvas4pb"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags `("-DCLINGO_BUILD_TESTS=on"
+ "-DCLINGO_INSTALL_LIB=on"
+ "-DCLINGO_BUILD_STATIC=off"
+ "-DCLINGO_BUILD_SHARED=on"
+ ;; XXX: Clingo requries private headers and
+ ;; sources from clasp
+ ,(string-append
+ "-DCLASP_SOURCE_DIR="
+ (assoc-ref %build-inputs "clasp-src")))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ (("add_subdirectory\\(clasp\\)")
+ "find_package(clasp REQUIRED)"))
+ (substitute* "libclingo/CMakeLists.txt"
+ (("\"cmake/Clingo\"") "\"cmake/clingo\"")
+ (("ClingoConfig\\.cmake") "clingo-config.cmake")
+ (("ClingoConfigVersion\\.cmake")
+ "clingo-config-version.cmake"))
+ (substitute* "cmake/ClingoConfig.cmake.in"
+ (("find_package\\(Clasp") "find_package(clasp"))
+ (rename-file "cmake/ClingoConfig.cmake.in"
+ "cmake/clingo-config.cmake.in")))
+ (add-after 'unpack 'skip-failing-tests
+ (lambda _
+ (with-directory-excursion "libclingo/tests"
+ (substitute* "CMakeLists.txt"
+ (("COMMAND test_clingo" all)
+ (string-append all
+ " -f "
+ "\"${CMAKE_CURRENT_SOURCE_DIR}/good.txt\"")))
+ (call-with-output-file "good.txt"
+ (lambda (port)
+ (for-each (lambda (test) (format port "~s~%" test))
+ '("parse-ast-v2" "add-ast-v2" "build-ast-v2"
+ "unpool-ast-v2" "parse_term"
+ "propagator" "propgator-sequence-mining"
+ "symbol" "visitor"))))))))))
+ (inputs
+ `(("clasp" ,clasp)
+ ("libpotassco" ,libpotassco)))
+ (native-inputs
+ `(("clasp-src" ,(package-source clasp))))
+ (home-page "https://potassco.org/")
+ (synopsis "Grounder and solver for logic programs")
+ (description "Clingo computes answer sets for a given logic program.")
+ (license license:expat)))
+
(define-public ceres
(package
(name "ceres-solver")
--
2.33.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#50933
; Package
guix-patches
.
(Fri, 01 Oct 2021 10:17:02 GMT)
Full text and
rfc822 format available.
Message #14 received at 50933 <at> debbugs.gnu.org (full text, mbox):
* gnu/packages/maths.scm (clasp): New variable.
---
gnu/packages/maths.scm | 43 ++++++++++++++++++++++++++++++++++++++++++
1 file changed, 43 insertions(+)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index dbb149db53..f9790dd64a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -2243,6 +2243,49 @@ Furthermore, it comes with the tool @command{lpconvert} that converts either
between aspif and smodels format or to a human-readable text format.")
(license license:expat))))
+(define-public clasp
+ (package
+ (name "clasp")
+ (version "3.3.6")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/potassco/clasp")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0rahqiq530jckvx717858h1q5p8znp1kb6sjm95p8blkr4n3pvmj"))))
+ (build-system cmake-build-system)
+ (arguments
+ `(#:configure-flags '("-DCLASP_BUILD_TESTS=on"
+ "-DCLASP_INSTALL_LIB=on"
+ "-DCLASP_USE_LOCAL_LIB_POTASSCO=off"
+ "-DBUILD_SHARED_LIBS=on")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'unpack 'patch-cmake
+ (lambda _
+ (substitute* "CMakeLists.txt"
+ ;; Use lowercase to be consistent with libpotassco
+ (("\"cmake/Clasp\"") "\"cmake/clasp\"")
+ (("ClaspConfig\\.cmake") "clasp-config.cmake")
+ (("ClaspConfigVersion\\.cmake")
+ "clasp-config-version.cmake"))
+ (substitute* "cmake/ClaspConfig.cmake.in"
+ (("find_package\\(Potassco") "find_package(potassco"))
+ (rename-file "cmake/ClaspConfig.cmake.in"
+ "cmake/clasp-config.cmake.in"))))))
+ (inputs
+ `(("libpotassco" ,libpotassco)))
+ (home-page "https://potassco.org/")
+ (synopsis "Answer set solver")
+ (description "clasp is an answer set solver for (extended) normal and
+disjunctive logic programs. The primary algorithm of clasp relies on
+conflict-driven nogood learning, a technique that proved very successful for
+satisfiability checking (SAT).")
+ (license license:expat)))
+
(define-public ceres
(package
(name "ceres-solver")
--
2.33.0
Reply sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
You have taken responsibility.
(Sun, 24 Oct 2021 18:45:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Liliana Marie Prikler <liliana.prikler <at> gmail.com>
:
bug acknowledged by developer.
(Sun, 24 Oct 2021 18:45:03 GMT)
Full text and
rfc822 format available.
Message #19 received at 50933-done <at> debbugs.gnu.org (full text, mbox):
Am Freitag, den 01.10.2021, 11:51 +0200 schrieb Liliana Marie Prikler:
> This patch adds a package for clingo ad its dependencies. I haven't
> tested clingo itself (I did test clasp however) and the test suite
> has two failing assertion in the solver category, but as far as I can
> see it ought to work mostly.
After finally getting around to test that clingo indeed can solve crime
[1], I've decided to push this patch set.
Regards,
Liliana
[1] https://potassco.org/doc/start/
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Mon, 22 Nov 2021 12:24:06 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 147 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.