English
Related papers

Related papers: Variations on Variants

200 papers

If a code base is so big and complicated that complete mechanical verification is intractable, can we still apply and benefit from verification methods? We show that by allowing a deliberate mechanized formalization gap we can shrink and…

Programming Languages · Computer Science 2019-10-28 Antal Spector-Zabusky , Joachim Breitner , Yao Li , Stephanie Weirich

Parser generators generate translators from language specifications. In many cases, such specifications contain semantic actions written in the same language as the generated code. Since these actions are subject to little static checking,…

Programming Languages · Computer Science 2010-02-09 Andrey Breslav

Polymorphic variants are a useful feature of the OCaml language whose current definition and implementation rely on kinding constraints to simulate a subtyping relation via unification. This yields an awkward formalization and results in a…

Programming Languages · Computer Science 2016-07-06 Giuseppe Castagna , Tommaso Petrucciani , Kim Nguyen

Of the complex features of generic nominally-typed OO type systems, wildcard types and variance annotations are probably the hardest to fully grasp. As demonstrated when adding closures (a.k.a., lambdas) and when extending type inference in…

Programming Languages · Computer Science 2018-07-17 Moez A. AbdelGawad

Expansion was invented at the end of the 1970s for calculating principal typings for $\lambda$-terms in type systems with intersection types. Expansion variables (E-variables) were invented at the end of the 1990s to simplify and help…

Logic · Mathematics 2009-05-14 Fairouz Kamareddine , Karim Nour , Vincent Rahli , J. B. Wells

Modern Haskell supports zero-cost coercions, a mechanism where types that share the same run-time representation may be freely converted between. To make sure such conversions are safe and desirable, this feature relies on a mechanism of…

Programming Languages · Computer Science 2019-06-03 Stephanie Weirich , Pritam Choudhury , Antoine Voizard , Richard A. Eisenberg

Verification of higher-order probabilistic programs is a challenging problem. We present a verification method that supports several quantitative properties of higher-order probabilistic programs. Usually, extending verification methods to…

Logic in Computer Science · Computer Science 2024-07-04 Satoshi Kura , Hiroshi Unno

We construct a realizability model of linear dependent type theory from a linear combinatory algebra. Our model motivates a number of additions to the type theory. In particular, we add a universe with two decoding operations: one takes…

Logic in Computer Science · Computer Science 2026-02-10 Sam Speight , Niels van der Weide

We present a novel dependent linear type theory in which the multiplicity of some variable-i.e., the number of times the variable can be used in a program-can depend on other variables. This allows us to give precise resource annotations to…

Programming Languages · Computer Science 2026-05-20 Maximilian Doré

The recent notion of graded modal types provides a framework for extending type theories with fine-grained data-flow reasoning. The Granule language explores this idea in the context of linear types. In this practical setting, we observe…

Programming Languages · Computer Science 2022-01-03 Jack Hughes , Michael Vollmer , Dominic Orchard

An index coding (IC) problem consisting of a server and multiple receivers with different side-information and demand sets can be equivalently represented using a fitting matrix. A scalar linear index code to a given IC problem is a matrix…

Information Theory · Computer Science 2017-04-04 Vamsi Krishna Gummadi , Ashok Choudhary , Prasad Krishnan

This abstract aims at presenting an ongoing effort to apply a novel typing mechanism stemming from Implicit Computational Complexity (ICC), that tracks dependencies between variables in three different ways, at different stages of…

Computational Complexity · Computer Science 2022-05-26 Clément Aubert , Thomas Rubiano , Neea Rusch , Thomas Seiller

Refinement types enrich a language's type system with logical predicates that circumscribe the set of values described by the type, thereby providing software developers a tunable knob with which to inform the type system about what…

Programming Languages · Computer Science 2020-10-16 Ranjit Jhala , Niki Vazou

Refinement types turn typechecking into lightweight verification. The classic form of refinement type is the datasort refinement, in which datasorts identify subclasses of inductive datatypes. Existing type systems for datasort refinements…

Programming Languages · Computer Science 2020-11-17 Jana Dunfield

A systematic way of defining variants of a modeling language is useful for adopting the language to domain or project specific needs. Variants can be obtained by adopting the syntax or semantics of the language. In this paper, we take a…

Software Engineering · Computer Science 2014-09-24 Hans Grönninger , Bernhard Rumpe

We present a statically typed embedding of relational programming (specifically a dialect of miniKanren with disequality constraints) in Haskell. Apart from handling types, our dialect extends standard relational combinator repertoire with…

Programming Languages · Computer Science 2024-09-02 Nikolai Kudasov , Artem Starikov

Transformers have impressive generalization capabilities on tasks with a fixed context length. However, they fail to generalize to sequences of arbitrary length, even for seemingly simple tasks such as duplicating a string. Moreover, simply…

Liquid Haskell is an extension to the Haskell programming language that adds support for refinement types: data types augmented with SMT-decidable logical predicates that refine the set of values that can inhabit a type. Furthermore, Liquid…

Programming Languages · Computer Science 2021-10-12 Patrick Redmond , Gan Shen , Lindsey Kuper

While modern software development heavily uses versioned packages, programming languages rarely support the concept of versions in their semantics, which makes software updates more bulky and unsafe. This paper proposes a programming…

Programming Languages · Computer Science 2021-07-16 Yudai Tanabe , Luthfan Anshar Lubis , Tomoyuki Aotani , Hidehiko Masuhara

MLsub is a minimal language with a type system combining subtyping and parametric polymorphism and a type inference algorithm which infers compact principal types. Simple-sub is an alternative inference algorithm which can be implemented…

Programming Languages · Computer Science 2024-07-10 Rodrigo Marques , Mário Florido , Pedro Vasconcelos