:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/DefaultLocation.e',112). % translate: unskipped File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e.lps :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(lps). % translate: begining File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e.lps % Fri, 09 Oct 2020 15:13:56 GMT File: (0x5625a977b600)%; %; 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/Chapter12/Device.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/Chapter12/Device.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/Chapter12/Device.e',23). % sort agent % From E: % % sort(agent). sort(agent). % sort device :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',23). % From E: % % sort(device). sort(device). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',26). % agent Nathan % From E: % % t(agent,nathan). agent(nathan). % device Device1, AntiqueDevice1 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',26). % From E: % % t(device,device1). device(device1). % From E: % % t(device,antiqueDevice1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',26). device(antiqueDevice1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',29). % predicate Ab1(device,time) % From E: % % predicate( % ab1(device,time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',29). predicates([ab1/2]). % From E: % % mpred_prop( % ab1(device,time), % predicate). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',29). mpred_prop(ab1(device,time),predicate). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',31). % fluent On(device) % From E: % % fluent( % on(device)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',31). fluents([on/1]). % From E: % % mpred_prop( % on(device), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',31). mpred_prop(on(device),fluent). % fluent PluggedIn(device) % From E: % % fluent( % pluggedIn(device)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',31). fluents([pluggedIn/1]). % From E: % % mpred_prop( % pluggedIn(device), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',31). mpred_prop(pluggedIn(device),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',33). % fluent BrokenSwitch(device) % From E: % % fluent( % brokenSwitch(device)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',33). fluents([brokenSwitch/1]). % From E: % % mpred_prop( % brokenSwitch(device), % fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',33). mpred_prop(brokenSwitch(device),fluent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',35). % event TurnOn(agent,device) % From E: % % event( % turnOn(agent,device)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',35). events([turnOn/2]). % From E: % % mpred_prop( % turnOn(agent,device), % event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',35). mpred_prop(turnOn(agent,device),event). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',37). %; Sigma % [agent,device,time] % !Ab1(device,time) -> % Initiates(TurnOn(agent,device),On(device),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',39). % From E: % % '->'( % not( % ab1(Device,Time)), % initiates( % turnOn(Agent,Device), % on(Device), % Time)). turnOn(Agent, Device)initiates on(Device)at Time if not ab1(Device, Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',39). /* initiated(happens(turnOn(Agent,Device), Time_From, Time_Until), at(on(Device),Time), [not(ab1(Device,Time))]). */ % "% =================================". %; Delta :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',45). % Happens(TurnOn(Nathan,Device1),0). % From E: % % happens( % turnOn(nathan,device1), % t+0). observe turnOn(nathan, device1)at t+0. % observe([turnOn(nathan,device1)],t+0). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',47). %; Theta :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',49). % Theta: % [device,time] % HoldsAt(BrokenSwitch(device),time) -> Ab1(device,time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',49). % From E: % % '->'( % axiom_uses(theta,Time), % '->'( % holds_at( % brokenSwitch(Device), % Time), % ab1(Device,Time))). if axiom_uses(theta, Time)then ab1(Device, Time)if brokenSwitch(Device)at Time. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',49). /* reactive_rule([axiom_uses(theta,Time)], [ if(ab1(Device,Time), at(brokenSwitch(Device),Time)) ]). */ % "% =================================". % Theta: % [device,time] % !HoldsAt(PluggedIn(device),time) -> Ab1(device,time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',49). % From E: % % '->'( % axiom_uses(theta,Time), % '->'( % holds_at( % not( % pluggedIn(Device)), % Time), % ab1(Device,Time))). if axiom_uses(theta, Time)then ab1(Device, Time)if not pluggedIn(Device)at Time. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',49). /* reactive_rule([axiom_uses(theta,Time)], [ if(ab1(Device,Time), at(not(pluggedIn(Device)),Time)) ]). */ % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',51). % Theta: % [time] % Ab1(AntiqueDevice1,time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',51). % From E: % % '->'( % axiom_uses(theta,Axiom_Uses), % ab1(antiqueDevice1,Time)). if axiom_uses(theta, _)then ab1(antiqueDevice1, Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',51). /* reactive_rule([axiom_uses(theta,Axiom_Uses)], [ab1(antiqueDevice1,Time)]). */ % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',53). %; Gamma :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',55). % !HoldsAt(On(Device1),0). % From E: % % initially( % neg( % on(device1))). initially not on(device1). % initial_state([not(on(device1))]). % "% =================================". % !HoldsAt(BrokenSwitch(Device1),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',55). % From E: % % initially( % neg( % brokenSwitch(device1))). initially not brokenSwitch(device1). % initial_state([not(brokenSwitch(device1))]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',57). % HoldsAt(PluggedIn(Device1),0). % From E: % % initially( % pluggedIn(device1)). initially pluggedIn(device1). % initial_state([pluggedIn(device1)]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',59). %; added: % [time] % !HoldsAt(On(AntiqueDevice1),time). % From E: % % holds_at( % neg( % on(antiqueDevice1)), % Time). not on(antiqueDevice1)at Time. % l_int(holds(not(on(antiqueDevice1)),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',61). % [time] % HoldsAt(PluggedIn(AntiqueDevice1),time). % From E: % % holds_at( % pluggedIn(antiqueDevice1), % Time). pluggedIn(antiqueDevice1)at Time. % l_int(holds(pluggedIn(antiqueDevice1),Time),[]). % "% =================================". :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',63). %; entailed: %; HoldsAt(On(Device1),1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',66). % completion Theta Ab1 % From E: % % completion(theta). completion(theta). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',66). % From E: % % completion(ab1). completion(ab1). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',66). % From E: % % completion(happens). completion(happens). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',69). % range time 0 1 % From E: % % range(time,0,1). range(time,0,1). % range offset 1 1 :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e',69). % From E: % % range(offset,1,1). range(offset,1,1). %; End of file. % translate: ending File: /pack/logicmoo_ec/ext/ec_sources/examples/Mueller2006/Chapter12/Device.e.lps