Home

Awesome

CRDT Model Checking Experiments

Model Checking Experiments

We write a script to automatically conduct comprehensive model checking experiments with the CRDT-TLA.

Requirements

This has been tested on Linux (with JDK 8), but not yet on Windows or Mac.

Experiments

Now, the script checks SEC of the two CRDT protocols:

  1. StateAWSet
  2. OpAWSet

Parameters

For each of these properties to check, we vary the number of replicas (#Replicas) from 2 to 4 and the number of data (#Data) from 2 to 5.

Because the run time at the scale (3, 5) and (4, 5) is not acceptable, We removed these two scale configurations.

We exit TLC when the number of distinct states TLC examines reaches a given threshold. The threshold is 100, 000, 000,

How to run?

Each of the following command conducts the model checking experiments described above in batch, and it is allowed to set the number of worker threads.

Commands

# Usage Note: In the following three commands, "make" is identical to "make run".
make		# using 10 workers by default (used in our setting)
make WORKERS=2  # using 2 workers
make WORKERS=   # setting the number of workers as that of physical cores in your machine

Output:

The model checking results are stored in the mc_result/YYYYmmdd-HHMMSS directory, consisting of

YYYYmmdd-HHMMSS is the timestamp generated when the batch program starts.

A sample model checking result (only the LaTeX tables) is given in mc_result.

To stop:

How is this implemented?

tlcwrapper.py

The tlcwrapper.py script encapsulates the usage of TLC commands.

It accepts two parameters:

crdt-batch.py

Run the experiments described above in batch.

It uses tlcwrapper.py to start TLC.

Temp files

TLC generates a subdirectory in the crdt/model directory for each experiment, which is used to store the tla files and cfg files required for TLC.

You can use make clean to delete them.

Any MC files may be helpful for you.

filenamedescription
MC.cfg / MC.tlaGenerated by TLCWrapper.py. Required by TLC.
MC_out.txtTLC log.
MC_user.txtUser output (using Print or PrintT).
MC_states.dump / MC_states.dotAll states dump (if enabled).
MC_coverage.txtCoverage information (if enabled).