:-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Cognition.e',20). :- call_pel_directive(translate(unskipped, '/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.pel')). :-include(library('ec_planner/ec_test_incl')). :-expects_dialect(ecalc). :- call_pel_directive(translate(begining, '/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.pel')). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Cognition.e',20). %; %; 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 %; %; human health :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',13). % fluent Alive(agent) fluent(alive(agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',15). % fluent Dead(agent) fluent(dead(agent)). % noninertial Dead :- call_pel_directive(noninertial(dead)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',18). % fluent Injured(agent) fluent(injured(agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',20). % event Kill(object,agent) event(kill(object,agent)). % event Injure(object,agent) event(injure(object,agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',22). % event HealInjured(agent) event(healInjured(agent)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',24). % [agent,time] % HoldsAt(Alive(agent),time) <-> !HoldsAt(Dead(agent),time). holds_at(alive(Agent), Time) <-> holds_at(not(dead(Agent)), Time). % [agent,time] % HoldsAt(Injured(agent),time) -> HoldsAt(Alive(agent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',24). holds_at(injured(Agent), Time) -> holds_at(alive(Agent), Time). % [object,agent,time] % Terminates(Kill(object,agent),Alive(agent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',28). terminates_at(kill(Object,Agent), alive(Agent), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',30). % [object,agent,time] % Initiates(Injure(object,agent),Injured(agent),time). initiates_at(injure(Object,Agent), injured(Agent), Time). % [agent,time] % Terminates(HealInjured(agent),Injured(agent),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',34). terminates_at(healInjured(Agent),injured(Agent),Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',36). % fluent Intact(physobj) fluent(intact(physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',38). % fluent Damaged(physobj) fluent(damaged(physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',40). % fluent Destroyed(physobj) fluent(destroyed(physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',42). %; At any time, a physical object is either intact, damaged, or destroyed: % xor Intact, Damaged, Destroyed xor([intact,damaged,destroyed]). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',45). % event Damage(object,physobj) event(damage(object,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',47). % event Destroy(object,physobj) event(destroy(object,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',49). % event Repair(object,physobj) event(repair(object,physobj)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',51). % [object,physobj,time] % Happens(Damage(object,physobj),time) -> % HoldsAt(Intact(physobj),time). happens_at(damage(Object, Physobj), Time) -> holds_at(intact(Physobj), Time). % [object,physobj,time] % Initiates(Damage(object,physobj),Damaged(physobj),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',56). initiates_at(damage(Object,Physobj), damaged(Physobj), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',58). % [object,physobj,time] % Terminates(Damage(object,physobj),Intact(physobj),time). terminates_at(damage(Object,Physobj), intact(Physobj), Time). % [object,physobj,time] % Happens(Destroy(object,physobj),time) -> % (HoldsAt(Intact(physobj),time)| % HoldsAt(Damaged(physobj),time)). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',62). happens_at(destroy(Object, Physobj), Time) -> ( holds_at(intact(Physobj), Time) ; holds_at(damaged(Physobj), Time) ). % [object,physobj,time] % Initiates(Destroy(object,physobj),Destroyed(physobj),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',67). initiates_at(destroy(Object,Physobj), destroyed(Physobj), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',69). % [object,physobj,time] % Terminates(Destroy(object,physobj),Intact(physobj),time). terminates_at(destroy(Object,Physobj), intact(Physobj), Time). % [object,physobj,time] % Terminates(Destroy(object,physobj),Damaged(physobj),time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',73). terminates_at(destroy(Object,Physobj), damaged(Physobj), Time). :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',75). % [object,physobj,time] % Initiates(Repair(object,physobj),Intact(physobj),time). initiates_at(repair(Object,Physobj), intact(Physobj), Time). %; end of file. :-was_s_l('/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.e',77). :- call_pel_directive(translate(ending, '/pack/logicmoo_ec/ext/ec_sources/ecnet/Condition.pel')).