首页 > 最新文献

Science of Computer Programming最新文献

英文 中文
Formal specification and validation of the MVM-Adapt system using Compositional I/O Abstract State Machines 基于组合I/O抽象状态机的MVM-Adapt系统的形式化规范与验证
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-09-01 Epub Date: 2025-03-17 DOI: 10.1016/j.scico.2025.103299
Silvia Bonfanti , Elvinia Riccobene , Patrizia Scandurra
To face complexity and scalability, the design of software-intensive systems requires the decomposition of the system into components, each modeled and analyzed separately from the others, and the composition of their analysis. Moreover, compositional model simulation is recognized as the only alternative available in practice when systems are large and complex, like in the cyber-physical domain, and intrinsically require combining the specification of ensembles of different parts (subsystems). Therefore, the need for simulation engines for composed model execution is getting a growing interest.
Along this research line, this paper presents the results of the compositional modeling and validation by scenarios of an industrial medical system, called MVM-Adapt, that we designed as an adaptive version of an existing mechanical lung ventilator deployed and certified to treat pneumonia during the COVID-19 pandemic.
We exploit the I/O Abstract State Machine formalism to model the device components as separate and interacting sub-systems that communicate through I/O events and adapt the device ventilation mode at run-time based on the health parameters of the patient. An orchestrated simulation coordinates the overall execution of these communicating I/O ASMs by exploiting suitable workflow patterns.
This compositional simulation technique has proved to be useful in practice to validate the new adaptive MVM's behavior and thus to support architects in better understanding this new mode of operation of the prototyped system.
为了面对复杂性和可伸缩性,软件密集型系统的设计需要将系统分解为组件,每个组件分别建模和分析,并将它们的分析组合起来。此外,当系统又大又复杂时,如在网络物理领域,并且本质上需要组合不同部件(子系统)的集成规范时,组合模型仿真被认为是实践中唯一可用的替代方案。因此,对用于组合模型执行的仿真引擎的需求越来越受到关注。沿着这条研究路线,本文介绍了一个名为MVM-Adapt的工业医疗系统的组成建模和场景验证的结果,我们将其设计为现有机械肺呼吸机的自适应版本,该系统已部署并经过认证,可在COVID-19大流行期间治疗肺炎。我们利用I/O抽象状态机形式将设备组件建模为通过I/O事件进行通信的独立交互子系统,并根据患者的健康参数在运行时调整设备通风模式。经过编排的模拟通过利用合适的工作流模式来协调这些通信I/O asm的整体执行。这种组合模拟技术在实践中被证明是有用的,可以验证新的自适应MVM的行为,从而支持架构师更好地理解原型系统的这种新的操作模式。
{"title":"Formal specification and validation of the MVM-Adapt system using Compositional I/O Abstract State Machines","authors":"Silvia Bonfanti ,&nbsp;Elvinia Riccobene ,&nbsp;Patrizia Scandurra","doi":"10.1016/j.scico.2025.103299","DOIUrl":"10.1016/j.scico.2025.103299","url":null,"abstract":"<div><div>To face complexity and scalability, the design of software-intensive systems requires the <em>decomposition</em> of the system into components, each modeled and analyzed separately from the others, and the <em>composition</em> of their analysis. Moreover, compositional model simulation is recognized as the only alternative available in practice when systems are large and complex, like in the cyber-physical domain, and intrinsically require combining the specification of ensembles of different parts (subsystems). Therefore, the need for simulation engines for composed model execution is getting a growing interest.</div><div>Along this research line, this paper presents the results of the compositional modeling and validation by scenarios of an industrial medical system, called MVM-Adapt, that we designed as an adaptive version of an existing mechanical lung ventilator deployed and certified to treat pneumonia during the COVID-19 pandemic.</div><div>We exploit the I/O Abstract State Machine formalism to model the device components as separate and interacting sub-systems that communicate through I/O events and adapt the device ventilation mode at run-time based on the health parameters of the patient. An orchestrated simulation coordinates the overall execution of these communicating I/O ASMs by exploiting suitable workflow patterns.</div><div>This compositional simulation technique has proved to be useful in practice to validate the new adaptive MVM's behavior and thus to support architects in better understanding this new mode of operation of the prototyped system.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"244 ","pages":"Article 103299"},"PeriodicalIF":1.5,"publicationDate":"2025-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143682184","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Software architecture decision-making process: The practitioners' view from the Brazilian industry 软件架构决策过程:来自巴西行业的从业者的观点
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-09-01 Epub Date: 2025-03-20 DOI: 10.1016/j.scico.2025.103302
Lucas Carvalho , Tayana Conte
In the development of modern software solutions, architecture plays a crucial role in the success of the solution, as it comprises structural and behavioral features of the system, along with critical decisions about the system. Given this, several studies have been conducted in the literature about architecture decision-making process, but these studies are normally conducted with professionals outside of the Brazilian perspective or restricted to a specific company. Although architecture knowledge is the same, differences, like cultural behaviors, professional experiences and academic background, may arise. For this reason, this study presents the architecture decision-making from the view of Brazilian software practitioners. The results are a compilation of findings from 12 semi-structured interviews with senior practitioners from different companies and provide insights about the decision-making process. Regarding the context in which decisions are made, it is found that practitioners often guide and influence decisions and use experience as their main foundation, and the process is normally influenced by features of the company, like its domain and size. Concerning the decision-making process, practitioners in most cases use PoCs, organizational patterns or requirements to define the architecture. Group decision-making is often followed, although no systematic approach is used. Also, no tools are employed to support decision-making, and the decisions are documented and revised frequently.
在现代软件解决方案的开发中,体系结构在解决方案的成功中起着至关重要的作用,因为它包含系统的结构和行为特征,以及关于系统的关键决策。鉴于此,文献中已经进行了一些关于建筑决策过程的研究,但这些研究通常是由巴西以外的专业人士进行的,或者仅限于特定的公司。虽然建筑知识是相同的,但可能会产生文化行为、专业经历和学术背景等差异。出于这个原因,本研究从巴西软件从业者的角度提出了架构决策。研究结果是对来自不同公司的高级从业人员进行的12次半结构化访谈的结果汇编,并提供了有关决策过程的见解。关于决策的环境,我们发现从业者经常指导和影响决策,并将经验作为其主要基础,而决策过程通常受到公司特征的影响,如其领域和规模。关于决策过程,从业者在大多数情况下使用poc、组织模式或需求来定义体系结构。虽然没有使用系统的方法,但经常遵循群体决策。此外,没有使用任何工具来支持决策,并且经常记录和修订决策。
{"title":"Software architecture decision-making process: The practitioners' view from the Brazilian industry","authors":"Lucas Carvalho ,&nbsp;Tayana Conte","doi":"10.1016/j.scico.2025.103302","DOIUrl":"10.1016/j.scico.2025.103302","url":null,"abstract":"<div><div>In the development of modern software solutions, architecture plays a crucial role in the success of the solution, as it comprises structural and behavioral features of the system, along with critical decisions about the system. Given this, several studies have been conducted in the literature about architecture decision-making process, but these studies are normally conducted with professionals outside of the Brazilian perspective or restricted to a specific company. Although architecture knowledge is the same, differences, like cultural behaviors, professional experiences and academic background, may arise. For this reason, this study presents the architecture decision-making from the view of Brazilian software practitioners. The results are a compilation of findings from 12 semi-structured interviews with senior practitioners from different companies and provide insights about the decision-making process. Regarding the context in which decisions are made, it is found that practitioners often guide and influence decisions and use experience as their main foundation, and the process is normally influenced by features of the company, like its domain and size. Concerning the decision-making process, practitioners in most cases use PoCs, organizational patterns or requirements to define the architecture. Group decision-making is often followed, although no systematic approach is used. Also, no tools are employed to support decision-making, and the decisions are documented and revised frequently.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"244 ","pages":"Article 103302"},"PeriodicalIF":1.5,"publicationDate":"2025-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143682185","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}
引用次数: 0
Comparing differentiable logics for learning with logical constraints 比较具有逻辑约束的可微逻辑学习
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-09-01 Epub Date: 2025-03-07 DOI: 10.1016/j.scico.2025.103280
Thomas Flinkow , Barak A. Pearlmutter , Rosemary Monahan
Extensive research on formal verification of machine learning systems indicates that learning from data alone often fails to capture underlying background knowledge, such as specifications implicitly available in the data. Various neural network verifiers have been developed to ensure that a machine-learnt model satisfies correctness and safety properties; however, they typically assume a trained network with fixed weights. A promising approach for creating machine learning models that inherently satisfy constraints after training is to encode background knowledge as explicit logical constraints that guide the learning process via so-called differentiable logics. In this paper, we experimentally compare and evaluate various logics from the literature, present our findings, and highlight open problems for future work. We evaluate differentiable logics with respect to their suitability in training, and use a neural network verifier to check their ability to establish formal guarantees. The complete source code for our experiments is available as an easy-to-use framework for training with differentiable logics at https://github.com/tflinkow/comparing-differentiable-logics.
对机器学习系统形式化验证的广泛研究表明,仅从数据中学习往往无法捕获潜在的背景知识,例如数据中隐含的规范。已经开发了各种神经网络验证器,以确保机器学习模型满足正确性和安全性;然而,它们通常假设一个具有固定权重的训练过的网络。创建训练后内在满足约束的机器学习模型的一个有前途的方法是将背景知识编码为通过所谓的可微逻辑指导学习过程的显式逻辑约束。在本文中,我们通过实验比较和评估了文献中的各种逻辑,展示了我们的发现,并强调了未来工作的开放性问题。我们评估了可微逻辑在训练中的适用性,并使用神经网络验证器来检查它们建立形式保证的能力。我们实验的完整源代码是一个易于使用的框架,可以在https://github.com/tflinkow/comparing-differentiable-logics上使用可微逻辑进行训练。
{"title":"Comparing differentiable logics for learning with logical constraints","authors":"Thomas Flinkow ,&nbsp;Barak A. Pearlmutter ,&nbsp;Rosemary Monahan","doi":"10.1016/j.scico.2025.103280","DOIUrl":"10.1016/j.scico.2025.103280","url":null,"abstract":"<div><div>Extensive research on formal verification of machine learning systems indicates that learning from data alone often fails to capture underlying background knowledge, such as specifications implicitly available in the data. Various neural network verifiers have been developed to ensure that a machine-learnt model satisfies correctness and safety properties; however, they typically assume a trained network with fixed weights. A promising approach for creating machine learning models that inherently satisfy constraints after training is to encode background knowledge as explicit logical constraints that guide the learning process via so-called differentiable logics. In this paper, we experimentally compare and evaluate various logics from the literature, present our findings, and highlight open problems for future work. We evaluate differentiable logics with respect to their suitability in training, and use a neural network verifier to check their ability to establish formal guarantees. The complete source code for our experiments is available as an easy-to-use framework for training with differentiable logics at <span><span>https://github.com/tflinkow/comparing-differentiable-logics</span><svg><path></path></svg></span>.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"244 ","pages":"Article 103280"},"PeriodicalIF":1.5,"publicationDate":"2025-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143620597","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
What does AI need to know to drive: Testing relevance of knowledge 人工智能需要知道什么才能驱动:测试知识的相关性
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-09-01 Epub Date: 2025-03-04 DOI: 10.1016/j.scico.2025.103297
Dominik Grundt, Astrid Rakow, Philipp Borchers, Eike Möhlmann
Artificial Intelligence (AI) plays an important role in managing the complexity of automated driving. Nonetheless, training and ensuring the safety of AI is challenging. The safe generalization from a known to an unknown situation remains an unsolved problem. Infusing knowledge into AI driving functions seems a promising approach to address generalization, development costs, and training efficiency. We reason that ascertaining the relevance of infused knowledge provides a strong indication of the correct execution of previous development phases of knowledge infusion. As a causal reason for AI performance, relevant knowledge is important for explaining AI behavior. This paper defines a novel notion of relevant knowledge in knowledge-infused AI and for requirements satisfaction in traffic scenarios. We present a scenario-based testing procedure that not only checks whether a knowledge-infused AI model satisfies a given requirement R but also provides statements on the relevance of infused knowledge. Finally, we describe a systematic method for generating abstract knowledge scenarios to enable an efficient application of our relevance testing procedure.
人工智能(AI)在管理自动驾驶的复杂性方面发挥着重要作用。尽管如此,训练和确保人工智能的安全仍具有挑战性。从已知情况到未知情况的安全推广仍然是一个未解决的问题。将知识注入人工智能驱动功能似乎是解决泛化、开发成本和培训效率问题的一种很有前途的方法。我们认为,确定知识注入的相关性为知识注入的前一个发展阶段的正确执行提供了强有力的指示。作为AI性能的因果原因,相关知识对于解释AI行为非常重要。本文定义了知识注入人工智能中相关知识和交通场景需求满足的新概念。我们提出了一个基于场景的测试过程,该过程不仅可以检查知识注入的AI模型是否满足给定的需求R,还可以提供关于注入知识的相关性的陈述。最后,我们描述了一种生成抽象知识场景的系统方法,以使我们的相关性测试过程能够有效地应用。
{"title":"What does AI need to know to drive: Testing relevance of knowledge","authors":"Dominik Grundt,&nbsp;Astrid Rakow,&nbsp;Philipp Borchers,&nbsp;Eike Möhlmann","doi":"10.1016/j.scico.2025.103297","DOIUrl":"10.1016/j.scico.2025.103297","url":null,"abstract":"<div><div>Artificial Intelligence (AI) plays an important role in managing the complexity of automated driving. Nonetheless, training and ensuring the safety of AI is challenging. The safe generalization from a known to an unknown situation remains an unsolved problem. Infusing knowledge into AI driving functions seems a promising approach to address generalization, development costs, and training efficiency. We reason that ascertaining the relevance of infused knowledge provides a strong indication of the correct execution of previous development phases of knowledge infusion. As a causal reason for AI performance, relevant knowledge is important for explaining AI behavior. This paper defines a novel notion of <em>relevant knowledge</em> in knowledge-infused AI and for requirements satisfaction in traffic scenarios. We present a scenario-based testing procedure that not only checks whether a knowledge-infused AI model satisfies a given requirement <span>R</span> but also provides statements on the relevance of infused knowledge. Finally, we describe a systematic method for generating abstract knowledge scenarios to enable an efficient application of our relevance testing procedure.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"244 ","pages":"Article 103297"},"PeriodicalIF":1.5,"publicationDate":"2025-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143551680","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Graph neural network-based long method and blob code smell detection 基于图神经网络的长方法和blob代码气味检测
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2025-02-18 DOI: 10.1016/j.scico.2025.103284
Minnan Zhang , Jingdong Jia , Luiz Fernando Capretz , Xin Hou , Huobin Tan
The concept of code smell was first proposed in the late nineties, to refer to signals that code may need refactoring. While not necessarily affecting functionality, code smell can hinder understandability and future scalability of the program. As a result, the precise detection of code smell has become an important topic in coding research. However, current detection methods are limited by imbalanced and industrial-irrelevant datasets, a lack of sufficient structural and logical information on the code, and simple model architecture. Given these limitations, this paper utilized an industry-relevant and sufficient dataset and then developed a graph neural network to better detect code smell. First, we identified Long Method and Blob as our research subjects due to their frequent occurrence and impacts on the maintainability of software. We then designed modified fuzzy sampling with focalloss to address the issue of data imbalance. Second, to deal with the large volume of data, we proposed a global and local attention scoring mechanism to extract the key information from the code. Third, in order to design a graph neural network specifically for the abstract syntax tree of code, we combined Euclidean space and non-Euclidean space. Finally, we compared our method with other machine learning methods and deep learning methods. The results demonstrate that our method outperforms the other methods on Long Method and Blob, which indicates the effectiveness of our proposed method.
代码气味的概念最早是在90年代后期提出的,指的是代码可能需要重构的信号。虽然不一定会影响功能,但代码气味会阻碍程序的可理解性和未来的可伸缩性。因此,代码气味的精确检测已成为编码研究中的一个重要课题。然而,目前的检测方法受到不平衡和与行业无关的数据集、缺乏足够的代码结构和逻辑信息以及简单的模型架构的限制。鉴于这些限制,本文利用了一个与行业相关且足够的数据集,然后开发了一个图神经网络来更好地检测代码气味。首先,我们确定了Long Method和Blob作为我们的研究对象,因为它们的频繁出现和对软件可维护性的影响。然后,我们设计了带有焦损的改进模糊采样来解决数据不平衡的问题。其次,为了处理海量数据,我们提出了一种全局和局部关注评分机制,从代码中提取关键信息。第三,将欧几里得空间与非欧几里得空间相结合,设计了专门针对代码抽象语法树的图神经网络。最后,我们将我们的方法与其他机器学习方法和深度学习方法进行了比较。结果表明,该方法在Long method和Blob上优于其他方法,表明了该方法的有效性。
{"title":"Graph neural network-based long method and blob code smell detection","authors":"Minnan Zhang ,&nbsp;Jingdong Jia ,&nbsp;Luiz Fernando Capretz ,&nbsp;Xin Hou ,&nbsp;Huobin Tan","doi":"10.1016/j.scico.2025.103284","DOIUrl":"10.1016/j.scico.2025.103284","url":null,"abstract":"<div><div>The concept of code smell was first proposed in the late nineties, to refer to signals that code may need refactoring. While not necessarily affecting functionality, code smell can hinder understandability and future scalability of the program. As a result, the precise detection of code smell has become an important topic in coding research. However, current detection methods are limited by imbalanced and industrial-irrelevant datasets, a lack of sufficient structural and logical information on the code, and simple model architecture. Given these limitations, this paper utilized an industry-relevant and sufficient dataset and then developed a graph neural network to better detect code smell. First, we identified Long Method and Blob as our research subjects due to their frequent occurrence and impacts on the maintainability of software. We then designed modified fuzzy sampling with focalloss to address the issue of data imbalance. Second, to deal with the large volume of data, we proposed a global and local attention scoring mechanism to extract the key information from the code. Third, in order to design a graph neural network specifically for the abstract syntax tree of code, we combined Euclidean space and non-Euclidean space. Finally, we compared our method with other machine learning methods and deep learning methods. The results demonstrate that our method outperforms the other methods on Long Method and Blob, which indicates the effectiveness of our proposed method.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103284"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143488855","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
SBD: Securing safe rust automatically from unsafe rust SBD:自动从不安全的锈迹中保护安全锈迹
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2025-02-19 DOI: 10.1016/j.scico.2025.103281
Shaowen Li, Hiroyuiki Sato
System programming expects programmers to have fine control over available resources to ensure both the correctness and efficiency of the system. Programming languages designed for this type of task provide little abstraction of the underlying hardware. With greater power to interact directly with the machine comes greater responsibility for programmers to manage the hardware themselves to avoid any undefined behavior. C and C++ have been the long-standing de facto languages in this field as they offer both the programming experience of a modern language and the ability to manipulate low-level resources with the abstraction of pointers. However, this responsibility is demanding for programmers, leading to numerous bugs caused by improper resource management.
Rust is a rising system programming language aiming to combine both low-level resource manipulation and high-level resource management. The design philosophy of Rust is to make the compiler play a vital role in resource management. A set of static analysis unique to Rust are performed at compile time to ensure resources are handled correctly without runtime cost. Nevertheless, static analysis is inherently conservative and Rust addresses this by providing a feature called unsafe Rust, which is exempt from its strict static checks. Various unsafe operations, such as raw pointer dereferencing and foreign function calls, are only permitted within an unsafe code block. This is essential to make the language sufficiently expressive. Nonetheless, Rust's unsafe block only matters statically for type checking, without any runtime assurance. As a consequence, the effects of unsafe operations within an unsafe block can spread to the outside safe code and jeopardize its safety.
We present Safety Block Division (SBD), a completely automatic solution to isolate safe Rust from unsafe Rust. The fundamental design of SBD is its safety data-flow analysis performed on Rust intermediate representation (IR) to fully incorporate language features. This distinguishes SBD from previous works. Past designs primarily operate on LLVM IR and require manual efforts or external tools. SBD is entirely built into the Rust compiler, and thus no programmer involvement is required. We extensively evaluate SBD on popular Rust crates (libraries). Our experiments reveal that SBD incurs negligible binary size (0.31% increase on average) and runtime (a geometric mean of 7.52% increase across eight benchmarks) overhead. We also demonstrate that SBD is capable of protecting against real-world vulnerabilities.
系统编程要求程序员对可用资源进行精细控制,以确保系统的正确性和效率。专为此类任务设计的编程语言几乎没有对底层硬件进行抽象。随着与机器直接交互的能力增强,程序员有更大的责任自行管理硬件,以避免出现任何未定义的行为。C 和 C++ 一直是这一领域的主流语言,因为它们既能提供现代语言的编程体验,又能利用指针的抽象功能操作底层资源。Rust 是一种新兴的系统编程语言,旨在将底层资源操作和高层资源管理结合起来。Rust 的设计理念是让编译器在资源管理中发挥重要作用。在编译时,Rust 会执行一套独有的静态分析,以确保资源得到正确处理,而不会产生运行时成本。然而,静态分析本质上是保守的,Rust 通过提供一种称为不安全 Rust 的功能来解决这一问题,这种功能不受严格的静态检查的限制。各种不安全操作,如原始指针反引用和外来函数调用,只允许在不安全代码块中进行。这对于使语言具有足够的表现力至关重要。尽管如此,Rust 的不安全代码块只在类型检查中起静态作用,而没有任何运行时保证。因此,不安全代码块中不安全操作的影响可能会扩散到外部安全代码,并危及其安全性。我们提出了安全代码块划分(SBD),这是一种完全自动的解决方案,可将安全的 Rust 代码与不安全的 Rust 代码隔离开来。SBD 的基本设计是在 Rust 中间表示(IR)上进行安全数据流分析,以充分结合语言特性。这使 SBD 有别于以往的工作。以往的设计主要在 LLVM IR 上运行,需要人工或外部工具。SBD 完全内置在 Rust 编译器中,因此不需要程序员的参与。我们在流行的 Rust Crates(库)上对 SBD 进行了广泛评估。实验结果表明,SBD 产生的二进制大小(平均增加 0.31%)和运行时间(在八个基准中几何平均增加 7.52%)开销可以忽略不计。我们还证明,SBD 能够抵御现实世界中的漏洞。
{"title":"SBD: Securing safe rust automatically from unsafe rust","authors":"Shaowen Li,&nbsp;Hiroyuiki Sato","doi":"10.1016/j.scico.2025.103281","DOIUrl":"10.1016/j.scico.2025.103281","url":null,"abstract":"<div><div>System programming expects programmers to have fine control over available resources to ensure both the correctness and efficiency of the system. Programming languages designed for this type of task provide little abstraction of the underlying hardware. With greater power to interact directly with the machine comes greater responsibility for programmers to manage the hardware themselves to avoid any undefined behavior. C and C++ have been the long-standing de facto languages in this field as they offer both the programming experience of a modern language and the ability to manipulate low-level resources with the abstraction of pointers. However, this responsibility is demanding for programmers, leading to numerous bugs caused by improper resource management.</div><div>Rust is a rising system programming language aiming to combine both low-level resource manipulation and high-level resource management. The design philosophy of Rust is to make the compiler play a vital role in resource management. A set of static analysis unique to Rust are performed at compile time to ensure resources are handled correctly without runtime cost. Nevertheless, static analysis is inherently conservative and Rust addresses this by providing a feature called <em>unsafe Rust</em>, which is exempt from its strict static checks. Various unsafe operations, such as raw pointer dereferencing and foreign function calls, are only permitted within an unsafe code block. This is essential to make the language sufficiently expressive. Nonetheless, Rust's <em>unsafe block</em> only matters statically for type checking, without any runtime assurance. As a consequence, the effects of unsafe operations within an unsafe block can spread to the outside safe code and jeopardize its safety.</div><div>We present <em><u>S</u>afety <u>B</u>lock <u>D</u>ivision</em> (SBD), a completely automatic solution to isolate safe Rust from unsafe Rust. The fundamental design of SBD is its safety data-flow analysis performed on Rust intermediate representation (IR) to fully incorporate language features. This distinguishes SBD from previous works. Past designs primarily operate on LLVM IR and require manual efforts or external tools. SBD is entirely built into the Rust compiler, and thus no programmer involvement is required. We extensively evaluate SBD on popular Rust crates (libraries). Our experiments reveal that SBD incurs negligible binary size (0.31% increase on average) and runtime (a geometric mean of 7.52% increase across eight benchmarks) overhead. We also demonstrate that SBD is capable of protecting against real-world vulnerabilities.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103281"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143454135","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Extending the EB4EB framework with parameterised events 使用参数化事件扩展EB4EB框架
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2025-02-19 DOI: 10.1016/j.scico.2025.103279
Peter Rivière, Neeraj Kumar Singh, Yamine Ait-Ameur, Guillaume Dupont
EB4EB, standing for Event-B for Event-B, is a framework that supports the formalisation of Event-B models using first-order logic and set-theory, so that it becomes possible to manipulate them as first-class objects. This framework relies on an Event-B algebraic theory, which serves as a meta-theory formalising, explicitly, all of the features of an Event-B machine. States, events, invariants, variants, etc... are formalised through data-types and operators. When this meta-theory is instantiated, an Event-B model becomes a first-order logic and set-theoretic formula, described in an Event-B context.
Because it can handle machine elements as terms in formulas, the EB4EB framework enables the definition of new specific proof obligations and analyses. Such analyses may then be applied to any EB4EB machines in order to establish advanced properties, not natively present in the Event-B method, such as deadlock-freeness or liveness requirements. These analyses are non-intrusive since they do not require to alter the machine in order to be performed.
In the previous formalisation of the EB4EB framework only states and events were handled, limiting the expressive reasoning power of the framework. This paper presents an extension of the EB4EB framework to support parameterised events, an important feature of Event-B. This extension is not straightforward in EB4EB. Indeed, the typing system supported by Event-B theories is not rich enough to describe such extension in a constructive manner as for the other Event-B features formalised in EB4EB. The proposed solution, described in this paper, consists in defining an axiomatic formalisation of event parameters definitions. We also show that the proof obligations and model analyses we have defined scale to handle event parameters. The approach is illustrated on different case studies we have developed.
EB4EB,代表Event-B的Event-B,是一个使用一阶逻辑和集合论支持Event-B模型形式化的框架,因此可以将它们作为一级对象来操作。这个框架依赖于Event-B代数理论,它作为一个元理论,显式地形式化了Event-B机器的所有特征。状态、事件、不变量、变量等等……通过数据类型和操作符形式化。当这个元理论被实例化时,Event-B模型就变成了在Event-B上下文中描述的一阶逻辑和集合论公式。因为它可以将机器元素作为公式中的术语来处理,所以EB4EB框架可以定义新的特定证明义务和分析。这样的分析可以应用到任何EB4EB机器上,以建立Event-B方法中原生不存在的高级属性,例如死锁自由或活动需求。这些分析是非侵入性的,因为它们不需要为了执行而改变机器。在以前的EB4EB框架的形式化中,只处理状态和事件,限制了框架的表达推理能力。本文提出了EB4EB框架的扩展,以支持参数化事件,这是Event-B的一个重要特征。这个扩展是不直接在EB4EB。事实上,事件- b理论支持的类型系统还不够丰富,无法像在EB4EB中形式化的其他事件- b特性那样以建设性的方式描述这种扩展。本文提出的解决方案包括定义事件参数定义的公理化形式化。我们还展示了我们定义的证明义务和模型分析来处理事件参数。我们开发的不同案例研究说明了这种方法。
{"title":"Extending the EB4EB framework with parameterised events","authors":"Peter Rivière,&nbsp;Neeraj Kumar Singh,&nbsp;Yamine Ait-Ameur,&nbsp;Guillaume Dupont","doi":"10.1016/j.scico.2025.103279","DOIUrl":"10.1016/j.scico.2025.103279","url":null,"abstract":"<div><div>EB4EB, standing for <em>Event-B for Event-B</em>, is a framework that supports the formalisation of Event-B models using first-order logic and set-theory, so that it becomes possible to manipulate them as first-class objects. This framework relies on an Event-B algebraic theory, which serves as a meta-theory formalising, explicitly, all of the features of an Event-B machine. States, events, invariants, variants, etc... are formalised through data-types and operators. When this meta-theory is instantiated, an Event-B model becomes a first-order logic and set-theoretic formula, described in an Event-B context.</div><div>Because it can handle machine elements as terms in formulas, the EB4EB framework enables the definition of new specific proof obligations and <em>analyses</em>. Such analyses may then be applied to any EB4EB machines in order to establish advanced properties, not natively present in the Event-B method, such as deadlock-freeness or liveness requirements. These analyses are <em>non-intrusive</em> since they do not require to alter the machine in order to be performed.</div><div>In the previous formalisation of the EB4EB framework only states and events were handled, limiting the expressive reasoning power of the framework. This paper presents an extension of the EB4EB framework to support parameterised events, an important feature of Event-B. This extension is not straightforward in EB4EB. Indeed, the typing system supported by Event-B theories is not rich enough to describe such extension in a constructive manner as for the other Event-B features formalised in EB4EB. The proposed solution, described in this paper, consists in defining an axiomatic formalisation of event parameters definitions. We also show that the proof obligations and model analyses we have defined scale to handle event parameters. The approach is illustrated on different case studies we have developed.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103279"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143480241","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Deductive verification of solidity smart contracts with SSCalc 基于SSCalc的可靠智能合约的演绎验证
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2025-01-23 DOI: 10.1016/j.scico.2025.103267
Diego Marmsoler, Billy Thornton
Smart contracts are programs stored on the blockchain, often developed in a high-level programming language, the most popular of which is Solidity. Smart contracts are used to automate financial transactions and thus bugs can lead to large financial losses. With this paper, we address this problem by describing a verification environment for Solidity in Isabelle/HOL. To this end, we first describe a calculus to reason about Solidity smart contracts. The calculus is formalized in Isabelle/HOL and its soundness is mechanically verified. Then, we verify a theorem which guarantees that all instances of an arbitrary contract type satisfy a corresponding invariant. The theorem can be used to verify invariants for Solidity smart contracts. This is demonstrated by a case study in which we use our approach to verify a simple token implemented in Solidity. Our results show that the framework has the potential to significantly reduce the verification effort compared to verifying directly from the semantics.
智能合约是存储在区块链上的程序,通常用高级编程语言开发,其中最流行的是Solidity。智能合约用于自动化金融交易,因此错误可能导致巨大的经济损失。在本文中,我们通过描述Isabelle/HOL中的Solidity验证环境来解决这个问题。为此,我们首先描述了一个关于Solidity智能合约的演算。在Isabelle/HOL中对微积分进行了形式化,并对其合理性进行了机械验证。然后,我们验证了一个定理,该定理保证任意契约类型的所有实例都满足相应的不变量。该定理可用于验证Solidity智能合约的不变量。这是通过一个案例研究来证明的,在这个案例研究中,我们使用我们的方法来验证在Solidity中实现的一个简单令牌。我们的结果表明,与直接从语义进行验证相比,该框架具有显著减少验证工作的潜力。
{"title":"Deductive verification of solidity smart contracts with SSCalc","authors":"Diego Marmsoler,&nbsp;Billy Thornton","doi":"10.1016/j.scico.2025.103267","DOIUrl":"10.1016/j.scico.2025.103267","url":null,"abstract":"<div><div>Smart contracts are programs stored on the blockchain, often developed in a high-level programming language, the most popular of which is Solidity. Smart contracts are used to automate financial transactions and thus bugs can lead to large financial losses. With this paper, we address this problem by describing a verification environment for Solidity in Isabelle/HOL. To this end, we first describe a calculus to reason about Solidity smart contracts. The calculus is formalized in Isabelle/HOL and its soundness is mechanically verified. Then, we verify a theorem which guarantees that all instances of an arbitrary contract type satisfy a corresponding invariant. The theorem can be used to verify invariants for Solidity smart contracts. This is demonstrated by a case study in which we use our approach to verify a simple token implemented in Solidity. Our results show that the framework has the potential to significantly reduce the verification effort compared to verifying directly from the semantics.</div></div>","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103267"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143176861","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"OA","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
引用次数: 0
Introduction to the TASE 2023 Special Issue TASE 2023特刊简介
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2025-01-08 DOI: 10.1016/j.scico.2025.103262
Neeraj Kumar Singh , Cristina David , Meng Sun , Meng Wang
{"title":"Introduction to the TASE 2023 Special Issue","authors":"Neeraj Kumar Singh ,&nbsp;Cristina David ,&nbsp;Meng Sun ,&nbsp;Meng Wang","doi":"10.1016/j.scico.2025.103262","DOIUrl":"10.1016/j.scico.2025.103262","url":null,"abstract":"","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103262"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143562613","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}
引用次数: 0
Preface: Fundamentals of Software Engineering (extended versions of selected papers of FSEN 2023) 前言:软件工程基础(FSEN 2023选定论文的扩展版本)
IF 1.5 4区 计算机科学 Q3 COMPUTER SCIENCE, SOFTWARE ENGINEERING Pub Date : 2025-07-01 Epub Date: 2024-11-28 DOI: 10.1016/j.scico.2024.103244
Hossein Hojjat , Erika Ábrahám
{"title":"Preface: Fundamentals of Software Engineering (extended versions of selected papers of FSEN 2023)","authors":"Hossein Hojjat ,&nbsp;Erika Ábrahám","doi":"10.1016/j.scico.2024.103244","DOIUrl":"10.1016/j.scico.2024.103244","url":null,"abstract":"","PeriodicalId":49561,"journal":{"name":"Science of Computer Programming","volume":"243 ","pages":"Article 103244"},"PeriodicalIF":1.5,"publicationDate":"2025-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"143562617","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}
引用次数: 0
期刊
Science of Computer Programming
全部 Acc. Chem. Res. ACS Applied Bio Materials ACS Appl. Electron. Mater. ACS Appl. Energy Mater. ACS Appl. Mater. Interfaces ACS Appl. Nano Mater. ACS Appl. Polym. Mater. ACS BIOMATER-SCI ENG ACS Catal. ACS Cent. Sci. ACS Chem. Biol. ACS Chemical Health & Safety ACS Chem. Neurosci. ACS Comb. Sci. ACS Earth Space Chem. ACS Energy Lett. ACS Infect. Dis. ACS Macro Lett. ACS Mater. Lett. ACS Med. Chem. Lett. ACS Nano ACS Omega ACS Photonics ACS Sens. ACS Sustainable Chem. Eng. ACS Synth. Biol. Anal. Chem. BIOCHEMISTRY-US Bioconjugate Chem. BIOMACROMOLECULES Chem. Res. Toxicol. Chem. Rev. Chem. Mater. CRYST GROWTH DES ENERG FUEL Environ. Sci. Technol. Environ. Sci. Technol. Lett. Eur. J. Inorg. Chem. IND ENG CHEM RES Inorg. Chem. J. Agric. Food. Chem. J. Chem. Eng. Data J. Chem. Educ. J. Chem. Inf. Model. J. Chem. Theory Comput. J. Med. Chem. J. Nat. Prod. J PROTEOME RES J. Am. Chem. Soc. LANGMUIR MACROMOLECULES Mol. Pharmaceutics Nano Lett. Org. Lett. ORG PROCESS RES DEV ORGANOMETALLICS J. Org. Chem. J. Phys. Chem. J. Phys. Chem. A J. Phys. Chem. B J. Phys. Chem. C J. Phys. Chem. Lett. Analyst Anal. Methods Biomater. Sci. Catal. Sci. Technol. Chem. Commun. Chem. Soc. Rev. CHEM EDUC RES PRACT CRYSTENGCOMM Dalton Trans. Energy Environ. Sci. ENVIRON SCI-NANO ENVIRON SCI-PROC IMP ENVIRON SCI-WAT RES Faraday Discuss. Food Funct. Green Chem. Inorg. Chem. Front. Integr. Biol. J. Anal. At. Spectrom. J. Mater. Chem. A J. Mater. Chem. B J. Mater. Chem. C Lab Chip Mater. Chem. Front. Mater. Horiz. MEDCHEMCOMM Metallomics Mol. Biosyst. Mol. Syst. Des. Eng. Nanoscale Nanoscale Horiz. Nat. Prod. Rep. New J. Chem. Org. Biomol. Chem. Org. Chem. Front. PHOTOCH PHOTOBIO SCI PCCP Polym. Chem.
×
引用
GB/T 7714-2015
复制
MLA
复制
APA
复制
导出至
BibTeX EndNote RefMan NoteFirst NoteExpress
×
0
微信
客服QQ
Book学术公众号 扫码关注我们
反馈
×
意见反馈
请填写您的意见或建议
请填写您的手机或邮箱
×
提示
您的信息不完整,为了账户安全,请先补充。
现在去补充
×
提示
您因"违规操作"
具体请查看互助需知
我知道了
×
提示
现在去查看 取消
×
提示
确定
Book学术官方微信
Book学术文献互助
Book学术文献互助群
群 号:604180095
Book学术
文献互助 智能选刊 最新文献 互助须知 联系我们:info@booksci.cn
Book学术提供免费学术资源搜索服务,方便国内外学者检索中英文文献。致力于提供最便捷和优质的服务体验。
Copyright © 2023 Book学术 All rights reserved.
ghs 京公网安备 11010802042870号 京ICP备2023020795号-1