{"title":"Tameness and the power of programs over monoids in DA","authors":"Nathan Grosshans, P. McKenzie, L. Segoufin","doi":"10.46298/lmcs-18(3:14)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(3:14)2022","url":null,"abstract":"The program-over-monoid model of computation originates with Barrington's\u0000proof that the model captures the complexity class $mathsf{NC^1}$. Here we\u0000make progress in understanding the subtleties of the model. First, we identify\u0000a new tameness condition on a class of monoids that entails a natural\u0000characterization of the regular languages recognizable by programs over monoids\u0000from the class. Second, we prove that the class known as $mathbf{DA}$\u0000satisfies tameness and hence that the regular languages recognized by programs\u0000over monoids in $mathbf{DA}$ are precisely those recognizable in the classical\u0000sense by morphisms from $mathbf{QDA}$. Third, we show by contrast that the\u0000well studied class of monoids called $mathbf{J}$ is not tame. Finally, we\u0000exhibit a program-length-based hierarchy within the class of languages\u0000recognized by programs over monoids from $mathbf{DA}$.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"32 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2021-01-19","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"121330554","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Higher Order Automatic Differentiation of Higher Order Functions","authors":"Mathieu Huot, S. Staton, Matthijs V'ak'ar","doi":"10.46298/lmcs-18(1:41)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(1:41)2022","url":null,"abstract":"We present semantic correctness proofs of automatic differentiation (AD). We consider a forward-mode AD method on a higher order language with algebraic data types, and we characterise it as the unique structure preserving macro given a choice of derivatives for basic operations. We describe a rich semantics for differentiable programming, based on diffeological spaces. We show that it interprets our language, and we phrase what it means for the AD method to be correct with respect to this semantics. We show that our characterisation of AD gives rise to an elegant semantic proof of its correctness based on a gluing construction on diffeological spaces. We explain how this is, in essence, a logical relations argument. Throughout, we show how the analysis extends to AD methods for computing higher order derivatives using a Taylor approximation.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"19 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2021-01-17","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"122225421","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Parametricity for Nested Types and GADTs","authors":"Patricia Johann, Enrico Ghiorzi, D. Jeffries","doi":"10.46298/lmcs-17(4:23)2021","DOIUrl":"https://doi.org/10.46298/lmcs-17(4:23)2021","url":null,"abstract":"This paper considers parametricity and its consequent free theorems for\u0000nested data types. Rather than representing nested types via their Church\u0000encodings in a higher-kinded or dependently typed extension of System F, we\u0000adopt a functional programming perspective and design a Hindley-Milner-style\u0000calculus with primitives for constructing nested types directly as fixpoints.\u0000Our calculus can express all nested types appearing in the literature,\u0000including truly nested types. At the level of terms, it supports primitive\u0000pattern matching, map functions, and fold combinators for nested types. Our\u0000main contribution is the construction of a parametric model for our calculus.\u0000This is both delicate and challenging. In particular, to ensure the existence\u0000of semantic fixpoints interpreting nested types, and thus to establish a\u0000suitable Identity Extension Lemma for our calculus, our type system must\u0000explicitly track functoriality of types, and cocontinuity conditions on the\u0000functors interpreting them must be appropriately threaded throughout the model\u0000construction. We also prove that our model satisfies an appropriate Abstraction\u0000Theorem, as well as that it verifies all standard consequences of parametricity\u0000in the presence of primitive nested types. We give several concrete examples\u0000illustrating how our model can be used to derive useful free theorems,\u0000including a short cut fusion transformation, for programs over nested types.\u0000Finally, we consider generalizing our results to GADTs, and argue that no\u0000extension of our parametric model for nested types can give a functorial\u0000interpretation of GADTs in terms of left Kan extensions and still be\u0000parametric.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"24 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2021-01-13","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"126872653","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Quotients, inductive types, and quotient inductive types","authors":"M. Fiore, A. Pitts, S. Steenkamp","doi":"10.46298/lmcs-18(2:15)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(2:15)2022","url":null,"abstract":"This paper introduces an expressive class of indexed quotient-inductive types, called QWI types, within the framework of constructive type theory. They are initial algebras for indexed families of equational theories with possibly infinitary operators and equations. We prove that QWI types can be derived from quotient types and inductive types in the type theory of toposes with natural number object and universes, provided those universes satisfy the Weakly Initial Set of Covers (WISC) axiom. We do so by constructing QWI types as colimits of a family of approximations to them defined by well-founded recursion over a suitable notion of size, whose definition involves the WISC axiom. We developed the proof and checked it using the Agda theorem prover.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"45 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2021-01-08","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"123280200","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"A Detailed Account of The Inconsistent Labelling Problem of Stutter-Preserving Partial-Order Reduction","authors":"Thomas Neele, A. Valmari, T. Willemse","doi":"10.46298/lmcs-17(3:8)2021","DOIUrl":"https://doi.org/10.46298/lmcs-17(3:8)2021","url":null,"abstract":"One of the most popular state-space reduction techniques for model checking\u0000is partial-order reduction (POR). Of the many different POR implementations,\u0000stubborn sets are a very versatile variant and have thus seen many different\u0000applications over the past 32 years. One of the early stubborn sets works shows\u0000how the basic conditions for reduction can be augmented to preserve\u0000stutter-trace equivalence, making stubborn sets suitable for model checking of\u0000linear-time properties. In this paper, we identify a flaw in the reasoning and\u0000show with a counter-example that stutter-trace equivalence is not necessarily\u0000preserved. We propose a stronger reduction condition and provide extensive new\u0000correctness proofs to ensure the issue is resolved. Furthermore, we analyse in\u0000which formalisms the problem may occur. The impact on practical implementations\u0000is limited, since they all compute a correct approximation of the theory.\u0000\u0000 Comment: arXiv admin note: substantial text overlap with arXiv:1910.09829","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"39 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-31","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132200146","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Modal meet-implication logic","authors":"Jim de Groot, D. Pattinson","doi":"10.46298/lmcs-18(3:1)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(3:1)2022","url":null,"abstract":"We extend the meet-implication fragment of propositional intuitionistic logic\u0000with a meet-preserving modality. We give semantics based on semilattices and a\u0000duality result with a suitable notion of descriptive frame. As a consequence we\u0000obtain completeness and identify a common (modal) fragment of a large class of\u0000modal intuitionistic logics. We recognise this logic as a dialgebraic logic,\u0000and as a consequence obtain expressivity-somewhere-else. Within the dialgebraic\u0000framework, we then investigate the extension of the meet-implication fragment\u0000of propositional intuitionistic logic with a monotone modality and prove\u0000completeness and expressivity-somewhere-else for it.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"18 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-27","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128956350","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Danilo Pianini, Roberto Casadei, Mirko Viroli, S. Mariani, F. Zambonelli
{"title":"Time-Fluid Field-Based Coordination through Programmable Distributed Schedulers","authors":"Danilo Pianini, Roberto Casadei, Mirko Viroli, S. Mariani, F. Zambonelli","doi":"10.46298/lmcs-17(4:13)2021","DOIUrl":"https://doi.org/10.46298/lmcs-17(4:13)2021","url":null,"abstract":"Emerging application scenarios, such as cyber-physical systems (CPSs), the\u0000Internet of Things (IoT), and edge computing, call for coordination approaches\u0000addressing openness, self-adaptation, heterogeneity, and deployment\u0000agnosticism. Field-based coordination is one such approach, promoting the idea\u0000of programming system coordination declaratively from a global perspective, in\u0000terms of functional manipulation and evolution in \"space and time\" of\u0000distributed data structures called fields. More specifically regarding time, in\u0000field-based coordination (as in many other distributed approaches to\u0000coordination) it is assumed that local activities in each device are regulated\u0000by a fair and unsynchronised fixed clock working at the platform level. In this\u0000work, we challenge this assumption, and propose an alternative approach where\u0000scheduling is programmed in a natural way (along with usual field-based\u0000coordination) in terms of causality fields, each enacting a programmable\u0000distributed notion of a computation \"cause\" (why and when a field computation\u0000has to be locally computed) and how it should change across time and space.\u0000Starting from low-level platform triggers, such causality fields can be\u0000organised into multiple layers, up to high-level, collectively-computed time\u0000abstractions, to be used at the application level. This reinterpretation of\u0000time in terms of articulated causality relations allows us to express what we\u0000call \"time-fluid\" coordination, where scheduling can be finely tuned so as to\u0000select the triggers to react to, generally allowing to adaptively balance\u0000performance (system reactivity) and cost (resource usage) of computations. We\u0000formalise the proposed scheduling framework for field-based coordination in the\u0000context of the field calculus, discuss an implementation in the aggregate\u0000computing framework, and finally evaluate the approach via simulation on\u0000several case studies.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"48 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-26","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131209352","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
Giorgio Audrito, Roberto Casadei, Ferruccio Damiani, Mirko Viroli
{"title":"Computation Against a Neighbour: Addressing Large-Scale Distribution and Adaptivity with Functional Programming and Scala","authors":"Giorgio Audrito, Roberto Casadei, Ferruccio Damiani, Mirko Viroli","doi":"10.46298/lmcs-19(1:6)2023","DOIUrl":"https://doi.org/10.46298/lmcs-19(1:6)2023","url":null,"abstract":"Recent works in contexts like the Internet of Things (IoT) and large-scale\u0000Cyber-Physical Systems (CPS) propose the idea of programming distributed\u0000systems by focussing on their global behaviour across space and time. In this\u0000view, a potentially vast and heterogeneous set of devices is considered as an\u0000\"aggregate\" to be programmed as a whole, while abstracting away the details of\u0000individual behaviour and exchange of messages, which are expressed\u0000declaratively. One such a paradigm, known as aggregate programming, builds on\u0000computational models inspired by field-based coordination. Existing models such\u0000as the field calculus capture interaction with neighbours by a so-called\u0000\"neighbouring field\" (a map from neighbours to values). This requires ad-hoc\u0000mechanisms to smoothly compose with standard values, thus complicating\u0000programming and introducing clutter in aggregate programs, libraries and\u0000domain-specific languages (DSLs). To address this key issue we introduce the\u0000novel notion of \"computation against a neighbour\", whereby the evaluation of\u0000certain subexpressions of the aggregate program are affected by recent\u0000corresponding evaluations in neighbours. We capture this notion in the\u0000neighbours calculus (NC), a new field calculus variant which is shown to\u0000smoothly support declarative specification of interaction with neighbours, and\u0000correspondingly facilitate the embedding of field computations as internal DSLs\u0000in common general-purpose programming languages -- as exemplified by a Scala\u0000implementation, called ScaFi. This paper formalises NC, thoroughly compares it\u0000with respect to the classic field calculus, and shows its expressiveness by\u0000means of a case study in edge computing, developed in ScaFi.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"4 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-15","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124077169","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Tractable Combinations of Temporal CSPs","authors":"M. Bodirsky, Johannes Greiner, Jakub Rydval","doi":"10.46298/lmcs-18(2:11)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(2:11)2022","url":null,"abstract":"The constraint satisfaction problem (CSP) of a first-order theory $T$ is the computational problem of deciding whether a given conjunction of atomic formulas is satisfiable in some model of $T$. We study the computational complexity of $mathrm{CSP}(T_1 cup T_2)$ where $T_1$ and $T_2$ are theories with disjoint finite relational signatures. We prove that if $T_1$ and $T_2$ are the theories of temporal structures, i.e., structures where all relations have a first-order definition in $(mathbb{Q};<)$, then $mathrm{CSP}(T_1 cup T_2)$ is in P or NP-complete. To this end we prove a purely algebraic statement about the structure of the lattice of locally closed clones over the domain ${mathbb Q}$ that contain $mathrm{Aut}(mathbb{Q};<)$.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"3 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"117027032","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}
{"title":"Quantum Control in the Unitary Sphere: Lambda-S1 and its Categorical Model","authors":"Alejandro D'iaz-Caro, Octavio Malherbe","doi":"10.46298/lmcs-18(3:32)2022","DOIUrl":"https://doi.org/10.46298/lmcs-18(3:32)2022","url":null,"abstract":"In a recent paper, a realizability technique has been used to give a\u0000semantics of a quantum lambda calculus. Such a technique gives rise to an\u0000infinite number of valid typing rules, without giving preference to any subset\u0000of those. In this paper, we introduce a valid subset of typing rules, defining\u0000an expressive enough quantum calculus. Then, we propose a categorical semantics\u0000for it. Such a semantics consists of an adjunction between the category of\u0000distributive-action spaces of value distributions (that is, linear combinations\u0000of values in the lambda calculus), and the category of sets of value\u0000distributions.","PeriodicalId":314387,"journal":{"name":"Log. Methods Comput. Sci.","volume":"53 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2020-12-10","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"132739791","PeriodicalName":null,"FirstCategoryId":null,"ListUrlMain":null,"RegionNum":0,"RegionCategory":"","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":"","EPubDate":null,"PubModel":null,"JCR":null,"JCRName":null,"Score":null,"Total":0}