diff options
Diffstat (limited to 'gnu/packages/potassco.scm')
-rw-r--r-- | gnu/packages/potassco.scm | 106 |
1 files changed, 86 insertions, 20 deletions
diff --git a/gnu/packages/potassco.scm b/gnu/packages/potassco.scm index 43d9ea6647..9f6b48f890 100644 --- a/gnu/packages/potassco.scm +++ b/gnu/packages/potassco.scm @@ -112,6 +112,7 @@ between aspif and smodels format or to a human-readable text format.") (url "https://github.com/potassco/clasp") (commit (string-append "v" version)))) (file-name (git-file-name name version)) + (patches (search-patches "clasp-hide-event-ids.patch")) (sha256 (base32 "0qap7rar8a5mkqz28n2hnvr4cfv5x0rh4zs3wdp919dw4d034chr")))) @@ -200,22 +201,7 @@ satisfiability checking (SAT).") (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")))))))))) + "cmake/clingo-config.cmake.in")))))) (inputs (list catch2-3 clasp libpotassco)) (native-inputs (list bison re2c mpark-variant @@ -444,6 +430,64 @@ Python code."))) as a theory to clingo from Python code. It also supports running clingo-dl directly from the python command line."))) +(define-public python-clingox + (package + (name "python-clingox") + (version "1.2.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/potassco/python-clingox") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0ji0sdqlv0byxmdipwk60afsb82r0rr1j73r7j2508hsfk94m2i8")))) + (build-system pyproject-build-system) + (propagated-inputs (list python-clingo)) + (home-page "https://potassco.org/clingo") + (synopsis "Auxiliary functions for Clingo") + (description "This package provides additional functions to go along with +the Python bindings for Clingo.") + (license license:expat))) + +(define-public python-asprin + (let ((revision "1") + (commit "bc5a0cf7d9ba346cf91cba66282b5946dbf1331c")) + (package + (name "python-asprin") + (version (git-version "3.1.1" revision commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/potassco/asprin") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0rf8yjdlpkvzp9917fvhfrrzag47vvfm7j2k5g44w1ggqyrz8fps")))) + (build-system pyproject-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-source + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "asprin/src/solver/metasp/reify.py" + (("\"clingo\"") + (string-append "\"" + (search-input-file inputs "bin/clingo") + "\"")))))))) + (inputs (list clingo)) + (propagated-inputs (list python-clingo)) + (home-page "https://potassco.org/") + (synopsis "Optimization in Answer Set Programming") + (description "@command{asprin} is a general framework for optimization in +@acronym{ASP, Answer Set Programming}, that allows for computing optimal +stable models of logic programs by means of preferences. Some preference types +are already predefined, but more can be added as logic programs.") + (license license:expat)))) + (define-public python-clorm (package (name "python-clorm") @@ -465,10 +509,7 @@ directly from the python command line."))) (lambda _ ;; noclingo tests rely on this being set (setenv "CLORM_NOCLINGO" "1") - (delete-file "tests/test_mypy_query.py") - (substitute* "tests/test_clingo.py" - (("self\\.assertTrue\\(os_called\\)" all) - (string-append "# " all)))))))) + (delete-file "tests/test_mypy_query.py")))))) (propagated-inputs (list python-clingo)) (native-inputs (list python-typing-extensions)) (home-page "https://potassco.org") @@ -612,3 +653,28 @@ as logic programs.") (description "Clinguin is a graphical user interface toolkit for clingo, which allows user interfaces to be specified entirely as a logic program.") (license license:expat))) + +(define-public python-clintest + (package + (name "python-clintest") + (version "0.2.0") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/potassco/clintest") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0xzbby9ram55h87ykm652kgm45b8rlhbjc8gjkz308h1jnjllmmy")))) + (build-system pyproject-build-system) + (inputs (list python-clingo)) + (native-inputs (list python-pytest)) + (home-page "https://potassco.org/clintest/") + (synopsis "Test framework for clingo programs") + (description "Clintest is a framework for unit testing clingo programs. +It provides various components to assemble the most commonly used tests quickly, +but also works fine along custom-built test. Clintest monitors the test +outcome while solving to abort the search for solutions once the outcome is +certain.") + (license license:expat))) |