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.
- A. Ahmed, R. B. Findler, J. G. Siek, and P. Wadler. Blame for all. In POPL, 2011. Google Scholar
Digital Library
- J. Armstrong, S. Virding, and M. Williams. Erlang Users Guide and Reference Manual. Version 3.2. Ellemtel Utveklings AB, 1991.Google Scholar
- H. C. Baker, Jr. and C. Hewitt. The incremental garbage collection of processes. In SAIPL, 1977. Google Scholar
Digital Library
- M. Blume and D. McAllester. Sound and complete models of contracts. J. Funct. Program., 2006. Google Scholar
Digital Library
- O. Chitil. Practical typed lazy contracts. In ICFP, 2012. Google Scholar
Digital Library
- O. Chitil, D. McNeill, and C. Runciman. Lazy assertions. In IFL, 2003. Google Scholar
Digital Library
- M. Degen, P. Thiemann, and S. Wehr. True lies: Lazy contracts for lazy languages (faithfulness is better than laziness). In ATPS, 2009.Google Scholar
- 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.Google Scholar
Cross Ref
- C. Dimoulas and M. Felleisen. On contract satisfaction in a higherorder world. TOPLAS, 33(5), Nov. 2011. Google Scholar
Digital Library
- C. Dimoulas, R. Pucella, and M. Felleisen. Future contracts. In PPDP, 2009. Google Scholar
Digital Library
- C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Complete monitoring for behavioral contracts. In ESOP, 2012. Google Scholar
Digital Library
- C. Dimoulas, R. B. Findler, and M. Felleisen. Option contracts. In OOPSLA, 2013. Google Scholar
Digital Library
- T. Disney, C. Flanagan, and J. McCarthy. Temporal higher-order contracts. In ICFP, 2011. Google Scholar
Digital Library
- F. Ergün, S. Kannan, S. R. Kumar, R. Rubinfeld, and M. Viswanathan. Spot-checkers. In STOC, 1998. Google Scholar
Digital Library
- R. B. Findler and M. Blume. Contracts as pairs of projections. In FLOPS, 2006. Google Scholar
Digital Library
- R. B. Findler and M. Felleisen. Contracts for higher-order functions. In ICFP, 2002. Google Scholar
Digital Library
- R. B. Findler, M. Blume, and M. Felleisen. An investigation of contracts as projections. University of Chicago Technical Report TR02-402, 2002.Google Scholar
- R. B. Findler, S.-Y. Guo, and A. Rogers. Lazy contract checking for immutable data structures. In IFL, 2008. Google Scholar
Digital Library
- M. Flatt and PLT. Reference: Racket. Technical Report PLT-TR-2010- 1, PLT Inc., 2010. http://racket-lang.org/tr1/.Google Scholar
- M. Greenberg, B. C. Pierce, and S. Weirich. Contracts made manifest. Journal of Functional Programming, 2012. Google Scholar
Digital Library
- R. H. Halstead, Jr. Implementation of multilisp: Lisp on a multiprocessor. LFP, 1984. Google Scholar
Digital Library
- R. Hinze, J. Jeuring, and A. Löh. Typed contracts for functional programming. In FLOPS, 2006. Google Scholar
Digital Library
- K. Honda, V. T. Vasconcelos, and M. Kubo. Language primitives and type discipline for structured communication-based programming. In ESOP, 1998. Google Scholar
Digital Library
- A. Jeffrey. Semantics for core concurrent ml using computation types. In HOOTS. Cambridge University Press, 1997. Google Scholar
Digital Library
- B. Meyer. Eiffel: the language. Prentice-Hall, Inc., 1992. ISBN 0-13- 247925-7. Google Scholar
Digital Library
- R. Milner. Functions as processes. Mathematical Structures in Computer Science, 2, 6 1992.Google Scholar
Cross Ref
- C. Morgan. Programming from specifications. 1990. Google Scholar
Digital Library
- D. L. Parnas. A technique for software module specification with examples. Commun. ACM, 1972. Google Scholar
Digital Library
- J. H. Reppy. Concurrent ML: Design, application and semantics, 1993.Google Scholar
- J. H. Reppy. Concurrent Programming in ML. Cambridge University Press, 1999. ISBN 0521480892. Google Scholar
Digital Library
- D. Sangiorgi and D. Walker. The Pi-Calculus: A Theory of Mobile Processes. Cambridge University Press, 2003.Google Scholar
- T. S. Strickland and M. Felleisen. Contracts for first-class classes. In DLS, Oct. 2010. Google Scholar
Digital Library
- T. S. Strickland, S. Tobin-Hochstadt, R. B. Findler, and M. Flatt. Chaperones and impersonators: run-time support for reasonable interposition. In OOPSLA, 2012. Google Scholar
Digital Library
- K. Takeuchi, K. Honda, and M. Kubo. An interaction-based language and its typing system. In PARLE, 1994. Google Scholar
Digital Library
Index Terms
Expressing contract monitors as patterns of communication
Recommendations
Expressing contract monitors as patterns of communication
ICFP 2015: Proceedings of the 20th ACM SIGPLAN International Conference on Functional ProgrammingWe 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 ...
A Behavioral Specification of Imperative Programming Languages*This paper was presented at Session TD3: Computer Systems & Applications (2) 3 of ITC-CSCC 2005.
In this paper, we give a denotational semantics of imperative programming languages as a CafeOBJ behavioral specification. Since CafeOBJ is an executable algebraic specification language, not only execution of programs but also semi-automatic ...
Implicit-signal monitors
An implicit (automatic) signal monitor uses a waituntil predicate statement to construct synchronization, as opposed to an explicit-signal monitor using condition variables and signal/wait statements for synchronization. Of the two synchronization ...






Comments