License: Creative Commons Attribution 3.0 Unported license (CC BY 3.0)
When quoting this document, please refer to the following
DOI: 10.4230/LIPIcs.ECOOP.2018.14
URN: urn:nbn:de:0030-drops-92196
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2018/9219/
Go to the corresponding LIPIcs Volume Portal


Oostvogels, Nathalie ; De Koster, Joeri ; De Meuter, Wolfgang

Static Typing of Complex Presence Constraints in Interfaces

pdf-format:
LIPIcs-ECOOP-2018-14.pdf (0.6 MB)


Abstract

Many functions in libraries and APIs have the notion of optional parameters, which can be mapped onto optional properties of an object representing those parameters. The fact that properties are optional opens up the possibility for APIs and libraries to design a complex "dependency logic" between properties: for example, some properties may be mutually exclusive, some properties may depend on others, etc. Existing type systems are not strong enough to express such dependency logic, which can lead to the creation of invalid objects and accidental usage of absent properties. In this paper we propose TypeScriptIPC: a variant of TypeScript with a novel type system that enables programmers to express complex presence constraints on properties. We prove that it is sound with respect to enforcing complex dependency logic defined by the programmer when an object is created, modified or accessed.

BibTeX - Entry

@InProceedings{oostvogels_et_al:LIPIcs:2018:9219,
  author =	{Nathalie Oostvogels and Joeri De Koster and Wolfgang De Meuter},
  title =	{{Static Typing of Complex Presence Constraints in Interfaces}},
  booktitle =	{32nd European Conference on Object-Oriented Programming  (ECOOP 2018)},
  pages =	{14:1--14:27},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-95977-079-8},
  ISSN =	{1868-8969},
  year =	{2018},
  volume =	{109},
  editor =	{Todd Millstein},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2018/9219},
  URN =		{urn:nbn:de:0030-drops-92196},
  doi =		{10.4230/LIPIcs.ECOOP.2018.14},
  annote =	{Keywords: type checking, interfaces, dependency logic}
}

Keywords: type checking, interfaces, dependency logic
Collection: 32nd European Conference on Object-Oriented Programming (ECOOP 2018)
Issue Date: 2018
Date of publication: 10.07.2018
Supplementary Material: ECOOP Artifact Evaluation approved artifact available at http://dx.doi.org/10.4230/DARTS.4.3.3


DROPS-Home | Fulltext Search | Imprint | Privacy Published by LZI