Research on CPN Automatic Modeling Method of STM32 Program

STM32 microcontrollers contain multiple interrupt program types, and the occurrence and execution of various types of interrupts are uncertain, making it difficult to detect hidden vulnerabilities. Colored Petri Nets (CPN) can model the software system and find vulnerabilities in the program through model detection, but the uncertain triggering of the interrupt will lead to state explosion, and then the model detection cannot be completed, so this paper proposes an automatic modeling method to avoid state explosion for STM32 microcontrollers, which reduces the possibility of state explosion on the one hand, and improves the modeling efficiency on the other hand. Firstly, the program preprocessing is carried out, which is divided into two steps, one is to read, mark and classify and store the STM32 source program, and the other is to perform equivalent class division detection to find the correlation variables between programs to provide support for the subsequent combination model. Secondly, the coarse-grained modeling method proposed by the project team was used to classify and model the main program and interrupt program of STM32, and multiple or one source program sentence was described as a transition. Finally, different types of interrupt predefined model frameworks are designed, and based on the detection results of the previous equivalence class division, the constructed main program model fragments and interrupt model fragments are connected with the corresponding types of interrupt model frameworks at each data interaction point to form a complete model, and the equivalent substitution connects the interrupt model at all locations, so as to cover all interrupts that may lead to errors. In the experimental part, the correctness and effectiveness of the method are verified by an intelligent irrigation example.

Authors

Institutions

Publication Details

Published
2025-05-05
DOI
https://doi.org/10.1109/cscwd64889.2025.11033435
Primary Topic
Advanced Sensor and Control Systems
Type
article
Field-Weighted Citation Impact
0.00

Funders

Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
article

Research on CPN Automatic Modeling Method of STM32 Program

Wenjie Zhong, Tao Sun, Boyu Zhang
Advanced Sensor and Control Systems
article

Research on CPN Automatic Modeling Method of STM32 Program

Wenjie Zhong, Tao Sun, Boyu Zhang
article en

Abstract

STM32 microcontrollers contain multiple interrupt program types, and the occurrence and execution of various types of interrupts are uncertain, making it difficult to detect hidden vulnerabilities. Colored Petri Nets (CPN) can model the software system and find vulnerabilities in the program through model detection, but the uncertain triggering of the interrupt will lead to state explosion, and then the model detection cannot be completed, so this paper proposes an automatic modeling method to avoid state explosion for STM32 microcontrollers, which reduces the possibility of state explosion on the one hand, and improves the modeling efficiency on the other hand. Firstly, the program preprocessing is carried out, which is divided into two steps, one is to read, mark and classify and store the STM32 source program, and the other is to perform equivalent class division detection to find the correlation variables between programs to provide support for the subsequent combination model. Secondly, the coarse-grained modeling method proposed by the project team was used to classify and model the main program and interrupt program of STM32, and multiple or one source program sentence was described as a transition. Finally, different types of interrupt predefined model frameworks are designed, and based on the detection results of the previous equivalence class division, the constructed main program model fragments and interrupt model fragments are connected with the corresponding types of interrupt model frameworks at each data interaction point to form a complete model, and the equivalent substitution connects the interrupt model at all locations, so as to cover all interrupts that may lead to errors. In the experimental part, the correctness and effectiveness of the method are verified by an intelligent irrigation example.

Inner Mongolia University (CN)
National Natural Science Foundation of China
Openalex Percentile: Top 84%
Advanced Sensor and Control Systems
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.