:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithAntiTrajectory.e',86). % translate: unskipped File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e.lps :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(lps). % translate: begining File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e.lps % Fri, 09 Oct 2020 15:14:32 GMT File: (0x5625a97d1c00)%; %; 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/Mueller2006/Chapter7/FallingObjectWithEvents.e',20). % load foundations/Root.e :- if(is_e_toplevel). :- load_e_cond('foundations/Root.e', changed). % load('/pack/logicmoo_ec/ext/ec_sources/foundations/Root.e',changed). :- endif. % load foundations/EC.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',20). :- if(is_e_toplevel). :- load_e_cond('foundations/EC.e', changed). % load('/pack/logicmoo_ec/ext/ec_sources/foundations/EC.e',changed). :- endif. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',23). % sort object % From E: % % sort(object). sort(object). % sort agent :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',23). % From E: % % sort(agent). sort(agent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',25). % sort height: integer % From E: % % subsort(height,integer). subsort(height,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',27). % agent Nathan % From E: % % t(agent,nathan). agent(nathan). % object Apple :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',27). % From E: % % t(object,apple). object(apple). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',30). % fluent Falling(object) % From E: % % fluent( % falling(object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',30). fluents([falling/1]). % From E: % % mpred_prop( % falling(object), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',30). mpred_prop(falling(object),fluent). % fluent Height(object,height) % From E: % % fluent( % height(object,height)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',30). fluents([height/2]). % From E: % % mpred_prop( % height(object,height), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',30). mpred_prop(height(object,height),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',33). % event Drop(agent,object) % From E: % % event( % drop(agent,object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',33). events([drop/2]). % From E: % % mpred_prop( % drop(agent,object), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',33). mpred_prop(drop(agent,object),event). % event HitGround(object) % From E: % % event( % hitGround(object)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',33). events([hitGround/1]). % From E: % % mpred_prop( % hitGround(object), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',33). mpred_prop(hitGround(object),event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',36). %; Sigma % [agent,object,time] % Initiates(Drop(agent,object),Falling(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',38). % From E: % % initiates( % drop(Agent,Object), % falling(Object), % Time). drop(Agent, Object)initiates falling(Object). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',38). /* initiated(happens(drop(Agent,Object), Time_From, Time_Until), falling(Object), []). */ % "% =================================". % [agent,object,height,time] % Releases(Drop(agent,object),Height(object,height),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',42). % From E: % % releases( % drop(Agent,Object), % height(Object,Height), % Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',42). releases(drop(Agent,Object), height(Object,Height), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',44). % [object,time] % Terminates(HitGround(object),Falling(object),time). % From E: % % terminates( % hitGround(Object), % falling(Object), % Time). hitGround(Object)terminates falling(Object). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',44). /* terminated(happens(hitGround(Object), Time_From, Time_Until), falling(Object), []). */ % "% =================================". % [object,height,time] % HoldsAt(Height(object,height),time) -> % Initiates(HitGround(object),Height(object,height),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',48). % From E: % % '->'( % holds_at( % height(Object,Height), % Time), % initiates( % hitGround(Object), % height(Object,Height), % Time)). hitGround(Object)initiates height(Object, Height)at Time if height(Object, Height)at Time. /* initiated(happens(hitGround(Object),Time,Time_Until), at(height(Object,Height),Time), [holds(height(Object,Height),Time)]). */ % "% =================================". %; Delta :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',53). % Delta: % [object,time] % HoldsAt(Falling(object),time) & % HoldsAt(Height(object,0),time) -> % Happens(HitGround(object),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',53). % From E: % % '->'( % axiom_uses(delta,Time), % '->'( % ','( % holds_at( % falling(Object), % Time), % holds_at( % height(Object,0), % Time)), % hitGround(Object))). if axiom_uses(delta, Time)then hitGround(Object)if falling(Object)at Time, height(Object, 0)at Time. % reactive_rule([axiom_uses(delta, Time)], [if(hitGround(Object), (at(falling(Object), Time), at(height(Object, 0), Time)))]). % "% =================================". % Delta: % Happens(Drop(Nathan,Apple),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',57). % From E: % % '->'( % axiom_uses(delta,Axiom_Uses), % happens( % drop(nathan,apple), % t+0)). if axiom_uses(delta, _)then observe drop(nathan, apple)at t+0. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',57). /* reactive_rule([axiom_uses(delta,Axiom_Uses)], [observe(at(drop(nathan,apple),t+0))]). */ % "% =================================". %; 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/Mueller2006/Chapter7/FallingObjectWithEvents.e',62). % From E: % % '->'( % ','( % holds_at( % height(Object,Height1), % Time), % holds_at( % height(Object,Height2), % Time)), % equals(Height1,Height2)). if height(Object, Height1)at Time, height(Object, Height2)at Time then equals(Height1, Height2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',62). /* reactive_rule([ holds(height(Object,Height1),Time), holds(height(Object,Height2),Time) ], [equals(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/Mueller2006/Chapter7/FallingObjectWithEvents.e',69). % From E: % % '->'( % ','( % holds_at( % height(Object,Height1), % Time), % '-Pred'(Height1,Offset,Height2)), % trajectory( % falling(Object), % Time, Time, % height(Object,Height2), % Offset)). if height(Object, Height1)at Time, '-Pred'(Height1, Offset, Height2)then trajectory(falling(Object), Time, height(Object, Height2), Offset). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',69). /* reactive_rule([ holds(height(Object,Height1),Time), '-Pred'(Height1,Offset,Height2) ], [ trajectory(falling(Object), Time, height(Object,Height2), Offset) ]). */ % "% =================================". %; Gamma :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',76). % !HoldsAt(Falling(Apple),0). % From E: % % initially( % neg( % falling(apple))). initially not falling(apple). % initial_state([not(falling(apple))]). % "% =================================". % HoldsAt(Height(Apple,3),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',76). % From E: % % initially( % height(apple,3)). initially height(apple, 3). % initial_state([height(apple,3)]). % "% =================================". % completion Delta Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',78). % From E: % % completion(delta). completion(delta). % From E: % % completion(happens). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',78). completion(happens). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',81). % range time 0 5 % From E: % % range(time,0,5). range(time,0,5). % range height 0 3 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',81). % From E: % % range(height,0,3). range(height,0,3). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e',83). % range offset 1 3 % From E: % % range(offset,1,3). range(offset,1,3). %; End of file. % translate: ending File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter7/FallingObjectWithEvents.e.lps