All Projects → mryndzionek → tlaplus_specs

mryndzionek / tlaplus_specs

Licence: other
Different TLA+ specifications, mostly for learning purposes

Programming Languages

TLA
29 projects
shell
77523 projects

Projects that are alternatives of or similar to tlaplus specs

ecto erd
A mix task for generating Entity Relationship Diagram from Ecto schemas available in your project.
Stars: ✭ 173 (+592%)
Mutual labels:  graphviz
graphviz
PHP Graphviz library
Stars: ✭ 70 (+180%)
Mutual labels:  graphviz
yed py
Making graphs for yEd
Stars: ✭ 54 (+116%)
Mutual labels:  graphviz
plutus-experimental-smart-contracts
Experimental Smart Contracts In Plutus.
Stars: ✭ 34 (+36%)
Mutual labels:  model-checking
home-assistant-graph
No description or website provided.
Stars: ✭ 30 (+20%)
Mutual labels:  graphviz
kraph
Go module for scraping APIs to graphs
Stars: ✭ 12 (-52%)
Mutual labels:  graphviz
C4 Plantuml
C4-PlantUML combines the benefits of PlantUML and the C4 model for providing a simple way of describing and communicate software architectures
Stars: ✭ 3,522 (+13988%)
Mutual labels:  graphviz
dotnets
Create simple drawings of neural networks using graphviz
Stars: ✭ 161 (+544%)
Mutual labels:  graphviz
rtl2dot
C call graph generator
Stars: ✭ 48 (+92%)
Mutual labels:  graphviz
klever
Read-only mirror of the Klever Git repository
Stars: ✭ 18 (-28%)
Mutual labels:  model-checking
theta
Generic, modular and configurable formal verification framework supporting various formalisms and algorithms
Stars: ✭ 34 (+36%)
Mutual labels:  model-checking
xmpaint
处理有向图的有力工具
Stars: ✭ 65 (+160%)
Mutual labels:  graphviz
specifica
Basic TLA+ related Haskell libraries (parser, evaluator, pretty-printer)
Stars: ✭ 19 (-24%)
Mutual labels:  tlaplus
dockerfilegraph
Visualize your multi-stage Dockerfiles
Stars: ✭ 55 (+120%)
Mutual labels:  graphviz
heroku-buildpack-graphviz
Install Graphviz on Heroku
Stars: ✭ 18 (-28%)
Mutual labels:  graphviz
Azure Plantuml
PlantUML sprites, macros, and other includes for Azure services
Stars: ✭ 247 (+888%)
Mutual labels:  graphviz
tlaplus-graph-explorer
A static web application to explore and animate a TLA+ state graph.
Stars: ✭ 188 (+652%)
Mutual labels:  tlaplus
plugins
Collection of builtin GNU TeXmacs plugins
Stars: ✭ 33 (+32%)
Mutual labels:  graphviz
rel
command line tool for managing personal graphs of anything and writing them to dot
Stars: ✭ 51 (+104%)
Mutual labels:  graphviz
bandersnatch-graph
Graphing all possibilities in the Netflix Black Mirror episode, "Bandersnatch"
Stars: ✭ 42 (+68%)
Mutual labels:  graphviz

Different TLA+ specifications, mostly for learning purposes

CigaretteSmokers.tla

A specification of the Cigarette smokers problem. The generated state graph is very small:

spec1

fig1

Blinker.tla

Simple spec simulating, more or less, this application. Three state machines controlling three LEDs. With 100ms resolution (model run with BC <- <<3, 5, 7>>) model checker finds 384 distinct states:

spec2

fig2

Just a humble reminder to never underestimate even the simplest concurrent programs, I guess 😃

GameOfLife.tla

Conway's Game of Life

spec3

All the 'attractors' for a 3x3 grid

fig3

State space for a 4x4 grid - original image generated by Graphviz is around 300MB 😃:

fig4

The same with some colors based on number of occupied cells:

fig5

Zoom on two of the smaller clusters:

fig6

fig7

Under 'symmetry group of the square' (D4) view in TLC the state space shrinks to ... 27 states. Under this view it's even possible to run TLC on 5x5 grid and get 486 states (reduction from 33554432):

fig8

Base Graphviz parameters:

dot -Tpng -Nstyle=filled -Npenwidth=5 -Epenwidth=8 -Ksfdp -Goverlap=prism -Goverlap_scaling=-10

Requirements.tla

Experimental specification aimed at mechanising verification of written requirements documents.

spec4

spec5

Checking CheckRequirements spec produces:

fig9

SlidingPuzzles.tla

Solution to a variation of sliding block puzzle most commonly known as Klotski.

spec6

TLC finds 25955 distinct states. Green node is the starting position. Red nodes are the goal nodes - with the biggest piece in center-bottom position.

fig10

The Pennant variation has significantly smaller state space of 'only' 1398 states. Raymond Hettinger talked about this puzzle and the state graph here.

W == 4 H == 5

Pennant == {{<<0, 0>>, <<0, 1>>, <<1, 0>>, <<1, 1>>},
            {<<2, 0>>, <<3, 0>>}, {<<2, 1>>, <<3, 1>>},
            {<<0, 2>>}, {<<1, 2>>},
            {<<0, 3>>, <<0, 4>>}, {<<1, 3>>, <<1, 4>>},
            {<<2, 3>>, <<3, 3>>}, {<<2, 4>>, <<3, 4>>}}
            
PennantGoal == {<<0, 3>>, <<0, 4>>, <<1, 3>>, <<1, 4>>} \in board

fig11

Ma's Puzzle has 110804 distinct states.

W == 5 H == 5

Mas == {{<<0, 0>>, <<1, 0>>, <<2, 0>>},
        {<<3, 0>>, <<4, 0>>,<<4, 1>>},
        {<<0, 1>>, <<1, 1>>}, {<<2, 1>>, <<3, 1>>},
        {<<0, 2>>, <<0, 3>>, <<1, 3>>},
        {<<1, 2>>, <<2, 2>>}, {<<3, 2>>, <<4, 2>>},
        {<<2, 3>>, <<3, 3>>, <<4, 3>>},
        {<<2, 4>>}}
        
MasGoal == {{<<3, 0>>, <<4, 0>>,<<4, 1>>}, {<<3, 1>>, <<3, 2>>, <<4, 2>>}} \subseteq board

fig12

Chameneos.tla

A specification of a 'concurrency game' requiring concurrent and symmetrical cooperation - link

fig13

For N=3 there are 522 distinct states:

fig14

The lattices at the edges are due to the possible orders in which the chameneoses fade.

For N=4 there are 6652 distinct states:

fig15

All the above graphs are for single initial permutation of chameneoses. Here is a full graph for N=2, M=4 (4843 distinct states).

fig16

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].