:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents20.e',85). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.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 %; %; @book{Mueller:2006, %; author = "Erik T. Mueller", %; year = "2006", %; title = "Commonsense Reasoning", %; address = "San Francisco", %; publisher = "Morgan Kaufmann/Elsevier", %; } %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',20). % 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/ecasp-decreasoner/FallingObjectWithEvents25.e',23). % sort object sort(object). % sort agent sort(agent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',25). % sort height: integer subsort(height,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',27). % agent Nathan t(agent,nathan). % object Apple t(object,apple). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',30). % fluent Falling(object) fluent(falling(object)). % fluent Height(object,height) fluent(height(object,height)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',33). % event Drop(agent,object) event(drop(agent,object)). % event HitGround(object) event(hitGround(object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',36). %; Sigma % [agent,object,time] % Initiates(Drop(agent,object),Falling(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',38). initiates_at(drop(Agent,Object), falling(Object), Time). % [agent,object,height,time] % Releases(Drop(agent,object),Height(object,height),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',42). releases_at(drop(Agent,Object), height(Object,Height), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',44). % [object,time] % Terminates(HitGround(object),Falling(object),time). terminates_at(hitGround(Object),falling(Object),Time). % [object,height,time] % HoldsAt(Height(object,height),time) -> % Initiates(HitGround(object),Height(object,height),time). holds_at(height(Object, Height), Time) -> initiates_at(hitGround(Object), height(Object, Height), Time). %; Delta :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',53). % Delta: directive(delta). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',53). % [object,time] % HoldsAt(Falling(object),time) & % HoldsAt(Height(object,0),time) -> % Happens(HitGround(object),time). holds_at(falling(Object), Time), holds_at(height(Object, 0), Time) -> happens_at(hitGround(Object), Time). % Delta: :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',57). directive(delta). % Happens(Drop(Nathan,Apple),18). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',57). happens_at(drop(nathan,apple),18). %; Psi % [object,height1,height2,time] % HoldsAt(Height(object,height1),time) & % HoldsAt(Height(object,height2),time) -> % height1=height2. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',62). holds_at(height(Object, Height1), Time), holds_at(height(Object, Height2), Time) -> Height1=Height2. %; Pi % [object,height1,height2,offset,time] % HoldsAt(Height(object,height1),time) & % height2 = (height1 - offset) -> % Trajectory(Falling(object),time,Height(object,height2),offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',69). holds_at(height(Object, Height1), Time), Height2=Height1-Offset -> trajectory(falling(Object), Time, height(Object, Height2), Offset). %; Gamma :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',76). % !HoldsAt(Falling(Apple),0). holds_at(not(falling(apple)),0). % HoldsAt(Height(Apple,3),18). holds_at(height(apple,3),18). % completion Delta Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',78). :- call_pel_directive(completion(delta)). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',81). % range time 0 25 :- call_pel_directive(range(time, 0, 25)). % range height 0 18 :- call_pel_directive(range(height, 0, 18)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.e',83). % range offset 1 18 :- call_pel_directive(range(offset, 1, 18)). %; End of file. :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/FallingObjectWithEvents25.pel')).