This is official implementation of stohMCharts: A Modeling Framework for Quantitative Performance Evaluation of Cyber-Physical-Social Systems.
To use stohMCharts, you'll need the following software installed on your system:
- Node.js version 19.4.0 or later.
- Uppaal version 4.0.15 or later.
To get started with stohMCharts, follow these steps:
- Clone the code to your local machine by running the following command:
git clone [email protected]:beiyanpiki/stohMCharts.git --depth=1 && cd stohMCharts
- Install the dependencies by running the following command. Make sure that
npm
is added to your PATH.
npm install
- Build the application by running the following command:
npm run build
- After the build process is complete, a new
build
folder will be generated. This folder contains the web application, which you can use in two ways:- You can use code server to run the web application on your local machine.
- You can upload the
build
folder to your server to make the web application available to others.
We've provided a simple example to show how to build and verify an SMC model using stohMCharts. Follow these steps to get started:
- Build a composite model like the one shown in Figure 1. You can load our prepared model by clicking
Examples -> Case 1
.
- Add some queries to verify our model. Click
Verification
and input the following queries (as shown in Figure 2):
Please note that
system_name
=template_name
+ '_1'. For instance, the composite modelB
's system_name isB_1
, so you need useB_1
in query's formula likeE<> B_1.B2
but notE<> B.B2
- ``E<> A_1.A3``
- ``E<> A_1.A4``
- ``E<> B_1.B2``
- ``E<> B_1.B3``
- ``Pr[<=30](<> Sample_1_1.B)``
-
Click the
Export
button to get the Uppaal XML file(in this case, it'sSample_1.xml
), you can open this file in Uppaal directly. -
Finally, you can check the model with existing queries in two ways:
- Use the GUI verifier to check our queries and plot the results (as shown in Figure 3).
- Use Verifyta by running the following command to get a full log of the check, as shown in figure 4:
.\verifyta.exe -t 0 .\Sample_1.xml -u -a 0.01 -E 0.05 -w 0.02 --histogram-bar-count 50 --state-representation 3 > out
Please cite our paper if you use this code in your own work:
@article{an2023stohmcharts,
title={stohMCharts: A Modeling Framework for Quantitative Performance Evaluation of Cyber-Physical-Social Systems},
author={An, Dongdong and Pan, Zongxu and Gao, Xin and Li, Shuang and Yin, Ling and Li, Tengfei},
journal={IEEE Access},
year={2023},
publisher={IEEE}
}