Skip to main content

Types from Data: Making Structured Data First-class Citizens in F#

Petricek, Tomas, Guerra, Gustavo, Syme, Don (2016) Types from Data: Making Structured Data First-class Citizens in F#. In: PLDI 2016. Proceedings of the 37th ACM SIGPLAN Conference on Programming Language Design and Implementation. PLDI Programming Language Design and Implementation . pp. 477-490. ACM, New York, USA ISBN 978-1-4503-4261-2. (doi:10.1145/2908080.2908115) (KAR id:67140)

PDF Author's Accepted Manuscript
Language: English
Download (341kB) Preview
[thumbnail of paper.pdf]
Preview
This file may not be suitable for users of assistive technology.
Request an accessible format
Official URL
http://dx.doi.org/10.1145/2908080.2908115

Abstract

Most modern applications interact with external services and access data in structured formats such as XML, JSON and CSV. Static type systems do not understand such formats, often making data access more cumbersome. Should we give up and leave the messy world of external data to dynamic typing and runtime checks? Of course, not! We present F# Data, a library that integrates external structured data into F#. As most real-world data does not come with an explicit schema, we develop a shape inference algorithm that infers a shape from representative sample documents. We then integrate the inferred shape into the F# type system using type providers. We formalize the process and prove a relative type soundness theorem. Our library significantly reduces the amount of data access code and it provides additional safety guarantees when contrasted with the widely used weakly typed techniques.

Item Type: Conference or workshop item (Proceeding)
DOI/Identification number: 10.1145/2908080.2908115
Uncontrolled keywords: F#, Inference, JSON, Type Providers, XML
Subjects: Q Science > QA Mathematics (inc Computing science) > QA 75 Electronic computers. Computer science
Q Science > QA Mathematics (inc Computing science) > QA 76 Software, computer programming,
Divisions: Divisions > Division of Computing, Engineering and Mathematical Sciences > School of Computing
Depositing User: Tomas Petricek
Date Deposited: 25 May 2018 16:39 UTC
Last Modified: 10 Mar 2021 17:41 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/67140 (The current URI for this page, for reference purposes)
Petricek, Tomas: https://orcid.org/0000-0002-7242-2208
  • Depositors only (login required):

Downloads

Downloads per month over past year