Permalink
Browse files

Added references file

  • Loading branch information...
1 parent e95e438 commit 5cec374114c3b9b9e97257ba2e44a8f89ac0f5f2 @fogus fogus committed Oct 11, 2012
Showing with 27 additions and 1 deletion.
  1. +1 −1 README.md
  2. +16 −0 References.md
  3. +10 −0 src/main/clojure/clojure/core/contracts.clj
View
@@ -66,7 +66,7 @@ Developer Information
* [Compatibility Test Matrix](http://build.clojure.org/job/core.contracts-test-matrix/)
-
+* [References](https://github.com/clojure/core.contracts/blob/master/References.md)
Change Log
====================
View
@@ -0,0 +1,16 @@
+clojure.core.contracts references
+=================================
+
+- [An Axiomatic Basis for Computer Programming](http://citeseer.ist.psu.edu/viewdoc/summary?doi=10.1.1.116.2392) by C.A.R Hoare -- essential reading
+- *Object-oriented Software Construction* by Bertrand Meyer
+- *Eiffel: The Language* by Bertrand Meyer
+- [D](http://www.digitalmars.com/d/2.0/dbc.html)
+- *The Fortress Language Specification* by Guy L. Steele Jr., et al.
+- [Contracts for Higher-order functions](http://www.ccs.neu.edu/racket/pubs/NU-CCIS-02-05.pdf) by Robert Bruce Findler and Matthias Felleisen
+- [System.Diagnostics.Contracts](http://msdn.microsoft.com/en-us/library/system.diagnostics.contracts.aspx)
+- [Design by Contract and Unit Testing](http://onestepback.org/index.cgi/Tech/Programming/DbcAndTesting.html)
+- [Design by contract for Ruby](http://split-s.blogspot.com/2006/02/design-by-contract-for-ruby.html)
+- [Contracts in Racket (A Scheme Descendent)](http://pre.plt-scheme.org/docs/html/guide/contracts.html)
+- [Contract Soundness for Object-Oriented Languages](http://www.ccs.neu.edu/scheme/pubs/oopsla01-ff.pdf) by Robert Bruce Findler and Matthias Felleisen
+- [A Proof Engine for Eiffel](http://tecomp.sourceforge.net/index.php?file=doc/papers/proof/engine)
+- *How to Deign Programs* by Matthias Felleisen, Robert Bruce Findler, Matthew Flatt, and Shriram Krishnamurthi [here](http://www.htdp.org/2003-09-26/Book/)
@@ -45,3 +45,13 @@
(list `alter-var-root (list `var n#)
(list `fn '[f c] (list `with-constraints 'f 'c)) c#))
nil)))
+
+(defmacro require-with-constraints
+ [name inv-description invariants]
+ `(do
+ (require ~(quote name))
+ (set-validator! (var ~name) (partial (contract ~(symbol (str "chk-" name))
+ ~inv-description
+ [~name]
+ ~invariants)
+ (fn [x#] true)))))

0 comments on commit 5cec374

Please sign in to comment.