:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/HotAirBalloon3.e',95). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.pel')). % load foundations/Root.e :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',1). :- 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/ecasp-decreasoner/KitchenSink.e',4). % sort height: integer subsort(height,integer). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',6). % event TapOn() event(tapOn()). % event TapOff() event(tapOff()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',8). % event Overflow() event(overflow()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',10). % fluent Filling() fluent(filling()). % fluent HasHeight(height) fluent(hasHeight(height)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',12). % fluent Spilling() fluent(spilling()). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',14). % range time 0 25 :- call_pel_directive(range(time, 0, 25)). % range height 0 20 :- call_pel_directive(range(height, 0, 20)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',16). % range offset 1 20 :- call_pel_directive(range(offset, 1, 20)). % [time] % (Initiates(TapOn(), Filling(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',20). initiates_at(tapOn(),filling(),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',22). % [time] % (Terminates(TapOff(), Filling(), time)). terminates_at(tapOff(),filling(),Time). % [height, time] % (Releases(TapOn(), HasHeight(height), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',26). releases_at(tapOn(),hasHeight(Height),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',28). % [height, time] % (HoldsAt(HasHeight(height), time) -> % Initiates(TapOff(), HasHeight(height), time)). holds_at(hasHeight(Height), Time) -> initiates_at(tapOff(), hasHeight(Height), Time). % [time] % (Terminates(Overflow(), Filling(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',33). terminates_at(overflow(),filling(),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',35). % [height, time] % (HoldsAt(HasHeight(height), time) -> % Initiates(Overflow(), HasHeight(height), time)). holds_at(hasHeight(Height), Time) -> initiates_at(overflow(), hasHeight(Height), Time). % [time] % (Initiates(Overflow(), Spilling(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',40). initiates_at(overflow(),spilling(),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',42). % [height1, height2, offset, time] % (HoldsAt(HasHeight(height1), time) & % height2 = (height1 + offset) -> % Trajectory(Filling(), time, HasHeight(height2), offset)). holds_at(hasHeight(Height1), Time), Height2=Height1+Offset -> trajectory(filling(), Time, hasHeight(Height2), Offset). % [height1, height2, time] % (HoldsAt(HasHeight(height1), time) & % HoldsAt(HasHeight(height2), time) -> % height1=height2). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',48). holds_at(hasHeight(Height1), Time), holds_at(hasHeight(Height2), Time) -> Height1=Height2. % [time] % (HoldsAt(HasHeight(10), time) & % HoldsAt(Filling(), time) -> % Happens(Overflow(), time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',53). holds_at(hasHeight(10), Time), holds_at(filling(), Time) -> happens_at(overflow(), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',58). % HoldsAt(HasHeight(0), 0). holds_at(hasHeight(0),0). % !HoldsAt(Filling(), 0). holds_at(not(filling()),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',60). % !HoldsAt(Spilling(), 0). holds_at(not(spilling()),0). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',62). % Happens(TapOn(), 5). happens_at(tapOn(),5). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.e',64). % completion Happens :- call_pel_directive(completion(happens_at)). %; End of File :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/examples/ecasp-decreasoner/KitchenSink.pel')).