Programming by composing general logic programs