3 research outputs found
A Pattern Logic for Prompt Lazy Assertions in Haskell
Assertions test expected properties of run-time values without disrupting the normal computation of a program. Here we present a library for enriching programs in the lazy language Haskell with assertions. Expected properties are written in an expressive pattern logic that combines pattern matching with logical operations and predicates. The presented assertions are lazy: they do not force evaluation but only examine what is evaluated by other parts of the program. They are also prompt: assertion failure is reported as early as possible, before a faulty value is used by the main computation
Executable Refinement Types
This dissertation introduces executable refinement types, which refine
structural types by semi-decidable predicates, and establishes their metatheory
and accompanying implementation techniques. These results are useful for
undecidable type systems in general.
Particular contributions include: (1) Type soundness and a logical relation
for extensional equivalence for executable refinement types (though type
checking is undecidable); (2) hybrid type checking for executable refinement
types, which blends static and dynamic checks in a novel way, in some sense
performing better statically than any decidable approximation; (3) a type
reconstruction algorithm - reconstruction is decidable even though type
checking is not, when suitably redefined to apply to undecidable type systems;
(4) a novel use of existential types with dependent types to ensure that the
language of logical formulae is closed under type checking (5) a prototype
implementation, Sage, of executable refinement types such that all dynamic
errors are communicated back to the compiler and are thenceforth static errors.Comment: Ph.D. dissertation. Accepted by the University of California, Santa
Cruz, in March 2014. 278 pages (295 including frontmatter