DICE is an open source monitoring system for global invariants running on resource-constrained networked embedded systems developed by Ștefan Gună.
DICE provides a simple, declarative language to express the distributed invariants to be monitored by a wireless sensor network. The network is tasked as a whole and together monitor invariants such as:
forall m, n: temp@m - temp@n < 10
-
forall m, n: temp@m > 25 -> fan_active@n = TRUE
To get started:
- Download the source code.
- Edit ../../tools/dice-compiler/attributes.att and declare node attributes.
- Edit ../../tools/dice-compiler/constraints.dc to decalare the invariant to be monitored.
- Build the compiler, i.e., mvn compile.
- Run the eu.guna.dice.DiceCompiler class on the two files.
- Edit attributes_data.c to insert the code handling attribute values. Have a look at attributes.h to identify the code you need to write.
- TODO Add violation handling code.
- Compile and run!
Alternatively, you can download version 1.0 of the DICE compiler.