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 ScholarDigital 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 ScholarDigital Library
- M. Blume and D. McAllester. Sound and complete models of contracts. J. Funct. Program., 2006. Google ScholarDigital Library
- O. Chitil. Practical typed lazy contracts. In ICFP, 2012. Google ScholarDigital Library
- O. Chitil, D. McNeill, and C. Runciman. Lazy assertions. In IFL, 2003. Google ScholarDigital 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 ScholarCross Ref
- C. Dimoulas and M. Felleisen. On contract satisfaction in a higherorder world. TOPLAS, 33(5), Nov. 2011. Google ScholarDigital Library
- C. Dimoulas, R. Pucella, and M. Felleisen. Future contracts. In PPDP, 2009. Google ScholarDigital Library
- C. Dimoulas, S. Tobin-Hochstadt, and M. Felleisen. Complete monitoring for behavioral contracts. In ESOP, 2012. Google ScholarDigital Library
- C. Dimoulas, R. B. Findler, and M. Felleisen. Option contracts. In OOPSLA, 2013. Google ScholarDigital Library
- T. Disney, C. Flanagan, and J. McCarthy. Temporal higher-order contracts. In ICFP, 2011. Google ScholarDigital Library
- F. Ergün, S. Kannan, S. R. Kumar, R. Rubinfeld, and M. Viswanathan. Spot-checkers. In STOC, 1998. Google ScholarDigital Library
- R. B. Findler and M. Blume. Contracts as pairs of projections. In FLOPS, 2006. Google ScholarDigital Library
- R. B. Findler and M. Felleisen. Contracts for higher-order functions. In ICFP, 2002. Google ScholarDigital 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 ScholarDigital 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 ScholarDigital Library
- R. H. Halstead, Jr. Implementation of multilisp: Lisp on a multiprocessor. LFP, 1984. Google ScholarDigital Library
- R. Hinze, J. Jeuring, and A. Löh. Typed contracts for functional programming. In FLOPS, 2006. Google ScholarDigital Library
- K. Honda, V. T. Vasconcelos, and M. Kubo. Language primitives and type discipline for structured communication-based programming. In ESOP, 1998. Google ScholarDigital Library
- A. Jeffrey. Semantics for core concurrent ml using computation types. In HOOTS. Cambridge University Press, 1997. Google ScholarDigital Library
- B. Meyer. Eiffel: the language. Prentice-Hall, Inc., 1992. ISBN 0-13- 247925-7. Google ScholarDigital Library
- R. Milner. Functions as processes. Mathematical Structures in Computer Science, 2, 6 1992.Google ScholarCross Ref
- C. Morgan. Programming from specifications. 1990. Google ScholarDigital Library
- D. L. Parnas. A technique for software module specification with examples. Commun. ACM, 1972. Google ScholarDigital 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 ScholarDigital 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 ScholarDigital 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 ScholarDigital Library
- K. Takeuchi, K. Honda, and M. Kubo. An interaction-based language and its typing system. In PARLE, 1994. Google ScholarDigital Library
Index Terms
- Expressing contract monitors as patterns of communication
Recommendations
Expressing contract monitors as patterns of communication
ICFP '15We 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 ...
Contract Design of Concessions
IJCSS '12: Proceedings of the 2012 International Joint Conference on Service SciencesThe concession contract establishes a formal relationship of exchange of service and money between the host government and concessionaire. Ideally, it will specify the obligations and rights of each party under every contingency concerning the future ...
Comments