:- multifile goal/1. goal(get_wet) :- goal(rains), goal(go_out), goal(have_not(umbrella)). goal(get_wet):- goal(shower_bath). goal(go_out):- goal(need(X)), goal(have_not(X)). goal(buy(X)):- goal(need(X)), goal(have_not(X)). goal(need(beer)):- goal(thirsty). can_question(rains). can_question(thirsty). can_question(have_not(_)). can_question(shower_bath).