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.2015.28
URN: urn:nbn:de:0030-drops-52164
URL: http://dagstuhl.sunsite.rwth-aachen.de/volltexte/2015/5216/
Go to the corresponding LIPIcs Volume Portal


Keil, Matthias ; Thiemann, Peter

TreatJS: Higher-Order Contracts for JavaScripts

pdf-format:
6.pdf (0.6 MB)


Abstract

TreatJS is a language embedded, higher-order contract system for JavaScript which enforces contracts by run-time monitoring. Beyond providing the standard abstractions for building higher-order contracts (base, function, and object contracts), TreatJS's novel contributions are its guarantee of non-interfering contract execution, its systematic approach to blame assignment, its support for contracts in the style of union and intersection types, and its notion of a parameterized contract scope, which is the building block for composable run-time generated contracts that generalize dependent function contracts.

TreatJS is implemented as a library so that all aspects of a contract can be specified using the full JavaScript language. The library relies on JavaScript proxies to guarantee full interposition for contracts. It further exploits JavaScript's reflective features to run contracts in a sandbox environment, which guarantees that the execution of contract code does not modify the application state. No source code transformation or change in the JavaScript run-time system is required. The impact of contracts on execution speed is evaluated using the Google Octane benchmark.

BibTeX - Entry

@InProceedings{keil_et_al:LIPIcs:2015:5216,
  author =	{Matthias Keil and Peter Thiemann},
  title =	{{TreatJS: Higher-Order Contracts for JavaScripts}},
  booktitle =	{29th European Conference on Object-Oriented Programming (ECOOP 2015)},
  pages =	{28--51},
  series =	{Leibniz International Proceedings in Informatics (LIPIcs)},
  ISBN =	{978-3-939897-86-6},
  ISSN =	{1868-8969},
  year =	{2015},
  volume =	{37},
  editor =	{John Tang Boyland},
  publisher =	{Schloss Dagstuhl--Leibniz-Zentrum fuer Informatik},
  address =	{Dagstuhl, Germany},
  URL =		{http://drops.dagstuhl.de/opus/volltexte/2015/5216},
  URN =		{urn:nbn:de:0030-drops-52164},
  doi =		{10.4230/LIPIcs.ECOOP.2015.28},
  annote =	{Keywords: Higher-Order Contracts, JavaScript, Proxies}
}

Keywords: Higher-Order Contracts, JavaScript, Proxies
Collection: 29th European Conference on Object-Oriented Programming (ECOOP 2015)
Issue Date: 2015
Date of publication: 29.06.2015


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