Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Project Euler - A Case Study In "Specification Driven Programming"

37 views
Skip to first unread message

Chris Kohlhepp

unread,
Jul 21, 2015, 5:44:56 PM7/21/15
to
https://chriskohlhepp.wordpress.com/specification-driven-programming-in-common-lisp/

Algorithmic puzzles have become popular among computer programmers. While educational, solutions to these puzzles tend to promote approaches where competing aspects of the puzzle are entangled. Specification Driven or Constraint Based Programming is offered as an alternate approach. We hypothesize that this approach untangles the various aspect of the problem, making it easier to change the specifications of the problem while unifying test and implementation models.

We then present four project Euler problems and one NP-hard logic puzzle in support of our hypothesis. We hope the examples show the brevity and declarative power of functional programming combined with meta programming -presented here using Common Lisp.

In the epilogue we demonstrate how to selectively effect static typing using Lisp macros as well as implement constraints otherwise known as "Concepts" in C++.
0 new messages