This paper proposes a framework for automatically evolving constraint satisfaction algorithms using genetic programming. The aim is to overcome the difficulties associated with matching algorithms to specific constraint satisfaction problems. A representation is introduced that is suitable for genetic programming and that can handle both complete and local search heuristics. In addition, the representation is shown to have considerably more flexibility than existing alternatives, being able to discover entirely new heuristics and to exploit synergies between heuristics. In a preliminary empirical study, it is shown that the new framework is capable of evolving algorithms for solving the well-studied problem of Boolean satisfiability testing.