:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Holding.e',49). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.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 %; %; @article{Mueller:2004a, %; author = "Erik T. Mueller", %; year = "2004", %; title = "Event calculus reasoning through satisfiability", %; journal = "Journal of Logic and Computation", %; volume = "14", %; number = "5", %; pages = "703--730", %; } %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',22). % option trajectory on :- call_pel_directive(option(trajectory, on)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',24). % 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/Mueller2004a/Leaf.e',27). % sort object sort(object). % sort height: integer subsort(height,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',30). % fluent Height(object,height) fluent(height(object,height)). % fluent Falling(object) fluent(falling(object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',32). % event StartFalling(object) event(startFalling(object)). % event HitsGround(object) event(hitsGround(object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',35). % [object,height1,height2,time] % HoldsAt(Height(object,height1),time) & % HoldsAt(Height(object,height2),time) -> % height1=height2. holds_at(height(Object, Height1), Time), holds_at(height(Object, Height2), Time) -> Height1=Height2. % [object,time] % Initiates(StartFalling(object),Falling(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',41). initiates_at(startFalling(Object), falling(Object), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',43). % [object,height,time] % Releases(StartFalling(object),Height(object,height),time). releases_at(startFalling(Object), height(Object,Height), Time). % [object,height1,height2,offset,time] % HoldsAt(Height(object,height1),time) & % height2=height1-offset*offset -> % Trajectory(Falling(object),time,Height(object,height2),offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',47). holds_at(height(Object, Height1), Time), Height2=Height1-Offset*Offset -> trajectory(falling(Object), Time, height(Object, Height2), Offset). % [object,time] % HoldsAt(Falling(object),time) & % HoldsAt(Height(object,0),time) -> % Happens(HitsGround(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',52). holds_at(falling(Object), Time), holds_at(height(Object, 0), Time) -> happens_at(hitsGround(Object), Time). %;[object,height1,height2,time] %;HoldsAt(Height(object,height1),time) & %;height1 != height2 -> %;Terminates(HitsGround(object),Height(object,height2),time). % [object,height,time] % HoldsAt(Height(object,height),time) -> % Initiates(HitsGround(object),Height(object,height),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',61). holds_at(height(Object, Height), Time) -> initiates_at(hitsGround(Object), height(Object, Height), Time). % [object,time] % Terminates(HitsGround(object),Falling(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',66). terminates_at(hitsGround(Object), falling(Object), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',68). % object Leaf t(object,leaf). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',70). % !HoldsAt(Falling(Leaf),0). holds_at(not(falling(leaf)),0). % HoldsAt(Height(Leaf,9),0). holds_at(height(leaf,9),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',72). % Happens(StartFalling(Leaf),0). happens_at(startFalling(leaf),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',74). % completion Happens :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',76). % range time 0 4 :- call_pel_directive(range(time, 0, 4)). % range offset 1 9 :- call_pel_directive(range(offset, 1, 9)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',78). % range height 0 9 :- call_pel_directive(range(height, 0, 9)). %; End of file. :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.pel')).