Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/orsinium-labs/simple-tla
Collection of useful "operators" (functions) to make TLA+ easier to learn and to use
https://github.com/orsinium-labs/simple-tla
formal-methods learning pluscal testing tla tlaplus verification
Last synced: about 1 month ago
JSON representation
Collection of useful "operators" (functions) to make TLA+ easier to learn and to use
- Host: GitHub
- URL: https://github.com/orsinium-labs/simple-tla
- Owner: orsinium-labs
- License: mit
- Created: 2022-11-27T10:23:52.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2022-12-02T10:46:42.000Z (about 2 years ago)
- Last Synced: 2024-01-28T18:02:50.131Z (11 months ago)
- Topics: formal-methods, learning, pluscal, testing, tla, tlaplus, verification
- Language: TLA
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-tla
Simple TLA is a collection of useful "operators" (functions) to make [TLA+](https://en.wikipedia.org/wiki/TLA%2B) (formal verification language for concurrent systems) easier to learn and to use.
+ The goal is to abstract away obscure operators, symbols, and syntax and provide primitives that languages like Elixir or Python provide out-of-the-box.
+ The idea is inspired by Clojure and LISP-like languages that sell the idea of keeping the language syntax to the minimum. While I cautious of that idea in general, it works great for TLA+ because it has very alienating syntax, and so trimming down that syntax is a good idea.
+ The target audience are people who are more engineers than mathematicians. I want to make TLA+ more similar to other modern programming languages, or at least less diffferent, without writing my own DSL.Even if you're not going to use the library in your project, it's still a good reference of how to do different things on pure TLA+.
## Installation
TLA+ doesn't have a package manager. So, installation is a bit tricky. Follow instruction from [CommunityModules](https://github.com/tlaplus/CommunityModules): [How to use it](https://github.com/tlaplus/CommunityModules#how-to-use-it).
## Usage
```tla
EXTENDS initbool!and(TRUE, FALSE)
```What happens there:
1. `EXTENDS init` will extend the current namespace with all modules provided by simple-tla. You cna find all the modules in [simple-tla](./simple-tla/) directory.
1. `bool` is the module name you want to use.
1. `!` is like `.` in other languages (or `:` in some). Use it to get a definition from a module.
1. `and` is the function name to call.
1. `(TRUE, FALSE)` is calling the function with 2 arguments.## See also
+ [Learn TLA+](https://learntla.com/index.html): the best place to learn TLA+.
+ [tlacli](https://github.com/hwayne/tlacli): the tool we use to run tests.
+ [CommunityModules](https://github.com/tlaplus/CommunityModules): the source of some more complex functions.
+ [StandardModules](https://github.com/tlaplus/tlaplus/tree/master/tlatools/org.lamport.tlatools/src/tla2sany/StandardModules): the source code of TLA+ stdlib modules.