prolog programs and constrain satisfaction added