A Survey of Constraint-based Programming Paradigms