{
"info": {
"author": "Wannes Meert, Arthur Choi",
"author_email": "wannes.meert@cs.kuleuven.be",
"bugtrack_url": null,
"classifiers": [
"Intended Audience :: Developers",
"License :: OSI Approved :: Apache Software License",
"Programming Language :: Python :: 3",
"Topic :: Scientific/Engineering :: Artificial Intelligence"
],
"description": "=====\nPySDD\n=====\n\nPython wrapper package to interactively use `Sententical Decision Diagrams (SDD) `_.\n\nFull documentation available on http://pysdd.readthedocs.io.\n\n------------\nDependencies\n------------\n\n* Python >=3.6\n* Cython\n\nOptional:\n\n* cysignals\n* numpy\n\nMake sure to have the correct development tools installed:\n\n* C compiler (see `Installing Cython `_)\n* The Python development version that includes Python header files and static library (e.g. libpython3-dev, python-dev, ...)\n\n------------\nInstallation\n------------\n\n.. code-block:: shell\n\n $ pip install PySDD\n\n\n--------------\nPython package\n--------------\n\nThe wrapper can be used as a Python package and allows for interactive use.\n\nThe following example builds an SDD for the formula ``a\u2227b \u2228 b\u2227c \u2228 c\u2227d``.\n\n.. code-block:: python\n\n from pysdd.sdd import SddManager, Vtree, WmcManager\n vtree = Vtree(var_count=4, var_order=[2,1,4,3], vtree_type=\"balanced\")\n sdd = SddManager.from_vtree(vtree)\n a, b, c, d = sdd.vars\n\n # Build SDD for formula\n formula = (a & b) | (b & c) | (c & d)\n\n # Model Counting\n wmc = formula.wmc(log_mode=False)\n print(f\"Model Count: {wmc.propagate()}\")\n wmc.set_literal_weight(a, 0.5)\n print(f\"Weighted Model Count: {wmc.propagate()}\")\n\n # Visualize SDD and Vtree\n with open(\"output/sdd.dot\", \"w\") as out:\n print(formula.dot(), file=out)\n with open(\"output/vtree.dot\", \"w\") as out:\n print(vtree.dot(), file=out)\n\nThe SDD and Vtree are visualized using Graphviz DOT:\n\n.. image:: https://people.cs.kuleuven.be/wannes.meert/pysdd/sdd.png\n.. image:: https://people.cs.kuleuven.be/wannes.meert/pysdd/vtree.png\n\n\n\nMore examples are available in the ``examples`` directory.\nAn interactive Jupyter notebook is available in\n`notebooks/examples.ipynb `_\n\n\n----------------------\nCommand Line Interface\n----------------------\n\nA Python CLI application is installed if you use pip, ``pysdd``. Or it can be used\ndirectly from the source directory where it is called ``pysdd-cli.py``.\nThis script mimicks the original sdd binary and adds additional features (e.g. weighted model counting)\n\n.. code-block:: shell\n\n $ pysdd -h\n $ ./pysdd-cli.py -h\n usage: pysdd-cli.py [-h] [-c FILE | -d FILE | -s FILE] [-v FILE] [-W FILE]\n [-V FILE] [-R FILE] [-S FILE] [-m] [-t TYPE] [-r K] [-q]\n [-p] [--log_mode]\n\n Sentential Decision Diagram, Compiler\n\n optional arguments:\n -h, --help show this help message and exit\n -c FILE set input CNF file\n -d FILE set input DNF file\n -s FILE set input SDD file\n -v FILE set input VTREE file\n -W FILE set output VTREE file\n -V FILE set output VTREE (dot) file\n -R FILE set output SDD file\n -S FILE set output SDD (dot) file\n -m minimize the cardinality of compiled sdd\n -t TYPE set initial vtree type (left/right/vertical/balanced/random)\n -r K if K>0: invoke vtree search every K clauses. If K=0: disable\n vtree search. By default (no -r option), dynamic vtree search is\n enabled\n -q perform post-compilation vtree search\n -p verbose output\n --log_mode weights in log\n\n Weighted Model Counting is performed if the NNF file containts a line\n formatted as follows: \"c weights PW_1 NW_1 ... PW_n NW_n\".\n\n\n-----------------\nMemory management\n-----------------\n\nPython's memory management is not used for the internal datastructures.\nUse the SDD library's garbage collection commands (e.g. ref, deref) to\nperform memory management.\n\n\n-----------------------\nCompilation from source\n-----------------------\n\n.. code-block:: shell\n\n $ pip install git+https://github.com/wannesm/PySDD.git#egg=PySDD\n\nThe repository should contain all the required files and libraries (unless\nyou use Windows). If you want to compile from source, note that some c-source\nfiles from the SDD package have been updated to work with this wrapper and are\nincluded in this repository. Do not overwrite these new files with the original\nfiles.\n\n* Download the SDD package from http://reasoning.cs.ucla.edu/sdd/.\n* Install the SDD package in the PySDD package in directories\n ``pysdd/lib/sdd-2.0`` and ``pysdd/lib/sddlib-2.0`` without overwriting\n the already available files.\n* Run ``python3 setup.py build_ext --inplace`` or ``make build`` to compile the\n library in the current directory. If you want to install the library such\n that the library is available for your local installation or in your virtual\n environment, use ``python3 setup.py install``.\n\nFor some Linux platforms, it might be necessary to recompile the libsdd-2.0 code with\nthe gcc option ``-fPIC`` and replace the ``pysdd/lib/sdd-2.0/lib/Linux/libsdd.a``\nlibrary with your newly compiled version.\n\nThe Windows platform is not supported. There is some initial support but we cannot\noffer guarantees or detailed instructions (but are happy to accept pull requests).\n\n\n----------\nReferences\n----------\n\nThis package is inspired by the SDD wrapper used in the probabilistic\nprogramming language `ProbLog `_.\n\nReferences:\n\n* Wannes Meert, PySDD,\n in `Recent Trends in Knowledge Compilation\n `_,\n Report from Dagstuhl Seminar 17381, Sep 2017.\n Eds. A. Darwiche, P. Marquis, D. Suciu, S. Szeider.\n\nOther languages:\n\n* C: http://reasoning.cs.ucla.edu/sdd/\n* Java: https://github.com/jessa/JSDD\n\n\n-------\nContact\n-------\n\n* Wannes Meert, KU Leuven, https://people.cs.kuleuven.be/wannes.meert\n* Arthur Choi, UCLA, http://web.cs.ucla.edu/~aychoi/\n\n\n-------\nLicense\n-------\n\nPython SDD wrapper:\n\nCopyright 2017-2018, KU Leuven and Regents of the University of California.\nLicensed under the Apache License, Version 2.0.\n\n\nSDD package:\n\nCopyright 2013-2018, Regents of the University of California\nLicensed under the Apache License, Version 2.0.",
"description_content_type": "",
"docs_url": null,
"download_url": "",
"downloads": {
"last_day": -1,
"last_month": -1,
"last_week": -1
},
"home_page": "https://github.com/wannesm/PySDD",
"keywords": "sdd,knowledge compilation",
"license": "Apache 2.0",
"maintainer": "",
"maintainer_email": "",
"name": "PySDD",
"package_url": "https://pypi.org/project/PySDD/",
"platform": "",
"project_url": "https://pypi.org/project/PySDD/",
"project_urls": {
"Homepage": "https://github.com/wannesm/PySDD",
"PySDD documentation": "http://pysdd.readthedocs.io/en/latest/",
"PySDD source": "https://github.com/wannesm/PySDD"
},
"release_url": "https://pypi.org/project/PySDD/0.2.9/",
"requires_dist": null,
"requires_python": ">=3.6",
"summary": "Sentential Decision Diagrams",
"version": "0.2.9"
},
"last_serial": 5457510,
"releases": {
"0.2.0": [
{
"comment_text": "",
"digests": {
"md5": "6d5270fa77c24be40fe764ffb875fe18",
"sha256": "2081430c0e198af93e8ebb8e6324ae0a8ba5589e39963a4abd732b49370cde31"
},
"downloads": -1,
"filename": "PySDD-0.2.0-cp36-cp36m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "6d5270fa77c24be40fe764ffb875fe18",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": ">=3.6",
"size": 989965,
"upload_time": "2018-04-21T22:10:05",
"url": "https://files.pythonhosted.org/packages/b8/58/ec6cf914099c1537e014fa9f54ca480c12666cf0a96e48323918eff41a67/PySDD-0.2.0-cp36-cp36m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2683aa7f8992ceedce1ae9948eb1bff9",
"sha256": "afb4ffc7e14f01c48ed4aeab5caee98a4b0b75e9331d110e32462c8f0d5200ff"
},
"downloads": -1,
"filename": "PySDD-0.2.0.tar.gz",
"has_sig": false,
"md5_digest": "2683aa7f8992ceedce1ae9948eb1bff9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 933231,
"upload_time": "2018-04-21T22:10:09",
"url": "https://files.pythonhosted.org/packages/35/e7/51eef5442bb71cc2e3c542cfe8c5892092a1073878354365e72f9e790dcc/PySDD-0.2.0.tar.gz"
}
],
"0.2.1": [
{
"comment_text": "",
"digests": {
"md5": "ce8158309195cfc580cd2515fb61c72b",
"sha256": "9079a25afa1b9a8e628d4827d3dceba9823e3913708b0ef829b0860d0304670a"
},
"downloads": -1,
"filename": "PySDD-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "ce8158309195cfc580cd2515fb61c72b",
"packagetype": "bdist_wheel",
"python_version": "cp36",
"requires_python": ">=3.6",
"size": 1054531,
"upload_time": "2018-07-02T21:15:14",
"url": "https://files.pythonhosted.org/packages/8e/21/d781cd01a05c7a30480f62614307631dcb1eaa841ca5aa191c01b6c9a893/PySDD-0.2.1-cp36-cp36m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "6c67ddd29a9a4293172a5cd60888c1da",
"sha256": "52c0b111521b645c2a2e9a973e0727bbd6ff21edb8416a85ba878c4439f89afe"
},
"downloads": -1,
"filename": "PySDD-0.2.1.tar.gz",
"has_sig": false,
"md5_digest": "6c67ddd29a9a4293172a5cd60888c1da",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 996168,
"upload_time": "2018-07-02T21:15:17",
"url": "https://files.pythonhosted.org/packages/63/23/298814d40ed08b4af76b44dd7ba35e56f6ecf185a687e290ed005c3691bb/PySDD-0.2.1.tar.gz"
}
],
"0.2.2": [
{
"comment_text": "",
"digests": {
"md5": "39944436f6039972bfcadd886f03db9c",
"sha256": "70c8b86059cd2cbaad341c30c49ad6a6d751ef6cb1372fa7cbbf51fe1bea3cbb"
},
"downloads": -1,
"filename": "PySDD-0.2.2-cp37-cp37m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "39944436f6039972bfcadd886f03db9c",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 1349244,
"upload_time": "2019-01-22T23:49:35",
"url": "https://files.pythonhosted.org/packages/0f/79/799a89e76e4da3b43836f722dd29e3ed0bc41b2f290588f42866cdd6e2d1/PySDD-0.2.2-cp37-cp37m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "82d01944b170290c6169650bcd519caf",
"sha256": "68204f73b3c1162c3b94e92ded5dfafd92a9b73798c664899d5d042b2f8a5ed2"
},
"downloads": -1,
"filename": "PySDD-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "82d01944b170290c6169650bcd519caf",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1285766,
"upload_time": "2019-01-22T23:49:42",
"url": "https://files.pythonhosted.org/packages/cb/3b/7c0a401571993550d9e40c2574b65207153228e975b8e314cfbcb52c1791/PySDD-0.2.2.tar.gz"
}
],
"0.2.3": [
{
"comment_text": "",
"digests": {
"md5": "3e6f1c1371c0f25813bb999ba29d5f88",
"sha256": "a0d0045c66a249c2adc425ebbd68682c25b6499962a7f786a5924721cc1f3596"
},
"downloads": -1,
"filename": "PySDD-0.2.3-cp37-cp37m-macosx_10_13_x86_64.whl",
"has_sig": false,
"md5_digest": "3e6f1c1371c0f25813bb999ba29d5f88",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 1349244,
"upload_time": "2019-01-22T23:56:02",
"url": "https://files.pythonhosted.org/packages/b5/96/36c0be5fbc665a3a966e9d676ec982da21e777a9c03397b003936e521c6d/PySDD-0.2.3-cp37-cp37m-macosx_10_13_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "67f65c0bf0635edfe8c8f03dc08b0015",
"sha256": "15b8770f73bf7ca76f5239ca65c7d299232ab8f73afecaee2385f71da1d53a5a"
},
"downloads": -1,
"filename": "PySDD-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "67f65c0bf0635edfe8c8f03dc08b0015",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1285776,
"upload_time": "2019-01-22T23:56:05",
"url": "https://files.pythonhosted.org/packages/73/69/8de919c5da9f5c7c050b0c4880bc2bebdb6fecb028c7a207e340b2b0f1a5/PySDD-0.2.3.tar.gz"
}
],
"0.2.4": [
{
"comment_text": "",
"digests": {
"md5": "6daca4993cedf3305267480e41ed7294",
"sha256": "be6fcad037e84b6f68b0d1fe933b543369de5b455c0a4bce57733e8b0259eaf6"
},
"downloads": -1,
"filename": "PySDD-0.2.4-cp37-cp37m-macosx_10_14_x86_64.whl",
"has_sig": false,
"md5_digest": "6daca4993cedf3305267480e41ed7294",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 1639909,
"upload_time": "2019-04-09T08:26:47",
"url": "https://files.pythonhosted.org/packages/3b/7a/5d18408b0ead3a20e96fa108d49480546160f3386602463d75013d7801a5/PySDD-0.2.4-cp37-cp37m-macosx_10_14_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "94bc839c0d27a9841fd4b533792f1f46",
"sha256": "e815fd504ebdcec546c62a2d8080a0986dc0d1e5ae5ab743437be43496aba274"
},
"downloads": -1,
"filename": "PySDD-0.2.4.tar.gz",
"has_sig": false,
"md5_digest": "94bc839c0d27a9841fd4b533792f1f46",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1563047,
"upload_time": "2019-04-09T08:26:50",
"url": "https://files.pythonhosted.org/packages/49/14/b5e1827291caf6a76b089c145d3e060d8b93cccf1ce1a35a04835445f041/PySDD-0.2.4.tar.gz"
}
],
"0.2.5": [
{
"comment_text": "",
"digests": {
"md5": "9ea9fae04d513f84b83473a81e102202",
"sha256": "a903570e401bb76099fa5c2a12fa39e2518becffa9d5006b10229d14ca62c099"
},
"downloads": -1,
"filename": "PySDD-0.2.5-cp37-cp37m-macosx_10_14_x86_64.whl",
"has_sig": false,
"md5_digest": "9ea9fae04d513f84b83473a81e102202",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 1639908,
"upload_time": "2019-04-12T14:54:09",
"url": "https://files.pythonhosted.org/packages/8d/a4/08fdc96db749ca1de792b7af6721eecd8ebe4f600e316b2b5105217c2f59/PySDD-0.2.5-cp37-cp37m-macosx_10_14_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "2760ad00977e8330e1f119b46a4ee4f6",
"sha256": "a7b4e034ab2fe98b82fe99b1affd8e98fbc39070ae05e231396f992019f07cb9"
},
"downloads": -1,
"filename": "PySDD-0.2.5.tar.gz",
"has_sig": false,
"md5_digest": "2760ad00977e8330e1f119b46a4ee4f6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1569087,
"upload_time": "2019-04-12T14:54:11",
"url": "https://files.pythonhosted.org/packages/38/a6/1815712b060b2dd69d1b2a5e119cde99dc0af71ce32352bb25dcd793e376/PySDD-0.2.5.tar.gz"
}
],
"0.2.6": [
{
"comment_text": "",
"digests": {
"md5": "cc307f923b3ac29818618e2a502e2102",
"sha256": "dbe9d29ba2ccd4b3ba5fbb1beaa4265bba5d84e7163f6a052b23d7ac74560b14"
},
"downloads": -1,
"filename": "PySDD-0.2.6-cp37-cp37m-macosx_10_14_x86_64.whl",
"has_sig": false,
"md5_digest": "cc307f923b3ac29818618e2a502e2102",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": ">=3.6",
"size": 1640505,
"upload_time": "2019-04-13T11:18:33",
"url": "https://files.pythonhosted.org/packages/b3/f0/e3e315b8d76c0a659e1aac2024a53c0ec73f7d618e38d81b66909fb87aac/PySDD-0.2.6-cp37-cp37m-macosx_10_14_x86_64.whl"
},
{
"comment_text": "",
"digests": {
"md5": "3aedc79ad034666a12ff6d6fe60ec30d",
"sha256": "31d7bc42dcea7cbe4850970669d8f6ba08a3be24f489519c20e526645f70e2d3"
},
"downloads": -1,
"filename": "PySDD-0.2.6.tar.gz",
"has_sig": false,
"md5_digest": "3aedc79ad034666a12ff6d6fe60ec30d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1569578,
"upload_time": "2019-04-13T11:18:37",
"url": "https://files.pythonhosted.org/packages/03/c9/ff5154a8db0fab46ae6e24a00faa237bae0add44eb678862b798fb1cfba7/PySDD-0.2.6.tar.gz"
}
],
"0.2.7": [
{
"comment_text": "",
"digests": {
"md5": "0025b946c80fa58ff7c8270756b7ff52",
"sha256": "1b09b63e16cee960634c6f7688ce8b75e32674067e62f888f5dc3f78e4fb81db"
},
"downloads": -1,
"filename": "PySDD-0.2.7.tar.gz",
"has_sig": false,
"md5_digest": "0025b946c80fa58ff7c8270756b7ff52",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1569628,
"upload_time": "2019-04-25T11:26:24",
"url": "https://files.pythonhosted.org/packages/c2/93/93784dfa65023005d02dddc76419aef90e09bfd3df39a3c56416175949ab/PySDD-0.2.7.tar.gz"
}
],
"0.2.8": [
{
"comment_text": "",
"digests": {
"md5": "18280bd20c51c04d2683031e0921cbda",
"sha256": "e6b219235871a0d57cf8e1c3cf4dd7ac6151ae5501e45d12c0982e4aad9c9180"
},
"downloads": -1,
"filename": "PySDD-0.2.8.tar.gz",
"has_sig": false,
"md5_digest": "18280bd20c51c04d2683031e0921cbda",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 1569675,
"upload_time": "2019-04-25T15:56:06",
"url": "https://files.pythonhosted.org/packages/f8/22/11837147dcf1bf74c127084c495746403611388fdd2170c7905385524017/PySDD-0.2.8.tar.gz"
}
],
"0.2.9": [
{
"comment_text": "",
"digests": {
"md5": "ebd91a12d68c350c00071388a9c6603b",
"sha256": "db8ad98ea2f2eb0d13583bb2160666312acf991c65b57d976b13d966b0049bd0"
},
"downloads": -1,
"filename": "PySDD-0.2.9.tar.gz",
"has_sig": false,
"md5_digest": "ebd91a12d68c350c00071388a9c6603b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3748606,
"upload_time": "2019-06-27T15:37:46",
"url": "https://files.pythonhosted.org/packages/c4/cc/efe22a49e83c0e8296240eea447a0c0b69669b566bafc6f50d1bf1741dd5/PySDD-0.2.9.tar.gz"
}
]
},
"urls": [
{
"comment_text": "",
"digests": {
"md5": "ebd91a12d68c350c00071388a9c6603b",
"sha256": "db8ad98ea2f2eb0d13583bb2160666312acf991c65b57d976b13d966b0049bd0"
},
"downloads": -1,
"filename": "PySDD-0.2.9.tar.gz",
"has_sig": false,
"md5_digest": "ebd91a12d68c350c00071388a9c6603b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 3748606,
"upload_time": "2019-06-27T15:37:46",
"url": "https://files.pythonhosted.org/packages/c4/cc/efe22a49e83c0e8296240eea447a0c0b69669b566bafc6f50d1bf1741dd5/PySDD-0.2.9.tar.gz"
}
]
}