{"title":"Composition of synchronous communicating systems","authors":"Franco Barbanera , Ivan Lanese , Emilio Tuosto","doi":"10.1016/j.jlamp.2023.100890","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100890","url":null,"abstract":"<div><p>Communication is an essential element of modern software, yet programming and analysing communicating systems are difficult tasks.</p><p>A reason for this difficulty is the lack of compositional mechanisms that preserve relevant communication properties. This problem has been recently addressed for the well-known model of <em>communicating systems</em>, that is sets of components consisting of finite-state machines capable of exchanging messages. Two communicating systems can be composed by selecting one component per system, and transforming both of them into coupled gateways connecting the two systems. More precisely, a gateway forwards a message received from within its system to the other gateway, which then delivers the message to the other system. Suitable <em>compatibility</em><span><span> conditions between gateways have been proved sufficient for this composition mechanism to preserve properties such as deadlock freedom for asynchronous as well as symmetric </span>synchronous communications (where sender and receiver play the same part in determining which message to exchange).</span></p><p>The present paper gives a comprehensive treatment of the case of synchronous communications. We consider both <em>symmetric synchronous</em> communications and <em>asymmetric synchronous</em> communications (where senders decide independently which message should be exchanged). The composition mechanism preserves different properties under different conditions depending on the considered type of synchronous communication. We show here that preservation of lock freedom requires an additional condition on gateways for asymmetric communication. Such condition is also needed for preservation of deadlock freedom, lock freedom or strong lock freedom for symmetric communications. This is not needed, instead, for preservation of either deadlock freedom or strong lock freedom with asymmetric interactions.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100890"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876052","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Program equivalence in a typed probabilistic call-by-need functional language","authors":"Manfred Schmidt-Schauß, David Sabel","doi":"10.1016/j.jlamp.2023.100904","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100904","url":null,"abstract":"<div><p>We extend a call-by-need variant of PCF with a binary probabilistic fair choice operator, which makes a lazy and typed variant of probabilistic functional programming. We define a contextual equivalence that respects the expected convergence of expressions and prove a corresponding context lemma. This enables us to show correctness of several program transformations with respect to contextual equivalence. Distribution-equivalence of expressions of numeric type is introduced. While the notion of contextual equivalence stems from program semantics, the notion of distribution equivalence is a direct description of the stochastic model. Our main result is that both notions are compatible: We show that for closed expressions of numeric type contextual equivalence and distribution-equivalence coincide. This provides a strong and often operationally feasible criterion for contextual equivalence of expressions and programs.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100904"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876058","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Specification and modelling of computing systems through graphs and graph transformation","authors":"Fabio Gadducci , Timo Kehrer","doi":"10.1016/j.jlamp.2023.100905","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100905","url":null,"abstract":"<div><p>This special issue collects extended versions of selected papers presented at the 14th International Conference on Graph Transformation (ICGT 2021), held on June 24 and 25, 2021, as a virtual event due to ongoing COVID-19 countermeasures and travel restrictions.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100905"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876051","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"An axiomatic approach to differentiation of polynomial circuits","authors":"Paul Wilson , Fabio Zanasi","doi":"10.1016/j.jlamp.2023.100892","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100892","url":null,"abstract":"<div><p>Reverse derivative categories (RDCs) have recently been shown to be a suitable semantic framework for studying machine learning algorithms. Whereas emphasis has been put on training methodologies, less attention has been devoted to particular <em>model classes</em>: the concrete categories whose morphisms represent machine learning models. In this paper we study presentations by generators and equations of classes of RDCs. In particular, we propose <em>polynomial circuits</em> as a suitable machine learning model class. We give an axiomatisation for these circuits and prove a functional completeness result. Finally, we discuss the use of polynomial circuits over specific semirings to perform machine learning with discrete values.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100892"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876054","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"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":"<div><p>A concurrent program with semaphore-based exclusive control can be modeled by a logically constrained term rewrite system. In this paper, we first propose a framework to reduce the non-occurrence of a specified runtime error in the program to an all-path reachability problem of the transformed logically constrained term rewrite system. Here, an all-path reachability problem of the system is a pair of state sets and is demonically valid if every finite execution path starting with a state in the first set and ending with a terminating state includes a state in the second set. Then, we propose a weakened but easily-implementable variant of an existing proof system for all-path reachability problems. As a case study, we deal with the race freedom of concurrent programs with semaphore-based exclusive control.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100903"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876055","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}
Ştefan Ciobâcă, Dorel Lucanu, Andrei Sebastian Buruiană
{"title":"Operationally-based program equivalence proofs using LCTRSs","authors":"Ştefan Ciobâcă, Dorel Lucanu, Andrei Sebastian Buruiană","doi":"10.1016/j.jlamp.2023.100894","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100894","url":null,"abstract":"<div><p>We propose an operationally-based framework for deductive proofs of program equivalence. It is based on encoding the language semantics<span> as logically constrained term rewriting systems<span> (LCTRSs) and the two programs as terms. As a novelty of our method, we show that it enables relational reasoning about programs in various settings, which are encoded in the operational semantics<span>. For example, we show how our method can be used to prove programs that are equivalent when considering an unbounded stack, but where the equivalence fails to hold if the stack is bounded. We also show how to formalize read-sets and write-sets of symbolic expressions and statements by extending the operational semantics in a conservative way. This enables the relational verification of program schemas, which we exploit to prove compiler optimizations that cannot be handled by other tools. Our method requires an extension of standard LCTRSs with axiomatized symbols, which generate new research questions. We also present a prototype implementation that proves the practical feasibility of our approach.</span></span></span></p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100894"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876056","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Branching pomsets: Design, expressiveness and applications to choreographies","authors":"Luc Edixhoven , Sung-Shik Jongmans , José Proença , Ilaria Castellani","doi":"10.1016/j.jlamp.2023.100919","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100919","url":null,"abstract":"<div><p>Choreographic languages describe possible sequences of interactions among a set of agents. Typical models are based on languages or automata over sending and receiving actions. Pomsets provide a more compact alternative by using a partial order to explicitly represent causality and concurrency between these actions. However, pomsets offer no representation of choices, thus a set of pomsets is required to represent branching behaviour. For example, if an agent Alice can send one of two possible messages to Bob three times, one would need a set of <span><math><mn>2</mn><mo>×</mo><mn>2</mn><mo>×</mo><mn>2</mn></math></span> distinct pomsets to represent all possible branches of Alice's behaviour. This paper proposes an extension of pomsets, named <em>branching pomsets</em>, with a branching structure that can represent Alice's behaviour using <span><math><mn>2</mn><mo>+</mo><mn>2</mn><mo>+</mo><mn>2</mn></math></span> ordered actions. We compare the expressiveness of branching pomsets with that of several forms of event structures from the literature. We encode choreographies as branching pomsets and show that the pomset semantics of the encoded choreographies are bisimilar to their operational semantics. Furthermore, we define well-formedness conditions on branching pomsets, inspired by multiparty session types, and we prove that the well-formedness of a branching pomset is a sufficient condition for the realisability of the represented communication protocol. Finally, we present a prototype tool that implements our theory of branching pomsets, focusing on its applications to choreographies.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100919"},"PeriodicalIF":0.9,"publicationDate":"2023-09-20","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49875053","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A generic construction for crossovers of graph-like structures and its realization in the Eclipse Modeling Framework","authors":"Jens Kosiol , Stefan John , Gabriele Taentzer","doi":"10.1016/j.jlamp.2023.100909","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100909","url":null,"abstract":"<div><p><span>In model-driven optimization (MDO), domain-specific models are used to define and solve optimization problems<span> via meta-heuristic search, often via evolutionary algorithms. Models are typically evolved using mutations, which can be formally specified as graph transformations. So far, only mutations have been used to generate new solution models from existing ones; a crossover mechanism has not yet been developed. In this paper, we present a generic crossover construction for graph-like structures, which can be used to implement </span></span>crossover operators for models in MDO. We prove basic properties of our construction and show how it can be used to implement a whole set of crossover operators that have been proposed for specific problems and situations on graphs. In particular, we present a specialization of our construction to models defined in the Eclipse Modeling Framework.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100909"},"PeriodicalIF":0.9,"publicationDate":"2023-09-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49875054","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Weighted automata extraction and explanation of recurrent neural networks for natural language tasks","authors":"Zeming Wei , Xiyue Zhang , Yihao Zhang , Meng Sun","doi":"10.1016/j.jlamp.2023.100907","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100907","url":null,"abstract":"<div><p><span>Recurrent Neural Networks (RNNs) have achieved tremendous success in processing sequential data, yet understanding and analyzing their behaviours remains a significant challenge. To this end, many efforts have been made to extract </span>finite automata<span><span><span> from RNNs, which are more amenable for analysis and explanation. However, existing approaches like exact learning and compositional approaches for model extraction have limitations in either scalability or precision. In this paper, we propose a novel framework of Weighted Finite Automata (WFA) extraction and explanation to tackle the limitations for natural language tasks. First, to address the transition sparsity and context loss problems we identified in WFA extraction for natural language tasks, we propose an empirical method to complement missing rules in the </span>transition diagram, and adjust </span>transition matrices<span><span> to enhance the context-awareness of the WFA. We also propose two data augmentation tactics to track more dynamic behaviours of RNN, which further allows us to improve the extraction precision. Based on the extracted model, we propose an explanation method for RNNs including a </span>word embedding<span> method – Transition Matrix Embeddings (TME) and TME-based task oriented explanation for the target RNN. Our evaluation demonstrates the advantage of our method in extraction precision than existing approaches, and the effectiveness of TME-based explanation method in applications to pretraining and adversarial example generation.</span></span></span></p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100907"},"PeriodicalIF":0.9,"publicationDate":"2023-09-06","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49875056","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":4,"RegionCategory":"数学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"On algebraic array theories","authors":"Rodrigo Raya, Viktor Kunčak","doi":"10.1016/j.jlamp.2023.100906","DOIUrl":"10.1016/j.jlamp.2023.100906","url":null,"abstract":"<div><p>Automatic verification of programs manipulating arrays relies on specialised decision procedures. A methodology to classify the theories handled by these procedures is introduced. It is based on decomposition theorems in the style of Feferman and Vaught. The method is applied to obtain an extension of combinatory array logic that is closed under propositional operations and Hoare triples. A classification according to expressiveness of six different fragments studied in the literature is given.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100906"},"PeriodicalIF":0.9,"publicationDate":"2023-09-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"47384064","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}