Abstract
Contracts feel misunderstood, especially those with a higher-order soul. While software engineers appreciate contracts as tools for articulating the interface between components, functional programmers desperately search for their types and meaning, completely forgetting about their pragmatics.
This gem presents a novel analysis of contract systems. Applied to the higher-order kind, this analysis reveals their large and clearly unappreciated software engineering potential. Three sample applications illustrate where this kind of exploration may lead.
- Parker Abercrombie and Murat Karaorman. jContractor: Bytecode Instrumentation Techniques for Implementing Design by Contract in Java. Electronic Notes in Theoretical Computer Science (70(4)), pp. 55–79, 2002. Presented in RV 2001, Run-time Verification (Satellite Workshop of FLoC '02)Google Scholar
- Chris Allan, Pavel Avgustinov, Aske Simon Christensen, Laurie Hendren, Sacha Kuzins, Ondˇrej Lhoták, Oege de Moor, Damien Sereni, Ganesh Sittampalam, and Julian Tibble. Adding Trace Matching with Free Variables to AspectJ. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 345–364, 2005. Google Scholar
Digital Library
- Pavel Avgustinov, Julian Tibble, and Oege de Moor. Making Trace Monitors Feasible. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 589–608, 2007. Google Scholar
Digital Library
- Howard Barringer, David Rydeheard, and Klaus Havelund. Rule Systems for Run-time Monitoring: From Eagle to Ruler. In Proc. International Conference on Runtime Verification, pp. 111–125, 2007. Google Scholar
Digital Library
- Detlef Bartetzko, Clemens Fischer, Michael Möller, and Heike Wehrheim. Jass — Java with Assertions. Electronic Notes in Theoretical Computer Science (55(2)), pp. 103–117, 2001. Presented in RV 2001, Run-time Verification (Satellite Workshop of CAV '01)Google Scholar
- Antoine Beugnard, Jean-Marc Jézéquel, Noël Plouzeau, and Damien Watkins. Contract Aware Components, 10 years after. Electronic Proceedings in Theoretical Computer Science (7), pp. 1–11, 2010.Google Scholar
Cross Ref
- Matthias Blume and David McAllester. Sound and Complete Models of Contracts. Journal of Functional Programming 16(4-5), pp. 367–414, 2006. Google Scholar
Digital Library
- Eric Bodden. J-LO, a Tool for Runtime-Checking Temporal Assertions. RWTH Aachen University, 2005. Master's Thesis.Google Scholar
- Feng Chen and Grigore Ro¸su. Towards Monitoring-Oriented Programming: A Paradigm Combining Specification and Implementation. Electronic Notes in Theoretical Computer Science (89(2)), pp. 108–127, 2003. Presented in RV 2003, Runtime Verification (Satellite Workshop of CAV '03)Google Scholar
- Thierry Coquand and Gerard Huet. The Calculus of Constructions. Information and Compuation(76:2-3), pp. 95–120, 1988. Google Scholar
Digital Library
- Ryan Culpeppeer. Fortifying Macros. Journal of Functional Programming (22(4/5)), pp. 439–476, 2012. Google Scholar
Digital Library
- Ryan Culpeppeer and Matthias Felleisen. Fortifying Macros. In Proc. ACM International Conference on Functional Programming, pp. 235–246, 2010. Google Scholar
Digital Library
- Christos Dimoulas and Matthias Felleisen. On Contract Satisfaction in a Higher-Order World. Transactions on Programming Languages and Systems 33(5), pp. 16:1–16:29, 2011. Google Scholar
Digital Library
- Christos Dimoulas, Robert Bruce Findler, Cormac Flanagan, and Matthias Felleisen. Correct Blame for Contracts: No More Scapegoating. In Proc. ACM Symposium on Principles of Programming Languages, pp. 215–226, 2011. Google Scholar
Digital Library
- Christos Dimoulas, Sam Tobin-Hochstadt, and Matthias Felleisen. Complete Monitors for Behavioral Contracts. In Proc. European Symposium on on Programming, pp. 214– 233, 2012. Google Scholar
Digital Library
- Tim Disney, Cormac Flanagan, and Jay McCarthy. Temporal Higher-order Contracts. In Proc. ACM International Conference on Functional Programming, pp. 176–188, 2011. Google Scholar
Digital Library
- Doron Drusinsky. Temporal Rover. 2010. http://www. time-rover.comGoogle Scholar
- Matthias Felleisen. On the Expressive Power of Programming Languages. Science of Programming 17, pp. 35–75, 1991. Google Scholar
Digital Library
- Matthias Felleisen, Robert Bruce Findler, and Matthew Flatt. Semantics Engineering with PLT Redex. MIT Press, 2009. Google Scholar
Digital Library
- Robert Bruce Findler and Matthias Blume. Contracts as Pairs of Projections. In Proc. International Conference on Functional and Logic Programming, pp. 226–241, 2006. Google Scholar
Digital Library
- Robert Bruce Findler, John Clements, Cormac Flanagan, Matthew Flatt, Shriram Krishnamurthi, Paul Steckler, and Matthias Felleisen. DrScheme: a Programming Environment for Scheme. Journal of Functional Programming 12(2), pp. 159–182, 2002. Google Scholar
Digital Library
- Robert Bruce Findler and Matthias Felleisen. Contracts for Higher-Order Functions. In Proc. ACM International Conference on Functional Programming, pp. 48–59, 2002. Google Scholar
Digital Library
- Robert Bruce Findler, Matthias Felleisen, and Matthias Blume. An Investigation of Contracts as Projections. University of Chicago, Computer Science Department, TR-2004-02, 2004.Google Scholar
- Cormac Flanagan. Hybrid Type Checking. In Proc. ACM Symposium on Principles of Programming Languages, pp. 245–256, 2006. Google Scholar
Digital Library
- Matthew Flatt, Eli Barzilay, and Robert Bruce Findler. Scribble: Closing the Book on Ad Hoc Documentation Tools. In Proc. ACM International Conference on Functional Programming, pp. 109–120, 2009. Google Scholar
Digital Library
- Matthew Flatt, Robert Bruce Findler, and Matthias Felleisen. Scheme with Classes, Mixins, and Traits. In Proc. Asian Symposium on Programming Languages and Systems, pp. 270–289, 2006. Google Scholar
Digital Library
- Matthew Flatt and PLT. Reference: Racket. PLT Inc., PLTTR-2010-1, 2010. http://racket-lang.org/tr1/Google Scholar
- Martin Gasbichler and Michael Sperber. Integrating User-Level Threads with Processes in Scsh. Higher Order and Symbolic Computation (18(3-4)), pp. 327–354, 2005. Google Scholar
Digital Library
- Ann Q. Gates, Steve Roach, Oscar Mondragon, and Nelly Delgado. DynaMICs: Comprehensive Support for Run-Time Monitoring. In Proc. International Conference on Runtime Verification, pp. 164–180, 2001.Google Scholar
- Simon F. Goldsmith, Robert O'Callahan, and Alex Aiken. Relational Queries over Program Traces. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 385–402, 2005. Google Scholar
Digital Library
- Michael Greenberg, Benjamin C. Pierce, and Stephanie Weirich. Contracts Made Manifest. In Proc. ACM Symposium on Principles of Programming Languages, pp. 353–364, 2010. Google Scholar
Digital Library
- Guy Lewis Steele, Jr. Macaroni is Better Than Spaghetti. In Proc. Symposium on Artificial Intelligence and Programming Languages, pp. 60–66, 1977. Google Scholar
Digital Library
- Guy Lewis Steele, Jr. The Revised Report on SCHEME: A Dialect of LISP. Massachusetts Institute of Technology Artificial Intelligence Laboratory, AIM-452, 1978.Google Scholar
- Klaus Havelund and Grigore Ro¸su. Monitoring Java Programs with Java PathExplorer. Electronic Notes in Theoretical Computer Science (55(2)), pp. 200–217, 2001. Presented in RV 2001, Run-time Verification (Satellite Workshop of CAV '01)Google Scholar
- Phillip Heidegger, Annette Bieniusa, and Peter Thiemann. Access Permission Contracts for Scripting Languages. In Proc. ACM Symposium on Principles of Programming Languages, pp. 112–122, 2012. Google Scholar
Digital Library
- Kohei Honda, Vasco Thudichum Vasconcelos, and Makoto Kubo. Language Primitives and Type Discipline for Structured Communication-Based Programming. In Proc. European Symposium on on Programming, pp. 122–138, 1998. Google Scholar
Digital Library
- Moonzoo Kim, Mahesh Viswanathan, Sampath Kannan, Insup Lee, and Oleg Sokolsky. Java-MaC: A Run-Time Assurance Approach for Java Programs. Formal Methods in System Design (24(2)), pp. 129–155, 2004. Google Scholar
Digital Library
- John Lamping. Typing the Specialization Interface. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 201–214, 1993. Google Scholar
Digital Library
- Gary T. Leavens. JML’s Rich, Inherited Specifications for Behavioral Subtypes. In Proc. Formal Methods and Software Engineering: 8th International Conference on Formal Engineering Methods, pp. 2–34, 2006. Google Scholar
Digital Library
- Marcelo D'Amorim and Klaus Havelund. Event-based Runtime Verification of Java Programs. In Proc. Workshop on Dynamic Analysis, pp. 1–7, 2005. Google Scholar
Digital Library
- Michael Martin, Benjamin Livshits, and Monica S. Lam. Finding Application Errors and Security Flaws Using PQL: a Program Query Language. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 365–383, 2005. Google Scholar
Digital Library
- Jay McCarthy. The Two-state Solution: Native and Serializable Continuations Accord. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 567–582, 2010. Google Scholar
Digital Library
- Patrick Meredith and Grigore Ro¸su. Efficient Parametric Runtime Verification with Deterministic String Rewriting. In Proc. ACM/IEEE International Conference on Automated Software Engineering, pp. 70–80, 2013.Google Scholar
- Bernard Meyer. Applying Design by Contract. IEEE Computer 25(10), pp. 45–51, 1992. Google Scholar
Digital Library
- Bernard Meyer. Eiffel: The Language. Prentice Hall, 1992. Google Scholar
Digital Library
- Scott Moore, Christos Dimoulas, Dan King, and Stephen Chong. Shill: A Secure Shell Scripting Language. In Proc. USENIX Symposium on Operating Systems Design and Implementation, pp. 183–199, 2014. Google Scholar
Digital Library
- James Hiram Morris. Lambda-Calculus Models of Programming Languages. Ph.D. dissertation, Massachusetts Institute of Technology, 1968.Google Scholar
- Phúc Nguy˜ên and David Van Horn. Relatively Complete Counterexamples for Higher-order Programs. In Proc. ACM Conference on Programming Language Design and Implementation, pp. 445–456, 2015. Google Scholar
Digital Library
- Phúc Nguy˜ên, Sam Tobin-Hochstadt, and David Van Horn. Soft Contract Verification. In Proc. ACM International Conference on Functional Programming, pp. 139–152, 2014. Google Scholar
Digital Library
- Patrick M. Rondon, Ming Kawaguci, and Ranjit Jhala. Liquid Types. In Proc. ACM Conference on Programming Language Design and Implementation, pp. 159–169, 2008. Google Scholar
Digital Library
- Christophe Scholliers, Éric Tanter, and Wolfgang De Meuter. Computational Contracts. Science of Computer Programming (98:3), pp. 360–375, 2015. Google Scholar
Digital Library
- Herbert A. Simon. Administrative Behavior. MacMillan, 1947.Google Scholar
- Vincent St-Amour, Leif Andersen, and Matthias Felleisen. Feature-specific Profiling. In Proc. Compiler Construction, pp. 49–68, 2015.Google Scholar
- Robert E. Storm and Shaula A. Yemini. Typestate: A Programming Language Concept for Enhancing Software Reliability. IEEE Transactions on Software Engineering(12(1)), pp. 157–171, 1986. Google Scholar
Digital Library
- T. Stephen Strickland, Christos Dimoulas, Asumu Takikawa, and Matthias Felleisen. Contracts for First-Class Classes. Transactions on Programming Languages and Systems 35(3), pp. 11:1–1:58, 2013. Google Scholar
Digital Library
- T. Stephen Strickland and Matthias Felleisen. Nested and Dynamic Contract Boundaries. In Proc. International Conference on Functional and Logic Programming, pp. 141–158, 2009.Google Scholar
- T. Stephen Strickland, Sam Tobin-Hochstadt, Robert Bruce Findler, and Matthew Flatt. Chaperones and Impersonators: Run-time Support for Reasonable Interposition. In Proc. ACM Conference on Object-Oriented Programming, Systems, Languages and Applications, pp. 943–962, 2012. Google Scholar
Digital Library
- Asumu Takikawa, T. Stephen Strickland, and Sam Tobin-Hochstadt. Constraining Delimited Control with Contracts. In Proc. European Symposium on on Programming, pp. 229– 248, 2013. Google Scholar
Digital Library
- The Coq Cevelopment Team. The Coq Proof Assistant Reference Manual. LogiCal Project, Version 8.0, 2004.Google Scholar
- Philip Wadler and Robert Bruce Findler. Well-typed Programs Can’t be Blamed. In Proc. European Symposium on on Programming, pp. 1–15, 2009. Google Scholar
Digital Library
Index Terms
Oh Lord, please don't let contracts be misunderstood (functional pearl)
Recommendations
Oh Lord, please don't let contracts be misunderstood (functional pearl)
ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional ProgrammingContracts feel misunderstood, especially those with a higher-order soul. While software engineers appreciate contracts as tools for articulating the interface between components, functional programmers desperately search for their types and meaning, ...
Modelling Legal Contracts as Processes
DEXA '00: Proceedings of the 11th International Workshop on Database and Expert Systems ApplicationsThis paper concentrates on the representation of legal relations that occur between parties once they have entered a contractual agreement and their evolution as the agreement progresses through time. Contracts are regarded as processes and they are ...
Subcontracting, Assignment, and Substitution for Legal Contracts in Symboleo
Conceptual ModelingAbstractLegal contracts specify obligations and powers among legal subjects, involve assets, and are subject to quality constraints. Smart contracts are software systems that monitor the execution of contracts to ensure compliance. As a starting point for ...







Comments