This replication package includes the source code and data necessary to reproduce the results presented in the paper "KBX: Verified Model Synchronization via Formal Bidirectional Transformation".
kbx/- Contains the source code of KBX.evaluation/- Contains evaluation data and scripts, including:families2persons/- The K definition and synchronization target examples for the bidirectional transformation (BX) between Families and Persons.hcsp2uml/- The K definition and synchronization target examples for the BX between HCSP and PlantUML.
evaluate.py- A script to reproduce the results in the paper.prover.tar.gz- Contains the pre-built prover for the evaluation, available for download at this link.
To reproduce the results described in the paper, execute the following commands:
- Install the K framework 7.1.23:
bash <(curl https://kframework.org/install)
kup install k --version v7.1.23- Prepare the Python environment using Poetry:
poetry install
poetry shell-
Install
clocandtokeifor counting lines of code -
Run the evaluation script to reproduce the results:
python evaluate.pyAfter completing Step 2, the environment for KBX is set up. To reuse KBX for verified model synchronization, follow these steps:
- Define the K definition to specify a unidirectional transformation for the synchronization targets.
- Use the
from kbx.generator import BXGeneratorin Python to generate a formal BX workspace:- Automatically generated K definitions for BX, which you can further customize.
kbx.pyscript to compile the K definitions and run the BX.
- Generate interpreters for the synchronization using the
python kbx.py initcommand. To generate proof hints during synchronization, add the--allow-proof-hintsoption. - Execute the synchronization using the
python kbx.py <direction> <source> <target>command. The<direction>can beforwardorbackward, and<source>and<target>are the source and target models, respectively. To generate proof hints during synchronization, add the--proof-hintsoption.
Our verification approach is based on the K framework, which generates proofs from these hints. There are two papers that provide more details about this verification approach:
- "Towards a Trustworthy Semantics-Based Language Framework via Proof Generation"
- "Generating Proof Certificates for a Language-Agnostic Deductive Program Verifier"