Tree Processing Program

This example provides a formal specification of a tree-processing program. It defines recursive operations over tree structures and ensures properties such as correct computation of structural measures like depth.

Verification

This example illustrates symbolic invariant analysis over recursive tree data. The specification contains recursive operations whose behavior is summarized by a constrained invariant.

DM-Check checks preservation of the supplied symbolic relation under the encoded transitions, while auxiliary equational reasoning can be delegated to NuITP when required.

The downloadable files give the exact tree property and command sequence used by the example.

Run it

Extract the DM-Check archive and, from that folder, replay the whole case study with its script:

$ maude -allow-files
Maude> load examples/tree/tree.maude
Maude> load dm-check.maude

DM-Check> load examples/tree/tree.dmc

The script selects the module TREE, prints every command before running it, and stops at the end of the file or at the first command that cannot be parsed or executed. To follow the proof step by step, type the commands one by one at the prompt instead. See Install, step 5 for the script format.