OREGON STATE UNIVERSITY

You are here

Surveyor: a DSEL for representing and analyzing strongly typed surveys

TitleSurveyor: a DSEL for representing and analyzing strongly typed surveys
Publication TypeConference Paper
Year of Publication2012
AuthorsAllen, W., and M. Erwig
Conference NameProceedings of the 2012 symposium on Haskell symposium - Haskell '12
Pagination81-90
Date Published09/2012
PublisherACM Press
Conference LocationCopenhagen, Denmark
ISBN Number9781450315746
Abstract

Polls and surveys are increasingly employed to gather information about attitudes and experiences of all kinds of populations and user groups. The ultimate purpose of a survey is to identify trends and relationships that can inform decision makers. To this end, the data gathered by a survey must be appropriately analyzed.

Most of the currently existing tools focus on the user interface aspect of the data collection task, but pay little attention to the structure and type of the collected data, which are usually represented as potentially tag-annotated, but otherwise unstructured, plain text. This makes the task of writing data analysis programs often difficult and error-prone, whereas a typed data representation could support the writing of type-directed data analysis tools that would enjoy the many benefits of static typing.

In this paper we present Surveyor, a DSEL that allows the compositional construction of typed surveys, where the types describe the structure of the data to be collected. A survey can be run to gather typed data, which can then be subjected to analysis tools that are built using Surveyor's typed combinators. Altogether the Surveyor DSEL realizes a strongly typed and type-directed approach to data gathering and analysis.

The implementation of our DSEL is based on GADTs to allow a flexible, yet strongly typed representation of surveys. Moreover, the implementation employs the Scrap-Your-Boilerplate library to facilitate the type-dependent traversal, extraction, and combination of data gathered from surveys.

DOI10.1145/2364506.2364518