首页 > 最新文献

Formal Methods in System Design最新文献

英文 中文
Preserving provability over GPU program optimizations with annotation-aware transformations. 通过注释感知转换来保持GPU程序优化的可证明性。
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2025-01-01 Epub Date: 2025-11-22 DOI: 10.1007/s10703-025-00480-7
Ömer Şakar, Mohsen Safari, Marieke Huisman, Anton Wijs

GPU programs are widely used in industry. To obtain the best performance, a typical development process involves the manual or semi-automatic application of optimizations prior to compiling the code. Such optimizations can introduce errors. To avoid the introduction of errors, we can augment GPU programs with (pre- and postcondition-style) annotations to capture functional properties. However, keeping these annotations correct when optimizing GPU programs is labor-intensive and error-prone. This paper presents an approach to automatically apply optimizations to GPU programs while preserving provability by defining annotation-aware transformations. It applies frequently-used GPU optimizations, but besides transforming code, it also transforms the annotations. The approach has been implemented in the Alpinist tool and we evaluate Alpinist in combination with the VerCors program verifier, to automatically apply optimizations to a collection of verified programs and reverify them.

GPU程序在工业中被广泛使用。为了获得最佳性能,典型的开发过程包括在编译代码之前手动或半自动地应用优化。这样的优化可能会引入错误。为了避免引入错误,我们可以使用(前置和后置条件风格)注释来增强GPU程序,以捕获功能属性。然而,在优化GPU程序时保持这些注释的正确性是一项耗费人力且容易出错的工作。本文提出了一种通过定义注释感知转换来保持可证明性的同时自动应用优化到GPU程序的方法。它应用常用的GPU优化,但除了转换代码,它还转换注释。该方法已在Alpinist工具中实现,我们将Alpinist与VerCors程序验证器结合进行评估,以自动将优化应用于已验证的程序集合并对其进行验证。
{"title":"Preserving provability over GPU program optimizations with annotation-aware transformations.","authors":"Ömer Şakar, Mohsen Safari, Marieke Huisman, Anton Wijs","doi":"10.1007/s10703-025-00480-7","DOIUrl":"10.1007/s10703-025-00480-7","url":null,"abstract":"<p><p>GPU programs are widely used in industry. To obtain the best performance, a typical development process involves the manual or semi-automatic application of optimizations prior to compiling the code. Such optimizations can introduce errors. To avoid the introduction of errors, we can augment GPU programs with (pre- and postcondition-style) annotations to capture functional properties. However, keeping these annotations correct when optimizing GPU programs is labor-intensive and error-prone. This paper presents an approach to automatically apply optimizations to GPU programs while preserving provability by defining <i>annotation-aware transformations</i>. It applies frequently-used GPU optimizations, but besides transforming code, it also transforms the annotations. The approach has been implemented in the Alpinist tool and we evaluate Alpinist in combination with the VerCors program verifier, to automatically apply optimizations to a collection of verified programs and reverify them.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"67 3","pages":"316-372"},"PeriodicalIF":0.8,"publicationDate":"2025-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12662985/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145647899","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
Predicate abstraction for hyperliveness verification. 用于高活性验证的谓词抽象。
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2025-01-01 Epub Date: 2025-07-16 DOI: 10.1007/s10703-025-00482-5
Raven Beutner, Bernd Finkbeiner

Temporal hyperproperties are system properties that relate multiple execution traces. In finite-state systems, temporal hyperproperties are supported by model-checking algorithms, and tools for general temporal logics like HyperLTL exist. In infinite-state systems, the analysis of temporal hyperproperties has, so far, been limited to k-safety properties, i.e., properties that stipulate the absence of a bad interaction between any k traces. In this paper, we present an automated method for the verification of k l -safety properties in infinite-state systems. A k l -safety property stipulates that for any k traces, there exist l traces such that the resulting k + l traces do not interact badly. This combination of universal and existential quantification captures many properties beyond k-safety, including hyperliveness properties such as generalized non-interference or program refinement. Our verification method is based on a strategy-based instantiation of existential trace quantification combined with a program reduction, both in the context of a fixed predicate abstraction.

时间超属性是与多个执行跟踪相关的系统属性。在有限状态系统中,时间超属性由模型检查算法支持,并且存在用于一般时间逻辑(如HyperLTL)的工具。在无限状态系统中,时间超性质的分析迄今为止仅限于k-安全性质,即规定任何k迹之间不存在不良相互作用的性质。在本文中,我们提出了一种在无限状态系统中验证∀k∃l -安全性质的自动化方法。∀k∃l -安全性质规定,对于任何k条迹,存在l条迹,使得所得到的k + l条迹不会严重相互作用。这种全称和存在量化的结合捕获了k安全之外的许多特性,包括高活性特性,如广义不干扰或程序精化。我们的验证方法基于基于策略的存在跟踪量化实例化,并结合了程序简化,两者都在固定谓词抽象的上下文中。
{"title":"Predicate abstraction for hyperliveness verification.","authors":"Raven Beutner, Bernd Finkbeiner","doi":"10.1007/s10703-025-00482-5","DOIUrl":"https://doi.org/10.1007/s10703-025-00482-5","url":null,"abstract":"<p><p>Temporal hyperproperties are system properties that relate multiple execution traces. In finite-state systems, temporal hyperproperties are supported by model-checking algorithms, and tools for general temporal logics like HyperLTL exist. In infinite-state systems, the analysis of temporal hyperproperties has, so far, been limited to <i>k</i>-safety properties, i.e., properties that stipulate the absence of a bad interaction between any <i>k</i> traces. In this paper, we present an automated method for the verification of <math> <mrow><msup><mo>∀</mo> <mi>k</mi></msup> <msup><mo>∃</mo> <mi>l</mi></msup> </mrow> </math> -safety properties in infinite-state systems. A <math> <mrow><msup><mo>∀</mo> <mi>k</mi></msup> <msup><mo>∃</mo> <mi>l</mi></msup> </mrow> </math> -safety property stipulates that for any <i>k</i> traces, there exist <i>l</i> traces such that the resulting <math><mrow><mi>k</mi> <mo>+</mo> <mi>l</mi></mrow> </math> traces do not interact badly. This combination of universal and existential quantification captures many properties beyond <i>k</i>-safety, including hyperliveness properties such as generalized non-interference or program refinement. Our verification method is based on a strategy-based instantiation of existential trace quantification combined with a program reduction, both in the context of a fixed predicate abstraction.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"66 2","pages":"238-277"},"PeriodicalIF":0.8,"publicationDate":"2025-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12350583/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"144872302","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
Golem: a flexible and efficient solver for constrained Horn clauses. 魔像:一个灵活而有效的霍恩约束子句求解器。
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2025-01-01 Epub Date: 2025-03-26 DOI: 10.1007/s10703-025-00470-9
Martin Blicha, Konstantin Britikov, Natasha Sharygina

The logical framework of Constrained Horn Clauses (CHC) models verification tasks from a variety of domains, ranging from verification of safety properties in transition systems to modular verification of programs with procedures. In this work we present Golem, a flexible and efficient solver for satisfiability of CHCs over linear real and integer arithmetic. Golem provides flexibility with modular architecture and multiple back-end model-checking algorithms, as well as efficiency with tight integration with the underlying SMT solver. This paper describes the architecture of Golem and its back-end engines, which include our recently introduced model-checking algorithm TPA for deep exploration. The description is complemented by extensive evaluation, demonstrating the competitive nature of the solver.

约束角子句(Constrained Horn Clauses, CHC)的逻辑框架对多个领域的验证任务进行建模,从过渡系统的安全特性验证到带有程序的程序的模块化验证。在这项工作中,我们提出了Golem,一个灵活而有效的求解器,用于求解线性实数和整数算法上的chc的可满足性。Golem通过模块化架构和多个后端模型检查算法提供灵活性,以及与底层SMT求解器紧密集成的效率。本文描述了Golem及其后端引擎的架构,其中包括我们最近引入的用于深度探索的模型检查算法TPA。该描述由广泛的评估补充,展示了求解器的竞争性质。
{"title":"Golem: a flexible and efficient solver for constrained Horn clauses.","authors":"Martin Blicha, Konstantin Britikov, Natasha Sharygina","doi":"10.1007/s10703-025-00470-9","DOIUrl":"10.1007/s10703-025-00470-9","url":null,"abstract":"<p><p>The logical framework of Constrained Horn Clauses (CHC) models verification tasks from a variety of domains, ranging from verification of safety properties in transition systems to modular verification of programs with procedures. In this work we present Golem, a flexible and efficient solver for satisfiability of CHCs over linear real and integer arithmetic. Golem provides flexibility with modular architecture and multiple back-end model-checking algorithms, as well as efficiency with tight integration with the underlying SMT solver. This paper describes the architecture of Golem and its back-end engines, which include our recently introduced model-checking algorithm TPA for deep exploration. The description is complemented by extensive evaluation, demonstrating the competitive nature of the solver.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"67 2","pages":"143-160"},"PeriodicalIF":0.8,"publicationDate":"2025-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.ncbi.nlm.nih.gov/pmc/articles/PMC12592260/pdf/","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"145481491","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
Abstraction Modulo Stability 抽象模数稳定性
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-09-12 DOI: 10.1007/s10703-024-00461-2
Anna Becchi, Alessandro Cimatti

The analysis of legacy systems requires the automated extraction of high-level specifications. We propose a framework, called Abstraction Modulo Stability, for the analysis of transition systems operating in stable states, and responding with run-to-completion transactions to external stimuli. The abstraction captures, in the form of a finite state machine, the effects of external stimuli on the system state. This approach is parametric on a set of predicates of interest and on the definition of stability. We consider some possible stability definitions, which yield different practically relevant abstractions, and propose parametric algorithms for abstraction computation. The framework is evaluated in terms of expressivity and adequacy within an industrial project with the Italian Railway Network, on reverse engineering of relay-based interlocking circuits to extract specifications for a computer-based reimplementation.

对遗留系统进行分析需要自动提取高级规格。我们提出了一个名为 "抽象模态稳定性"(Abstraction Modulo Stability)的框架,用于分析在稳定状态下运行的过渡系统,并通过运行到完成事务对外部刺激做出响应。抽象以有限状态机的形式捕捉外部刺激对系统状态的影响。这种方法以一组相关谓词和稳定性定义为参数。我们考虑了一些可能的稳定性定义,它们产生了不同的实际相关抽象,并提出了抽象计算的参数算法。在与意大利铁路网合作的一个工业项目中,我们对该框架的表达能力和适当性进行了评估,该项目涉及对基于继电器的联锁电路进行逆向工程,以提取规范用于基于计算机的重新实施。
{"title":"Abstraction Modulo Stability","authors":"Anna Becchi, Alessandro Cimatti","doi":"10.1007/s10703-024-00461-2","DOIUrl":"https://doi.org/10.1007/s10703-024-00461-2","url":null,"abstract":"<p>The analysis of legacy systems requires the automated extraction of high-level specifications. We propose a framework, called Abstraction Modulo Stability, for the analysis of transition systems operating in stable states, and responding with run-to-completion transactions to external stimuli. The abstraction captures, in the form of a finite state machine, the effects of external stimuli on the system state. This approach is parametric on a set of predicates of interest and on the definition of stability. We consider some possible stability definitions, which yield different practically relevant abstractions, and propose parametric algorithms for abstraction computation. The framework is evaluated in terms of expressivity and adequacy within an industrial project with the Italian Railway Network, on reverse engineering of relay-based interlocking circuits to extract specifications for a computer-based reimplementation.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"16 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-09-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142217989","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
PAC statistical model checking of mean payoff in discrete- and continuous-time MDP 离散和连续时间 MDP 平均报酬的 PAC 统计模型检查
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-08-17 DOI: 10.1007/s10703-024-00463-0
Chaitanya Agarwal, Shibashis Guha, Jan Křetínský, M. Pazhamalai

Markov decision processes (MDPs) and continuous-time MDP (CTMDPs) are the fundamental models for non-deterministic systems with probabilistic uncertainty. Mean payoff (a.k.a. long-run average reward) is one of the most classic objectives considered in their context. We provide the first practical algorithm to compute mean payoff probably approximately correctly in unknown MDPs. Our algorithm is anytime in the sense that if terminated prematurely, it returns an approximate value with the required confidence. Further, we extend it to unknown CTMDPs. We do not require any knowledge of the state or number of successors of a state, but only a lower bound on the minimum transition probability, which has been advocated in literature. Our algorithm learns the unknown MDP/CTMDP through repeated, directed sampling; thus spending less time on learning components with smaller impact on the mean payoff. In addition to providing probably approximately correct (PAC) bounds for our algorithm, we also demonstrate its practical nature by running experiments on standard benchmarks.

马尔可夫决策过程(MDP)和连续时间 MDP(CTMDP)是具有概率不确定性的非确定系统的基本模型。平均报酬率(又称长期平均报酬率)是这两种模型中最经典的目标之一。我们提供了第一种实用算法,可以在未知 MDP 中近似正确地计算平均报酬。我们的算法具有随时性,即使过早终止,它也能返回具有所需置信度的近似值。此外,我们还将其扩展到未知 CTMDP。我们不需要任何关于状态或状态后继数的知识,只需要最小过渡概率的下限,这在文献中已经得到提倡。我们的算法通过重复的定向采样来学习未知的 MDP/CTMDP,因此在学习对平均报酬影响较小的部分上花费的时间较少。除了为我们的算法提供可能近似正确(PAC)的界限外,我们还通过在标准基准上运行实验来证明它的实用性。
{"title":"PAC statistical model checking of mean payoff in discrete- and continuous-time MDP","authors":"Chaitanya Agarwal, Shibashis Guha, Jan Křetínský, M. Pazhamalai","doi":"10.1007/s10703-024-00463-0","DOIUrl":"https://doi.org/10.1007/s10703-024-00463-0","url":null,"abstract":"<p>Markov decision processes (MDPs) and continuous-time MDP (CTMDPs) are the fundamental models for non-deterministic systems with probabilistic uncertainty. Mean payoff (a.k.a. long-run average reward) is one of the most classic objectives considered in their context. We provide the first practical algorithm to compute mean payoff probably approximately correctly in unknown MDPs. Our algorithm is anytime in the sense that if terminated prematurely, it returns an approximate value with the required confidence. Further, we extend it to unknown CTMDPs. We do not require any knowledge of the state or number of successors of a state, but only a lower bound on the minimum transition probability, which has been advocated in literature. Our algorithm learns the unknown MDP/CTMDP through repeated, directed sampling; thus spending less time on learning components with smaller impact on the mean payoff. In addition to providing probably approximately correct (PAC) bounds for our algorithm, we also demonstrate its practical nature by running experiments on standard benchmarks.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"19 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-08-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"142217984","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
A verified durable transactional mutex lock for persistent x86-TSO 用于持久 x86-TSO 的可验证持久事务互斥锁
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-07-31 DOI: 10.1007/s10703-024-00462-1
Eleni Vafeiadi Bila, Brijesh Dongol

The advent of non-volatile memory technologies has spurred intensive research interest in correctness and programmability. This paper addresses both by developing and verifying a durable (aka persistent) transactional memory (TM) algorithm, (text {dTML}_{text {Px86}}). Correctness of (text {dTML}_{text {Px86}}) is judged in terms of durable opacity, which ensures both failure atomicity (ensuring memory consistency after a crash) and opacity (ensuring thread safety). We assume a realistic execution model, Px86, which represents Intel’s persistent memory model and extends the Total Store Order memory model with instructions that control persistency. Our TM algorithm, (text {dTML}_{text {Px86}}), is an adaptation of an existing software transactional mutex lock, but with additional synchronisation mechanisms to cope with Px86. Our correctness proof is operational and comprises two distinct types of proofs: (1) proofs of invariants of (text {dTML}_{text {Px86}}) and (2) a proof of refinement against an operational specification that guarantees durable opacity. To achieve (1), we build on recent Owicki–Gries logics for Px86, and for (2) we use a simulation-based proof technique, which, as far as we are aware, is the first application of simulation-based proofs for Px86 programs. Our entire development has been mechanised in the Isabelle/HOL proof assistant.

非易失性内存技术的出现激发了人们对正确性和可编程性的浓厚研究兴趣。本文通过开发和验证一种耐用(又称持久)事务内存(TM)算法--(text {dTML}_{text {Px86}})来解决这两个问题。(text {dTML}_{text{Px86}}) 的正确性是根据持久不透明性来判断的,它同时确保了故障原子性(确保崩溃后内存的一致性)和不透明性(确保线程安全)。我们假设了一个现实的执行模型 Px86,它代表了英特尔的持久内存模型,并通过控制持久性的指令扩展了总存储顺序内存模型。我们的 TM 算法((text {dTML}_{text {Px86}}/)是对现有软件事务互斥锁的改编,但增加了额外的同步机制,以应对 Px86。我们的正确性证明是可操作的,包括两种不同类型的证明:(1)(text {dTML}_{text {Px86}}) 的不变量证明;(2)针对可操作规范的细化证明,该规范可保证持久不透明。为了实现(1),我们以最近的 Px86 Owicki-Gries 逻辑为基础;为了实现(2),我们使用了基于模拟的证明技术,据我们所知,这是首次将基于模拟的证明应用于 Px86 程序。我们的整个开发过程都在 Isabelle/HOL 证明助手中实现了机械化。
{"title":"A verified durable transactional mutex lock for persistent x86-TSO","authors":"Eleni Vafeiadi Bila, Brijesh Dongol","doi":"10.1007/s10703-024-00462-1","DOIUrl":"https://doi.org/10.1007/s10703-024-00462-1","url":null,"abstract":"<p>The advent of non-volatile memory technologies has spurred intensive research interest in correctness and programmability. This paper addresses both by developing and verifying a durable (aka persistent) transactional memory (TM) algorithm, <span>(text {dTML}_{text {Px86}})</span>. Correctness of <span>(text {dTML}_{text {Px86}})</span> is judged in terms of <i>durable opacity</i>, which ensures both <i>failure atomicity</i> (ensuring memory consistency after a crash) and <i>opacity</i> (ensuring thread safety). We assume a realistic execution model, Px86, which represents Intel’s persistent memory model and extends the <i>Total Store Order</i> memory model with instructions that control persistency. Our TM algorithm, <span>(text {dTML}_{text {Px86}})</span>, is an adaptation of an existing software transactional mutex lock, but with additional synchronisation mechanisms to cope with Px86. Our correctness proof is operational and comprises two distinct types of proofs: (1) proofs of invariants of <span>(text {dTML}_{text {Px86}})</span> and (2) a proof of refinement against an operational specification that guarantees durable opacity. To achieve (1), we build on recent Owicki–Gries logics for Px86, and for (2) we use a simulation-based proof technique, which, as far as we are aware, is the first application of simulation-based proofs for Px86 programs. Our entire development has been mechanised in the Isabelle/HOL proof assistant.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"86 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-07-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141863919","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
Formally understanding Rust’s ownership and borrowing system at the memory level 在内存层面正式了解 Rust 的所有权和借用系统
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-07-09 DOI: 10.1007/s10703-024-00460-3
Shuanglong Kan, Zhe Chen, David Sanán, Yang Liu

Rust is an emergent systems programming language highlighting memory safety through its Ownership and Borrowing System (OBS). Formalizing OBS in semantics is essential in certifying Rust’s memory safety guarantees. Existing formalizations of OBS are at the language level. That is, they explain OBS on Rust’s constructs. This paper proposes a different view of OBS at the memory level, independent of Rust’s constructs. The basic idea of our formalization is mapping the OBS invariants maintained by Rust’s type system to memory layouts and checking the invariants for memory operations. Our memory-level formalization of OBS helps people better understand the relationship between OBS and memory safety by narrowing the gap between OBS and memory operations. Moreover, it enables potential reuse of Rust’s OBS in other programming languages since memory operations are standard features and our formalization is not bound to Rust’s constructs. Based on the memory model, we have developed an executable operational semantics for Rust, called RustSEM, and implemented the semantics in K-Framework ((mathbb {K})). RustSEM covers a much larger subset of the significant language constructs than existing formal semantics for Rust. More importantly, RustSEM can run and verify real Rust programs by exploiting (mathbb {K})’s execution and verification engines. We have evaluated the semantic correctness of RustSEM wrt. the Rust compiler using around 700 tests. In particular, we have compared our formalization of OBS in the memory model with Rust’s type system and identified their differences due to the conservation of the Rust compiler. Moreover, our formalization of OBS is helpful to identifying undefined behavior of Rust programs with mixed safe and unsafe operations. We have also evaluated the potential applications of RustSEM in automated runtime and formal verification for functional and memory properties. Experimental results show that RustSEM can enhance Rust’s memory safety mechanism, as it is more powerful than OBS in the Rust compiler for detecting memory errors.

Rust 是一种新兴系统编程语言,通过其所有权和借用系统(OBS)强调内存安全性。将 OBS 正式化是 Rust 内存安全保证的关键。现有的 OBS 形式化都是语言层面的。也就是说,它们是在 Rust 的构造上解释 OBS 的。本文提出了一种独立于 Rust 结构的内存级 OBS 的不同观点。我们形式化的基本思想是将 Rust 类型系统维护的 OBS 不变量映射到内存布局,并检查内存操作的不变量。我们对 OBS 的内存级形式化缩小了 OBS 与内存操作之间的差距,有助于人们更好地理解 OBS 与内存安全之间的关系。此外,由于内存操作是标准特性,而我们的形式化并不局限于 Rust 的构造,因此它还能使 Rust 的 OBS 在其他编程语言中得到潜在的重用。基于内存模型,我们为 Rust 开发了一种可执行的操作语义,称为 RustSEM,并在 K 框架中实现了该语义((mathbb {K}) )。与现有的 Rust 形式语义相比,RustSEM 涵盖了更多重要的语言构造子集。更重要的是,RustSEM可以利用(mathbb {K}) 的执行和验证引擎来运行和验证真实的Rust程序。我们使用约700个测试评估了RustSEM与Rust编译器之间的语义正确性。特别是,我们比较了内存模型中 OBS 的形式化与 Rust 的类型系统,并确定了它们之间由于 Rust 编译器的保护而产生的差异。此外,我们对 OBS 的形式化还有助于识别 Rust 程序中混合了安全和不安全操作的未定义行为。我们还评估了 RustSEM 在自动运行时以及函数和内存属性形式化验证中的潜在应用。实验结果表明,RustSEM 可以增强 Rust 的内存安全机制,因为它比 Rust 编译器中的 OBS 更能检测内存错误。
{"title":"Formally understanding Rust’s ownership and borrowing system at the memory level","authors":"Shuanglong Kan, Zhe Chen, David Sanán, Yang Liu","doi":"10.1007/s10703-024-00460-3","DOIUrl":"https://doi.org/10.1007/s10703-024-00460-3","url":null,"abstract":"<p>Rust is an emergent systems programming language highlighting memory safety through its Ownership and Borrowing System (OBS). Formalizing OBS in semantics is essential in certifying Rust’s memory safety guarantees. Existing formalizations of OBS are at the language level. That is, they explain OBS on Rust’s constructs. This paper proposes a different view of OBS at the memory level, independent of Rust’s constructs. The basic idea of our formalization is mapping the OBS invariants maintained by Rust’s type system to memory layouts and checking the invariants for memory operations. Our memory-level formalization of OBS helps people better understand the relationship between OBS and memory safety by narrowing the gap between OBS and memory operations. Moreover, it enables potential reuse of Rust’s OBS in other programming languages since memory operations are standard features and our formalization is not bound to Rust’s constructs. Based on the memory model, we have developed an executable operational semantics for Rust, called RustSEM, and implemented the semantics in K-Framework (<span>(mathbb {K})</span>). RustSEM covers a much larger subset of the significant language constructs than existing formal semantics for Rust. More importantly, RustSEM can run and verify real Rust programs by exploiting <span>(mathbb {K})</span>’s execution and verification engines. We have evaluated the semantic correctness of RustSEM wrt. the Rust compiler using around 700 tests. In particular, we have compared our formalization of OBS in the memory model with Rust’s type system and identified their differences due to the conservation of the Rust compiler. Moreover, our formalization of OBS is helpful to identifying undefined behavior of Rust programs with mixed safe and unsafe operations. We have also evaluated the potential applications of RustSEM in automated runtime and formal verification for functional and memory properties. Experimental results show that RustSEM can enhance Rust’s memory safety mechanism, as it is more powerful than OBS in the Rust compiler for detecting memory errors.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"1 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-07-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141566936","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
The hexatope and octatope abstract domains for neural network verification 用于神经网络验证的六面体和八面体抽象域
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-06-17 DOI: 10.1007/s10703-024-00457-y
Stanley Bak, Taylor Dohmen, K. Subramani, Ashutosh Trivedi, Alvaro Velasquez, Piotr Wojciechowski

Efficient verification algorithms for neural networks often depend on various abstract domains such as intervals, zonotopes, and linear star sets. The choice of the abstract domain presents an expressiveness vs. scalability trade-off: simpler domains are less precise but yield faster algorithms. This paper investigates the hexatope and octatope abstract domains in the context of neural net verification. Hexatopes are affine transformations of higher-dimensional hexagons, defined by difference constraint systems, and octatopes are affine transformations of higher-dimensional octagons, defined by unit-two-variable-per-inequality constraint systems. These domains generalize the idea of zonotopes which can be viewed as affine transformations of hypercubes. On the other hand, they can be considered as a restriction of linear star sets, which are affine transformations of arbitrary (mathcal {H})-Polytopes. This distinction places hexatopes and octatopes firmly between zonotopes and linear star sets in their expressive power, but what about the efficiency of decision procedures? An important analysis problem for neural networks is the exact range computation problem that asks to compute the exact set of possible outputs given a set of possible inputs. For this, three computational procedures are needed: (1) optimization of a linear cost function; (2) affine mapping; and (3) over-approximating the intersection with a half-space. While zonotopes allow an efficient solution for these approaches, star sets solves these procedures via linear programming. We show that these operations are faster for hexatopes and octatopes than they are for the more expressive linear star sets by reducing the linear optimization problem over these domains to the minimum cost network flow, which can be solved in strongly polynomial time using the Out-of-Kilter algorithm. Evaluating exact range computation on several ACAS Xu neural network benchmarks, we find that hexatopes and octatopes show promise as a practical abstract domain for neural network verification.

神经网络的高效验证算法通常依赖于各种抽象域,如区间、众数和线性星集。抽象域的选择会带来表现力与可扩展性的权衡:较简单的域精度较低,但算法速度较快。本文以神经网络验证为背景,研究了六面体和八面体抽象域。六面体是高维六边形的仿射变换,由差分约束系统定义;八面体是高维八边形的仿射变换,由单位二变量不等式约束系统定义。这些域概括了 zonotopes 的概念,可以看作是超立方体的仿射变换。另一方面,它们可以被看作是线性星集的限制,而线性星集是任意 (mathcal {H})-Polytopes 的仿射变换。这种区别使六面体和八面体在表达能力上牢牢地介于多面体和线性星集之间,但决策程序的效率又如何呢?神经网络的一个重要分析问题是精确范围计算问题,它要求在给定一组可能输入的情况下,计算出可能输出的精确集合。为此,需要三种计算程序:(1) 优化线性成本函数;(2) 仿射映射;(3) 过度逼近与半空间的交集。带状图可以高效地解决这些问题,而星形集则通过线性规划来解决这些问题。我们通过将这些域上的线性优化问题简化为最小成本网络流,证明六面体和八面体的这些操作比表达能力更强的线性星集更快。通过对几个 ACAS Xu 神经网络基准的精确范围计算进行评估,我们发现六面体和八面体有望成为神经网络验证的实用抽象域。
{"title":"The hexatope and octatope abstract domains for neural network verification","authors":"Stanley Bak, Taylor Dohmen, K. Subramani, Ashutosh Trivedi, Alvaro Velasquez, Piotr Wojciechowski","doi":"10.1007/s10703-024-00457-y","DOIUrl":"https://doi.org/10.1007/s10703-024-00457-y","url":null,"abstract":"<p>Efficient verification algorithms for neural networks often depend on various abstract domains such as <i>intervals</i>, <i>zonotopes</i>, and <i>linear star sets</i>. The choice of the abstract domain presents an expressiveness vs. scalability trade-off: simpler domains are less precise but yield faster algorithms. This paper investigates the <i>hexatope</i> and <i>octatope</i> abstract domains in the context of neural net verification. Hexatopes are affine transformations of higher-dimensional hexagons, defined by difference constraint systems, and octatopes are affine transformations of higher-dimensional octagons, defined by unit-two-variable-per-inequality constraint systems. These domains generalize the idea of zonotopes which can be viewed as affine transformations of hypercubes. On the other hand, they can be considered as a restriction of linear star sets, which are affine transformations of arbitrary <span>(mathcal {H})</span>-Polytopes. This distinction places hexatopes and octatopes firmly between zonotopes and linear star sets in their expressive power, but what about the efficiency of decision procedures? An important analysis problem for neural networks is the <i>exact range computation</i> problem that asks to compute the exact set of possible outputs given a set of possible inputs. For this, three computational procedures are needed: (1) optimization of a linear cost function; (2) affine mapping; and (3) over-approximating the intersection with a half-space. While zonotopes allow an efficient solution for these approaches, star sets solves these procedures via linear programming. We show that these operations are faster for hexatopes and octatopes than they are for the more expressive linear star sets by reducing the linear optimization problem over these domains to the minimum cost network flow, which can be solved in strongly polynomial time using the Out-of-Kilter algorithm. Evaluating exact range computation on several ACAS Xu neural network benchmarks, we find that hexatopes and octatopes show promise as a practical abstract domain for neural network verification.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"145 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-06-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141529142","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
(Un)Solvable loop analysis (无法解决的循环分析
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-06-11 DOI: 10.1007/s10703-024-00455-0
Daneshvar Amrollahi, Ezio Bartocci, George Kenison, Laura Kovács, Marcel Moosbrugger, Miroslav Stankovič

Automatically generating invariants, key to computer-aided analysis of probabilistic and deterministic programs and compiler optimisation, is a challenging open problem. Whilst the problem is in general undecidable, the goal is settled for restricted classes of loops. For the class of solvable loops, introduced by Rodríguez-Carbonell and Kapur (in: Proceedings of the ISSAC, pp 266–273, 2004), one can automatically compute invariants from closed-form solutions of recurrence equations that model the loop behaviour. In this paper we establish a technique for invariant synthesis for loops that are not solvable, termed unsolvable loops. Our approach automatically partitions the program variables and identifies the so-called defective variables that characterise unsolvability. Herein we consider the following two applications. First, we present a novel technique that automatically synthesises polynomials from defective monomials, that admit closed-form solutions and thus lead to polynomial loop invariants. Second, given an unsolvable loop, we synthesise solvable loops with the following property: the invariant polynomials of the solvable loops are all invariants of the given unsolvable loop. Our implementation and experiments demonstrate both the feasibility and applicability of our approach to both deterministic and probabilistic programs.

自动生成不变式是对概率和确定性程序进行计算机辅助分析和编译器优化的关键,也是一个具有挑战性的开放问题。虽然这个问题在一般情况下是不可判定的,但对于受限制的循环类来说,目标已经实现。对于 Rodríguez-Carbonell 和 Kapur(《ISSAC 论文集》,第 266-273 页,2004 年)提出的可解循环类,我们可以根据循环行为模型递推方程的闭式解自动计算不变式。在本文中,我们建立了一种针对不可解循环(称为不可解循环)的不变式合成技术。我们的方法能自动分割程序变量,并识别所谓的缺陷变量,这些缺陷变量是不可解性的特征。在此,我们将考虑以下两个应用。首先,我们提出了一种新技术,它能从缺陷单项式中自动合成多项式,这些多项式允许闭式解,从而导致多项式循环不变式。其次,在给定一个不可解循环的情况下,我们合成具有以下性质的可解循环:可解循环的不变多项式是给定不可解循环的所有不变式。我们的实现和实验证明了我们的方法对确定性和概率性程序的可行性和适用性。
{"title":"(Un)Solvable loop analysis","authors":"Daneshvar Amrollahi, Ezio Bartocci, George Kenison, Laura Kovács, Marcel Moosbrugger, Miroslav Stankovič","doi":"10.1007/s10703-024-00455-0","DOIUrl":"https://doi.org/10.1007/s10703-024-00455-0","url":null,"abstract":"<p>Automatically generating invariants, key to computer-aided analysis of probabilistic and deterministic programs and compiler optimisation, is a challenging open problem. Whilst the problem is in general undecidable, the goal is settled for restricted classes of loops. For the class of <i>solvable</i> loops, introduced by Rodríguez-Carbonell and Kapur (in: Proceedings of the ISSAC, pp 266–273, 2004), one can automatically compute invariants from closed-form solutions of recurrence equations that model the loop behaviour. In this paper we establish a technique for invariant synthesis for loops that are not solvable, termed <i>unsolvable</i> loops. Our approach automatically partitions the program variables and identifies the so-called <i>defective</i> variables that characterise unsolvability. Herein we consider the following two applications. First, we present a novel technique that automatically synthesises polynomials from defective monomials, that admit closed-form solutions and thus lead to polynomial loop invariants. Second, given an unsolvable loop, we synthesise solvable loops with the following property: the invariant polynomials of the solvable loops are all invariants of the given unsolvable loop. Our implementation and experiments demonstrate both the feasibility and applicability of our approach to both deterministic and probabilistic programs.</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"3 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-06-11","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141504913","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
Divider verification using symbolic computer algebra and delayed don’t care optimization: theory and practical implementation 使用符号计算机代数和延迟不关心优化进行除法验证:理论与实际应用
IF 0.8 4区 计算机科学 Q3 COMPUTER SCIENCE, THEORY & METHODS Pub Date : 2024-05-24 DOI: 10.1007/s10703-024-00452-3
Alexander Konrad, Christoph Scholl, Alireza Mahzoon, Daniel Große, Rolf Drechsler

Recent methods based on Symbolic Computer Algebra (SCA) have shown great success in formal verification of multipliers and—more recently—of dividers as well. In this paper we enhance known approaches by the computation of satisfiability don’t cares for so-called Extended Atomic Blocks (EABs) and by Delayed Don’t Care Optimization (DDCO) for optimizing polynomials during backward rewriting. Using those novel methods we are able to extend the applicability of SCA-based methods to further divider architectures which could not be handled by previous approaches. We successfully apply the approach to the fully automatic formal verification of large dividers (with bit widths up to 512).

最近,基于符号计算机代数(SCA)的方法在乘法器以及最近的除法器的形式验证中取得了巨大成功。在本文中,我们通过计算所谓的扩展原子块(EAB)的可满足性 "不关心"(satisfiability don't care),以及在反向重写过程中优化多项式的延迟 "不关心 "优化(DDCO),对已知方法进行了改进。利用这些新方法,我们能够将基于 SCA 的方法的适用性扩展到更多以前的方法无法处理的分频器架构。我们成功地将该方法应用于大型分频器(位宽达 512)的全自动形式验证。
{"title":"Divider verification using symbolic computer algebra and delayed don’t care optimization: theory and practical implementation","authors":"Alexander Konrad, Christoph Scholl, Alireza Mahzoon, Daniel Große, Rolf Drechsler","doi":"10.1007/s10703-024-00452-3","DOIUrl":"https://doi.org/10.1007/s10703-024-00452-3","url":null,"abstract":"<p>Recent methods based on <i>Symbolic Computer Algebra</i> (SCA) have shown great success in formal verification of multipliers and—more recently—of dividers as well. In this paper we enhance known approaches by the computation of <i>satisfiability don’t cares for so-called Extended Atomic Blocks (EABs)</i> and by <i>Delayed Don’t Care Optimization (DDCO)</i> for optimizing polynomials during backward rewriting. Using those novel methods we are able to extend the applicability of SCA-based methods to further divider architectures which could not be handled by previous approaches. We successfully apply the approach to the fully automatic formal verification of large dividers (with bit widths up to 512).</p>","PeriodicalId":12430,"journal":{"name":"Formal Methods in System Design","volume":"23 1","pages":""},"PeriodicalIF":0.8,"publicationDate":"2024-05-24","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"141147858","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
期刊
Formal Methods in System Design
全部 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