% Copyright (C) 2013 Peter Schueller %schema1. schema2 :- not schema1. nom(g1,n1,tom). act(g1,n2,throw_down). nom(g1,n3,schoolbag). mod(g1,n4,to). nom(g1,n5,ray). nom(g1,n6,male_person). act(g1,n7,reach). nom(g1,n8,top) :- schema1. nom(g1,n8,bottom) :- schema2. mod(g1,n9,of). nom(g1,na,stairs). dep(g1,d1,n1,n2,@set(subj)). dep(g1,d2,n3,n2,@set(obj)). dep(g1,d3,n1,n3,@set((poss,mod))). dep(g1,d4,n4,n2,@set(obj2)). dep(g1,d5,n5,n4,@set(obj)). dep(g1,d6,n6,n7,@set(subj)). dep(g1,d7,d6,d1,@set((meta,temp,later))). dep(g1,d8,n8,n7,@set(obj)). dep(g1,d9,n9,n8,@set(mod)). dep(g1,db,na,n9,@set(obj)). % A11 print("Tom threw his schoolbag down to Ray after he reached the top of the stairs.") :- schema1. print("Tom threw his schoolbag down to Ray after he reached the bottom of the stairs.") :- schema2. % either n1 = n6 or n5 = n6 required_equivalence(g1,eq1,n1,n6). required_equivalence(g1,eq1,n5,n6). correct_result(g1,n1,n6) :- schema1. correct_result(g1,n5,n6) :- schema2.