Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/m4lvin/gomoche
🗣️📞 Gossip Model Checking
https://github.com/m4lvin/gomoche
distributed-systems epistemic-logic gossip haskell model-checking protocol
Last synced: 22 days ago
JSON representation
🗣️📞 Gossip Model Checking
- Host: GitHub
- URL: https://github.com/m4lvin/gomoche
- Owner: m4lvin
- License: gpl-3.0
- Created: 2017-10-01T16:09:01.000Z (about 7 years ago)
- Default Branch: main
- Last Pushed: 2024-02-01T15:08:06.000Z (9 months ago)
- Last Synced: 2024-02-01T17:10:55.891Z (9 months ago)
- Topics: distributed-systems, epistemic-logic, gossip, haskell, model-checking, protocol
- Language: Haskell
- Homepage:
- Size: 85.9 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GoMoChe - Gossip Model Checking
[![CI status](https://github.com/m4lvin/GoMoChe/actions/workflows/ci.yml/badge.svg)](https://github.com/m4lvin/GoMoChe/actions/workflows/ci.yml)
[![Gitpod Ready-to-Code](https://img.shields.io/badge/Gitpod-ready--to--code-blue?logo=gitpod)](https://gitpod.io/#https://github.com/m4lvin/GoMoChe)A Haskell tool to analyse (dynamic) gossip protocols, including an epistemic model checker.
## Getting Started
Option A: For a quick try-out, [click here to use GoMoChe in your browser via GitPod](https://gitpod.io/#https://github.com/m4lvin/GoMoChe), *wait* and use the terminal there.
Option B: To use GoMoChe locally, you need the [Haskell Tool Stack](https://haskellstack.org). Then do `stack build` and `stack ghci` inside this folder.
## Usage Examples
List all call sequences permitted by the protocol `lns` on the graph `threeExample` defined in the module `Gossip.Examples`:
GoMoChe> mapM_ print $ sequences lns (threeExample,[])
[(0,1),(0,2),(1,2)]
[(0,1),(1,2),(0,2)]
[(0,1),(2,1),(0,2)]
[(1,2),(0,1)]
[(2,1),(0,1)]Count how many of these call sequences are successful and unsuccessful:
GoMoChe> statistics lns (threeExample,[])
(3,2)The same, for another gossip graph given in short notation:
GoMoChe> statistics lns (parseGraph "01-12-231-3 I4",[])
(57,20)Evaluate a formula at a gossip state:
GoMoChe> eval (threeExample,[(0,1)]) (S 1 0)
True
GoMoChe> eval (threeExample,[(0,1)]) (S 1 2)
False
GoMoChe> eval (threeExample,[(0,1)]) (K 2 anyCall (S 1 0))
True
GoMoChe> eval (threeExample,[(0,1)]) (K 2 lns (S 1 0))
True
GoMoChe> eval (threeExample,[(0,1),(1,2)]) (S 0 2)
False
GoMoChe> eval (threeExample,[(0,1),(1,2)]) (S 2 0)
TrueIf you have graphviz installed, you can visualize gossip graphs like this:
GoMoChe> dispDot $ diamondExample
![](doc/diamondExample.svg)
Also execution trees can be visualized, for example:
GoMoChe> dispTreeWith [2] 2 1 lns (tree lns (nExample,[]))
![](doc/nExample_2_2_1.svg)
Note: In GitPod, use `pdf` and `pdfTreeWith` instead of `dispDot` and `dispTreeWidth`.
## Tests
The file `test/results.hs` contains a test suite that also covers most examples.
You can run it with `stack clean; stack test --coverage`.## References
- Hans van Ditmarsch, Malvin Gattinger, Louwe B. Kuijer, Pere Pardo:
[Strengthening Gossip Protocols using Protocol-Dependent Knowledge](https://malv.in/2019/StrengtheningGossipProtocols.pdf)
In: Journal of Applied Logics - IfCoLog Journal of Logics and their Applications, Volume 6, Number 1, 2019.- Chapter 6 "Dynamic Gossip"
in Malvin Gattinger: [New Directions in Model Checking Dynamic Epistemic Logic](https://malv.in/phdthesis)
PhD thesis at ILLC, University of Amsterdam, 2018.- Hans van Ditmarsch, Jan van Eijck, Pere Pardo, Rahim Ramezanian, François Schwarzentruber:
*Dynamic Gossip*.
In: Bulletin of the Iranian Mathematical Society (BIMS), 2018.
https://doi.org/10.1007/s41980-018-0160-4- Hans van Ditmarsch, Jan van Eijck, Pere Pardo, Rahim Ramezanian, François Schwarzentruber:
*Epistemic protocols for dynamic gossip*.
In: Journal of Applied Logic, Volume 20, 2017, Pages 1-31,
https://doi.org/10.1016/j.jal.2016.12.001## Other Tools
- *ElmGossip: Explore dynamic gossip in your browser* by Ramon Meffert