diff options
Diffstat (limited to 'sci-mathematics/cvc3')
-rw-r--r-- | sci-mathematics/cvc3/Manifest | 8 | ||||
-rw-r--r-- | sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild | 141 | ||||
-rw-r--r-- | sci-mathematics/cvc3/cvc3-2.4.1.ebuild | 156 | ||||
-rw-r--r-- | sci-mathematics/cvc3/files/50cvc3-gentoo.el | 3 | ||||
-rw-r--r-- | sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch | 76 | ||||
-rw-r--r-- | sci-mathematics/cvc3/metadata.xml | 45 |
6 files changed, 429 insertions, 0 deletions
diff --git a/sci-mathematics/cvc3/Manifest b/sci-mathematics/cvc3/Manifest new file mode 100644 index 000000000000..b5293cb82616 --- /dev/null +++ b/sci-mathematics/cvc3/Manifest @@ -0,0 +1,8 @@ +AUX 50cvc3-gentoo.el 164 SHA256 1fbca0f0a0556eb5fc1d8ba4361f2143bc7fe81b08c21c1da752121ea3d25b90 SHA512 bba873dfaeadc821ffc41168df51a0e0d5c0d038f60a36ba4f74c83d0ef8fb4ff3089cb587b680d5058c7fcddad2585c1e913cb25d8e2256cccda5872f017d07 WHIRLPOOL ba6691a596a47670d0b143e957f10112de18493df013c9ffa8f232f0e7450adcea184a60246a44286976ddc683954354ecd985481a0407df83359d8b5bb07ccb +AUX cvc3-2.4.1-gccv6-fix.patch 2907 SHA256 2218a10ba315200a0cf6d436999a8840913add7b6e030948daac4b40b5d5e65c SHA512 1e4e54820aa0ff256bc12916be1219961848430d3448ac4e04d4dcab5ba3ef1e056cad1a3c68ba5e9ff4f0f48c5a92e1b2e9e7eb14837265b166abe1228005cf WHIRLPOOL b66be69a05e3031dd8a2dc998503002ffbf8a7a005dd2d33d8f4f220fcc267cf61ddfd5f0c6cdbe499ae0132bb45da5b7435b92379471d02ecd06f3d25298938 +DIST cvc3-2.4.1.tar.gz 1196616 SHA256 d55b1d6006cfbac3f6d4c086964558902c3ed0efa66ac499cfb2193f3ee4acf7 SHA512 48e5cd82b3eb7506d762c2abc8db0c8fbc548575a1362dda53888075ac105a5bc0f0d58dfe01b60f207bc00ff8dfc39a5b3d9317784fe551658c884bb02e1ff2 WHIRLPOOL 9d39dacff010f093685191737d41760a84ac7d12246ddaafbb9f48c78c7bff5697c5e85c62ef44b7dc76f86a55c118c041323c3a1b1953f5c725447795375d93 +EBUILD cvc3-2.4.1-r1.ebuild 4298 SHA256 d1278bb19e75b03b2584d708d3018926c651451491dd8efae4044bb75cb4c784 SHA512 7cc46232b5f2aa148967e13796ed6ba689e5b98bce5677a9efb1492bd97af7a6bf5e6c48d648e15d8e5b035f73a0a8930b66d903c2a57fdc8cabc756681dd252 WHIRLPOOL f9a3ddc4152fb595fbb3487561e6ea454c925b8a4f866246684b55b4d7dd7b190849b2902f1e9b6a84c985c80ebdcd3fad83a7fac7615b376347f6a6e1cbf7dc +EBUILD cvc3-2.4.1.ebuild 4240 SHA256 a49f42650b8fc3b531c6d331b4eb03edfb9cb5ecd9e018b9790370e2478457a4 SHA512 31329c448ca916bf2c26f712399b85e5da447649850bfef83c0b3c2ae3ac18e531189fa42295c47eb2c24780f7e8fea612ec6af50ee91efb89594baec7208706 WHIRLPOOL 11812d6657060b8f31450c8a99c74d69a447cc3295af8b623e15201afdc8fb5c611a1e00d6b3bb37d1cc22d5df56a611d7d4e38305623dc3b1139a33db86c9a6 +MISC ChangeLog 3640 SHA256 1215580f8d4b259ad8d0f139d8ee479e75c32ded4ba8259c1dabfd14ca2e99ff SHA512 a9c188bfa1d03337bc28240476274ba05c1cf2bcfcac94fc9141bdb3dcad7eb262c4599a465287637b6090fb76fd870cc0c882d1c3b097e5f6253dda82cd4c2c WHIRLPOOL d237773b12d969fab388a80c6eaec4150884d3f44734506b5356bf4c9f7f081613531da0f99483fd3648d91de6ce3d9eba303cdb6b2b2ace58ca7a7f23b5ffb5 +MISC ChangeLog-2015 1461 SHA256 9a76013008472466d700fdb89bbd50a763bc87dec872ecfd4f93d590fd3ac69c SHA512 48f5075521f141a27d2f33bd3b9d5e3230f509dd17d171924a9505492d8a3a2a48b703ce5c56a677b67337cbfc8cfa722f2eada7f93915ee8ef106574202c8fc WHIRLPOOL 1828e770765b900329b0680f9da2d7633bc75076212fc148cebce7d208f59f20185f07a873508dadd1e14f559551359ef02c35219d7eedeadc9422ef4685eba5 +MISC metadata.xml 1806 SHA256 421b2a561d7853f7e1fe24347048417973d07415cf8960ab98141fe5f8da72ee SHA512 7717a3e172f56cdac0c6716e2c776578fc5e5ee35dad288c605d28034eca54049414e7450d9b2a7d17869f3cdd0da41f61e407c5cd52fef2f3fa225e3e99133f WHIRLPOOL 1cfe5761f0a78064efa29b98b5e0a957cc7eadd39c6ef1bc33d1fb07aa5ee5e4fe15227d2956ef8d765229c3c0c3d9a4edcd9fd4e1ee7ee3b3d564d74fe90dbf diff --git a/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild new file mode 100644 index 000000000000..b51969ee713f --- /dev/null +++ b/sci-mathematics/cvc3/cvc3-2.4.1-r1.ebuild @@ -0,0 +1,141 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI=6 + +inherit elisp-common + +DESCRIPTION="CVC3 is a theorem prover for Satisfiability Modulo Theories (SMT) problems" +HOMEPAGE="http://www.cs.nyu.edu/acsys/cvc3/index.html" +SRC_URI="http://www.cs.nyu.edu/acsys/cvc3/releases/2.4.1/${P}.tar.gz" + +LICENSE="BSD MIT HPND zchaff? ( zchaff )" +RESTRICT="mirror zchaff? ( bindist )" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="doc emacs isabelle test zchaff" + +RDEPEND="dev-libs/gmp:0= + isabelle? ( >=sci-mathematics/isabelle-2011.1-r1:= )" +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) + emacs? ( + virtual/emacs + )" + +SITEFILE="50${PN}-gentoo.el" + +PATCHES=( "${FILESDIR}/${P}-gccv6-fix.patch" ) + +src_prepare() { + default + + sed -e 's#prefix=@prefix@#prefix=$(patsubst %/,%,$(DESTDIR))@prefix@#' \ + -e 's#libdir=@libdir@#libdir=$(patsubst %/,%,$(DESTDIR))@libdir@#' \ + -e 's#mandir=@mandir@#mandir=$(patsubst %/,%,$(DESTDIR))@mandir@#' \ + -i "${S}/Makefile.local.in" \ + || die "Could not set DESTDIR in Makefile.local.in" +} + +src_configure() { + # --enable-static disables building of shared libraries, statically + # links /usr/bin/cvc3 and installs static libraries. + # --enable-static --enable-sharedlibs behaves the same as just --enable-static + econf \ + --enable-dynamic \ + $(use_enable zchaff) + + if use test; then + sed -e 's@LD_LIBS = @LD_LIBS = -L'"${S}"'/lib -Wl,-R'"${S}"'/lib @' \ + -i "${S}/test/Makefile" \ + || die "Could not set library paths in test/Makefile" + fi +} + +src_compile() { + emake + + use doc && emake -C doc + + if use emacs; then + pushd emacs >/dev/null || die + elisp-compile *.el || die "emacs elisp compile failed" + popd >/dev/null || die + fi + + use test && emake -C test +} + +src_test() { + pushd test >/dev/null || die + ./bin/test || die "Testsuite failed" + popd >/dev/null || die +} + +src_install() { + use doc && local HTML_DOCS=( doc/html/*.{html,gif,png,css} ) + default + + if use emacs; then + elisp-install ${PN} emacs/*.{el,elc} + cp "${FILESDIR}"/${SITEFILE} "${S}" || die "Failed to copy Emacs files" + elisp-site-file-install ${SITEFILE} + fi + + if use isabelle; then + ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \ + || die "isabelle getenv ISABELLE_HOME failed" + [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty" + dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + cat >> settings <<- EOF || die "Failed to create Isabelle configuration for CVC3" + CVC3_COMPONENT="\$COMPONENT" + CVC3_HOME="${EPREFIX}/usr/bin" + CVC3_SOLVER="\$CVC3_HOME/cvc3" + CVC3_REMOTE_SOLVER="cvc3" + CVC3_INSTALLED="yes" + EOF + insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + doins settings + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen + if use isabelle; then + if [[ -f "${EROOT%/}/etc/isabelle/components" ]]; then + if egrep "contrib/${PN}-[0-9.]*" "${EROOT%/}/etc/isabelle/components"; then + sed -e "/contrib\/${PN}-[0-9.]*/d" \ + -i "${EROOT%/}/etc/isabelle/components" || die "Failed to remove old CVC3 registrations in Isabelle" + fi + cat >> "${EROOT%/}/etc/isabelle/components" <<- EOF || die "Failed to register CVC3 with Isabelle" + contrib/${PN}-${PV} + EOF + fi + fi + if use zchaff; then + einfo "This copy of CVC3 is also configured to use the SAT solver zchaff whose" + einfo "copyright is owned by Princeton University and is more restrictive." + einfo "Specifically, it may be used for internal, noncommercial, research purposes" + einfo "only. See the copyright notices from the zchaff source files which are" + einfo "included in the LICENSE file." + einfo "To build CVC3 without these files, please build cvc3 without the zchaff" + einfo "use flag (note: zchaff is disabled by default):" + einfo "USE=-zchaff emerge sci-mathemathematics/cvc3" + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen + if use isabelle; then + if [[ ! -f "${EROOT%/}/usr/bin/cvc3" && -f "${EROOT%/}/etc/isabelle/components" ]]; then + # Note: this sed should only match the version of this ebuild + # Which is what we want as we do not want to remove the line + # of a new CVC3 being installed during an upgrade. + sed -e "/contrib\/${PN}-${PV}/d" \ + -i "${EROOT%/}/etc/isabelle/components" || die "Failed to unregister CVC3 from Isabelle" + fi + fi +} diff --git a/sci-mathematics/cvc3/cvc3-2.4.1.ebuild b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild new file mode 100644 index 000000000000..4352e6377d2c --- /dev/null +++ b/sci-mathematics/cvc3/cvc3-2.4.1.ebuild @@ -0,0 +1,156 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 + +EAPI="5" + +inherit elisp-common + +DESCRIPTION="CVC3 is a theorem prover for Satisfiability Modulo Theories (SMT) problems" +HOMEPAGE="http://www.cs.nyu.edu/acsys/cvc3/index.html" +SRC_URI="http://www.cs.nyu.edu/acsys/cvc3/releases/2.4.1/${P}.tar.gz" + +LICENSE="BSD MIT HPND zchaff? ( zchaff )" +RESTRICT="mirror zchaff? ( bindist )" +SLOT="0/${PV}" +KEYWORDS="~amd64 ~x86" +IUSE="doc emacs isabelle test zchaff" + +RDEPEND="dev-libs/gmp:0= + isabelle? ( + >=sci-mathematics/isabelle-2011.1-r1:= + )" +DEPEND="${RDEPEND} + doc? ( + app-doc/doxygen + media-gfx/graphviz + ) + emacs? ( + virtual/emacs + )" + +SITEFILE=50${PN}-gentoo.el + +src_prepare() { + sed -e 's#prefix=@prefix@#prefix=$(patsubst %/,%,$(DESTDIR))@prefix@#' \ + -e 's#libdir=@libdir@#libdir=$(patsubst %/,%,$(DESTDIR))@libdir@#' \ + -e 's#mandir=@mandir@#mandir=$(patsubst %/,%,$(DESTDIR))@mandir@#' \ + -i "${S}/Makefile.local.in" \ + || die "Could not set DESTDIR in Makefile.local.in" +} + +src_configure() { + # --enable-static disables building of shared libraries, statically + # links /usr/bin/cvc3 and installs static libraries. + # --enable-static --enable-sharedlibs behaves the same as just --enable-static + econf \ + --enable-dynamic \ + $(use_enable zchaff) + + if use test; then + sed -e 's@LD_LIBS = @LD_LIBS = -L'"${S}"'/lib -Wl,-R'"${S}"'/lib @' \ + -i "${S}/test/Makefile" \ + || die "Could not set library paths in test/Makefile" + fi +} + +src_compile() { + emake + + if use doc; then + pushd doc || die "Could not cd to doc" + emake + popd + fi + + if use emacs ; then + pushd "${S}/emacs" || die "Could change directory to emacs" + elisp-compile *.el || die "emacs elisp compile failed" + popd + fi + + if use test; then + pushd test || die "Could not cd to test" + emake + popd + fi +} + +src_test() { + pushd test || die "Could not cd to test" + ./bin/test || die "tests failed" + popd +} + +src_install() { + emake DESTDIR="${D}" install + + if use doc; then + pushd "${S}"/doc/html || die "Could not cd to doc/html" + dohtml *.html + insinto /usr/share/doc/${PF}/html + doins *.css *.gif *.png + popd + fi + + if use emacs ; then + elisp-install ${PN} emacs/*.{el,elc} + cp "${FILESDIR}"/${SITEFILE} "${S}" + elisp-site-file-install ${SITEFILE} + fi + + if use isabelle; then + ISABELLE_HOME="$(isabelle getenv ISABELLE_HOME | cut -d'=' -f 2)" \ + || die "isabelle getenv ISABELLE_HOME failed" + [[ -n "${ISABELLE_HOME}" ]] || die "ISABELLE_HOME empty" + dodir "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + cat <<- EOF >> "${S}/settings" + CVC3_COMPONENT="\$COMPONENT" + CVC3_HOME="${ROOT}usr/bin" + CVC3_SOLVER="\$CVC3_HOME/cvc3" + CVC3_REMOTE_SOLVER="cvc3" + CVC3_INSTALLED="yes" + EOF + insinto "${ISABELLE_HOME}/contrib/${PN}-${PV}/etc" + doins "${S}/settings" + fi +} + +pkg_postinst() { + use emacs && elisp-site-regen + if use isabelle; then + if [ -f "${ROOT}etc/isabelle/components" ]; then + if egrep "contrib/${PN}-[0-9.]*" "${ROOT}etc/isabelle/components"; then + sed -e "/contrib\/${PN}-[0-9.]*/d" \ + -i "${ROOT}etc/isabelle/components" + fi + cat <<- EOF >> "${ROOT}etc/isabelle/components" + contrib/${PN}-${PV} + EOF + fi + fi + if use zchaff; then + einfo "This copy of CVC3 is also configured to use the SAT solver zchaff whose" + einfo "copyright is owned by Princeton University and is more restrictive." + einfo "Specifically, it may be used for internal, noncommercial, research purposes" + einfo "only. See the copyright notices from the zchaff source files which are" + einfo "included in the LICENSE file." + einfo "To build CVC3 without these files, please build cvc3 without the zchaff" + einfo "use flag (note: zchaff is disabled by default):" + einfo "USE=-zchaff emerge sci-mathemathematics/cvc3" + fi +} + +pkg_postrm() { + use emacs && elisp-site-regen + if use isabelle; then + if [ ! -f "${ROOT}usr/bin/cvc3" ]; then + if [ -f "${ROOT}etc/isabelle/components" ]; then + # Note: this sed should only match the version of this ebuild + # Which is what we want as we do not want to remove the line + # of a new CVC3 being installed during an upgrade. + sed -e "/contrib\/${PN}-${PV}/d" \ + -i "${ROOT}etc/isabelle/components" + fi + fi + fi +} diff --git a/sci-mathematics/cvc3/files/50cvc3-gentoo.el b/sci-mathematics/cvc3/files/50cvc3-gentoo.el new file mode 100644 index 000000000000..8e046edf7ad1 --- /dev/null +++ b/sci-mathematics/cvc3/files/50cvc3-gentoo.el @@ -0,0 +1,3 @@ +(add-to-list 'load-path "@SITELISP@") +(add-to-list 'auto-mode-alist '("\\.cvc\\'" . cvc-mode)) +(autoload 'cvc-mode "cvc-mode" "CVC specifications editing mode." t) diff --git a/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch new file mode 100644 index 000000000000..1fb3516b8c27 --- /dev/null +++ b/sci-mathematics/cvc3/files/cvc3-2.4.1-gccv6-fix.patch @@ -0,0 +1,76 @@ +commit 4eb28b907e89be05d92eb704115f821b9b848e60 +Author: Matthew Dawson <matthew@mjdsystems.ca> +Date: Sun Oct 16 22:06:03 2016 -0400 + + Fix gcc v6 compile failures. + + * Use std::hash<const char*> over std::hash<char *>, as throwing away the const is not allowed. + * Use Hash::hash by default in CDMap over std::hash, to get Hash::hash<CVC3::expr> + +diff --git a/src/expr/expr_value.cpp b/src/expr/expr_value.cpp +index 0c85ff6..e4dd251 100644 +--- a/src/expr/expr_value.cpp ++++ b/src/expr/expr_value.cpp +@@ -29,7 +29,7 @@ namespace CVC3 { + // Class ExprValue static members + //////////////////////////////////////////////////////////////////////// + +-std::hash<char*> ExprValue::s_charHash; ++std::hash<const char*> ExprValue::s_charHash; + std::hash<long int> ExprValue::s_intHash; + + //////////////////////////////////////////////////////////////////////// +diff --git a/src/include/cdmap.h b/src/include/cdmap.h +index faf682a..c3b094c 100644 +--- a/src/include/cdmap.h ++++ b/src/include/cdmap.h +@@ -43,9 +43,9 @@ namespace CVC3 { + // Auxiliary class: almost the same as CDO (see cdo.h), but on + // setNull() call it erases itself from the map. + +-template <class Key, class Data, class HashFcn = std::hash<Key> > class CDMap; ++template <class Key, class Data, class HashFcn = Hash::hash<Key> > class CDMap; + +-template <class Key, class Data, class HashFcn = std::hash<Key> > ++template <class Key, class Data, class HashFcn = Hash::hash<Key> > + class CDOmap :public ContextObj { + Key d_key; + Data d_data; +diff --git a/src/include/expr_hash.h b/src/include/expr_hash.h +index b2107d7..baa2eab 100644 +--- a/src/include/expr_hash.h ++++ b/src/include/expr_hash.h +@@ -20,7 +20,6 @@ + * hash_set over Expr class. + */ + /*****************************************************************************/ +- + #ifndef _cvc3__expr_h_ + #include "expr.h" + #endif +diff --git a/src/include/expr_value.h b/src/include/expr_value.h +index 95102b2..f53aa4d 100644 +--- a/src/include/expr_value.h ++++ b/src/include/expr_value.h +@@ -179,7 +179,7 @@ protected: + // Static hash functions. They don't depend on the context + // (ExprManager and such), so it is still thread-safe to have them + // static. +- static std::hash<char*> s_charHash; ++ static std::hash<const char*> s_charHash; + static std::hash<long int> s_intHash; + + static size_t pointerHash(void* p) { return s_intHash((long int)p); } +diff --git a/src/theory_core/theory_core.cpp b/src/theory_core/theory_core.cpp +index df5289f..37ccab9 100644 +--- a/src/theory_core/theory_core.cpp ++++ b/src/theory_core/theory_core.cpp +@@ -710,7 +710,7 @@ TheoryCore::TheoryCore(ContextManager* cm, + // d_termTheorems(cm->getCurrentContext()), + d_predicates(cm->getCurrentContext()), + d_solver(NULL), +- d_simplifyInPlace(false), ++ d_simplifyInPlace(NULL), + d_currentRecursiveSimplifier(NULL), + d_resourceLimit(0), + d_timeBase(0), diff --git a/sci-mathematics/cvc3/metadata.xml b/sci-mathematics/cvc3/metadata.xml new file mode 100644 index 000000000000..cb6781b3e6dd --- /dev/null +++ b/sci-mathematics/cvc3/metadata.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> +<maintainer type="person"> + <email>gienah@gentoo.org</email> + <name>Mark Wright</name> +</maintainer> +<maintainer type="project"> + <email>sci-mathematics@gentoo.org</email> + <name>Gentoo Mathematics Project</name> +</maintainer> +<longdescription lang="en"> +CVC3 is an automatic theorem prover for Satisfiability Modulo Theories +(SMT) problems. It can be used to prove the validity (or, dually, the +satisfiability) of first-order formulas in a large number of built-in +logical theories and their combination. + +CVC3 is the last offspring of a series of popular SMT provers, which +originated at Stanford University with the SVC system. In particular, +it builds on the code base of CVC Lite, its most recent +predecessor. Its high level design follows that of the Sammy prover. + +CVC3 works with a version of first-order logic with polymorphic types +and has a wide variety of features including: + + several built-in base theories: rational and integer linear + arithmetic, arrays, tuples, records, inductive data types, bit + vectors, and equality over uninterpreted function symbols; + support for quantifiers; + an interactive text-based interface; + a rich C and C++ API for embedding in other systems; + proof and model generation abilities; + predicate subtyping; + essentially no limit on its use for research or commercial + purposes (see license). +</longdescription> +<use> + <flag name="isabelle">Add integration support for the Isabelle/HOL + theorem prover.</flag> + <flag name="zchaff">Use the SAT solver zchaff whose copyright is + owned by Princeton University and is more restrictive (see zchaff + license). + </flag> +</use> +</pkgmetadata> |