Treffer: Mixed Messages: Measuring Conformance and Non-Interference in TypeScript

Title:
Mixed Messages: Measuring Conformance and Non-Interference in TypeScript
Publisher Information:
Schloss Dagstuhl - Leibniz-Zentrum fuer Informatik LIPIcs - Leibniz International Proceedings in Informatics. 31st European Conference on Object-Oriented Programming (ECOOP 2017) 2017
Document Type:
E-Ressource Electronic Resource
DOI:
10.4230.LIPIcs.ECOOP.2017.28
Availability:
Open access content. Open access content
https://creativecommons.org/licenses/by/3.0
Note:
application/pdf
English
Other Numbers:
DEDAG oai:drops-oai.dagstuhl.de:7264
doi:10.4230/LIPIcs.ECOOP.2017.28
urn:nbn:de:0030-drops-72640
https://drops.dagstuhl.de/opus/volltexte/2017/7264/
1005973428
Contributing Source:
SCHLOSS DAGSTUHL LEIBNIZ ZENTRUM GMBH
From OAIster®, provided by the OCLC Cooperative.
Accession Number:
edsoai.on1005973428
Database:
OAIster

Weitere Informationen

TypeScript participates in the recent trend among programming languages to support gradual typing. The DefinitelyTyped Repository for TypeScript supplies type definitions for over 2000 popular JavaScript libraries. However, there is no guarantee that implementations conform to their corresponding declarations. We present a practical evaluation of gradual typing for TypeScript. We have developed a tool for use with TypeScript, based on the polymorphic blame calculus, for monitoring JavaScript libraries and TypeScript clients against the TypeScript definition. We apply our tool, TypeScript TPD, to those libraries in the DefinitelyTyped Repository which had adequate test code to use. Of the 122 libraries we checked, 62 had cases where either the library or its tests failed to conform to the declaration. Gradual typing should satisfy non-interference. Monitoring a program should never change its behaviour, except to raise a type error should a value not conform to its declared type. However, our experience also suggests serious technical concerns with the use of the JavaScript proxy mechanism for enforcing contracts. Of the 122 libraries we checked, 22 had cases where the library or its tests violated non-interference.