{ "info": { "author": "Jesse Myers", "author_email": "", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 3.7" ], "description": "# pluscal\n\n[PlusCal][1] AST and builder in Python\n\n [1]: https://lamport.azurewebsites.net/tla/p-manual.pdf\n\n\n## What Is This?\n\n`PlusCal` is an algorithm language that compiles into a `TLA+` specification. This library defines\n*Python types* that form an abstract syntax tree (AST) of the `PlusCal` P-Syntax grammar as well as\na *builder* API for fluently constructing algorithms. The implementation leans heavily on Python\n`dataclasses` and type-hinting; a type checker (e.g. `mypy`) can be used to validate the grammar.\n\nIt is anticipated that this library will be used both by humans and by programs to construct grammatically\ncorrect specifications and run them through the TLC model checker.\n\n\n## Usage\n\nInstall from pip:\n\n pip install pluscal\n\nCreate an algorithm:\n\n```python\n>>> from pluscal.api import Algorithm, Print, Variable\n\n>>> algorithm = Algorithm(\n \"hello_world\",\n).declare(\n Variable(\"s\").in_set(\"Hello\", \"World!\"),\n).do(\n Print(\"s\", label=\"A\"),\n)\n\n>>> print(algorithm)\n--algorithm hello_world\nvariable s \\in {\"Hello\", \"World!\"};\nbegin\n A:\n print s;\nend algorithm\n```\n\n\n## Limitations\n\nThis library is not complete. Some known limitations include:\n\n 1. The lower-level `TLA+` grammar used by the `Expr`, `Field`, `Label`, `Name`, and `Variable` types\n are neither modeled nor validated fully. These types are essentially strings at this time.\n\n 2. The validation logic does not express the full nuances of `PlusCal`, especially as it relates to\n label placement.\n\n See section `3.7` of the PlusCal manual.\n\n 3. Some of the fainess operations are not yet yet implemented.\n\n See section `4.6` of the PlusCal manual.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/jessemyers/pluscal", "keywords": "PlusCal TLA+", "license": "Apache 2.0", "maintainer": "", "maintainer_email": "", "name": "pluscal", "package_url": "https://pypi.org/project/pluscal/", "platform": "", "project_url": "https://pypi.org/project/pluscal/", "project_urls": { "Homepage": "https://github.com/jessemyers/pluscal" }, "release_url": "https://pypi.org/project/pluscal/0.4.2/", "requires_dist": [ "bumpversion (>=0.5.3) ; extra == 'dist'", "pip (>=19.0.3) ; extra == 'dist'", "setuptools (>=40.8.0) ; extra == 'dist'", "twine (>=1.13.0) ; extra == 'dist'", "wheel (>=0.33.1) ; extra == 'dist'", "flake8 (>=3.7.7) ; extra == 'lint'", "flake8-isort (>=2.7.0) ; extra == 'lint'", "flake8-print (>=3.1.0) ; extra == 'lint'", "coverage (>=4.5.3) ; extra == 'test'", "nose (>=1.3.7) ; extra == 'test'", "PyHamcrest (>=1.9.0) ; extra == 'test'", "mypy (>=0.670.0) ; extra == 'typehinting'" ], "requires_python": ">=3.7", "summary": "PlusCal AST and builder in Python", "version": "0.4.2" }, "last_serial": 5146766, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "4ead523288d30cbbf1b25a0aed574fbb", "sha256": "46782cc2ccb4956d2db3c0b81f291443d841c232b8354ea6d62397665c29e5d0" }, "downloads": -1, "filename": "pluscal-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "4ead523288d30cbbf1b25a0aed574fbb", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.7", "size": 6661, "upload_time": "2019-03-22T18:05:33", "url": "https://files.pythonhosted.org/packages/d7/8f/e9ef7ee63fdace02d834b5b73910182ce028bdfb1b209ae7c7223dbf588b/pluscal-0.1.0-py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "44f1dc146036ec1e71ac2e0eabc70f9e", "sha256": "db6c3c57349d2388e57317c32d94a902eb10e08d9bd1d56daa13a6bf6bed74d6" }, "downloads": -1, "filename": "pluscal-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "44f1dc146036ec1e71ac2e0eabc70f9e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.7", "size": 27425, "upload_time": "2019-04-10T16:58:54", "url": "https://files.pythonhosted.org/packages/e8/2c/bbf29750f96ff54c33afc42a159dee59fa1f9126180dd0a0726ef6963833/pluscal-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "7a9b812aaf4322f49748b61098f6b79c", "sha256": "4230f41dd2324d713bf1000132482ad7a757ff7356e43f05339e87638d225ae9" }, "downloads": -1, "filename": "pluscal-0.2.0.tar.gz", "has_sig": false, "md5_digest": "7a9b812aaf4322f49748b61098f6b79c", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 10463, "upload_time": "2019-04-10T16:58:56", "url": "https://files.pythonhosted.org/packages/50/b5/9359375b2a3026acf7e25bc29d40a30c5eefe9c7952ffe4b235a17ec5e1b/pluscal-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "4dbf2a15b136bfd3779d78a5137b85d3", "sha256": "4c9af118e2abc4d957970372da7d89e162d34b0359b90ad0f11ef216109ddf98" }, "downloads": -1, "filename": "pluscal-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "4dbf2a15b136bfd3779d78a5137b85d3", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.7", "size": 30307, "upload_time": "2019-04-11T03:43:54", "url": "https://files.pythonhosted.org/packages/20/0f/728348cf1a6fafe22670c04a81154075b5874f283f5920a7a36a691325b7/pluscal-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "54004cb74158afb3b91e10710d64662f", "sha256": "350dd58c6102ce8dc63f364a6438c976147a8cb8b83291af11effdb9bbbb9bee" }, "downloads": -1, "filename": "pluscal-0.3.0.tar.gz", "has_sig": false, "md5_digest": "54004cb74158afb3b91e10710d64662f", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 11892, "upload_time": "2019-04-11T03:43:56", "url": "https://files.pythonhosted.org/packages/69/a9/1c72b5cedb14b42fe5335c373416817b676fa4ff0fed6692666ec66185aa/pluscal-0.3.0.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "2922bbe52249a9a81e819ef1c600660e", "sha256": "dc015083f8d1c9070abac394e2e2644689c60bf829c48b06b0d64e425eadceaf" }, "downloads": -1, "filename": "pluscal-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2922bbe52249a9a81e819ef1c600660e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.7", "size": 30853, "upload_time": "2019-04-15T20:59:58", "url": "https://files.pythonhosted.org/packages/fe/c6/da8abfef6943e085a6ec31b47f61b1515eb596846956a70d9473389fdf76/pluscal-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3ca983abf20c7fdc7439577f9c28e55", "sha256": "abe07ded72b331ba06b8ac33a3f87e864766758ab1b176b463774e07ada8d6ea" }, "downloads": -1, "filename": "pluscal-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e3ca983abf20c7fdc7439577f9c28e55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12296, "upload_time": "2019-04-15T20:59:59", "url": "https://files.pythonhosted.org/packages/a3/18/8b5ad29469f5ccbc4e540fc1d9cbeae0b718fc3791c916d8f7b98d4c254b/pluscal-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2922bbe52249a9a81e819ef1c600660e", "sha256": "dc015083f8d1c9070abac394e2e2644689c60bf829c48b06b0d64e425eadceaf" }, "downloads": -1, "filename": "pluscal-0.4.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "2922bbe52249a9a81e819ef1c600660e", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": ">=3.7", "size": 30853, "upload_time": "2019-04-15T20:59:58", "url": "https://files.pythonhosted.org/packages/fe/c6/da8abfef6943e085a6ec31b47f61b1515eb596846956a70d9473389fdf76/pluscal-0.4.2-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e3ca983abf20c7fdc7439577f9c28e55", "sha256": "abe07ded72b331ba06b8ac33a3f87e864766758ab1b176b463774e07ada8d6ea" }, "downloads": -1, "filename": "pluscal-0.4.2.tar.gz", "has_sig": false, "md5_digest": "e3ca983abf20c7fdc7439577f9c28e55", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.7", "size": 12296, "upload_time": "2019-04-15T20:59:59", "url": "https://files.pythonhosted.org/packages/a3/18/8b5ad29469f5ccbc4e540fc1d9cbeae0b718fc3791c916d8f7b98d4c254b/pluscal-0.4.2.tar.gz" } ] }