Accompanying tool artifact for the paper "AsmetaComp: a Tool for Runtime Contract Checking with I/O Abstract State Machines
Authors/Creators
Description
These artifacts are related to the AsmetaComp tool to execute compositions of Input Output Abstract State Machine components and automatically checks assume–guarantee contracts at runtime.
AsmetaComp offers three main features:
- A unified environment for modeling both component behavior and assume–guarantee contracts. Contracts are written as Boolean expressions over the input and output events of I/O ASMs.
- A compositional execution. Independent I/O ASM components can be connected using dedicated operators — such as pipe, parallel, and half- or full-duplex bidirectional pipes — and executed according to a well-defined orchestration semantics.
- An automated runtime contract checking. During compositional simulation, contracts are evaluated on the fly. If an assumption or a guarantee is violated, the tool immediately reports the error, enabling early detection of integration problems.ù
These artifacts illustrate the use of AsmetaComp through a medical case study, the Medicine Reminder and Monitoring system, modeled as a composition of I/O ASMs.
In this system, the user manually fills the pillbox compartments according to the prescription, with one medicine type per compartment.
The prescription specifies, for each medicine, its name, dosage, minimum separation from other drugs, intake schedule, and delay parameters for missed doses. These data initialize both the Configuration Manager and the Rescheduler.
At the scheduled time, the pillbox notifies the patient by unlocking and lighting the corresponding compartment. The patient confirms the intake by opening and closing it. If the dose is not taken within ten minutes, the LED flashes for another ten minutes, after which the dose is marked as missed.
Here there are 6 secenarios to simulate different real situations
These artifacts consist of:
- AsmetaCompScript.zip contains the AsmetaComp.jar file, all the models and scripts to reproduce the scenarios.
- "How to install Java.pdf" file with the guidelins to install Java if not already installed
- "Readme.pdf" file with guidlines on how to run scenarios.
High-level directory structure:
Readme.pdf -> Readme file
How to install Java.pdf -> Guidelines to install Java
AsmetaCompScript.zip:
MRM CBD/ ->Folder with AsmetaComp.jar and functionality outcome examples
AsmetaComp.jar -> AsmetaComp .jar file
MRMModels/ ->Folder with models and scripts
compartment.asm -> Asmeta model of Compartment component
configurationMgr.asm -> Asmeta model of the ConfigurationMgr component
knowledge.asm-> Asmeta module imported in Pillbox and Rescheduler components
pillbox.asm-> Asmeta model of the Pillbox component
pillboxCompCS1.asmsh-> Script of scenario CS1
pillboxCompCS2.asmsh-> Script of scenario CS2
pillboxCompCS3.asmsh-> Script of scenario CS3
pillboxCompPO.asmsh-> Script of scenario PO
pillboxCompWC.asmsh-> Script of scenario WC
pillboxCompWP.asmsh-> Script of scenario WP
pillboxWrongConfig.asm-> Asmeta model of the wrong Pillbox component used in scenario WC
pillboxWrongPill.asm-> Asmeta model of the wrong Pillbox component used in scenario WP
rescheduler.asm-> Asmeta model of the Rescheduler component
reschedulerNonOptimal.asm-> Asmeta model of the wrong Rescheduler component used in scenario PO
reschedulerWrongConfig.asm-> Asmeta model of the wrong Rescheduler component