A symbolic model checker for Dynamic Epistemic Logic.
You can try SMCDEL online here: https://w4eg.de/malvin/illc/smcdelweb/
- Download binaries from the latest release or compile from source using stack.
stack installwill build and install an executablesmcdelinto~/.local/binwhich should be in yourPATHvariable.
-
Create a text file
MuddyShort.smcdel.txtwhich describes the knowledge structure and the formulas you want to check for truth or validity:-- Three Muddy Children in SMCDEL VARS 1,2,3 LAW Top OBS alice: 2,3 bob: 1,3 carol: 1,2 WHERE? [ ! (1|2|3) ] alice knows whether 1 VALID? [ ! (1|2|3) ] [ ! ((~ (alice knows whether 1)) & (~ (bob knows whether 2)) & (~ (carol knows whether 3))) ] [ ! ((~ (alice knows whether 1)) & (~ (bob knows whether 2)) & (~ (carol knows whether 3))) ] (alice,bob,carol) comknow that (1 & 2 & 3) -
Run
smcdel MuddyShort.smcdel.txtresulting in:>> smcdel MuddyShort.smcdel.txt SMCDEL 1.0 by Malvin Gattinger -- https://github.com/jrclogic/SMCDEL At which states is ... true? [] [1] Is ... valid on the given structure? TrueMore example files are in the folder Examples.
-
To also build and install the web interface, run
stack install --flag smcdel:webThen you can runsmcdel-weband open http://localhost:3000.
The first part of the input describes a knowledge structure (that encodes an S5 Kripke model). With three keywords in this order:
VARS ...
LAW ...
OBS ...
-
VARSis the keyword before the vocabulary, i.e. the set of all atomic propositions. For example,VARS 0,1says that in this structure we have two atomic propositions. One might usually call them "p" and "q", but in SMCDEL all variables must be integers. -
LAWis the keyword before the state law. This is a Boolean formula to say what states should exist. For example,LAW Topsays that all possible states should be there. WithVARS 0,1this we have four states{},{0},{1}and{0,1}. Alternatively,LAW 1 | 2would restrict this to three states{0},{1}and{0,1}. All variables used in this formula must be mentioned inVARS. The state law is common knowledge among all agents. -
OBSis the keyword before the observations. Here we say which agent observes which of the atomic propositions. For example,alice : 1,2says thataliceobserves variables 1 and 2. All variables mentioned inOBSmust be inVARS. All agents mentioned in the queries below must be included in the observation list here.
The second part of the input then consists of any number of queries, each using one of the three keywords:
-
VALID?followed by a formula will check whether the formula is valid in the structure, i.e. true at all states.Example:
VALID? alice knows that 0. -
WHERE?followed by a formula will list all the states where the formula is true.Example:
WHERE? bob knows whether 1. -
TRUE?followed by a state and a formula will check if the formula is true at that state.Example:
TRUE? {0,1} alice knows that 0
The syntax for formulas is defined in src/SMCDEL/Internal/Lex.x and src/SMCDEL/Internal/Parse.y.
The executables only provide model checking for S5 with public announcements. For K and to define more complex models and updates, SMCDEL should be used as a Haskell library. Please refer to the Haddock documentation for each module.
Examples can be found in the folders src/SMCDEL/Examples and bench.
Dependencies:
To get all visualisation functions working, graphviz, dot2tex and some LaTeX packages should be installed.
On Debian, please do sudo apt install graphviz dot2tex libtinfo5 texlive-latex-base texlive-latex-extra poppler-utils preview-latex-style texlive-pstricks zlib1g-dev.
SMCDEL uses different BDD packages.
-
Data.HasCacBDD which runs CacBDD from http://kailesu.net/CacBDD/. This is the default choice used by the executables and the modules
SMCDEL.Symbolic.S5andSMCDEL.Symbolic.K. -
The pure Haskell library
decision-diagrams. It is used by the moduleSMCDEL.Symbolic.S5_DD. -
Optionally, Cudd (with some patches) which uses the CUDD library. To obtain the modules
SMCDEL.Symbolic.K_CUDD,SMCDEL.Symbolic.Ki_CUDDandSMCDEL.Symbolic.S5_CUDDyou should compile withstack build --flag smcdel:with-cudd.
Main reference for the theory behind the implementation, also containing benchmarks:
Additional publications:
Additional references for specific examples are listed in the Haddock documentation.