Introduction to algorithms
Eiffel: the language
The essence of compiling with continuations
PLDI '93 Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation
A Practical Approach to Programming With Assertions
IEEE Transactions on Software Engineering
A technique for software module specification with examples
Communications of the ACM
Purely Functional Data Structures
Purely Functional Data Structures
Contracts for higher-order functions
Proceedings of the seventh ACM SIGPLAN international conference on Functional programming
jContractor: A Reflective Java Library to Support Design by Contract
Reflection '99 Proceedings of the Second International Conference on Meta-Level Architectures and Reflection
APSEC '97 Proceedings of the Fourth Asia-Pacific Software Engineering and International Computer Science Conference
Contracts: From Analysis to C++ Implementation
TOOLS '99 Proceedings of the Technology of Object-Oriented Languages and Systems
A Min-Cover Approach for Finding Salient Curves
CVPRW '06 Proceedings of the 2006 Conference on Computer Vision and Pattern Recognition Workshop
A pattern logic for prompt lazy assertions in Haskell
IFL'06 Proceedings of the 18th international conference on Implementation and application of functional languages
Monadic, prompt lazy assertions in Haskell
APLAS'07 Proceedings of the 5th Asian conference on Programming languages and systems
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
IFL'03 Proceedings of the 15th international conference on Implementation of Functional Languages
On contract satisfaction in a higher-order world
ACM Transactions on Programming Languages and Systems (TOPLAS)
Access permission contracts for scripting languages
POPL '12 Proceedings of the 39th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
The interaction of contracts and laziness
PEPM '12 Proceedings of the ACM SIGPLAN 2012 workshop on Partial evaluation and program manipulation
ESOP'13 Proceedings of the 22nd European conference on Programming Languages and Systems
Proceedings of the 41st ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages
Hi-index | 0.00 |
Existing contract checkers for data structures force programmers to choose between poor alternatives. Contracts are either built into the functions that construct the data structure, meaning that each object can only be used with a single contract and that a data structure with an invariant cannot be viewed as a subtype of the data structure without the invariant (thus inhibiting abstraction) or contracts are checked eagerly when an operation on the data structure is invoked, meaning that many redundant checks are performed, potentially even changing the program's asymptotic complexity.We explore the idea of adding a small, controlled amount of laziness to contract checkers so that the contracts on a data structure are only checked as the program inspects the data structure. Unlike contracts on the constructors, our lazy contracts allow subtyping and thus preserve the potential for abstraction. Unlike eagerly-checked contracts, our contracts do not affect the asymptotic behavior of the program.This paper presents our implementation of these ideas, an optimization in our implementation, performance measurements, and a discussion of an extension to our implementation that admits more expressive contracts by loosening the strict asymptotic guarantees and only preserving the amortized asymptotic complexity.