Access Permission Contracts for Scripting Languages - Archive ouverte HAL Accéder directement au contenu
Communication Dans Un Congrès Année : 2012

Access Permission Contracts for Scripting Languages

Résumé

The ideal software contract fully specifies the behavior of an operation. Often, in particular in the context of scripting languages, a full specification may be cumbersome to state and may not even be desired. In such cases, a partial specification, which describes selected aspects of the behavior, may be used to raise the confidence in an implementation of the operation to a reasonable level. We propose a novel kind of contract for object-based languages that specifies the side effects of an operation with access permissions. An access permission contract uses sets of access paths to express read and write permissions for the properties of the objects accessible from the operation. We specify a monitoring semantics for access permission contracts and implement this semantics in a contract system for JavaScript. We prove soundness and stability of violation under increasing aliasing for our semantics. Applications of access permission contracts include enforcing modularity, test-driven development, program understanding, and regression testing. With respect to testing and understanding, we find that adding access permissions to contracts increases the effectiveness of error detection through contract monitoring by 6-13%.
Fichier non déposé

Dates et versions

hal-01282275 , version 1 (03-03-2016)

Identifiants

Citer

Phillip Heidegger, Annette Bieniusa, Peter Thieman. Access Permission Contracts for Scripting Languages. 39th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages (POPL), Jan 2012, Philadelphia, United States. pp.111-122, ⟨10.1145/2103656.2103671⟩. ⟨hal-01282275⟩
62 Consultations
0 Téléchargements

Altmetric

Partager

Gmail Facebook X LinkedIn More