:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/OffOn.e',50). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.pel')). %; %; Copyright (c) 2005 IBM Corporation and others. %; All rights reserved. This program and the accompanying materials %; are made available under the terms of the Common Public License v1.0 %; which accompanies this distribution, and is available at %; http://www.eclipse.org/legal/cpl-v10.html %; %; Contributors: %; IBM - Initial implementation %; %; @inproceedings{Mueller:2004b, %; author = "Erik T. Mueller", %; year = "2004", %; title = "A tool for satisfiability-based commonsense reasoning in the event calculus", %; editor = "Valerie Barr and Zdravko Markov", %; booktitle = "\uppercase{P}roceedings of the \uppercase{S}eventeenth \uppercase{I}nternational \uppercase{F}lorida \uppercase{A}rtificial \uppercase{I}ntelligence \uppercase{R}esearch \uppercase{S}ociety \uppercase{C}onference", %; pages = "147--152", %; address = "Menlo Park, CA", %; publisher = "AAAI Press", %; } %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',23). % load foundations/Root.e :- call_pel_directive(load('foundations/Root.e')). % load foundations/EC.e :- call_pel_directive(load('foundations/EC.e')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',26). % sort object sort(object). % sort agent: object subsort(agent,object). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',28). % sort physobj: object subsort(physobj,object). % sort location sort(location). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',31). % fluent At(object,location) fluent(at_loc(object,location)). % fluent Holding(agent,physobj) fluent(holding(agent,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',33). % event PickUp(agent,physobj) event(pickUp(agent,physobj)). % event SetDown(agent,physobj) event(setDown(agent,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',35). % event Move(agent,location,location) event(move(agent,location,location)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',37). %; state constraints % [agent,location,physobj,time] % HoldsAt(At(agent,location),time) & % HoldsAt(Holding(agent,physobj),time) -> % HoldsAt(At(physobj,location),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',39). holds_at(at_loc(Agent, Location), Time), holds_at(holding(Agent, Physobj), Time) -> holds_at(at_loc(Physobj, Location), Time). % [object,location1,location2,time] % HoldsAt(At(object,location1),time) & % HoldsAt(At(object,location2),time) -> % location1=location2. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',45). holds_at(at_loc(Object, Location1), Time), holds_at(at_loc(Object, Location2), Time) -> Location1=Location2. %; effect axioms % [agent,location1,location2,time] % Initiates(Move(agent,location1,location2),At(agent,location2),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',51). initiates_at(move(Agent,Location1,Location2), at_loc(Agent,Location2), Time). % [agent,location1,location2,time] % Terminates(Move(agent,location1,location2),At(agent,location1),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',55). terminates_at(move(Agent,Location1,Location2), at_loc(Agent,Location1), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',57). % [agent,physobj,time] % Initiates(PickUp(agent,physobj),Holding(agent,physobj),time). initiates_at(pickUp(Agent,Physobj), holding(Agent,Physobj), Time). % [agent,physobj,time] % Terminates(SetDown(agent,physobj),Holding(agent,physobj),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',61). terminates_at(setDown(Agent,Physobj), holding(Agent,Physobj), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',63). %; preconditions % [agent,location1,location2,time] % Happens(Move(agent,location1,location2),time) -> % HoldsAt(At(agent,location1),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',65). happens_at(move(Agent, Location1, Location2), Time) -> holds_at(at_loc(Agent, Location1), Time). % [agent,physobj,time] % Happens(PickUp(agent,physobj),time) -> % {location}% HoldsAt(At(agent,location),time) & % HoldsAt(At(physobj,location),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',70). exists([Location], (happens_at(pickUp(Agent, Physobj), Time)->holds_at(at_loc(Agent, Location), Time), holds_at(at_loc(Physobj, Location), Time))). %; releases % [agent,physobj,location,time] % Releases(PickUp(agent,physobj),At(physobj,location),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',76). releases_at(pickUp(Agent,Physobj), at_loc(Physobj,Location), Time). % [agent,physobj,location,time] % HoldsAt(At(agent,location),time) -> % Initiates(SetDown(agent,physobj),At(physobj,location),time). holds_at(at_loc(Agent, Location), Time) -> initiates_at(setDown(Agent, Physobj), at_loc(Physobj, Location), Time). %;[agent,physobj,location1,location2,time] %;HoldsAt(At(agent,location1),time) & %;location1 != location2 -> %;Terminates(SetDown(agent,physobj),At(physobj,location2),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',88). % agent James t(agent,james). % physobj Coin t(physobj,coin). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',90). % location L1, L2, L3, L4 t(location,l1). t(location,l2). t(location,l3). t(location,l4). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',92). % !HoldsAt(Holding(James,Coin),0). holds_at(not(holding(james,coin)),0). % HoldsAt(At(Coin,L4),0). holds_at(at_loc(coin,l4),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',94). % HoldsAt(At(James,L1),0). holds_at(at_loc(james,l1),0). % Happens(Move(James,L1,L2),0). happens_at(move(james,l1,l2),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',96). % Happens(Move(James,L2,L3),1). happens_at(move(james,l2,l3),1). % Happens(Move(James,L3,L4),2). happens_at(move(james,l3,l4),2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',98). % Happens(PickUp(James,Coin),3). happens_at(pickUp(james,coin),3). % Happens(Move(James,L4,L3),4). happens_at(move(james,l4,l3),4). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',100). % Happens(Move(James,L3,L2),5). happens_at(move(james,l3,l2),5). % Happens(SetDown(James,Coin),6). happens_at(setDown(james,coin),6). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',102). % Happens(Move(James,L2,L3),7). happens_at(move(james,l2,l3),7). % Happens(Move(James,L3,L4),8). happens_at(move(james,l3,l4),8). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',104). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.e',107). % range time 0 9 :- call_pel_directive(range(time, 0, 9)). % range offset 1 1 :- call_pel_directive(range(offset, 1, 1)). %; End of file. :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/PickUp.pel')).