2005 · 24 citations · 12 references
ComputingComputer ScienceComputer SystemsComputer ArchitectureOperating SystemsProgramming LanguagesCompiler ConstructionData TypesFunctional ProgrammingInterpreter DesignType CheckingType SystemsData Type InferenceFunctional Language DesignPolymorphic Type SystemsPolymorphic TypesType DeclarationsType InferenceType PolymorphismViews
This paper explains how the high-level treatment of datatypes in functional languages—using features like constructor functions and pattern matching—can be made to coexist with bitdata. We use this term to describe the bit- level representations of data that are required in the construction of many different applications, including operating systems, device drivers, and assemblers. We explain our approach as a combination of two language extensions, each of which could potentially be adapted to any modern functional language. The first adds simple and elegant constructs for manipulating raw bitfield values, while the second provides a view-like mechanism for defining distinct new bitdata types with fine-control over the underlying representation. Our design leverages polymorphic type inference, as well as techniques for improvement of qualified types, to track both the type and the width of bitdata structures. We have implemented our extensions in a small functional language interpreter, and used it to show that our approach can handle a wide range of practical bitdata types.
12
A theory of type polymorphism in programming
Robin Milner · Journal of Computer and System Sciences · 1978 · 2.2K citations · Full text
Initial Algebra Semantics and Continuous Algebras
Joseph A. Goguen, J. W. Thatcher, Eric G. Wagner et al. · Journal of the ACM · 1977 · 803 citations · Full text
Computing, Computer Science, Algebra +12
Jochen Liedtke · 1995 · 599 citations · Full text
Views: a way for pattern matching to cohabit with data abstraction
Philip Wadler · 1987 · 320 citations
Computing, Computer Science, Design +17