Yongchang Ding , Wei Han , Zhiqiang Li , Haowen Chen , Linjun Chen , Rong Peng , Xiao-Yuan Jing
{"title":"Metric information mining with metric attention to boost software defect prediction performance","authors":"Yongchang Ding , Wei Han , Zhiqiang Li , Haowen Chen , Linjun Chen , Rong Peng , Xiao-Yuan Jing","doi":"10.1016/j.scico.2025.103381","DOIUrl":"10.1016/j.scico.2025.103381","url":null,"abstract":"<div><div>In the field of software engineering, defect prediction has always been a popular research direction. Currently, the research on traditional software defect prediction mainly focuses on metric features, which are derived from various descriptive rules. Many researchers have proposed a large number of defect prediction models based on these metric features and various framework models. However, the problem of data scarcity has severely hindered the development of the field. Therefore, this work proposes a new method, namely the Metric Attention Module (MAM), which excavates the correlations within the metric data features, between features, within modules, and between modules. By learning new data representations, MAM guides the model's learning process and ultimately improves the model's performance without changing the network framework structure. Additionally, the method is interpretable.</div><div>In this work, experiments were conducted in various task environments and on different datasets, all resulting in varying degrees of improvement. In the context of within-project defect prediction (WPDP), experiments with the MAM data model showed an average improvement of 14.7% in Accuracy, 15.9% in F1 score, 23.7% in AUC, and 65.1% in MCC. In cross-project defect prediction (CPDP), under more complex task environments, the model demonstrated excellent performance across multiple standard datasets. Compared to the baseline models and training results, the F1, Accuracy, and MCC scores improved by approximately 40%, 20%, and 50%, respectively.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103381"},"PeriodicalIF":1.4,"publicationDate":"2025-08-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144861269","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Exact and sufficient schedulability tests for adaptive weakly-hard real-time mixed-criticality systems","authors":"Hossein Rabbiun , Mahmoud Shirazi , Jamal Mohammadi","doi":"10.1016/j.scico.2025.103382","DOIUrl":"10.1016/j.scico.2025.103382","url":null,"abstract":"<div><div>This paper presents enhanced schedulability analysis techniques for Adaptive Mixed-Criticality systems with Weakly-Hard constraints (AMC-WH), where the low-criticality (LO) task jobs can continue to execute when the system switches to high-criticality (HI) mode. Prior AMC-WH studies typically adopt the skip-over model, in which up to <em>s</em> out of <em>m</em> consecutive LO task deadlines may be missed without violating system constraints. These approaches evaluate the Worst-Case Response Times (WCRT) of LO tasks under a fixed job execution pattern. In contrast, this work introduces a novel schedulability analysis framework based on the more general <span><math><mo>(</mo><mi>m</mi><mo>,</mo><mi>k</mi><mo>)</mo></math></span>-firm model, where each LO task must meet at least <em>m</em> out of any <em>k</em> consecutive deadlines. This extension allows for more flexible and configurable execution patterns for LO tasks after a mode transition, improving the adaptability of the system to varying operational conditions. Additionally, we propose an exact schedulability test for AMC-WH based on Response Time Analysis (RTA), which incorporates the <span><math><mo>(</mo><mi>m</mi><mo>,</mo><mi>k</mi><mo>)</mo></math></span>-firm model to precisely analyze schedulability by dynamically managing LO task execution patterns post-mode switch. Comprehensive experimental evaluations confirm the effectiveness and practicality of the proposed tests. In particular, our approach achieves an 18% improvement in schedulability compared to the AMC-WH skip-over baseline, while also optimizing resource utilization. By leveraging the flexibility of the <span><math><mo>(</mo><mi>m</mi><mo>,</mo><mi>k</mi><mo>)</mo></math></span>-firm model, our method supports a wide range of real-time applications with diverse tolerance levels for deadline misses, offering enhanced adaptability in LO task execution strategies.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103382"},"PeriodicalIF":1.4,"publicationDate":"2025-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144830040","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"An ML-style module system for cross-stage type abstraction in multi-stage programming","authors":"Takashi Suwa , Atsushi Igarashi","doi":"10.1016/j.scico.2025.103379","DOIUrl":"10.1016/j.scico.2025.103379","url":null,"abstract":"<div><div>We propose <em>MetaFM</em>, a novel ML-style module system that enables users to decompose <em>multi-stage programs</em> (i.e., programs written in a typed <em>multi-stage programming</em> language) into loosely coupled components in a manner natural with respect to type abstraction. The distinctive aspect of MetaFM is that it allows values at different stages to be bound in a single structure (i.e., <span><math><mrow><mi>struct</mi></mrow><mspace></mspace><mo>⋯</mo><mspace></mspace><mrow><mi>end</mi></mrow></math></span>). This feature is crucial, for example, for defining a function and a macro that use one abstract type in common without revealing the implementation detail of that type. MetaFM also accommodates staging with full-fledged module-related features such as <em>functors</em>, <em>higher-kinded types</em>, and the <strong>with type</strong><em>-construct</em>. We give two separate formalizations of MetaFM's semantics by employing the technique of <em>elaborations</em>, i.e., type-directed translations to target languages. Specifically, we first define <em>F-ing Modules</em>-based semantics as a set of elaboration rules that convert MetaFM programs into <em>System F</em><span><math><msup><mrow><mi>ω</mi></mrow><mrow><mo>〈</mo><mo>〉</mo></mrow></msup></math></span>, a multi-stage extension of System F<em>ω</em>, and prove that the elaboration preserves typing. The existential quantification offered by System F<span><math><msup><mrow><mi>ω</mi></mrow><mrow><mo>〈</mo><mo>〉</mo></mrow></msup></math></span> demonstrates that a type abstraction mechanism is properly formalized in our language. Then, because our F-ing Modules-based semantics of staging has some issues as to the evaluation order, we give another elaboration by utilizing a method called <em>static interpretation</em>, which flattens nested structures into arrays of bindings and inlines functor applications through type-checking. While our F-ing Modules-based semantics cannot be naturally extended with effectful computations, the static interpretation-based one can easily accommodate effectful features such as mutable references, though this is achieved with the limitation that functors must be first-order for the moment. As a sideline, we develop a technique that simplifies the correctness proof of the static interpretation for first-order functors. Additionally, our language supports <em>cross-stage persistence</em> (<em>CSP</em>), a feature for code reuse spanning more than one stage, without breaking type safety. We also implemented a module system for a language of real-world use based on the latter semantics to demonstrate the utility of our formalization.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103379"},"PeriodicalIF":1.4,"publicationDate":"2025-08-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144830041","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Claudia Gómez Llanez , Paola Vallejo , Jose Aguilar
{"title":"Design patterns applied in the development of serious games for cognitive-affective training","authors":"Claudia Gómez Llanez , Paola Vallejo , Jose Aguilar","doi":"10.1016/j.scico.2025.103378","DOIUrl":"10.1016/j.scico.2025.103378","url":null,"abstract":"<div><div>Game developers have been widely adopting software design patterns (SDPs) for their usefulness in providing maintainability, scalability, and adaptability to their software products. Nevertheless, their systematic application to cognitive-affective training in the context of Serious Games (SG) has not been explored. In turn, the definition of a Cognitive-Affective model (COGAF) for SGs facilitates their use in training cognitive and affective aspects in users. This article focuses on integrating SDPs into the COGAF model to facilitate the development of SGs. The paper presents four design patterns to simplify SG development based on the COGAF model. The SDPs used in the COGAF model create a set of Java classes, which embody the architectural principles of Serious Game Design Patterns (SGDP) for cognitive-affective training. Integrating design patterns (Template Method, Factory Method, Composite, and Strategy) in COGAF contributes to the organization, reuse and maintenance of code in SGs, reducing development complexity. We validate our proposal in four ways, the first with a case study involving user interaction in SGs, the second by implementing competency questions, the third, by assessing the usability and subjective player experience, and the fourth is a statistical evaluation to assess the development times of SG developers using extended and classic COGAF. The results show that integrating design patterns into COGAF improves code organization, which translates into improved development times for SG developers. In turn, the quality and effectiveness of cognitive-affective training with the generated SGs are not affected, ensuring the coherence and completeness of the proposal.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103378"},"PeriodicalIF":1.4,"publicationDate":"2025-08-05","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144867124","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Typing tensor calculus in 2-categories (I)","authors":"Fatimah Rita Ahmadi","doi":"10.1016/j.scico.2025.103376","DOIUrl":"10.1016/j.scico.2025.103376","url":null,"abstract":"<div><div>To formalize calculations in linear algebra for the development of efficient algorithms and a framework suitable for functional programming languages and faster parallel computations, we adopt an approach that treats linear algebraic structures, such as matrices, as morphisms in the category of matrices, <span><math><mi>Ma</mi><msub><mrow><mi>t</mi></mrow><mrow><mi>k</mi></mrow></msub></math></span>. We further generalize this framework to arbitrary monoidal semiadditive categories. To extend this perspective and incorporate higher-rank matrices (tensors), we introduce the notion of semiadditive 2-categories, where matrices <span><math><msub><mrow><mi>T</mi></mrow><mrow><mi>i</mi><mi>j</mi></mrow></msub></math></span> are interpreted as 1-morphisms and tensors with four indices <span><math><msub><mrow><mi>T</mi></mrow><mrow><mi>i</mi><mi>j</mi><mi>k</mi><mi>l</mi></mrow></msub></math></span> as 2-morphisms. This formalization provides an index-free, typed framework for linear algebra that naturally accommodates matrices and tensors with up to four indices. Moreover, we extend the framework to monoidal semiadditive 2-categories and demonstrate explicit operations and vectorization techniques within the 2-category of <strong>2Vec</strong>, as introduced by Kapranov and Voevodsky.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103376"},"PeriodicalIF":1.4,"publicationDate":"2025-07-29","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144723774","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A programming framework for distributed computing continuum systems","authors":"Zhehao Zhao, Yifeng Chen","doi":"10.1016/j.scico.2025.103366","DOIUrl":"10.1016/j.scico.2025.103366","url":null,"abstract":"<div><div>Distributed Computing Continuum Systems (DCCS) integrate a large-scale cloud side and a wide-area heterogeneous edge side within the same network environment and is therefore a more general computing paradigm than cloud or edge computing. There are currently no programming technologies suitable for the support of DCCS application development. In this paper, we introduce a programming framework called <span>Wolfs</span>, which uses only basic programming constructs from programming-language theories. The framework is communication-centric in the sense that high-level communication models and lower-level communication protocols are organised in a hierarchy. Data-processing computations are inserted in the hierarchy as actions. This design allows application-level information to influence network routing and connection management. <span>Wolfs</span> programming is demonstrated in two case studies.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103366"},"PeriodicalIF":1.4,"publicationDate":"2025-07-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144723776","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Optimization of Farkas' Lemma-based linear invariant generation using divide-and-conquer with pruning","authors":"Ruibang Liu, Hongming Liu, Guoqiang Li","doi":"10.1016/j.scico.2025.103361","DOIUrl":"10.1016/j.scico.2025.103361","url":null,"abstract":"<div><div>Formal verification plays a critical role in contemporary computer science, offering mathematically rigorous methods to ensure the correctness, reliability, and security of programs. Loops, due to their complexity and uncertainty, have become a major challenge in program verification. Loop invariants are often employed to abstract the properties of loops within a program, making the automatic generation of such invariants a pivotal challenge. Among the various methods, template-based frameworks grounded in Farkas' Lemma are recognized for their effectiveness in generating tight invariants in the realm of constraint solving. Recent advances have identified the conversion from conjunctive normal form (CNF) to disjunctive normal form (DNF) as a major bottleneck, leading to a combinatorial explosion. In this study, we introduce an optimized algorithm to address the combinatorial explosion by trading off space for time efficiency. Our approach employs two key strategies, divide-and-conquer, and pruning, to boost speed. First, we apply a divide-and-conquer strategy to decompose a complex problem into smaller, more manageable subproblems that can be solved quickly and in parallel. Second, we intelligently apply a pruning strategy, navigating the depth-first search process to avoid unnecessary checks. These improvements maintain the accuracy and speed up the analysis. We constructed a small dataset to showcase the superiority of our tool, which achieved an average speedup of 9.27x on this dataset. The experiments demonstrate that our method provides significant acceleration while maintaining accuracy and indicate that our approach outperforms the state-of-the-art methods.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"247 ","pages":"Article 103361"},"PeriodicalIF":1.5,"publicationDate":"2025-07-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144656371","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Yibo Dai , Li Xie , Peng Wu , Shecheng Cui , Linhai Ma
{"title":"Intrathread method orders based adaptive testing of concurrent objects","authors":"Yibo Dai , Li Xie , Peng Wu , Shecheng Cui , Linhai Ma","doi":"10.1016/j.scico.2025.103362","DOIUrl":"10.1016/j.scico.2025.103362","url":null,"abstract":"<div><div>Concurrent data structures or classes are designed to provide safe accesses and simultaneous updates by multiple threads to shared objects in a concurrent environment, with the goal of enhancing parallelism and throughput. However, testing concurrent objects poses significant challenges due to the potential explosion of concurrency test spaces, the variety of programming vulnerabilities, and the inherent nondeterminism of concurrent test executions. In this paper, we propose an Intrathread Method Orders based Adaptive Concurrency Testing (IMOACT) framework for concurrent objects. IMOACT can capture diverse behaviors of interthread method pairs through characterizing concurrent execution contexts with intrathread method orders. Moreover, IMOACT can adaptively optimize concurrent test executions by generating scheduling sequences based on the key scheduling points visited so far, streamlining test generation and execution organically across multiple tests. Experimental case studies with typical C/C++ concurrent classes demonstrate that IMOACT outperforms baseline approaches. On average, IMOACT promotes the effectiveness of detecting concurrency bugs by 65%, and achieves a speedup of 2.43x compared to the underlying state-of-the-art concurrency testing approach.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103362"},"PeriodicalIF":1.5,"publicationDate":"2025-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144663008","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Wang Zili, Gamboa Guzman Laura P., Rozier Kristin Y.
{"title":"WEST: Interactive validation of Mission-time Linear Temporal Logic (MLTL)","authors":"Wang Zili, Gamboa Guzman Laura P., Rozier Kristin Y.","doi":"10.1016/j.scico.2025.103365","DOIUrl":"10.1016/j.scico.2025.103365","url":null,"abstract":"<div><div>Mission-time Linear Temporal Logic (MLTL) is a finite, discrete, closed-interval-bounded variant of Metric Temporal Logic (MTL) that formal methods practitioners use to specify requirements for safety-critical systems, such as aircraft and spacecraft. Our tool addresses the specification bottleneck of formal verification by providing an interactive visualization tool for MLTL that allows practitioners to validate that their MLTL specifications do indeed match the intended requirements. We provide an overview of the functionalities of the command-line interface and the graphical user interface of the WEST tool. Additionally, we provide five independent methods used to validate the tool's correctness, as well as experimental results demonstrating the tool's scalability on three suites of randomly generated MLTL formulas.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103365"},"PeriodicalIF":1.5,"publicationDate":"2025-07-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144662956","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Adrian Francalanza , Gerard Tabone , Frank Pfenning
{"title":"Grits: A message-passing programming language based on the semi-axiomatic sequent calculus","authors":"Adrian Francalanza , Gerard Tabone , Frank Pfenning","doi":"10.1016/j.scico.2025.103360","DOIUrl":"10.1016/j.scico.2025.103360","url":null,"abstract":"<div><div>This paper introduces <span>Grits</span>, a channel-based message-passing concurrent language based on the semi-axiomatic sequent calculus, a logical foundation underpinning intuitionistic session types. The language leverages modalities from adjoint logic to express a number of programming idioms such as broadcast communication and message cancellation. The <span>Grits</span> interpreter is developed using Go, and consists primarily of two components: a type-checker and an evaluator.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"248 ","pages":"Article 103360"},"PeriodicalIF":1.5,"publicationDate":"2025-07-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144685667","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}