:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004a/Leaf.e',80). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.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 %; %; example of concurrent events with cumulative or canceling effects %; %; @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/Approve.e',25). % 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/Approve.e',28). % sort agent sort(agent). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',30). % event ApproveOf(agent,agent) event(approveOf(agent,agent)). % event DisapproveOf(agent,agent) event(disapproveOf(agent,agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',32). % fluent Happy(agent) fluent(happy(agent)). % fluent Confused(agent) fluent(confused(agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',35). % [agent1,agent2,time] % !Happens(DisapproveOf(agent1,agent2),time) -> % Initiates(ApproveOf(agent1,agent2),Happy(agent2),time). not(happens_at(disapproveOf(Agent1, Agent2), Time)) -> initiates_at(approveOf(Agent1, Agent2), happy(Agent2), Time). % [agent1,agent2,time] % !Happens(ApproveOf(agent1,agent2),time) -> % Terminates(DisapproveOf(agent1,agent2),Happy(agent2),time). not(happens_at(approveOf(Agent1, Agent2), Time)) -> terminates_at(disapproveOf(Agent1, Agent2), happy(Agent2), Time). % [agent1,agent2,time] % Happens(DisapproveOf(agent1,agent2),time) -> % Initiates(ApproveOf(agent1,agent2),Confused(agent2),time). happens_at(disapproveOf(Agent1, Agent2), Time) -> initiates_at(approveOf(Agent1, Agent2), confused(Agent2), Time). % agent James, Peter :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',46). t(agent,james). t(agent,peter). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',49). % [agent] % !HoldsAt(Happy(agent),0) & !HoldsAt(Confused(agent),0). holds_at(not(happy(Agent)), 0), holds_at(not(confused(Agent)), 0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',51). % Happens(ApproveOf(Peter,James),0). happens_at(approveOf(peter,james),0). % Happens(DisapproveOf(Peter,James),0). happens_at(disapproveOf(peter,james),0). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',53). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Mueller2004b/Approve.e',56). % range time 0 1 :- call_pel_directive(range(time, 0, 1)). % 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/Approve.pel')).