-
Subcubic Certificates for CFL Reachability arXiv.cs.PL Pub Date : 2021-02-25 Dmitry Chistikov; Rupak Majumdar; Philipp Schepper
Many problems in interprocedural program analysis can be modeled as the context-free language (CFL) reachability problem on graphs and can be solved in cubic time. Despite years of efforts, there are no known truly sub-cubic algorithms for this problem. We study the related certification task: given an instance of CFL reachability, are there small and efficiently checkable certificates for the existence
-
A tier-based typed programming language characterizing Feasible Functionals arXiv.cs.PL Pub Date : 2021-02-23 Emmanuel Hainry; Bruce M. Kapron; Jean-Yves Marion; Romain Péchoux
The class of Basic Feasible Functionals BFF$_2$ is the type-2 counterpart of the class FP of type-1 functions computable in polynomial time. Several characterizations have been suggested in the literature, but none of these present a programming language with a type system guaranteeing this complexity bound. We give a characterization of BFF$_2$ based on an imperative language with oracle calls using
-
Supermartingales, Ranking Functions and Probabilistic Lambda Calculus arXiv.cs.PL Pub Date : 2021-02-22 Andrew Kenyon-Roberts; Luke Ong
We introduce a method for proving almost sure termination in the context of lambda calculus with continuous random sampling and explicit recursion, based on ranking supermartingales. This result is extended in three ways. Antitone ranking functions have weaker restrictions on how fast they must decrease, and are applicable to a wider range of programs. Sparse ranking functions take values only at a
-
SigVM: Toward Fully Autonomous Smart Contracts arXiv.cs.PL Pub Date : 2021-02-22 Ryan Song; Zihan Zhao; Yuxi Cai; Andreas Veneris; Fan Long
This paper presents SigVM, a novel blockchain virtual machine that supports an event-driven execution model, enabling developers to build fully autonomous smart contracts. SigVM introduces another way for a contract to interact with another. Contracts in SigVM can emit signal events, on which other contracts can listen. Once an event is triggered, corresponding handler functions are automatically executed
-
Certifying Choreography Compilation arXiv.cs.PL Pub Date : 2021-02-21 Luís Cruz-Filipe; Fabrizio Montesi; Marco Peressotti
Choreographic programming is a paradigm for developing concurrent and distributed systems, where programs are choreographies that define, from a global viewpoint, the computations and interactions that communicating processes should enact. Choreography compilation translates choreographies into the local definitions of process behaviours, given as terms in a process calculus. Proving choreography compilation
-
Overcoming Restraint: Modular Refinement using Cogent's Principled Foreign Function Interface arXiv.cs.PL Pub Date : 2021-02-19 Louis; Cheung; Liam O'Connor; Christine Rizkallah
Cogent is a restricted functional language designed to reduce the cost of developing verified systems code. However, Cogent does not support recursion nor iteration, and its type system imposes restrictions that are sometimes too strong for low-level system programming. To overcome these restrictions, Cogent provides a foreign function interface (FFI) between Cogent and C which allows for implementing
-
Tail Modulo Cons arXiv.cs.PL Pub Date : 2021-02-19 Frédéric Bour; Basile Clément; Gabriel Scherer
OCaml function calls consume space on the system stack. Operating systems set default limits on the stack space which are much lower than the available memory. If a program runs out of stack space, they get the dreaded "Stack Overflow" exception -- they crash. As a result, OCaml programmers have to be careful, when they write recursive functions, to remain in the so-called _tail-recursive_ fragment
-
A Compiler Infrastructure for Accelerator Generators arXiv.cs.PL Pub Date : 2021-02-19 Rachit Nigam; Samuel Thomas; Zhijing Li; Adrian Sampson
We present Calyx, a new intermediate language (IL) for compiling high-level programs into hardware designs. Calyx combines a hardware-like structural language with a software-like control flow representation with loops and conditionals. This split representation enables a new class of hardware-focused optimizations that require both structural and control flow information which are crucial for high-level
-
Effective Cache Apportioning for Performance Isolation Under Compiler Guidance arXiv.cs.PL Pub Date : 2021-02-18 Bodhisatwa Chatterjee; Sharjeel Khan; Santosh Pande
With a growing number of cores per socket in modern data-centers where multi-tenancy of a diverse set of applications must be efficiently supported, effective sharing of the last level cache is a very important problem. This is challenging because modern workloads exhibit \textit{dynamic phase behavior} - their cache requirements \& sensitivity vary across different execution points. To tackle this
-
Interleaving classical and reversible arXiv.cs.PL Pub Date : 2021-02-18 Armando B. Matos; Luca Paolini; Luca Roversi
Given a simple recursive function, we show how to extract two interacting processes from it. The two processes can be described by means of iterative programs, one of which is intrinsically reversible, in a language that, up to minor details, belongs to the core of widely used imperative programming languages. We implement the two processes as interleaving synchronous JAVA threads whose interaction
-
An asymptotic analysis of probabilistic logic programming with implications for expressing projective families of distributions arXiv.cs.PL Pub Date : 2021-02-17 Felix Weitkämper
Over the last years, there has been increasing research on the scaling behaviour of statistical relational representations with the size of the domain, and on the connections between domain size dependence and lifted inference. In particular, the asymptotic behaviour of statistical relational representations has come under scrutiny, and projectivity was isolated as the strongest form of domain size
-
C11Tester: A Race Detector for C/C++ Atomics Technical Report arXiv.cs.PL Pub Date : 2021-02-16 Weiyu Luo; Brian Demsky
Writing correct concurrent code that uses atomics under the C/C++ memory model is extremely difficult. We present C11Tester, a race detector for the C/C++ memory model that can explore executions in a larger fragment of the C/C++ memory model than previous race detector tools. Relative to previous work, C11Tester's larger fragment includes behaviors that are exhibited by ARM processors. C11Tester uses
-
Guarded Kleene Algebra with Tests: Coequations, Coinduction, and Completeness arXiv.cs.PL Pub Date : 2021-02-16 Todd Schmid; Tobias Kappé; Dexter Kozen; Alexandra Silva
Guarded Kleene Algebra with Tests (GKAT) is an efficient fragment of KAT, as it allows for almost linear decidability of equivalence. In this paper, we study the (co)algebraic properties of GKAT. Our initial focus is on the fragment that can distinguish between unsuccessful programs performing different actions, by omitting the so-called early termination axiom. We develop an operational (coalgebraic)
-
Metatheory.jl: Fast and Elegant Algebraic Computation in Julia with Extensible Equality Saturation arXiv.cs.PL Pub Date : 2021-02-15 Alessandro Cheli
We introduce Metatheory.jl: a lightweight and performant general purpose symbolics and metaprogramming framework meant to simplify the act of writing complex Julia metaprograms and to significantly enhance Julia with a native term rewriting system, based on state-of-the-art equality saturation techniques, and a dynamic first class Abstract Syntax Tree (AST) pattern matching system that is dynamically
-
Investigating and Recommending Co-Changed Entities for JavaScript Programs arXiv.cs.PL Pub Date : 2021-02-15 Zijian Jiang; Hao Zhong; Na Meng
JavaScript (JS) is one of the most popular programming languages due to its flexibility and versatility, but debugging JS code is tedious and error-prone. In our research, we conducted an empirical study to characterize the relationship between co-changed software entities (e.g., functions and variables), and built a machine learning (ML)-based approach to recommend additional entity to edit given
-
Interface Compliance of Inline Assembly: Automatically Check, Patch and Refine arXiv.cs.PL Pub Date : 2021-02-15 Frédéric Recoules; Sébastien Bardin; Richard Bonichon; Matthieu Lemerre; Laurent Mounier; Marie-Laure Potet
Inline assembly is still a common practice in low-level C programming, typically for efficiency reasons or for accessing specific hardware resources. Such embedded assembly codes in the GNU syntax (supported by major compilers such as GCC, Clang and ICC) have an interface specifying how the assembly codes interact with the C environment. For simplicity reasons, the compiler treats GNU inline assembly
-
Sequence Types and Infinitary Semantics arXiv.cs.PL Pub Date : 2021-02-15 Pierre Vial
We introduce a new representation of non-idempotent intersection types, using sequences (families indexed with natural numbers) instead of lists or multisets. This allows scaling up intersection type theory to the infinitary lambda-calculus. We thus characterize hereditary head normalization (Klop's Problem) and we give a unique type to all hereditary permutators (TLCA Problem #20), which is not possible
-
Data-Driven Synthesis of Provably Sound Side Channel Analyses arXiv.cs.PL Pub Date : 2021-02-12 Jingbo Wang; Chungha Sung; Mukund Raghothaman; Chao Wang
We propose a data-driven method for synthesizing a static analyzer to detect side-channel information leaks in cryptographic software. Compared to the conventional way of manually crafting such a static analyzer, which can be labor intensive, error prone and suboptimal, our learning-based technique is not only automated but also provably sound. Our analyzer consists of a set of type-inference rules
-
Complete Bidirectional Typing for the Calculus of Inductive Constructions arXiv.cs.PL Pub Date : 2021-02-12 Meven Lennon-Bertrand
This article presents a bidirectional type system for the Calculus of Inductive Constructions (CIC). It introduces a novel judgement intermediate between the usual inference and checking, dubbed constrained inference, to handle the presence of computation in types. The key property is the completeness of the system with respect to the usual undirected one, which has been formally proven in Coq as a
-
Neural Architecture Search as Program Transformation Exploration arXiv.cs.PL Pub Date : 2021-02-12 Jack Turner; Elliot J. Crowley; Michael O'Boyle
Improving the performance of deep neural networks (DNNs) is important to both the compiler and neural architecture search (NAS) communities. Compilers apply program transformations in order to exploit hardware parallelism and memory hierarchy. However, legality concerns mean they fail to exploit the natural robustness of neural networks. In contrast, NAS techniques mutate networks by operations such
-
Strong Call by Value is Reasonable for Time arXiv.cs.PL Pub Date : 2021-02-11 Małgorzata BiernackaInstitute of Computer Science, University of Wrocław, Poland; Witold CharatonikInstitute of Computer Science, University of Wrocław, Poland; Tomasz DrabInstitute of Computer Science, University of Wrocław, Poland
The invariance thesis of Slot and van Emde Boas states that all reasonable models of computation simulate each other with polynomially bounded overhead in time and constant-factor overhead in space. In this paper we show that a family of strong call-by-value strategies in the $\lambda$-calculus are reasonable for time. The proof is based on a construction of an appropriate abstract machine, systematically
-
NOELLE Offers Empowering LLVM Extensions arXiv.cs.PL Pub Date : 2021-02-09 Angelo Matni; Enrico Armenio Deiana; Yian Su; Lukas Gross; Souradip Ghosh; Sotiris Apostolakis; Ziyang Xu; Zujun Tan; Ishita Chaturvedi; David I. August; Simone Campanoni
Modern and emerging architectures demand increasingly complex compiler analyses and transformations. As the emphasis on compiler infrastructure moves beyond support for peephole optimizations and the extraction of instruction-level parallelism, they should support custom tools designed to meet these demands with higher-level analysis-powered abstractions of wider program scope. This paper introduces
-
A High-Performance Sparse Tensor Algebra Compiler in Multi-Level IR arXiv.cs.PL Pub Date : 2021-02-09 Ruiqin Tian; Luanzheng Guo; Jiajia Li; Bin Ren; Gokcen Kestor
Tensor algebra is widely used in many applications, such as scientific computing, machine learning, and data analytics. The tensors represented real-world data are usually large and sparse. There are tens of storage formats designed for sparse matrices and/or tensors and the performance of sparse tensor operations depends on a particular architecture and/or selected sparse format, which makes it challenging
-
An Interactive Proof of Termination for a Concurrent $λ$-calculus with References and Explicit Substitutions arXiv.cs.PL Pub Date : 2021-02-09 Yann Hamdaoui; Benoît Valiron
In this paper we introduce a typed, concurrent $\lambda$-calculus with references featuring explicit substitutions for variables and references. Alongside usual safety properties, we recover strong normalization. The proof is based on a reducibility technique and an original interactive property reminiscent of the Game Semantics approach.
-
Synchronous Forwarders arXiv.cs.PL Pub Date : 2021-02-09 Marco Carbone; Sonia Marin; Carsten Schürmann
Session types are types for specifying protocols that processes must follow when communicating with each other. Session types are in a propositions-as-types correspondence with linear logic. Previous work has shown that a multiparty session type, a generalisation of session types to protocols of two or more parties, can be modelled as a proof of coherence, a generalisation of linear logic duality.
-
Demystifying Code Summarization Models arXiv.cs.PL Pub Date : 2021-02-09 Yu Wang; Fengjuan Gao; Linzhang Wang
The last decade has witnessed a rapid advance in machine learning models. While the black-box nature of these systems allows powerful predictions, it cannot be directly explained, posing a threat to the continuing democratization of machine learning technology. Tackling the challenge of model explainability, research has made significant progress in demystifying the image classification models. In
-
Neural Termination Analysis arXiv.cs.PL Pub Date : 2021-02-07 Mirco Giacobbe; Daniel Kroening; Julian Parsert
We introduce a novel approach to the automated termination analysis of computer programs: we train neural networks to act as ranking functions. Ranking functions map program states to values that are bounded from below and decrease as the program runs. The existence of a valid ranking function proves that the program terminates. While in the past ranking functions were usually constructed using static
-
A Newcomer In The PGAS World -- UPC++ vs UPC: A Comparative Study arXiv.cs.PL Pub Date : 2021-02-06 Jérémie Lagravière; Johannes Langguth; Martina Prugger; Phuong H. Ha; Xing Cai
A newcomer in the Partitioned Global Address Space (PGAS) 'world' has arrived in its version 1.0: Unified Parallel C++ (UPC++). UPC++ targets distributed data structures where communication is irregular or fine-grained. The key abstractions are global pointers, asynchronous programming via RPC, futures and promises. UPC++ API for moving non-contiguous data and handling memories with different optimal
-
Towards Modal Software Engineering arXiv.cs.PL Pub Date : 2021-02-05 Ramy Shahin
In this paper we introduce the notion of Modal Software Engineering: automatically turning sequential, deterministic programs into semantically equivalent programs efficiently operating on inputs coming from multiple intersecting worlds. We are drawing an analogy between modal logics, and software application domains where multiple sets of inputs (multiple worlds) need to be processed efficiently.
-
Operational Semantics with Hierarchical Abstract Syntax Graphs arXiv.cs.PL Pub Date : 2021-02-04 Dan R. GhicaHuawei Research, Edinburgh, University of Birmingham, UK
This is a motivating tutorial introduction to a semantic analysis of programming languages using a graphical language as the representation of terms, and graph rewriting as a representation of reduction rules. We show how the graphical language automatically incorporates desirable features, such as alpha-equivalence and how it can describe pure computation, imperative store, and control features in
-
Formalising a Turing-Complete Choreographic Language in Coq arXiv.cs.PL Pub Date : 2021-02-04 Luís Cruz-Filipe; Fabrizio Montesi; Marco Peressotti
Theory of choreographic languages typically includes a number of complex results that are proved by structural induction. The high number of cases and the subtle details in some of them lead to long reviewing processes, and occasionally to errors being found in published proofs. In this work, we take a published proof of Turing completeness of a choreographic language and formalise it in Coq. Our development
-
Compact Native Code Generation for Dynamic Languages on Micro-core Architectures arXiv.cs.PL Pub Date : 2021-02-03 Maurice Jamieson; Nick Brown
Micro-core architectures combine many simple, low memory, low power-consuming CPU cores onto a single chip. Potentially providing significant performance and low power consumption, this technology is not only of great interest in embedded, edge, and IoT uses, but also potentially as accelerators for data-center workloads. Due to the restricted nature of such CPUs, these architectures have traditionally
-
Zero-cost meta-programmed stateful functors in F* arXiv.cs.PL Pub Date : 2021-02-02 Jonathan Protzenko; Son Ho
We present zero-cost, high-level F* functors and their compilation to low-level, efficient C code. Thanks to a combination of partial evaluation, fine-grained control of reduction, and tactic-driven C++ template-like metaprogramming, we provide the programmer with a toolkit that dramatically reduces the proof-to-code ratio, brings out the essence of algorithmic and implementation agility, and allows
-
Report of the Workshop on Program Synthesis for Scientific Computing arXiv.cs.PL Pub Date : 2021-02-02 Hal Finkel; Ignacio Laguna
Program synthesis is an active research field in academia, national labs, and industry. Yet, work directly applicable to scientific computing, while having some impressive successes, has been limited. This report reviews the relevant areas of program synthesis work for scientific computing, discusses successes to date, and outlines opportunities for future work. This report is the result of the Workshop
-
Falx: Synthesis-Powered Visualization Authoring arXiv.cs.PL Pub Date : 2021-02-01 Chenglong Wang; Yu Feng; Rastislav Bodik; Isil Dillig; Alvin Cheung; Amy J. Ko
Modern visualization tools aim to allow data analysts to easily create exploratory visualizations. When the input data layout conforms to the visualization design, users can easily specify visualizations by mapping data columns to visual channels of the design. However, when there is a mismatch between data layout and the design, users need to spend significant effort on data transformation. We propose
-
Commutative Monads for Probabilistic Programming Languages arXiv.cs.PL Pub Date : 2021-01-31 Xiaodong Jia; Bert Lindenhovius; Michael Mislove; Vladimir Zamdzhiev
A long-standing open problem in the semantics of programming languages supporting probabilistic choice is to find a commutative monad for probability on the category DCPO. In this paper we present three such monads and a general construction for finding even more. We show how to use these monads to provide a sound and adequate denotational semantics for the Probabilistic FixPoint Calculus (PFPC) --
-
Model-Based Testing of Networked Applications arXiv.cs.PL Pub Date : 2021-01-31 Yishuai Li; Benjamin C. Pierce; Steve Zdancewic
We present a rigorous framework for automatically testing application-layer protocols. The key innovation is a domain-specific embedded language for writing nondeterministic models of the behavior of networked servers. These models are defined in Gallina, the language of the Coq interactive theorem prover, supporting a smooth transition from testing to formal verification. Given a server model, we
-
ICodeNet -- A Hierarchical Neural Network Approach for Source Code Author Identification arXiv.cs.PL Pub Date : 2021-01-30 Pranali Bora; Tulika Awalgaonkar; Himanshu Palve; Raviraj Joshi; Purvi Goel
With the open-source revolution, source codes are now more easily accessible than ever. This has, however, made it easier for malicious users and institutions to copy the code without giving regards to the license, or credit to the original author. Therefore, source code author identification is a critical task with paramount importance. In this paper, we propose ICodeNet - a hierarchical neural network
-
MRIReco.jl: An MRI Reconstruction Framework written in Julia arXiv.cs.PL Pub Date : 2021-01-29 Tobias Knopp; Mirco Grosser
Purpose: The aim of this work is to develop a high-performance, flexible and easy-to-use MRI reconstruction framework using the scientific programming language Julia. Methods: Julia is a modern, general purpose programming language with strong features in the area of signal / image processing and numerical computing. It has a high-level syntax but still generates efficient machine code that is usually
-
Putting gradual types to work arXiv.cs.PL Pub Date : 2021-01-28 Bhargav Shivkumar; Enrique Naudon; Lukasz Ziarek
In this paper, we describe our experience incorporating gradual types in a statically typed functional language with Hindley-Milner style type inference. Where most gradually typed systems aim to improve static checking in a dynamically typed language, we approach it from the opposite perspective and promote dynamic checking in a statically typed language. Our approach provides a glimpse into how languages
-
Safety Verification of Parameterized Systems under Release-Acquire arXiv.cs.PL Pub Date : 2021-01-28 Adwait Godbole; Shankara Narayanan Krishna; Roland Meyer
We study the safety verification problem for parameterized systems under the release-acquire (RA) semantics. It has been shown that the problem is intractable for systems with unlimited access to atomic compare-and-swap (CAS) instructions. We show that, from a verification perspective where approximate results help, this is overly pessimistic. We study parameterized systems consisting of an unbounded
-
Type-Based Analysis of Logarithmic Amortised Complexity arXiv.cs.PL Pub Date : 2021-01-28 Martin Hofmann; Lorenz Leutgeb; Georg Moser; David Obwaller; Florian Zuleger
We introduce a novel amortised resource analysis couched in a type-and-effect system. Our analysis is formulated in terms of the physicist's method of amortised analysis, and is potential-based. The type system makes use of logarithmic potential functions and is the first such system to exhibit *logarithmic amortised complexity*. With our approach we target the automated analysis of self-adjusting
-
Alignment Completeness for Relational Hoare Logics arXiv.cs.PL Pub Date : 2021-01-27 Ramana Nagasamudram; David A. Naumann
Relational Hoare logics (RHL) provide rules for reasoning about relations between programs. Several RHLs include a rule, Sequential-Product, that infers a relational correctness judgment from judgments of ordinary Hoare logic (HL). A variety of other rules have been found useful in practice, but Sequential-Product is relatively complete on its own (with HL). As a more satisfactory way to evaluate RHLs
-
Deriving monadic quicksort (Declarative Pearl) arXiv.cs.PL Pub Date : 2021-01-27 Shin-Cheng Mu; Tsung-Ju Chiang
To demonstrate derivation of monadic programs, we present a specification of sorting using the non-determinism monad, and derive pure quicksort on lists and state-monadic quicksort on arrays. In the derivation one may switch between point-free and pointwise styles, and deploy techniques familiar to functional programmers such as pattern matching and induction on structures or on sizes. Derivation of
-
Compositional Semantics for Probabilistic Programs with Exact Conditioning arXiv.cs.PL Pub Date : 2021-01-27 Dario Stein; Sam Staton
We define a probabilistic programming language for Gaussian random variables with a first-class exact conditioning construct. We give operational, denotational and equational semantics for this language, establishing convenient properties like exchangeability of conditions. Conditioning on equality of continuous random variables is nontrivial, as the exact observation may have probability zero; this
-
Tutorial on implementing Hoare logic for imperative programs in Haskell arXiv.cs.PL Pub Date : 2021-01-27 Boro Sitnikovski
Using the programming language Haskell, we introduce an implementation for a simple imperative language that can evaluate arithmetic and boolean expressions; step by step, we will expand the implementation starting from arithmetic expressions, to boolean expressions and then to imperative programs. As we expand the language, we will show several evaluation strategies, considering the normalization
-
Evolution of artificial intelligence languages, a systematic literature review arXiv.cs.PL Pub Date : 2021-01-27 Emmanuel Adetiba; Temitope John; Adekunle Akinrinmade; Funmilayo Moninuola; Oladipupo Akintade; Joke Badejo
The field of Artificial Intelligence (AI) has undoubtedly received significant attention in recent years. AI is being adopted to provide solutions to problems in fields such as medicine, engineering, education, government and several other domains. In order to analyze the state of the art of research in the field of AI, we present a systematic literature review focusing on the Evolution of AI programming
-
A MLIR Dialect for Quantum Assembly Languages arXiv.cs.PL Pub Date : 2021-01-27 Alexander McCaskey; Thien Nguyen
We demonstrate the utility of the Multi-Level Intermediate Representation (MLIR) for quantum computing. Specifically, we extend MLIR with a new quantum dialect that enables the expression and compilation of common quantum assembly languages. The true utility of this dialect is in its ability to be lowered to the LLVM intermediate representation (IR) in a manner that is adherent to the quantum intermediate
-
C-for-Metal: High Performance SIMD Programming on Intel GPUs arXiv.cs.PL Pub Date : 2021-01-26 Guei-Yuan Lueh; Kaiyu Chen; Gang Chen; Joel Fuentes; Wei-Yu Chen; Fangwen Fu; Hong Jiang; Hongzheng Li; Daniel Rhee
The SIMT execution model is commonly used for general GPU development. CUDA and OpenCL developers write scalar code that is implicitly parallelized by compiler and hardware. On Intel GPUs, however, this abstraction has profound performance implications as the underlying ISA is SIMD and important hardware capabilities cannot be fully utilized. To close this performance gap we introduce C-For-Metal (CM)
-
Enabling Dataflow Optimization for Quantum Programs arXiv.cs.PL Pub Date : 2021-01-26 David Ittah; Thomas Häner; Vadym Kliuchnikov; Torsten Hoefler
We propose an IR for quantum computing that directly exposes quantum and classical data dependencies for the purpose of optimization. Our IR consists of two dialects, one input dialect and one that is specifically tailored to enable quantum-classical co-optimization. While the first employs a perhaps more intuitive memory-semantics (quantum operations act as side-effects), the latter uses value-semantics
-
A Monad for Probabilistic Point Processes arXiv.cs.PL Pub Date : 2021-01-26 Swaraj DashUniversity of Oxford; Sam StatonUniversity of Oxford
A point process on a space is a random bag of elements of that space. In this paper we explore programming with point processes in a monadic style. To this end we identify point processes on a space X with probability measures of bags of elements in X. We describe this view of point processes using the composition of the Giry and bag monads on the category of measurable spaces and functions and prove
-
A program logic for fresh name generation arXiv.cs.PL Pub Date : 2021-01-26 Harold Pancho Eliott; Martin Berger
We present a program logic for Pitts and Stark's {\nu}-calculus, an extension of the call-by-value simply-typed {\lambda}-calculus with a mechanism for the generation of fresh names. Names can be compared for (in)-equality, producing programs with subtle observable properties. Hidden names produced by interactions between generation and abstraction are captured logically with a second-order quantifier
-
Categorical semantics of a simple differential programming language arXiv.cs.PL Pub Date : 2021-01-26 Geoffrey Cruttwell; Jonathan Gallagher; Dorette Pronk
With the increased interest in machine learning, and deep learning in particular, the use of automatic differentiation has become more wide-spread in computation. There have been two recent developments to provide the theoretical support for this types of structure. One approach, due to Abadi and Plotkin, provides a simple differential programming language. Another approach is the notion of a reverse
-
Data Flow Analysis of Asynchronous Systems using Infinite Abstract Domains arXiv.cs.PL Pub Date : 2021-01-25 Snigdha Athaiya; Raghavan Komondoor; K Narayan Kumar
Asynchronous message-passing systems are employed frequently to implement distributed mechanisms, protocols, and processes. This paper addresses the problem of precise data flow analysis for such systems. To obtain good precision, data flow analysis needs to somehow skip execution paths that read more messages than the number of messages sent so far in the path, as such paths are infeasible at run
-
Termination Analysis Without the Tears arXiv.cs.PL Pub Date : 2021-01-24 Shaowei Zhu; Zachary Kincaid
Determining whether a given program terminates is the quintessential undecidable problem. Algorithms for termination analysis are divided into two groups: (1) algorithms with strong behavioral guarantees that work in limited circumstances (e.g., complete synthesis of linear ranking functions for polyhedral loops [Podelski and Rybalchenko, 2004]), and (2) algorithms that are widely applicable, but have
-
A greedy algorithm for dropping digits (Functional Pearl) arXiv.cs.PL Pub Date : 2021-01-24 Richard Bird; Shin-Cheng Mu
Consider the puzzle: given a number, remove $k$ digits such that the resulting number is as large as possible. Various techniques were employed to derive a linear-time solution to the puzzle: predicate logic was used to justify the structure of a greedy algorithm, a dependently-typed proof assistant was used to give a constructive proof of the greedy condition, and equational reasoning was used to
-
Longest segment of balanced parentheses -- an exercise in program inversion in a segment problem (Functional Pearl) arXiv.cs.PL Pub Date : 2021-01-24 Shin-Cheng Mu; Tsung-Ju Chiang
Given a string of parentheses, the task is to find a longest consecutive segment that is properly bracketed. We find it an interesting problem because it involves two techniques: the usual approach for solving segment problems, and the converse-of-a-function theorem -- through which we derived an instance of shift-reduce parsing.
-
Implementing WordNet Measures of Lexical Semantic Similarity in a Fuzzy Logic Programming System arXiv.cs.PL Pub Date : 2021-01-24 Pascual Julián-Iranzo; Fernando Sáenz-Pérez
This paper introduces techniques to integrate WordNet into a Fuzzy Logic Programming system. Since WordNet relates words but does not give graded information on the relation between them, we have implemented standard similarity measures and new directives allowing the proximity equations linking two words to be generated with an approximation degree. Proximity equations are the key syntactic structures
-
Calculating a backtracking algorithm: an exercise in monadic program derivation arXiv.cs.PL Pub Date : 2021-01-23 Shin-Cheng Mu
Equational reasoning is among the most important tools that functional programming provides us. Curiously, relatively less attention has been paid to reasoning about monadic programs. In this report we derive a backtracking algorithm for problem specifications that use a monadic unfold to generate possible solutions, which are filtered using a $\mathit{scanl}$-like predicate. We develop theorems that
-
Equational reasoning for non-determinism monad: the case of Spark aggregation arXiv.cs.PL Pub Date : 2021-01-23 Shin-Cheng Mu
As part of the author's studies on equational reasoning for monadic programs, this report focus on non-determinism monad. We discuss what properties this monad should satisfy, what additional operators and notations can be introduced to facilitate equational reasoning about non-determinism, and put them to the test by proving a number of properties in our example problem inspired by the author's previous
Contents have been reproduced by permission of the publishers.