Pub Date : 2023-08-01DOI: 10.1016/j.jlamp.2023.100875
Jorge Blázquez, Manuel Montenegro, Clara Segura
We address the verification of mutable, heap-allocated abstract data types (ADTs) in Dafny, and their traversal via iterators. For this purpose, we devise a verification methodology that makes it possible to implement ADTs based on already existing ones, while maintaining proper encapsulation. Then, we apply this methodology to the specification and implementation of linear collections such as stacks, queues, deques, and lists with iterators. The approach introduced in this paper allows one to progressively refine some aspects of the specification such as iterator invalidation, so that clients of the library can reason about how structural changes to a list affect existing iterators. Finally, we extend our methodology to the verification of client code (i.e., code that makes use of the implemented ADTs) and identify the boilerplate conditions common to all methods that receive and manipulate ADTs.
{"title":"Verification of mutable linear data structures and iterator-based algorithms in Dafny","authors":"Jorge Blázquez, Manuel Montenegro, Clara Segura","doi":"10.1016/j.jlamp.2023.100875","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100875","url":null,"abstract":"<div><p>We address the verification of mutable, heap-allocated abstract data types (ADTs) in Dafny, and their traversal via iterators. For this purpose, we devise a verification methodology that makes it possible to implement ADTs based on already existing ones, while maintaining proper encapsulation. Then, we apply this methodology to the specification and implementation of linear collections such as stacks, queues, deques, and lists with iterators. The approach introduced in this paper allows one to progressively refine some aspects of the specification such as iterator invalidation, so that clients of the library can reason about how structural changes to a list affect existing iterators. Finally, we extend our methodology to the verification of client code (i.e., code that makes use of the implemented ADTs) and identify the boilerplate conditions common to all methods that receive and manipulate ADTs.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"134 ","pages":"Article 100875"},"PeriodicalIF":0.9,"publicationDate":"2023-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49881539","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}
Pub Date : 2023-08-01DOI: 10.1016/j.jlamp.2023.100903
Misaki Kojima, Naoki Nishida
{"title":"Reducing non-occurrence of specified runtime errors to all-path reachability problems of constrained rewriting","authors":"Misaki Kojima, Naoki Nishida","doi":"10.1016/j.jlamp.2023.100903","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100903","url":null,"abstract":"","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 1","pages":"100903"},"PeriodicalIF":0.9,"publicationDate":"2023-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"54463350","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}
Pub Date : 2023-08-01DOI: 10.1016/j.jlamp.2023.100887
Steven Eker , Narciso Martí-Oliet , José Meseguer , Rubén Rubio , Alberto Verdejo
Rewriting logic is a natural and expressive framework for the specification of concurrent systems and logics. The Maude specification language provides an implementation of this formalism that allows executing, verifying, and analyzing the represented systems. These specifications declare their objects by means of terms and equations, and provide rewriting rules to represent potentially non-deterministic local transformations on the state. Sometimes a controlled application of these rules is required to reduce non-determinism, to capture global, goal-oriented or efficiency concerns, or to select specific executions for their analysis. That is what we call a strategy. In order to express them, respecting the separation of concerns principle, a Maude strategy language was proposed and developed. The first implementation of the strategy language was done in Maude itself using its reflective features. After ample experimentation, some more features have been added and, for greater efficiency, the strategy language has been implemented in C++ as an integral part of the Maude system. This paper describes the Maude strategy language along with its semantics, its implementation decisions, and several application examples from various fields.
{"title":"The Maude strategy language","authors":"Steven Eker , Narciso Martí-Oliet , José Meseguer , Rubén Rubio , Alberto Verdejo","doi":"10.1016/j.jlamp.2023.100887","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100887","url":null,"abstract":"<div><p>Rewriting logic is a natural and expressive framework for the specification of concurrent systems and logics. The Maude specification language provides an implementation of this formalism that allows executing, verifying, and analyzing the represented systems. These specifications declare their objects by means of terms and equations, and provide rewriting rules to represent potentially non-deterministic local transformations on the state. Sometimes a controlled application of these rules is required to reduce non-determinism, to capture global, goal-oriented or efficiency concerns, or to select specific executions for their analysis. That is what we call a strategy. In order to express them, respecting the separation of concerns principle, a Maude strategy language was proposed and developed. The first implementation of the strategy language was done in Maude itself using its reflective features. After ample experimentation, some more features have been added and, for greater efficiency, the strategy language has been implemented in C++ as an integral part of the Maude system. This paper describes the Maude strategy language along with its semantics, its implementation decisions, and several application examples from various fields.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"134 ","pages":"Article 100887"},"PeriodicalIF":0.9,"publicationDate":"2023-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49881540","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}
Pub Date : 2023-08-01DOI: 10.1016/j.jlamp.2023.100876
Luca Cardelli , Giuseppe Squillace , Mirco Tribastone , Max Tschaikowski , Andrea Vandin
It is well known that exact notions of model abstraction and reduction for dynamical systems may not be robust enough in practice because they are highly sensitive to the specific choice of parameters. In this paper we consider this problem for nonlinear ordinary differential equations (ODEs) with polynomial derivatives. We introduce a model reduction technique based on approximate differential equivalence, i.e., a partition of the set of ODE variables that performs an aggregation when the variables are governed by nearby derivatives. We develop algorithms to (i) compute the largest approximate differential equivalence; (ii) construct an approximately reduced model from the original one via an appropriate perturbation of the coefficients of the polynomials; and (iii) provide a formal certificate on the quality of the approximation as an error bound, computed as an over-approximation of the reachable set of the reduced model. Finally, we apply approximate differential equivalences to case studies on electric circuits, biological models, and polymerization reaction networks.
{"title":"Formal lumping of polynomial differential equations through approximate equivalences","authors":"Luca Cardelli , Giuseppe Squillace , Mirco Tribastone , Max Tschaikowski , Andrea Vandin","doi":"10.1016/j.jlamp.2023.100876","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100876","url":null,"abstract":"<div><p>It is well known that exact notions of model abstraction and reduction for dynamical systems may not be robust enough in practice because they are highly sensitive to the specific choice of parameters. In this paper we consider this problem for nonlinear ordinary differential equations (ODEs) with polynomial derivatives. We introduce a model reduction technique based on <em>approximate differential equivalence</em>, i.e., a partition of the set of ODE variables that performs an aggregation when the variables are governed by nearby derivatives. We develop algorithms to (i) compute the largest approximate differential equivalence; (ii) construct an approximately reduced model from the original one via an appropriate perturbation of the coefficients of the polynomials; and (iii) provide a formal certificate on the quality of the approximation as an error bound, computed as an over-approximation of the reachable set of the reduced model. Finally, we apply approximate differential equivalences to case studies on electric circuits, biological models, and polymerization reaction networks.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"134 ","pages":"Article 100876"},"PeriodicalIF":0.9,"publicationDate":"2023-08-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49881542","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}
Pub Date : 2023-07-01DOI: 10.1016/j.jlamp.2023.100890
F. Barbanera, Ivan Lanese, E. Tuosto
{"title":"Composition of synchronous communicating systems","authors":"F. Barbanera, Ivan Lanese, E. Tuosto","doi":"10.1016/j.jlamp.2023.100890","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100890","url":null,"abstract":"","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 1","pages":"100890"},"PeriodicalIF":0.9,"publicationDate":"2023-07-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"54463325","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}
Pub Date : 2023-06-01DOI: 10.1016/j.jlamp.2023.100861
Guohui Wang , Shanyan Chen , Yong Guan , Zhiping Shi , Ximeng Li , Jingzhi Zhang
As an effective extension of human limbs, dexterous robotic hands based on cyber-physical systems (CPS) are used to perform diverse tasks in industrial production, medical operation, outer-space exploration, etc. The reliable functioning of dexterous robotic hands depends on the proper modeling and solving of inverse kinematics problems in the design phase. The traditional D-H parameter method for modeling and solving inverse kinematics problems suffers from the singularity problem, which is avoided by methods based on the screw theory. However, the manual or computer-simulation-based development of these methods could suffer from human errors and software defects. In this paper, we address this problem by using formal techniques and tools to develop a screw-theory-based method. Firstly, we formalize theories related to the Paden-Kahan sub-problem in an interactive theorem prover. Secondly, we construct a formal model for solving the inverse kinematics problem for robotic systems. Lastly, taking the three-fingered dexterous hand as a case study, we formally verified its inverse kinematics solutions. The results presented in this article help guarantee a level of safety for robotic systems that is beyond achievable by manual and computer-simulation-based development methods.
{"title":"Formalization of the inverse kinematics of three-fingered dexterous hand","authors":"Guohui Wang , Shanyan Chen , Yong Guan , Zhiping Shi , Ximeng Li , Jingzhi Zhang","doi":"10.1016/j.jlamp.2023.100861","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100861","url":null,"abstract":"<div><p><span>As an effective extension of human limbs, dexterous robotic hands based on cyber-physical systems (CPS) are used to perform diverse tasks in industrial production, medical operation, outer-space exploration, etc. The reliable functioning of dexterous robotic hands depends on the proper modeling and solving of </span>inverse kinematics<span> problems in the design phase. The traditional D-H parameter method for modeling and solving inverse kinematics problems<span><span> suffers from the singularity problem, which is avoided by methods based on the screw theory. However, the manual or computer-simulation-based development of these methods could suffer from human errors and software defects. In this paper, we address this problem by using formal techniques and tools to develop a screw-theory-based method. Firstly, we formalize theories related to the Paden-Kahan sub-problem in an interactive </span>theorem prover. Secondly, we construct a formal model for solving the inverse kinematics problem for robotic systems. Lastly, taking the three-fingered dexterous hand as a case study, we formally verified its inverse kinematics solutions. The results presented in this article help guarantee a level of safety for robotic systems that is beyond achievable by manual and computer-simulation-based development methods.</span></span></p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"133 ","pages":"Article 100861"},"PeriodicalIF":0.9,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"50203600","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}
Pub Date : 2023-06-01DOI: 10.1016/j.jlamp.2023.100892
Paul W. Wilson, F. Zanasi
{"title":"An axiomatic approach to differentiation of polynomial circuits","authors":"Paul W. Wilson, F. Zanasi","doi":"10.1016/j.jlamp.2023.100892","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100892","url":null,"abstract":"","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 1","pages":"100892"},"PeriodicalIF":0.9,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"54463339","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}
Pub Date : 2023-06-01DOI: 10.1016/j.jlamp.2023.100862
Sven Schneider , Leen Lambers
Graphs are used as a universal data structure in various domains. Sets of graphs (and likewise graph morphisms) can be specified using, e.g., the graph logic of Graph Conditions (GCs). The evaluation of a graph against such a GC results in a Boolean satisfaction judgement on whether the graph is specified by the GC. The graph logic is known to be as expressive as first-order logic on graphs. However, since infinitely many graphs exist, there are also infinitely many evaluations for each given GC. To support GC validation, testing, debugging, and repair, a suitable synthesis procedure generating a complete compact overview of how a given GC may be evaluated for possibly varying graphs is called for.
In a previous paper, we generated such an overview for a given GC in the form of a complete finite set of diverse evaluations for varying associated graphs formally given by so called Evaluation Trees (ETs). Each of these ETs concretely describes how its associated graph is evaluated against the given GC by recording the executed evaluation steps. Moreover, these generated ETs and the given GC for which they are generated have the same underlying structure easing comprehensibility of the represented evaluation steps. The returned ETs are complete since each possible ET subsumes one of the returned ETs and diverse by not containing superfluous ETs subsuming smaller ETs.
We now extend and refine this approach still solving the ET synthesis problem by (a) extending the graph logic GL allowing for the specification of a minimal number of graph patterns to be contained in specified graphs, (b) provide means to scale the size of the generated ETs up to a user-provided bound allowing for the generation of not just minimal ETs, (c) record the order of evaluations steps also for operators where the evaluation but not the operator itself defines such an order, and (d) generate ETs recording combinations of reasons for (non-)satisfaction of GCs where only single reasons were recorded before.
{"title":"Evaluation diversity for graph conditions","authors":"Sven Schneider , Leen Lambers","doi":"10.1016/j.jlamp.2023.100862","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100862","url":null,"abstract":"<div><p><span>Graphs are used as a universal data structure in various domains. Sets of graphs (and likewise graph morphisms) can be specified using, e.g., the graph logic </span><figure><img></figure> of Graph Conditions (GCs). The <em>evaluation</em> of a graph against such a GC results in a Boolean satisfaction judgement on whether the graph is specified by the GC. The graph logic <figure><img></figure> is known to be as expressive as first-order logic on graphs. However, since infinitely many graphs exist, there are also infinitely many evaluations for each given GC. To support GC validation, testing, debugging, and repair, a suitable synthesis procedure generating a complete compact overview of <em>how</em> a given GC may be evaluated for possibly varying graphs is called for.</p><p>In a previous paper, we generated such an overview for a given GC in the form of a complete finite set of diverse evaluations for varying associated graphs formally given by so called Evaluation Trees (ETs). Each of these ETs concretely describes <em>how</em><span> its associated graph is evaluated against the given GC by recording the executed evaluation steps. Moreover, these generated ETs and the given GC for which they are generated have the same underlying structure easing comprehensibility of the represented evaluation steps. The returned ETs are </span><em>complete</em> since each possible ET subsumes one of the returned ETs and <em>diverse</em> by not containing superfluous ETs subsuming smaller ETs.</p><p>We now extend and refine this approach still solving the ET synthesis problem by (a) extending the graph logic GL allowing for the specification of a minimal number of graph patterns to be contained in specified graphs, (b) provide means to scale the size of the generated ETs up to a user-provided bound allowing for the generation of not just minimal ETs, (c) record the order of evaluations steps also for operators where the evaluation but not the operator itself defines such an order, and (d) generate ETs recording combinations of reasons for (non-)satisfaction of GCs where only single reasons were recorded before.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"133 ","pages":"Article 100862"},"PeriodicalIF":0.9,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"50203595","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}
Pub Date : 2023-06-01DOI: 10.1016/j.jlamp.2023.100874
Álvaro Fernández Díaz, Lars-Åke Fredlund, Clara Benac-Earle, Julio Mariño
This article provides a formal specification of the distribution and fault-tolerance mechanisms of eJason. The eJason programming language is an extension to the agent-oriented programming language Jason that introduces native support for the transparent distribution of agents as well as fault-tolerance mechanisms. This formal semantics is presented from a multiagent system perspective. It unambiguously describes both the possible evolution of the distributed multiagent system over time and the different instruments for fault detection and fault recovery, hence exposing their strengths. This specification may serve as a reference for researchers interested in the inclusion of similar mechanisms in agent-oriented programming languages. The formal semantics has been mechanized through an (open-source) implementation written in Prolog, which implements both the standard Jason operational semantics, along with the new rules for distribution and fault-tolerance introduced in this article.
{"title":"A formal semantics for agent distribution and fault tolerance in Jason","authors":"Álvaro Fernández Díaz, Lars-Åke Fredlund, Clara Benac-Earle, Julio Mariño","doi":"10.1016/j.jlamp.2023.100874","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100874","url":null,"abstract":"<div><p>This article provides a formal specification of the distribution and fault-tolerance mechanisms of eJason. The eJason programming language is an extension to the agent-oriented programming language Jason that introduces native support for the transparent distribution of agents as well as fault-tolerance mechanisms. This formal semantics is presented from a multiagent system perspective. It unambiguously describes both the possible evolution of the distributed multiagent system over time and the different instruments for fault detection and fault recovery, hence exposing their strengths. This specification may serve as a reference for researchers interested in the inclusion of similar mechanisms in agent-oriented programming languages. The formal semantics has been mechanized through an (open-source) implementation written in Prolog, which implements both the standard Jason operational semantics, along with the new rules for distribution and fault-tolerance introduced in this article.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"133 ","pages":"Article 100874"},"PeriodicalIF":0.9,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"50203598","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}
Pub Date : 2023-06-01DOI: 10.1016/j.jlamp.2023.100873
Roy Overbeek, Jörg Endrullis, Aloïs Rosset
We extend the powerful Pullback-Pushout (PBPO) approach for graph rewriting with strong matching. Our approach, called PBPO+, allows more control over the embedding of the pattern in the host graph, which is important for a large class of rewrite systems. We argue that PBPO+ can be considered a unifying theory in the general setting of quasitoposes, by demonstrating that PBPO+ can define a strict superset of the rewrite relations definable by PBPO, AGREE and DPO. Additionally, we show that PBPO+ is well suited for rewriting labeled graphs and some classes of attributed graphs, by introducing a lattice structure on the label set and requiring graph morphisms to be order-preserving.
{"title":"Graph rewriting and relabeling with PBPO+: A unifying theory for quasitoposes","authors":"Roy Overbeek, Jörg Endrullis, Aloïs Rosset","doi":"10.1016/j.jlamp.2023.100873","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100873","url":null,"abstract":"<div><p>We extend the powerful Pullback-Pushout (PBPO) approach for graph rewriting with strong matching. Our approach, called PBPO<sup>+</sup>, allows more control over the embedding of the pattern in the host graph, which is important for a large class of rewrite systems. We argue that PBPO<sup>+</sup> can be considered a unifying theory in the general setting of quasitoposes, by demonstrating that PBPO<sup>+</sup> can define a strict superset of the rewrite relations definable by PBPO, AGREE and DPO. Additionally, we show that PBPO<sup>+</sup> is well suited for rewriting labeled graphs and some classes of attributed graphs, by introducing a lattice structure on the label set and requiring graph morphisms to be order-preserving.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"133 ","pages":"Article 100873"},"PeriodicalIF":0.9,"publicationDate":"2023-06-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"50203596","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}