:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/RussianTurkey.e',67). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.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{Thielscher:1997, %; author = "Michael Thielscher", %; year = "1997", %; title = "Ramification and causality", %; journal = "Artificial Intelligence", %; volume = "89", %; pages = "317--364", %; } %; %; @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: %; timestamps %; :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',39). % 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/ThielscherCircuit.e',41). % load foundations/ECCausal.e :- call_pel_directive(load('foundations/ECCausal.e')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',43). % event LightOn() event(lightOn()). % event Close1() event(close1()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',45). % event Open2() event(open2()). % event CloseRelay() event(closeRelay()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',48). % fluent Light() fluent(light()). % fluent Switch1() fluent(switch1()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',50). % fluent Switch2() fluent(switch2()). % fluent Switch3() fluent(switch3()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',52). % fluent Relay() fluent(relay()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',54). % [time] % Stopped(Light(),time) & % Initiated(Switch1(),time) & % Initiated(Switch2(),time) -> % Happens(LightOn(),time). stopped(light(), Time), initiated(switch1(), Time), initiated(switch2(), Time) -> happens_at(lightOn(), Time). % [time] % Started(Switch2(),time) & % Initiated(Relay(),time) -> % Happens(Open2(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',61). started(switch2(), Time), initiated(relay(), Time) -> happens_at(open2(), Time). % [time] % Stopped(Relay(),time) & % Initiated(Switch1(),time) & % Initiated(Switch3(),time) -> % Happens(CloseRelay(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',66). stopped(relay(), Time), initiated(switch1(), Time), initiated(switch3(), Time) -> happens_at(closeRelay(), Time). % [time] % Initiates(LightOn(),Light(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',70). initiates_at(lightOn(),light(),Time). % [time] % Terminates(Open2(),Switch2(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',72). terminates_at(open2(),switch2(),Time). % [time] % Initiates(CloseRelay(),Relay(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',74). initiates_at(closeRelay(),relay(),Time). % [time] % Initiates(Close1(),Switch1(),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',76). initiates_at(close1(),switch1(),Time). % !HoldsAt(Switch1(),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',78). holds_at(not(switch1()),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',80). % HoldsAt(Switch2(),0). holds_at(switch2(),0). % HoldsAt(Switch3(),0). holds_at(switch3(),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',82). % !HoldsAt(Relay(),0). holds_at(not(relay()),0). % !HoldsAt(Light(),0). holds_at(not(light()),0). % Happens(Close1(),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',84). happens_at(close1(),0). % completion Happens :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',86). :- call_pel_directive(completion(happens_at)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/Shanahan1999/ThielscherCircuit.e',89). % 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/Shanahan1999/ThielscherCircuit.pel')).