Published February 18, 2026 | Version v1
Software Open

Accompanying tool artifact for the paper "AsmetaComp: a Tool for Runtime Contract Checking with I/O Abstract State Machines

  • 1. ROR icon University of Bergamo
  • 2. Università degli Studi di Milano Dipartimento di Matematica Federigo Enriques

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

Files

AsmetaCompScript.zip

Files (8.2 MB)

Name Size Download all
md5:8da3fc9b16f911acecce70d76273c9f7
7.5 MB Preview Download
md5:738a8041d41803742741a035569a147f
27.3 kB Preview Download
md5:0f3348be7e580d78e9e01a8da1e8b8ae
656.2 kB Preview Download