We present a novel sampling framework for probabilistic programs. The framework combines two recent ideas—control-data separation and logical condition propagation—in a nontrivial manner so that the two ideas boost the benefits of each other. We implemented our algorithm on top of Anglican. The experimental results demonstrate our algorithm's efficiency, especially for programs with while loops and rare observations.
{"title":"Control-data separation and logical condition propagation for efficient inference on probabilistic programs","authors":"Ichiro Hasuo , Yuichiro Oyabu , Clovis Eberhart , Kohei Suenaga , Kenta Cho , Shin-ya Katsumata","doi":"10.1016/j.jlamp.2023.100922","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100922","url":null,"abstract":"<div><p>We present a novel sampling framework for probabilistic programs. The framework combines two recent ideas—<em>control-data separation</em> and <em>logical condition propagation</em>—in a nontrivial manner so that the two ideas boost the benefits of each other. We implemented our algorithm on top of Anglican. The experimental results demonstrate our algorithm's efficiency, especially for programs with while loops and rare observations.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100922"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91959643","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 : 2024-01-01Epub Date: 2023-10-23DOI: 10.1016/j.jlamp.2023.100923
Giacomo Maletto , Luca Roversi
Reversible primitive permutations (RPP) is a class of recursive functions that models reversible computation. We present a proof, which has been verified using the proof-assistant Lean, that demonstrates RPP can encode every primitive recursive function (PRF-completeness) and that each RPP can be encoded as a primitive recursive function (PRF-soundness). Our proof of PRF-completeness is simpler and fixes some errors in the original proof, while also introducing a new reversible iteration scheme for RPP. By keeping the formalization and semi-automatic proofs simple, we are able to identify a single programming pattern that can generate a set of reversible algorithms within RPP: Cantor pairing, integer division quotient/remainder, and truncated square root. Finally, Lean source code is available for experiments on reversible computation whose properties can be certified.
{"title":"Certifying expressive power and algorithms of reversible primitive permutations with Lean","authors":"Giacomo Maletto , Luca Roversi","doi":"10.1016/j.jlamp.2023.100923","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100923","url":null,"abstract":"<div><p>Reversible primitive permutations (<span>RPP</span>) is a class of recursive functions that models reversible computation. We present a proof, which has been verified using the proof-assistant <span>Lean</span>, that demonstrates <span>RPP</span> can encode every primitive recursive function (<span>PRF</span>-completeness) and that each <span>RPP</span> can be encoded as a primitive recursive function (<span>PRF</span>-soundness). Our proof of <span>PRF</span>-completeness is simpler and fixes some errors in the original proof, while also introducing a new reversible iteration scheme for <span>RPP</span>. By keeping the formalization and semi-automatic proofs simple, we are able to identify a single programming pattern that can generate a set of reversible algorithms within <span>RPP</span>: Cantor pairing, integer division quotient/remainder, and truncated square root. Finally, <span>Lean</span> source code is available for experiments on reversible computation whose properties can be certified.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100923"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2352220823000779/pdfft?md5=ad2af14a775f13438b00a61e5119077a&pid=1-s2.0-S2352220823000779-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91959656","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}
Pub Date : 2024-01-01Epub Date: 2023-09-09DOI: 10.1016/j.jlamp.2023.100909
Jens Kosiol , Stefan John , Gabriele Taentzer
In model-driven optimization (MDO), domain-specific models are used to define and solve optimization problems 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 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.
{"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":"2024-01-01","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}
Pub Date : 2024-01-01Epub Date: 2023-10-02DOI: 10.1016/j.jlamp.2023.100921
Yuanrui Zhang , Zhiming Liu
We propose a dynamic logic called “dynamic logic with branching modalities”, which extends the temporal dynamic logic DLT with a “branching modality” for specifying safety properties of regular programs with tests (simply “regular programs”). Compared to the trace modality of DLT for while programs that do not abort, branching modality of does not exclude aborting traces introduced by regular programs, thus is able to capture a type of safety properties which are important for systems with failure behaviors. Moreover, it is congruent to the compositionality of regular programs so that the proof system naturally extended from that of DLT is proved to be complete for . In this paper, we build the theory of on both propositional and first-ordered levels, defining two logics: propositional () and first-ordered (). forms the theoretical basis of while is useful for practical verification. We propose the proof systems for and , and analyze their decidability, soundness and (relative) completeness in a formal way, through comparing their expressiveness and deduction capabilities with propositional dynamic logic (PDL) and first-order dynamic logic (FODL) respectively. We show that is actually an extension of DLT, and illustrate the motivations of using the branching modality through an example.
{"title":"A dynamic logic with branching modalities","authors":"Yuanrui Zhang , Zhiming Liu","doi":"10.1016/j.jlamp.2023.100921","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100921","url":null,"abstract":"<div><p>We propose a dynamic logic <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> called “dynamic logic with branching modalities”, which extends the temporal dynamic logic DLT with a “branching modality” for specifying safety properties of regular programs with tests (simply “regular programs”). Compared to the trace modality of DLT for <em>while</em> programs that do not abort, branching modality of <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> does not exclude aborting traces introduced by regular programs, thus is able to capture a type of safety properties which are important for systems with failure behaviors. Moreover, it is congruent to the compositionality of regular programs so that the proof system naturally extended from that of DLT is proved to be complete for <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span>. In this paper, we build the theory of <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> on both propositional and first-ordered levels, defining two logics: propositional <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> (<span><math><msub><mrow><mi>PDL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span>) and first-ordered <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> (<span><math><msub><mrow><mi>FODL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span>). <span><math><msub><mrow><mi>PDL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> forms the theoretical basis of <span><math><msub><mrow><mi>DL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> while <span><math><msub><mrow><mi>FODL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> is useful for practical verification. We propose the proof systems for <span><math><msub><mrow><mi>PDL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> and <span><math><msub><mrow><mi>FODL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span>, and analyze their decidability, soundness and (relative) completeness in a formal way, through comparing their expressiveness and deduction capabilities with propositional dynamic logic (PDL) and first-order dynamic logic (FODL) respectively. We show that <span><math><msub><mrow><mi>FODL</mi></mrow><mrow><mi>b</mi></mrow></msub></math></span> is actually an extension of DLT, and illustrate the motivations of using the branching modality through an example.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100921"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49875055","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 : 2024-01-01Epub Date: 2023-11-07DOI: 10.1016/j.jlamp.2023.100928
Francisco Durán , Nicolás Pozas , Camilo Rocha
A significant task in business process optimization is concerned with streamlining the allocation and sharing of resources. This paper presents an approach for analyzing business process provisioning under a resource prediction strategy based on deep learning. A timed and probabilistic rewrite theory specification formalizes the semantics of business processes. It is integrated with an external oracle in the form of a long short-term memory neural network that can be queried to predict how traces of the process may advance within a time frame. Comparison of execution time and resource occupancy under different parameters is included for several case studies, as well as details on the construction of the deep learning model and its integration with Maude.
{"title":"Business processes resource management using rewriting logic and deep-learning-based predictive monitoring","authors":"Francisco Durán , Nicolás Pozas , Camilo Rocha","doi":"10.1016/j.jlamp.2023.100928","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100928","url":null,"abstract":"<div><p>A significant task in business process optimization is concerned with streamlining the allocation and sharing of resources. This paper presents an approach for analyzing business process provisioning under a resource prediction strategy based on deep learning. A timed and probabilistic rewrite theory specification formalizes the semantics of business processes. It is integrated with an external oracle in the form of a long short-term memory neural network that can be queried to predict how traces of the process may advance within a time frame. Comparison of execution time and resource occupancy under different parameters is included for several case studies, as well as details on the construction of the deep learning model and its integration with Maude.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100928"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91987265","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 : 2024-01-01Epub Date: 2023-10-20DOI: 10.1016/j.jlamp.2023.100924
Clément Aubert
This article designs a general principle to check the correctness of the definition of concurrency (a.k.a. independence) of events for concurrent calculi. Concurrency relations are central in process algebras, but also two-sided: they are often defined independently on composable and on coinitial transitions, and no criteria exist to assess whether they “interact correctly”. This article starts by examining how reversibility can provide such a correctness of concurrencies criterion, and its implications. It then defines, for the first time, a syntactical definition of concurrency for CCSK, a reversible declension of the calculus of communicating systems. To do so, according to our criterion, requires to define concurrency relations for all types of transitions along two axes: direction (forward or backward) and concomitance (coinitial or composable). Our definition is uniform thanks to proved transition systems and satisfies our sanity checks: square properties, sideways diamonds, but also the reversible checks (reverse diamonds and causal consistency). We also prove that our formalism is either equivalent to or a refinement of pre-existing definitions of concurrency for reversible systems. We conclude by discussing additional criteria and possible future works.
{"title":"The correctness of concurrencies in (reversible) concurrent calculi","authors":"Clément Aubert","doi":"10.1016/j.jlamp.2023.100924","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100924","url":null,"abstract":"<div><p><span>This article designs a general principle to check the correctness of the definition of concurrency (a.k.a. independence) of events for concurrent calculi. Concurrency relations are central in process algebras, but also two-sided: they are often defined independently on composable and on coinitial transitions, and no criteria exist to assess whether they “interact correctly”. This article starts by examining how reversibility can provide such a correctness of concurrencies criterion, and its implications. It then defines, for the first time, a syntactical definition of concurrency for </span><span>CCSK</span>, a reversible declension of the calculus of communicating systems. To do so, according to our criterion, requires to define concurrency relations for all types of transitions along two axes: direction (forward or backward) and concomitance (coinitial or composable). Our definition is uniform thanks to proved transition systems and satisfies our sanity checks: square properties, sideways diamonds, but also the reversible checks (reverse diamonds and causal consistency). We also prove that our formalism is either equivalent to or a refinement of pre-existing definitions of concurrency for reversible systems. We conclude by discussing additional criteria and possible future works.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100924"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91959655","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 : 2024-01-01Epub Date: 2023-09-06DOI: 10.1016/j.jlamp.2023.100907
Zeming Wei , Xiyue Zhang , Yihao Zhang , Meng Sun
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 finite automata 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 transition diagram, and adjust transition matrices 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 word embedding 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.
{"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":"2024-01-01","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}
Pub Date : 2024-01-01Epub Date: 2023-11-04DOI: 10.1016/j.jlamp.2023.100927
Abdelkrim Abdelli
The verification of preemptive real-time systems is a crucial aspect in ensuring their correctness and reliability to meet strict time constraints. Generally, the analysis of the behaviors of such systems requires the computation of the reachability graphs encoding their state space. However, the construction of the latter is computationally expensive and resource-consuming as it involves, for each graph node, managing and solving polyhedral constraints whose complexity is exponential.
In this paper, we explore a novel approach that builds an over-approximation of the state space of preemptive real-time systems. Our graph construction extends the expression of a node to the time-distance system that encodes the quantitative properties of past-fired subsequences. This makes it possible to restore relevant time information that is used to compute in a polynomial time a tighter difference bound matrix over-approximation of the polyhedral constraints. We show that the obtained graph is more appropriate to restore the quantitative properties of the model. The simulation results show that our graphs are almost of the same size as the exact graphs, while improving by far the times needed for their computation.
{"title":"Time distance-based computation of the DBM over-approximation of preemptive real-time systems","authors":"Abdelkrim Abdelli","doi":"10.1016/j.jlamp.2023.100927","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100927","url":null,"abstract":"<div><p>The verification of preemptive real-time systems is a crucial aspect in ensuring their correctness and reliability to meet strict time constraints. Generally, the analysis of the behaviors of such systems requires the computation of the reachability graphs encoding their state space. However, the construction of the latter is computationally expensive and resource-consuming as it involves, for each graph node, managing and solving polyhedral constraints whose complexity is exponential.</p><p>In this paper, we explore a novel approach that builds an over-approximation of the state space of preemptive real-time systems. Our graph construction extends the expression of a node to the time-distance system that encodes the quantitative properties of past-fired subsequences. This makes it possible to restore relevant time information that is used to compute in a polynomial time a tighter difference bound matrix over-approximation of the polyhedral constraints. We show that the obtained graph is more appropriate to restore the quantitative properties of the model. The simulation results show that our graphs are almost of the same size as the exact graphs, while improving by far the times needed for their computation.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100927"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91987267","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 : 2024-01-01Epub Date: 2023-10-31DOI: 10.1016/j.jlamp.2023.100926
Salvador Lucas
Reduction-based systems are used as a basis for the implementation of programming languages, automated reasoning systems, mathematical analysis tools, etc. In such inherently non-deterministic systems, guaranteeing that diverging steps can be eventually rejoined is crucial for a faithful use in most applications. This property of reduction systems is called local confluence. In a landmark 1980 paper, Gérard Huet characterized local confluence of a Term Rewriting System as the joinability of all its critical pairs. In this paper, we characterize local confluence of Conditional Term Rewriting Systems, where reduction steps may depend on the satisfaction of specific conditions in rules: a conditional term rewriting system is locally confluent if and only if (i) all its conditional critical pairs and (ii) all its conditional variable pairs (which we introduce in this paper) are joinable. Furthermore, the logic-based approach we follow here is well-suited to analyze local confluence of more general reduction-based systems. We exemplify this by (i) including (context-sensitive) replacement restrictions in the arguments of function symbols, and (ii) allowing for more general conditions in rules. The obtained systems are called Generalized Term Rewriting Systems. A characterization of local confluence is also given for them.
{"title":"Local confluence of conditional and generalized term rewriting systems","authors":"Salvador Lucas","doi":"10.1016/j.jlamp.2023.100926","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100926","url":null,"abstract":"<div><p>Reduction-based systems are used as a basis for the implementation of programming languages, automated reasoning systems, mathematical analysis tools, etc. In such inherently non-deterministic systems, guaranteeing that diverging steps can be eventually rejoined is crucial for a faithful use in most applications. This property of reduction systems is called <em>local confluence</em>. In a landmark 1980 paper, Gérard Huet characterized local confluence of a <em>Term Rewriting System</em> as the joinability of all its <em>critical pairs</em>. In this paper, we characterize local confluence of <em>Conditional Term Rewriting Systems</em>, where reduction steps may depend on the satisfaction of specific conditions in rules: a conditional term rewriting system is locally confluent if and only if (i) all its <em>conditional critical pairs</em> and (ii) all its <em>conditional variable pairs</em> (which we introduce in this paper) are joinable. Furthermore, the logic-based approach we follow here is well-suited to analyze local confluence of more general reduction-based systems. We exemplify this by (i) including (context-sensitive) replacement restrictions in the arguments of function symbols, and (ii) allowing for more general conditions in rules. The obtained systems are called <em>Generalized Term Rewriting Systems</em>. A characterization of local confluence is also given for them.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100926"},"PeriodicalIF":0.9,"publicationDate":"2024-01-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"91987266","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}
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 distinct pomsets to represent all possible branches of Alice's behaviour. This paper proposes an extension of pomsets, named branching pomsets, with a branching structure that can represent Alice's behaviour using 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.
{"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":"2024-01-01","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}