{"title":"Environments and the complexity of abstract machines","authors":"Beniamino Accattoli, Bruno Barras","doi":"10.1145/3131851.3131855","DOIUrl":"https://doi.org/10.1145/3131851.3131855","url":null,"abstract":"Abstract machines for functional languages rely on the notion of environment, a data structure storing the previously encountered and delayed beta-redexes. This paper provides a close analysis of the different approaches to define and implement environments. There are two main styles. The most common one is to have many local environments, one for every piece of code in the data structures of the machine. A minority of works instead uses a single global environment. Up to now, the two approaches have been considered equivalent, in particular at the level of the complexity of the overhead: they have both been used to obtain bilinear bounds, that is, linear in the number of beta steps and in the size of the initial term. We start by having a close look on global environments and how to implement them. Then we show that local environments admit implementations that are asymptotically faster than global environments, lowering the dependency from the size of the initial term from linear to logarithmic, thus improving the bounds in the literature. We then focus on a third style, split environments, that are in between local and global ones, and have the benefits of both. Finally, we provide a call-by-need machine with split environments for which we prove the new improved bounds on the overhead.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"66 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131396806","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":"Accessing biological data as Prolog facts","authors":"N. Angelopoulos, J. Wielemaker","doi":"10.1145/3131851.3131857","DOIUrl":"https://doi.org/10.1145/3131851.3131857","url":null,"abstract":"It has been argued before that Prolog is a strong candidate for research and code development in bioinformatics and computational biology. This position has been based on both the intrinsic strengths of Prolog and recent advances in its technologies. Here we strengthen the case for the deployment and penetration of Prolog into bioinformatics, by introducing bio_db, a comprehensive and extensible system for working with biological data. Our library packages high quality, publicly available biological databases that are routinely used in tasks such as: (a) the translation between biological products and (b) product-to-product interactions which can be visualised as graphs. This library allows easy access to these data in five formats: Prolog fact files, Prolog quick load files, Berkeley DB data files, RocksDB and SQLite databases. In addition, the library introduces two innovative features that are pertinent to data analytics in general. First, on-demand downloading of prepacked data files as well as reconstruction from latest data files from the curated databases are supported. Second, by employing code hot-swapping the library delivers the data: (a) transparently to the user and (b) in the familiar format of Prolog facts.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"7 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134460449","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":"Characterization of strong normalizability for a sequent lambda calculus with co-control","authors":"J. E. Santo, S. Ghilezan","doi":"10.1145/3131851.3131867","DOIUrl":"https://doi.org/10.1145/3131851.3131867","url":null,"abstract":"We study strong normalization in a lambda calculus of proof-terms with co-control for the intuitionistic sequent calculus. In this sequent lambda calculus, the management of formulas on the left hand side of typing judgements is \"dual\" to the management of formulas on the right hand side of the typing judgements in Parigot's lambdamu calculus - that is why our system has first-class \"co-control\". The characterization of strong normalization is by means of intersection types, and is obtained by analyzing the relationship with another sequent lambda calculus, without co-control, for which a characterization of strong normalizability has been obtained before. The comparison of the two formulations of the sequent calculus, with or without co-control, is of independent interest. Finally, since it is known how to obtain bidirectional natural deduction systems isomorphic to these sequent calculi, characterizations are obtained of the strongly normalizing proof-terms of such natural deduction systems.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"44 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"134146082","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":"Machine fusion: merging merges, more or less","authors":"Amos Robinson, B. Lippmeier","doi":"10.1145/3131851.3131865","DOIUrl":"https://doi.org/10.1145/3131851.3131865","url":null,"abstract":"Compilers for stream programs often rely on a fusion transformation to convert the implied dataflow network into low-level iteration based code. Different fusion transformations handle different sorts of networks, with the distinguishing criteria being whether the network may contain splits and joins, and whether the set of fusible operators can be extended. We present the first fusion system that simultaneously satisfies all three of these criteria: networks can contain splits, joins, and new operators can be added to the system without needing to modify the overall fusion transformation.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"18 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"116864675","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":"Shrink fast correctly!","authors":"Olivier Savary Bélanger, A. Appel","doi":"10.1145/3131851.3131859","DOIUrl":"https://doi.org/10.1145/3131851.3131859","url":null,"abstract":"Function inlining, case-folding, projection-folding, and dead-variable elimination are important code transformations in virtually every functional-language compiler. When one of these reductions strictly reduces the size of the program (e.g., when the inlined function has only one applied occurrence), we call it a shrink reduction. Appel and Jim [1] introduced an algorithm to perform all shrink reductions (producing a shrink normal form) in quasilinear time. They proved confluence but not correctness. We have implemented this algorithm as part of an end-to-end verified compiler for Gallina, the specification language of the Coq theorem prover. We have given the first proofs of these properties: correctness with respect to contextual equivalence, reduction (in one pass) of all administrative redexes with one applied occurrence introduced by CPS conversion, and termination. The correctness and termination proofs are machine-checked in Coq. Because we use a pure functional language without imperative array update, our implementation is O(N log N) rather than O(N). Still, it's quite fast: we give performance results on some nontrivial benchmarks.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"22 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"115273994","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":"Function definitions for compound values in object-oriented languages","authors":"J. Chrzaszcz, Aleksy Schubert","doi":"10.1145/3131851.3131860","DOIUrl":"https://doi.org/10.1145/3131851.3131860","url":null,"abstract":"Declarative programming features are gradually included in the design of object-oriented languages such as Java and C++. These languages recently adopted anonymous function definitions and offer basic primitives that restrict changes on data, namely final and const keywords, respectively. We propose a type system for an object-oriented Java-like language that facilitates declarative programming while leaving programmers significant freedom in use of imperative features. The system allows one to delimit compound value representations and effectively define values that are common in functional programming languages. Given that, we distinguish methods that work as first-order functions on such values. In this framework functions may modify internal working state that is clearly separated from the global state of the program. The system exploits access modes for method arguments, which describe the way the method operates on the given entity representation.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"124247523","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":"Attribute grammars with set attributes and global constraints as a unifying framework for planning domain models","authors":"R. Barták, A. Maillard","doi":"10.1145/3131851.3131858","DOIUrl":"https://doi.org/10.1145/3131851.3131858","url":null,"abstract":"The paper presents attribute grammars as a unifying framework for modeling planning domains and problems. The motivation is to exploit techniques from formal languages in domain model verification, plan and goal recognition, domain model acquisition, as well as in planning. Grammar rules are used for action selection while specific set attributes are used to collect events (preconditions and effects of actions) that are ordered using a global timeline constraint. We show how classical STRIPS, hierarchical task networks, and procedural domain models are transformed to attribute grammars.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"128414677","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":"Selective unification in constraint logic programming","authors":"F. Mesnard, Étienne Payet, G. Vidal","doi":"10.1145/3131851.3131863","DOIUrl":"https://doi.org/10.1145/3131851.3131863","url":null,"abstract":"Concolic testing is a well-known validation technique for imperative and object-oriented programs. We have recently introduced an adaptation of this technique to logic programming. At the heart of our framework for concolic testing lies a logic programming specific procedure that we call \"selective unification\". In this paper, we consider concolic testing in the context of constraint logic programming and extend the notion of selective unification accordingly. We prove that the selective unification problem is generally undecidable for constraint logic programs, and we present a correct and complete algorithm for selective unification in the context of a class of constraint structures.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"1 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130400889","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}
Luis Aguirre, N. Martí-Oliet, Miguel Palomino, I. Pita
{"title":"Conditional narrowing modulo SMT and axioms","authors":"Luis Aguirre, N. Martí-Oliet, Miguel Palomino, I. Pita","doi":"10.1145/3131851.3131856","DOIUrl":"https://doi.org/10.1145/3131851.3131856","url":null,"abstract":"This work presents a narrowing calculus for reachability problems in order-sorted conditional rewrite theories whose underlying equational logic is composed of some theories solvable via a satisfiability modulo theories (SMT) solver plus some combination of associativity, commutativity, and identity axioms for the non-SMT part of the equational logic; the conditions of the rules can be either rewrite conditions or quantifier-free SMT formulas. For any normalized answer of a reachability problem, this calculus computes this answer, or a more general one that can be instantiated to it.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"18 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"131761897","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":"Copattern matching and first-class observations in OCaml, with a macro","authors":"Paul Laforgue, Yann Régis-Gianas","doi":"10.1145/3131851.3131869","DOIUrl":"https://doi.org/10.1145/3131851.3131869","url":null,"abstract":"Infinite data structures are elegantly defined by means of copattern matching, a dual construction to pattern matching that expresses the outcomes of the observations of an infinite structure. We extend the OCaml programming language with copatterns, exploiting the duality between pattern matching and copattern matching. Provided that a functional programming language has GADTs, every copattern matching can be transformed into a pattern matching via a purely local syntactic transformation, a macro. The development of this extension leads us to a generalization of previous calculus of copatterns: the introduction of first-class observation queries. We study this extension both from a formal and practical point of view.","PeriodicalId":148157,"journal":{"name":"Proceedings of the 19th International Symposium on Principles and Practice of Declarative Programming","volume":"50 1","pages":"0"},"PeriodicalIF":0.0,"publicationDate":"2017-10-09","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":null,"resultStr":null,"platform":"Semanticscholar","paperid":"130681371","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}