{"title":"Hierarchical tree-based algorithms for efficient expression parsing and test sequence generation in software models","authors":"Yihao Li , Pan Liu","doi":"10.1016/j.jss.2025.112354","DOIUrl":null,"url":null,"abstract":"<div><div>The software expression model serves as a formalized specification, accurately depicting software behavior and generating test sequences through algebraic operations derived from the model. Typically, automated algebraic manipulation involves constructing an abstract syntax tree (AST) for the expression, followed by traversing it to identify subexpressions. However, this approach introduces a significant amount of redundant algebraic operations, diminishing the efficiency of expression parsing. To address this challenge, this paper introduces HT-EP, an innovative hierarchical tree-based expression parsing algorithm. HT-EP transforms expressions into hierarchical trees, utilizing algebraic operations to process nodes efficiently and generate streamlined test sequences. Compared to ASTs, hierarchical trees exhibit a simplified structure with fewer nodes, enabling faster traversal. Our experiment involved 124 expressions from scholarly papers over the past six decades and core functional expressions from 15 open-source software projects. The goal was to assess the parsing and fault detection capabilities of HT-EP against four other expression parsing algorithms. Additionally, we compared the complexities of hierarchical trees and ASTs, exploring factors influencing hierarchical tree complexity. Experimental results reveal that the HT-EP algorithm excels in parsing and software fault detection capabilities compared to the other four algorithms. Furthermore, for expressions derived from real-world cases, HT-EP achieves an approximate 40% reduction in redundant algebraic operation steps and an average 63% reduction in runtime compared to AST-EP.</div></div>","PeriodicalId":51099,"journal":{"name":"Journal of Systems and Software","volume":"223 ","pages":"Article 112354"},"PeriodicalIF":3.7000,"publicationDate":"2025-01-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"Journal of Systems and Software","FirstCategoryId":"94","ListUrlMain":"https://www.sciencedirect.com/science/article/pii/S0164121225000226","RegionNum":2,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, SOFTWARE ENGINEERING","Score":null,"Total":0}
引用次数: 0
Abstract
The software expression model serves as a formalized specification, accurately depicting software behavior and generating test sequences through algebraic operations derived from the model. Typically, automated algebraic manipulation involves constructing an abstract syntax tree (AST) for the expression, followed by traversing it to identify subexpressions. However, this approach introduces a significant amount of redundant algebraic operations, diminishing the efficiency of expression parsing. To address this challenge, this paper introduces HT-EP, an innovative hierarchical tree-based expression parsing algorithm. HT-EP transforms expressions into hierarchical trees, utilizing algebraic operations to process nodes efficiently and generate streamlined test sequences. Compared to ASTs, hierarchical trees exhibit a simplified structure with fewer nodes, enabling faster traversal. Our experiment involved 124 expressions from scholarly papers over the past six decades and core functional expressions from 15 open-source software projects. The goal was to assess the parsing and fault detection capabilities of HT-EP against four other expression parsing algorithms. Additionally, we compared the complexities of hierarchical trees and ASTs, exploring factors influencing hierarchical tree complexity. Experimental results reveal that the HT-EP algorithm excels in parsing and software fault detection capabilities compared to the other four algorithms. Furthermore, for expressions derived from real-world cases, HT-EP achieves an approximate 40% reduction in redundant algebraic operation steps and an average 63% reduction in runtime compared to AST-EP.
期刊介绍:
The Journal of Systems and Software publishes papers covering all aspects of software engineering and related hardware-software-systems issues. All articles should include a validation of the idea presented, e.g. through case studies, experiments, or systematic comparisons with other approaches already in practice. Topics of interest include, but are not limited to:
•Methods and tools for, and empirical studies on, software requirements, design, architecture, verification and validation, maintenance and evolution
•Agile, model-driven, service-oriented, open source and global software development
•Approaches for mobile, multiprocessing, real-time, distributed, cloud-based, dependable and virtualized systems
•Human factors and management concerns of software development
•Data management and big data issues of software systems
•Metrics and evaluation, data mining of software development resources
•Business and economic aspects of software development processes
The journal welcomes state-of-the-art surveys and reports of practical experience for all of these topics.