Theory of recursive functions and effective computability
Theory of recursive functions and effective computability
CLEAN: A language for functional graph rewriting
Proc. of a conference on Functional programming languages and computer architecture
Eiffel: the language
The revised report on the syntactic theories of sequential control and state
Theoretical Computer Science
The DrScheme project: an overview
ACM SIGPLAN Notices
An axiomatic basis for computer programming
Communications of the ACM
An indexed model of recursive types for foundational proof-carrying code
ACM Transactions on Programming Languages and Systems (TOPLAS)
The Definition of Standard ML
A Discipline of Programming
Contracts for higher-order functions
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
TACS '97 Proceedings of the Third International Symposium on Theoretical Aspects of Computer Software
Behavioral software contracts
DrScheme: a programming environment for Scheme
Journal of Functional Programming
A sound (and complete) model of contracts
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
Typed closure conversion preserves observational equivalence
Proceedings of the 13th ACM SIGPLAN international conference on Functional programming
Static contract checking for Haskell
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Compositional reasoning and decidable checking for dependent contract types
Proceedings of the 3rd workshop on Programming languages meets program verification
What does aspect-oriented programming mean for functional programmers?
Proceedings of the 2009 ACM SIGPLAN workshop on Generic programming
ACM Transactions on Programming Languages and Systems (TOPLAS)
Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Undoing dynamic typing (declarative pearl)
FLOPS'08 Proceedings of the 9th international conference on Functional and logic programming
Correct blame for contracts: no more scapegoating
Proceedings of the 38th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
A semantics for lazy assertions
Proceedings of the 20th ACM SIGPLAN workshop on Partial evaluation and program manipulation
Temporal higher-order contracts
Proceedings of the 16th ACM SIGPLAN international conference on Functional programming
On contract satisfaction in a higher-order world
ACM Transactions on Programming Languages and Systems (TOPLAS)
Space-efficient gradual typing
Higher-Order and Symbolic Computation
Typed contracts for functional programming
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
Contracts as pairs of projections
FLOPS'06 Proceedings of the 8th international conference on Functional and Logic Programming
The interaction of contracts and laziness
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
Hybrid contract checking via symbolic simplification
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
Complete monitors for behavioral contracts
ESOP'12 Proceedings of the 21st European conference on Programming Languages and Systems
Practical typed lazy contracts
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Higher-order symbolic execution via contracts
Proceedings of the ACM international conference on Object oriented programming systems languages and applications
HALO: haskell to logic through denotational semantics
POPL '13 Proceedings of the 40th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Hi-index | 0.00 |
Even in statically typed languages it is useful to have certain invariants checked dynamically. Findler and Felleisen gave an algorithm for dynamically checking expressive higher-order types called contracts. They did not, however, give a semantics of contracts. The lack of a semantics makes it impossible to define and prove soundness and completeness of the checking algorithm. (Given a semantics, a sound checker never reports violations that do not exist under that semantics; a complete checker is – in principle – able to find violations when violations exist.) Ideally, a semantics should capture what programmers intuitively feel is the meaning of a contract or otherwise clearly point out where intuition does not match reality. In this paper we give an interpretation of contracts for which we prove the Findler-Felleisen algorithm sound and (under reasonable assumptions) complete. While our semantics mostly matches intuition, it also exposes a problem with predicate contracts where an arguably more intuitive interpretation than ours would render the checking algorithm unsound. In our semantics we have to make use of a notion of safety (which we define in the paper) to avoid unsoundness. We are able to eliminate the “leakage” of safety into the semantics by changing the language, replacing the original version of unrestricted predicate contracts with a restricted form. The corresponding loss in expressive power can be recovered by making safety explicit as a contract. This can be done either in ad-hoc fashion or by including general recursive contracts. The addition of recursive contracts has far-reaching implications, deeply affecting the formulation of our model and requiring different techniques for proving soundness.