Abstract
Dependent refinement types are types equipped with predicates that specify preconditions and postconditions of underlying functional languages. We propose a general semantic construction of dependent refinement type systems from underlying type systems and predicate logic, that is, a construction of liftings of closed comprehension categories from given (underlying) closed comprehension categories and posetal fibrations for predicate logic. We give sufficient conditions to lift structures such as dependent products, dependent sums, computational effects, and recursion from the underlying type systems to dependent refinement type systems. We demonstrate the usage of our construction by giving semantics to a dependent refinement type system and proving soundness.
Highlights
We address the question: “How are dependent refinement type systems, underlying type systems, and predicate logic related from the viewpoint of categorical semantics?” most existing dependent refinement type systems are proved to be sound using operational semantics, we believe that categorical semantics is more suitable for the general understanding of their nature, especially when we consider general computational effects and various kinds of predicate logic
We extend the construction of liftings of closed comprehension category (CCompC) to liftings of fibred monads [1] on CCompCs, which is motivated by the fact that many dependent refinement type systems have computational effects, e.g., exception, divergence, nondeterminism [25], and probability [5]
– We provide a general construction of liftings of CCompCs from given CCompCs and posetal fibrations satisfying certain conditions, as a semantic counterpart of construction of dependent refinement type systems from underlying type systems and predicate logic
Summary
Dependent refinement types [6] are types equipped with predicates that restrict values in the types. Assume that we have a pair of a CCompC p : E → B for interpreting underlying type systems and a fibration q : P → B for predicate logic satisfying certain conq. – We provide a general construction of liftings of CCompCs from given CCompCs and posetal fibrations satisfying certain conditions, as a semantic counterpart of construction of dependent refinement type systems from underlying type systems and predicate logic. We extend this to liftings of fibred monads on the underlying CCompCs to model computational effects. We prove soundness of the typing rule for partial correctness of recursion under the existence of a lifting of Conway operators
Talk to us
Join us for a 30 min session where you can share your feedback and ask us any queries you have