Core Higher-Order Session Processes: Tractable Equivalences and Relative ExpressivenessDimitrios Kouzapas, Jorge A. Perez and Nobuko Yoshida90
DTR15-1.pdf
This work proposes tractable bisimulations for the higher-order pi-calculus with session primitives (HOpi) and offers a complete study of the expressivity of its most significant subcalculi. First we develop three typed bisimulations, which are shown to coincide with contextual equivalence. These characterisations demonstrate that observing as inputs only a specific finite set of higher-order values (which inhabit session types) suffices to reason about HOpi processes. Next, we identify HO, a minimal, second-order subcalculus of HOpi in which higher-order applications/abstractions, name-passing, and recursion are absent. We show that HO can encode HOpi extended with higher-order applications and abstractions and that a first-order session pi-calculus can encode HOpi. Both encodings are fully abstract. We also prove that the session pi-calculus with passing of shared names cannot be encoded into HOpi without shared names. We show that HOpi, HO, and session pi-calculi are equally expressive; the expressivity of HO enables effective reasoning about typed equivalences for higher-order processes.
]]>Simplified Reduct for Choice Rules in ASPMark Law, Alessandra Russo and Krysia Broda9
DTR15-2.pdf
The accepted definitions of the semantics of choice rules in Answer Set Programming (ASP) involve a translation by inventing new atoms which do not occur in the original program. In this report, we present a new definition of the reduct for programs containing choice rules which does not invent new atoms and prove that the semantics are the same for the class of ASP programs which we consider.
]]>High Quality SimRank-Based Similarity SearchWeiren Yu, Julie A. McCann10
DTR15-3.pdf
SimRank is an influential link-based similarity measure that has been used in many fields of Web search and sociometry. The best-of-breed method by Kusumoto et. al., however, does not always deliver high-quality results, since it fails to accurately obtain its diagonal correction matrix D. Besides, SimRank is also limited by an unwanted ``connectivity trait'': increasing the number of paths between nodes a and b often incurs a decrease in score s(a,b). The best-known solution, SimRank++, cannot resolve this problem, since a revised score will be zero if a and b have no common in-neighbors. In this paper, we consider high-quality similarity search. Our scheme, SR#, is efficient and semantically meaningful: (1) We first formulate the exact D, and devise a ``varied-D'' method to accurately compute SimRank in linear memory. Moreover, by grouping computation, we also reduce the time of from quadratic to linear in the number of iterations. (2) We design a ``kernel-based'' model to improve the quality of SimRank, and circumvent the ``connectivity trait'' issue. (3) We give mathematical insights to the semantic difference between SimRank and its variant, and correct an argument: ``if D is replaced by a scaled identity matrix, top-K rankings will not be affected much''. The experiments confirm that SR# can accurately extract high-quality scores, and is much faster than the state-of-the-art competitors.
]]>Static analysis of parity games: alternating reachability under parityMichael Huth, Jim Huan-Pu Kuo and Nir Piterman18
DTR15-4.pdf
It is well understood that solving parity games is equivalent, up to polynomial time, to model checking of the modal mu-calculus. It is a long-standing open problem whether solving parity games (or model checking modal mu-calculus formulas) can be done in polynomial time. A recent approach to studying this problem has been the design of partial solvers, algorithms that run in polynomial time and that may only solve parts of a parity game. Although it was shown that such partial solvers can completely solve many practical benchmarks, the design of such partial solvers was somewhat ad hoc, limiting a deeper understanding of the potential of that approach. We here mean to provide such robust foundations for deeper analysis through a new form of game, alternating reachability under parity. We prove the determinacy of these games and use this determinacy to define, for each player, a monotone fixed point over an ordered domain of height linear in the size of the parity game such that all nodes in its greatest fixed point are won by said player in the parity game. We show, through theoretical and experimental work, that such greatest fixed points and their computation leads to partial solvers that run in polynomial time. These partial solvers are based on established principles of static analysis and are more effective than partial solvers studied in extant work.
]]>Effects as sessions, session as effects (with appendices)Dominic Orchard and Nobuko Yoshida
DTR15-5.pdf
Effect and session type systems are two expressive behavioural type systems. The former is usually developed in the context of the lambda-calculus and its variants, the latter for the pi-calculus. In this paper we explore their relative expressive power. Firstly, we give an embedding from PCF, augmented with a parameterised effect system, into a session-typed pi-calculus (session calculus), showing that session types are powerful enough to express effects. Secondly, we give a reverse embedding, from the session calculus back into PCF, by instantiating PCF with concurrency primitives and its effect system with a session-like effect algebra; effect systems are powerful enough to express sessions. The embedding of session types into an effect system is leveraged to give a new implementation of session types in Haskell, via an effect system encoding. The correctness of this implementation follows from the second embedding result. We also discuss various extensions to our embeddings. This paper was presented at POPL'16; the present technical report includes the appendices.
]]>Hybrid Session Verification through Endpoint API GenerationRaymond Hu and Nobuko Yoshida 24
DTR15-6.pdf
This paper proposes a new hybrid session verification methodology for applying session types directly to mainstream languages, based on generating protocol-specific endpoint APIs from multiparty session types. The API generation promotes static type checking of the behavioural aspect of the source protocol by mapping the state space of an endpoint in the protocol to a family of channel types in the target language. This is supplemented by very light run-time checks in the generated API that enforce a linear usage discipline on instances of the channel types. The resulting hybrid verification guarantees the absence of protocol violation errors during the execution of the session. We have implemented our methodology for Java as an extension to the Scribble framework, and used it to implement compliant clients and servers for real-world protocols such as HTTP and SMTP. The API generation methodology additionally provides a platform for applying further features from session type theory: our implementation supports choice subtyping through branch interface generation, and safe permutation of I/O actions and affine inputs through input future generation.]]>Lightweight session types in ScalaAlceste Scalas and Nobuko Yoshida45
DTR15-7.pdf
Designing, developing and maintaining concurrent applications is an error-prone and time-consuming task; most difficulties arise because compilers are usually unable to check whether the inputs/outputs performed by a program at runtime will adhere to a given protocol specification. To address this problem, we propose lightweight session programming in Scala: we leverage the native features of the Scala type system and standard library, to introduce (1) a representation of session types as Scala types, and (2) a library, called lchannels, with a convenient API for session-based programming, supporting local and distributed communication. We generalise the idea of Continuation-Passing Style Protocols (CPSPs), studying their formal relationship with session types. We illustrate how session programming can be carried over in Scala: how to formalise a communication protocol, and represent it using Scala classes and lchannels, letting the compiler help spotting protocol violations. We attest the practicality of our approach with a complex use case, and evaluate the performance of lchannels with a series of benchmarks.
]]>