:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/CoinToss.e',67). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.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 %; %; @incollection{Shanahan:1999, %; author = "Shanahan, Murray", %; year = "1999", %; title = "The Event Calculus explained", %; editor = "Michael J. Wooldridge and Manuela M. Veloso", %; booktitle = "Artificial Intelligence Today: Recent Trends and Developments", %; series = "Lecture Notes in Computer Science", %; volume = "1600", %; pages = "409--430", %; address = "Berlin", %; publisher = "Springer", %; } %; %; deduction %; %; modifications from Shanahan's formulation: %; InitiallyN -> !HoldsAt %; InitiallyP -> HoldsAt %; timestamps %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',32). % 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/Shanahan1999/Happy.e',35). % sort person sort(person). % event Feed(person) event(feed(person)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',37). % event Clothe(person) event(clothe(person)). % fluent Happy(person) fluent(happy(person)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',39). % fluent Hungry(person) fluent(hungry(person)). % fluent Cold(person) fluent(cold(person)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',41). % noninertial Happy :- call_pel_directive(noninertial(happy)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',43). % [person,time] % HoldsAt(Happy(person),time) <-> % !HoldsAt(Hungry(person),time) & % !HoldsAt(Cold(person),time). holds_at(happy(Person), Time) <-> holds_at(not(hungry(Person)), Time), holds_at(not(cold(Person)), Time). % [person,time] % Terminates(Feed(person),Hungry(person),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',49). terminates_at(feed(Person),hungry(Person),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',51). % [person,time] % Terminates(Clothe(person),Cold(person),time). terminates_at(clothe(Person),cold(Person),Time). % person Fred :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',53). t(person,fred). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',56). % HoldsAt(Hungry(Fred),0). holds_at(hungry(fred),0). % !HoldsAt(Cold(Fred),0). holds_at(not(cold(fred)),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',58). % Happens(Feed(Fred),1). happens_at(feed(fred),1). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',60). % completion Happens :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/Happy.e',62). % range time 0 2 :- call_pel_directive(range(time, 0, 2)). % 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/Shanahan1999/Happy.pel')).