Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
research-article

Expressing contract monitors as patterns of communication

Published: 29 August 2015 Publication History

Abstract

We present a new approach to contract semantics which expresses myriad monitoring strategies using a small core of foundational communication primitives. This approach allows multiple existing contract monitoring approaches, ranging from Findler and Felleisen’s original model of higher-order contracts to semi-eager, parallel, or asynchronous monitors, to be expressed in a single language built on well-understood constructs. We prove that this approach accurately simulates the original semantics of higher-order contracts. A straightforward implementation in Racket demonstrates the practicality of our approach which not only enriches existing Racket monitoring strategies, but also support a new style of monitoring in which collections of contracts collaborate to establish a global invariant.

References

[1]
A. Ahmed, R. B. Findler, J. G. Siek, and P. Wadler. Blame for all. In POPL, 2011.
[2]
J. Armstrong, S. Virding, and M. Williams. Erlang Users Guide and Reference Manual. Version 3.2. Ellemtel Utveklings AB, 1991.
[3]
H. C. Baker, Jr. and C. Hewitt. The incremental garbage collection of processes. In SAIPL, 1977.
[4]
M. Blume and D. McAllester. Sound and complete models of contracts. J. Funct. Program., 2006.
[5]
O. Chitil. Practical typed lazy contracts. In ICFP, 2012.
[6]
O. Chitil, D. McNeill, and C. Runciman. Lazy assertions. In IFL, 2003.
[7]
M. Degen, P. Thiemann, and S. Wehr. True lies: Lazy contracts for lazy languages (faithfulness is better than laziness). In ATPS, 2009.
[8]
M. Degen, P. Thiemann, and S. Wehr. Eager and delayed contract monitoring for call-by-value and call-by-name evaluation. J. Log. Algebr. Program., 79(7), 2010.
[9]
C. Dimoulas and M. Felleisen. On contract satisfaction in a higherorder world. TOPLAS, 33(5), Nov. 2011.
[10]
C. Dimoulas, R. Pucella, and M. Felleisen. Future contracts. In PPDP, 2009.
[11]
C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Complete monitoring for behavioral contracts. In ESOP, 2012.
[12]
C. Dimoulas, R. B. Findler, and M. Felleisen. Option contracts. In OOPSLA, 2013.
[13]
T. Disney, C. Flanagan, and J. McCarthy. Temporal higher-order contracts. In ICFP, 2011.
[14]
F. Ergün, S. Kannan, S. R. Kumar, R. Rubinfeld, and M. Viswanathan. Spot-checkers. In STOC, 1998.
[15]
R. B. Findler and M. Blume. Contracts as pairs of projections. In FLOPS, 2006.
[16]
R. B. Findler and M. Felleisen. Contracts for higher-order functions. In ICFP, 2002.
[17]
R. B. Findler, M. Blume, and M. Felleisen. An investigation of contracts as projections. University of Chicago Technical Report TR02-402, 2002.
[18]
R. B. Findler, S.-Y. Guo, and A. Rogers. Lazy contract checking for immutable data structures. In IFL, 2008.
[19]
M. Flatt and PLT. Reference: Racket. Technical Report PLT-TR-2010- 1, PLT Inc., 2010. http://racket-lang.org/tr1/.
[20]
M. Greenberg, B. C. Pierce, and S. Weirich. Contracts made manifest. Journal of Functional Programming, 2012.
[21]
R. H. Halstead, Jr. Implementation of multilisp: Lisp on a multiprocessor. LFP, 1984.
[22]
R. Hinze, J. Jeuring, and A. Löh. Typed contracts for functional programming. In FLOPS, 2006.
[23]
K. Honda, V. T. Vasconcelos, and M. Kubo. Language primitives and type discipline for structured communication-based programming. In ESOP, 1998.
[24]
A. Jeffrey. Semantics for core concurrent ml using computation types. In HOOTS. Cambridge University Press, 1997.
[25]
B. Meyer. Eiffel: the language. Prentice-Hall, Inc., 1992. ISBN 0-13- 247925-7.
[26]
R. Milner. Functions as processes. Mathematical Structures in Computer Science, 2, 6 1992.
[27]
C. Morgan. Programming from specifications. 1990.
[28]
D. L. Parnas. A technique for software module specification with examples. Commun. ACM, 1972.
[29]
J. H. Reppy. Concurrent ML: Design, application and semantics, 1993.
[30]
J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, 1999. ISBN 0521480892.
[31]
D. Sangiorgi and D. Walker. The Pi-Calculus: A Theory of Mobile Processes. Cambridge University Press, 2003.
[32]
T. S. Strickland and M. Felleisen. Contracts for first-class classes. In DLS, Oct. 2010.
[33]
T. S. Strickland, S. Tobin-Hochstadt, R. B. Findler, and M. Flatt. Chaperones and impersonators: run-time support for reasonable interposition. In OOPSLA, 2012.
[34]
K. Takeuchi, K. Honda, and M. Kubo. An interaction-based language and its typing system. In PARLE, 1994.

Cited By

View all
  • (2019)Does blame shifting work?Proceedings of the ACM on Programming Languages10.1145/33711334:POPL(1-29)Online publication date: 20-Dec-2019
  • (2018)An extended account of contract monitoring strategies as patterns of communicationJournal of Functional Programming10.1017/S095679681800004728Online publication date: 7-Mar-2018
  • (2017)Chaperone contracts for higher-order sessionsProceedings of the ACM on Programming Languages10.1145/31102791:ICFP(1-29)Online publication date: 29-Aug-2017
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM SIGPLAN Notices
ACM SIGPLAN Notices  Volume 50, Issue 9
ICFP '15
September 2015
436 pages
ISSN:0362-1340
EISSN:1558-1160
DOI:10.1145/2858949
  • Editor:
  • Andy Gill
Issue’s Table of Contents
  • cover image ACM Conferences
    ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional Programming
    August 2015
    436 pages
    ISBN:9781450336697
    DOI:10.1145/2784731
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than the author(s) must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected].

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 29 August 2015
Published in SIGPLAN Volume 50, Issue 9

Check for updates

Author Tags

  1. Lazy monitoring
  2. asynchronous monitoring
  3. behavioral specification

Qualifiers

  • Research-article

Funding Sources

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)1
  • Downloads (Last 6 weeks)0
Reflects downloads up to 09 Nov 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Does blame shifting work?Proceedings of the ACM on Programming Languages10.1145/33711334:POPL(1-29)Online publication date: 20-Dec-2019
  • (2018)An extended account of contract monitoring strategies as patterns of communicationJournal of Functional Programming10.1017/S095679681800004728Online publication date: 7-Mar-2018
  • (2017)Chaperone contracts for higher-order sessionsProceedings of the ACM on Programming Languages10.1145/31102791:ICFP(1-29)Online publication date: 29-Aug-2017
  • (2017)Big types in little runtime: open-world soundness and collaborative blame for gradual type systemsACM SIGPLAN Notices10.1145/3093333.300984952:1(762-774)Online publication date: 1-Jan-2017
  • (2017)Big types in little runtime: open-world soundness and collaborative blame for gradual type systemsProceedings of the 44th ACM SIGPLAN Symposium on Principles of Programming Languages10.1145/3009837.3009849(762-774)Online publication date: 1-Jan-2017

View Options

Get Access

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media