{"id":18040507,"url":"https://github.com/kelvich/tlaplus_jupyter","last_synced_at":"2025-08-14T21:23:09.488Z","repository":{"id":53741728,"uuid":"196396856","full_name":"kelvich/tlaplus_jupyter","owner":"kelvich","description":"Jupyter kernel for TLA⁺","archived":false,"fork":false,"pushed_at":"2022-09-12T13:10:53.000Z","size":80,"stargazers_count":120,"open_issues_count":5,"forks_count":8,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-07-12T08:21:18.716Z","etag":null,"topics":["jupyter-kernel","model-checking","tla"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kelvich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-11T13:09:09.000Z","updated_at":"2025-05-08T19:30:51.000Z","dependencies_parsed_at":"2022-09-10T22:41:38.505Z","dependency_job_id":null,"html_url":"https://github.com/kelvich/tlaplus_jupyter","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/kelvich/tlaplus_jupyter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvich%2Ftlaplus_jupyter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvich%2Ftlaplus_jupyter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvich%2Ftlaplus_jupyter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvich%2Ftlaplus_jupyter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kelvich","download_url":"https://codeload.github.com/kelvich/tlaplus_jupyter/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kelvich%2Ftlaplus_jupyter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266165829,"owners_count":23886689,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jupyter-kernel","model-checking","tla"],"created_at":"2024-10-30T15:06:19.046Z","updated_at":"2025-07-20T17:33:29.144Z","avatar_url":"https://github.com/kelvich.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build status](https://ci.appveyor.com/api/projects/status/myh95n5j0j0pr04j/branch/master?svg=true)](https://ci.appveyor.com/project/kelvich/tlaplus-jupyter/branch/master)\n[![Build Status](https://travis-ci.org/kelvich/tlaplus_jupyter.svg?branch=master)](https://travis-ci.org/kelvich/tlaplus_jupyter)\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/kelvich/tlaplus_jupyter/master?filepath=intro.ipynb)\n\n# tlaplus_jupyter\n\nJupyter kernel for TLA⁺ and Pluscal specification languages.\n* Syntax highlight based on official lexer.\n* REPL functionality for expressions.\n* Can be executed online with Binder. [Try it now!](https://mybinder.org/v2/gh/kelvich/tlaplus_jupyter/master?filepath=intro.ipynb)\n* No need to install TLA Toolbox: Java and Python will be enough.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg width=\"1227\" alt=\"Screenshot 2019-11-11 at 23 58 17\" src=\"https://user-images.githubusercontent.com/284219/68620766-3d3f5400-04df-11ea-8fa7-763124f84162.png\"\u003e\n\u003c/p\u003e\n\n## Installation\n\n`tlaplus_jupyter` is a python package installable with `pip`. Python 2 and 3 are supported. To install run:\n\n```\npip install tlaplus_jupyter\npython -m tlaplus_jupyter.install\n```\n\nThe last step will register `tlaplus_jupyter` as a Jupyter kernel in your system and will download `tla2tools.jar`. After that Jupyter can be started as usual:\n\n```\njupyter notebook\n```\n\nTo create a new TLA⁺ notebook click on the `New` button and select TLA⁺ in a dropdown menu. It is also handy to enable line numbering inside cells (View \u003e Toggle Line Numbers) since syntax checker refers to problems by their line numbers.\n\nNote that by default `python -m tlaplus_jupyter.install` enables TLC execution [statistics collection](https://github.com/tlaplus/tlaplus/blob/master/tlatools/src/util/ExecutionStatisticsCollector.md). Pass `--help` to see how to opt out.\n\n## Usage\n\nBasic usage is explained in an [intro notebook](https://mybinder.org/v2/gh/kelvich/tlaplus_jupyter/master?filepath=intro.ipynb).\n\n`tlaplus_jupyter` supports several types of cells with different behavior on execution:\n\n1. Cells with `full module definition`. Upon execution kernel will perform syntax check (with tla2sany.SANY) and report errors if any. If the module contains Pluscal program kernel will also translate it to TLA.\n\n2. Cell starting with `%tlc:ModuleName` where `ModuleName` is the name of one of the modules previously executed. In this case, the cell is treated as a config file for the TLC model checker. For example to check spec `Spec` and invariant `TypeOk` of model `DieHardTLA` execute following:\n    ```\n    %tlc:DieHardTLA\n    SPECIFICATION Spec\n    INVARIANT TypeOK\n    ```\n\n    Init and next state formula can be set after keywords `INIT` and `NEXT` correspondingly. Constant definitions should follow `CONSTANTS` keyword separated by newline or commas. Description of possible config statements and syntax is given in chapter 14 of [Specifying systems](https://www.microsoft.com/en-us/research/publication/specifying-systems-the-tla-language-and-tools-for-hardware-and-software-engineers/) book.\n\n    Custom TLC flags may be specified after the module name:\n    ```\n    %tlc:DieHardTLA -deadlock\n    SPECIFICATION Spec\n    ```\n\n    TLC evaluation happens in the context of all defined modules. So if model refers to another model that other model should be at some cell too.\n\n3. Cells containing neither `%`-magic nor module definition are treated as a constant expression and will print its results on execution. As with `!tlc` evaluation happens in the context of all defined modules, so the expression can refer to anything defined in evaluated modules.\n\n4. Command `%log` / `%log on` / `%log off` correspondingly shows kernel log / enables logging / disables logging for currently open notebook.\n\n## Sharing executable models with Binder\n\nTLA⁺ models shared on Github can be easily made runnable by coping  [Dockerfile](Dockerfile) to the repository root. After that, URL to such repo can be used at [Binder](https://mybinder.org) to start a dynamic TLA⁺ environment.\n\n## Related Projects\n\n[vscode-tlaplus](https://github.com/alygin/vscode-tlaplus) Cool plugin for VSCode editor with syntax highlight and custom widgets for displaying traces.\n\n## License\n\n[BSD](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvich%2Ftlaplus_jupyter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkelvich%2Ftlaplus_jupyter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkelvich%2Ftlaplus_jupyter/lists"}