SearcharxivSearch

arXiv subjects

Christopher Jenkins

Publications and source records attributed to Christopher Jenkins.

10 recordsLinked to original sources

Towards Formal Verification of HotStuff-based Byzantine Fault Tolerant Consensus in Agda: Extended Version

LibraBFT is a Byzantine Fault Tolerant (BFT) consensus protocol based on HotStuff. We present an abstract model of the protocol underlying HotStuff / LibraBFT, and formal, machine-checked proofs of their core correctness (safety) property and an extended condition that enables non-participating parties to verify committed results. (Liveness properties would be proved for specific implementations, not for the abstract model presented in this paper.) A key contribution is precisely defining assumptions about the behavior of honest peers, in an abstract way, independent of any particular implementation. Therefore, our work is an important step towards proving correctness of an entire class of concrete implementations, without repeating the hard work of proving correctness of the underlying protocol. The abstract proofs are for a single configuration (epoch); extending these proofs across configuration changes is future work. Our models and proofs are expressed in Agda, and are available in open source.

cs.DC

Simulating Large Eliminations in Cedille

Large eliminations provide an expressive mechanism for arity- and type-generic programming. However, as large eliminations are closely tied to a type theory's primitive notion of inductive type, this expressivity is not expected within polymorphic lambda calculi in which datatypes are encoded using impredicative quantification. We report progress on simulating large eliminations for datatype encodings in one such type theory, the calculus of dependent lambda eliminations (CDLE). Specifically, we show that the expected computation rules for large eliminations, expressed using a derived type of extensional equality of types, can be proven within CDLE. We present several case studies, demonstrating the adequacy of this simulation for a variety of generic programming tasks, and a generic formulation of the simulation allowing its use for any datatype. All results have been mechanically checked by Cedille, an implementation of CDLE.

cs.PL

Relational Type Theory (All Proofs)

This paper introduces Relational Type Theory (RelTT), a new approach to type theory with extensionality principles, based on a relational semantics for types. The type constructs of the theory are those of System F plus relational composition, converse, and promotion of application of a term to a relation. A concise realizability semantics is presented for these types. The paper shows how a number of constructions of traditional interest in type theory are possible in RelTT, including eta-laws for basic types, inductive types with their induction principles, and positive-recursive types. A crucial role is played by a lemma called Identity Inclusion, which refines the Identity Extension property familiar from the semantics of parametric polymorphism. The paper concludes with a type system for RelTT, paving the way for implementation.

cs.LO

Efficient lambda encodings for Mendler-style coinductive types in Cedille

In the calculus of dependent lambda eliminations (CDLE), it is possible to define inductive datatypes via lambda encodings that feature constant-time destructors and a course-of-values induction scheme. This paper begins to address the missing derivations for the dual, coinductive types. Our derivation utilizes new methods within CDLE, as there are seemingly fundamental difficulties in adapting previous known approaches for deriving inductive types. The lambda encodings we present implementing coinductive types feature constant-time constructors and a course-of-values corecursion scheme. Coinductive type families are also supported, enabling proofs for many standard coinductive properties such as stream bisimulation. All work is mechanically verified by the Cedille tool, an implementation of CDLE.

cs.PL

Monotone recursive types and recursive data representations in Cedille

Guided by Tarksi's fixpoint theorem in order theory, we show how to derive monotone recursive types with constant-time roll and unroll operations within Cedille, an impredicative, constructive, and logically consistent pure typed lambda calculus. This derivation takes place within the preorder on Cedille types induced by type inclusions, a notion which is expressible within the theory itself. As applications, we use monotone recursive types to generically derive two recursive representations of data in lambda calculus, the Parigot and Scott encoding. For both encodings, we prove induction and examine the computational and extensional properties of their destructor, iterator, and primitive recursor in Cedille. For our Scott encoding in particular, we translate into Cedille a construction due to Lepigre and Raffalli that equips Scott naturals with primitive recursion, then extend this construction to derive a generic induction principle. This allows us to give efficient and provably unique (up to function extensionality) solutions for the iteration and primitive recursion schemes for Scott-encoded data.

cs.PL

Comparison of R1 Mapping Protocols: What are we measuring?

Purpose: Recent work highlights the breadth of reported spin-lattice relaxation rates ($R_1$) for individual tissues. One potential source of variation is the protocol used to determine $R_1$. The methodological dependence of R1 and relaxivity $r_1$ are investigated. Methods: $R_1$ is quantified in gel phantoms with varying concentration of MnCl2, and a small cohort of three healthy volunteers using different acquisition methods. Siemens inversion recovery (IR) and saturation recovery (SR) protocols are applied to phantoms and volunteers. Variable flip angle (VFA) protocols are additionally applied to phantoms. $R_1$ is quantified using single voxel fits, and distributions examined for regions in the thalamus, and cerebellum as well as grey and white matter. Phantoms exclude boundary fits and relaxivity is quantified across the full concentration range. Normality of $R_1$ distributions is assessed by Kolmogorov-Smirnov score, and inter-sequence agreement by two-sample t-test. Results: Phantom relaxivity is found to be 7.16 Hz/mM, 9.22 Hz/mM and 10.65 Hz/mM to 11.91 Hz/mM for IR, SR and VFA methods, respectively. In vivo $R_1$ exhibit low intra-participant variation for IR. SR $R_1$ are lower than IR values with inter- and intra-participant variation on the same order. Brain regions and phantoms mapped with different protocols varied significantly with t-test p-values between 0 and 5E-10. Conclusion: Results suggest a significant protocol dependence of $R_1$, and corresponding relaxivity, suggesting inter-method comparisons should be attempted tentatively, if at all.

physics.med-ph

Elaborating Inductive Definitions and Course-of-Values Induction in Cedille

In the Calculus of Dependent Lambda Eliminations (CDLE), a pure Curry-style type theory, it is possible to generically {\lambda}-encode inductive datatypes which support course-of-values (CoV) induction. We present a datatype subsystem for Cedille (an implementation of CDLE) that provides this feature to programmers through convenient notation for declaring datatypes and for defining functions over them by case analysis and fixpoint-style recursion guarded by a type-based termination checker. We demonstrate that this does not require extending CDLE by showing how datatypes and functions over them elaborate to {\lambda}-encodings, and proving that this elaboration is type- and value-preserving. This datatype subsystem and elaborator are implemented in Cedille, establishing for the first time a complete translation of inductive definitions to a small pure typed {\lambda}-calculus.

cs.PL

Course-of-Value Induction in Cedille

In the categorical setting, histomorphisms model a course-of-value recursion scheme that allows functions to be defined using arbitrary previously computed values. In this paper, we use the Calculus of Dependent Lambda Eliminations (CDLE) to derive a lambda-encoding of inductive datatypes that admits course-of-value induction. Similar to course-of-value recursion, course-of-value induction gives access to inductive hypotheses at arbitrary depth of the inductive arguments of a function. We show that the derived course-of-value datatypes are well-behaved by proving Lambek's lemma and characterizing the computational behavior of the induction principle. Our work is formalized in the Cedille programming language and also includes several examples of course-of-value functions.

cs.LO

Syntax and Semantics of Cedille

This document presents the syntax, classification rules, realizability semantics, and soundness theorem for Cedille, an extrinsic (i.e., Curry-style) type theory extending the Calculus of Constructions, and designed for deriving of inductive datatypes, with their induction principles.

cs.PL

Spine-local Type Inference

We present spine-local type inference, a partial type inference system for inferring omitted type annotations for System F terms based on local type inference. Local type inference relies on bidirectional inference rules to propagate type information into and out of adjacent nodes of the AST and restricts type-argument inference to occur only within a single node. Spine-local inference relaxes the restriction on type-argument inference by allowing it to occur only within an {application spine and improves upon it by using contextual type-argument inference. As our goal is to explore the design space of local type inference, we show that, relative to other variants, spine-local type inference enables desirable features such as first-class curried applications, partial type applications, and the ability to infer types for some terms not otherwise possible. Our approach enjoys usual properties of a bidirectional system of having a specification for our inference algorithm and predictable requirements for typing annotations, and in particular maintains some the advantages of local type inference such as a relatively simple implementation and a tendency to produce good-quality error messages when type inference fails.

cs.PL