Applying the constraint satisfaction problem paradigm to structure generation