{"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":"2023-10-31","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}
D. Della Giustina, C. Londero, C. Piazza, B. Riccardi, R. Romanello
{"title":"Quantum encoding of dynamic directed graphs","authors":"D. Della Giustina, C. Londero, C. Piazza, B. Riccardi, R. Romanello","doi":"10.1016/j.jlamp.2023.100925","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100925","url":null,"abstract":"<div><p>In application domains such as routing, network analysis, scheduling, and planning, directed graphs are widely used as both formal models and core data structures for the development of efficient algorithmic solutions. In these areas, graphs are often evolving in time: for example, connection links may fail due to temporary technical issues, meaning that edges of the graph cannot be traversed for some time interval and alternative paths have to be followed.</p><p>In classical computation graphs have been implemented both explicitly through adjacency matrices/lists and symbolically as ordered binary decision diagrams. Moreover, ad-hoc visit procedures have been developed to deal with dynamically evolving graphs.</p><p>Quantum computation, exploiting interference and entanglement, has provided an exponential speed-up for specific problems, e.g., database search and integer factorization. In the quantum framework everything must be represented and manipulated using reversible operators. This poses a challenge when one has to deal with traversals of dynamically evolving directed graphs. Graph traversals are not intrinsically reversible because of converging paths. In the case of dynamically evolving graphs also the creation/destruction of paths comes into play against reversibility.</p><p>In this paper we propose a novel high level graph representation in quantum computation supporting dynamic connectivity typical of real-world network applications. Our procedure allows to encode any <em>multigraph</em> into a unitary matrix. We devise algorithms for computing the encoding that are optimal in terms of time and space and we show the effectiveness of the proposal with some examples. We describe how to react to edge/node failures in constant time. Furthermore, we present two methods to perform quantum random walks taking advantage of this encoding: with and without <em>projectors</em>. We implement and test our encoding obtaining that the theoretical bounds for the running time are confirmed by the empirical results and providing more details on the behavior of the algorithms over graphs of different densities.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"136 ","pages":"Article 100925"},"PeriodicalIF":0.9,"publicationDate":"2023-10-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"https://www.sciencedirect.com/science/article/pii/S2352220823000792/pdfft?md5=c55a5be4601cbf982b84a0ffbe5997ec&pid=1-s2.0-S2352220823000792-main.pdf","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"92096451","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}
{"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":"2023-10-23","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}
{"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":"2023-10-20","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}
{"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":"2023-10-05","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}
{"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":"2023-10-02","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}
{"title":"An efficient canonical narrowing implementation with irreducibility and SMT constraints for generic symbolic protocol analysis","authors":"Raúl López-Rueda, Santiago Escobar, Julia Sapiña","doi":"10.1016/j.jlamp.2023.100895","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100895","url":null,"abstract":"<div><p>Narrowing and unification are very useful tools for symbolic analysis of rewrite theories, and thus for any model that can be specified in that way. A very clear example of their application is the field of formal cryptographic protocol analysis, which is why narrowing and unification are used in tools such as Maude-NPA, Tamarin and Akiss. In this work we present the implementation of a canonical narrowing algorithm, which improves the standard narrowing algorithm, extended to be able to process rewrite theories with conditional rules. The conditions of the rules will contain SMT constraints, which will be carried throughout the execution of the algorithm to determine if the solutions have associated satisfiable or unsatisfiable constraints, and in the latter case, discard them.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100895"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876057","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":"ElixirST: A session-based type system for Elixir modules","authors":"Adrian Francalanza, Gerard Tabone","doi":"10.1016/j.jlamp.2023.100891","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100891","url":null,"abstract":"<div><p>This paper investigates the adaptation of session types to provide behavioural information about Elixir modules. We devise a type system, called <span>ElixirST</span><span>, which statically determines whether functions in an Elixir module observe their endpoint specifications, expressed as session types; a corresponding tool automating this typechecking has also been constructed. In this paper we also formally validate this type system. An LTS-based operational semantics for the language fragment supported by the type system is developed, modelling its runtime behaviour when interacting with the module client. This operational semantics is then used to prove a form of session fidelity and progress for </span><span>ElixirST</span>.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100891"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876050","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":"Fundamentals of compositional rewriting theory","authors":"Nicolas Behr , Russ Harmer , Jean Krivine","doi":"10.1016/j.jlamp.2023.100893","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100893","url":null,"abstract":"<div><p>A foundational theory of compositional categorical rewriting theory is presented, based on a collection of fibration-like properties that collectively induce and intrinsically structure the large collection of lemmata used in the proofs of theorems such as concurrency and associativity. The resulting highly generic proofs of these theorems are given. It is noteworthy that the proof of the concurrency theorem takes only a few lines and, while that of associativity remains somewhat longer, it would be unreadably long if written directly in terms of the basic lemmata. In essence, our framework improves the readability and ease of comprehension of these proofs by exposing latent modularity. A curated list of known instances of our framework is used to conclude the paper with a detailed discussion of the conditions under which the Double Pushout and Sesqui-Pushout semantics of graph transformation are compositional.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100893"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876053","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":"Liquidity analysis in resource-aware programming","authors":"Cosimo Laneve","doi":"10.1016/j.jlamp.2023.100889","DOIUrl":"https://doi.org/10.1016/j.jlamp.2023.100889","url":null,"abstract":"<div><p>Liquidity is a liveness property of programs managing resources that pinpoints those programs not freezing any resource forever. We consider a simple stateful language whose resources are assets (digital currencies, non fungible tokens, etc.). Then we define a type system that tracks in a symbolic way the input-output behavior of functions with respect to assets. These types and their composition, which define types of computations, allow us to design two algorithms for liquidity that have different precisions and costs. We also demonstrate the correctness of the algorithms.</p></div>","PeriodicalId":48797,"journal":{"name":"Journal of Logical and Algebraic Methods in Programming","volume":"135 ","pages":"Article 100889"},"PeriodicalIF":0.9,"publicationDate":"2023-10-01","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"49876049","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}