1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'ecnet/Container.e').
    4%;
    5%; Copyright (c) 2005 IBM Corporation and others.
    6%; All rights reserved. This program and the accompanying materials
    7%; are made available under the terms of the Common Public License v1.0
    8%; which accompanies this distribution, and is available at
    9%; http://www.eclipse.org/legal/cpl-v10.html
   10%;
   11%; Contributors:
   12%; IBM - Initial implementation
   13%;
   14%;
   15%; Container: container
   16%;
   17%; linkage to OTSpace(M):
   18% [agent,container1,container2,time]
   19% Happens(TakeOutOf(agent,container1,container2),time) ->
   20% HoldsAt(ContainerIsOpen(container2),time).
   21axiom(requires(takeOutOf(Agent, Container1, Container2), Time),
   22    [holds_at(containerIsOpen(Container2), Time)]).
   23
   24
   25% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:19
   26% [agent,container1,container2,time]
   27% Happens(PutInside(agent,container1,container2),time) ->
   28% HoldsAt(ContainerIsOpen(container2),time).
   29% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:21
   30axiom(requires(putInside(Agent, Container1, Container2), Time),
   31    [holds_at(containerIsOpen(Container2), Time)]).
   32
   33
   34% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:23
   35%; agent opens container.
   36
   37% event ContainerOpen(agent,container)
   38 %  event(containerOpen(agent,container)).
   39% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:25
   40==> mpred_prop(containerOpen(agent,container),event).
   41==> meta_argtypes(containerOpen(agent,container)).
   42
   43
   44% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:26
   45%; agent closes container.
   46
   47% event ContainerClose(agent,container)
   48 %  event(containerClose(agent,container)).
   49% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:28
   50==> mpred_prop(containerClose(agent,container),event).
   51==> meta_argtypes(containerClose(agent,container)).
   52
   53
   54% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:29
   55%; container is open.
   56
   57% fluent ContainerIsOpen(container)
   58 %  fluent(containerIsOpen(container)).
   59% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:31
   60==> mpred_prop(containerIsOpen(container),fluent).
   61==> meta_argtypes(containerIsOpen(container)).
   62
   63% fluent ContainerClosed(container)
   64 %  fluent(containerClosed(container)).
   65% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:33
   66==> mpred_prop(containerClosed(container),fluent).
   67==> meta_argtypes(containerClosed(container)).
   68
   69% noninertial ContainerClosed
   70% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:34
   71==> noninertial(containerClosed).
   72
   73
   74% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:35
   75% [container,time]
   76% HoldsAt(ContainerClosed(container),time) <->
   77% !HoldsAt(ContainerIsOpen(container),time).
   78
   79 /*  holds_at(containerClosed(Container), Time) <->
   80       not(holds_at(containerIsOpen(Container), Time)).
   81 */
   82% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:37
   83axiom(holds_at(containerClosed(Container), Time),
   84    [not(holds_at(containerIsOpen(Container), Time))]).
   85axiom(not(holds_at(containerIsOpen(Container), Time)),
   86    [holds_at(containerClosed(Container), Time)]).
   87
   88
   89% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:39
   90%; A precondition axiom states that
   91%; for an agent to open a container,
   92%; the agent must be awake,
   93%; the container must not already be open, and
   94%; the agent must be holding the container.
   95% [agent,container,time]
   96% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:45
   97% Happens(ContainerOpen(agent,container),time) ->
   98% HoldsAt(Awake(agent),time) &
   99% !HoldsAt(ContainerIsOpen(container),time) &
  100% HoldsAt(Holding(agent,container),time).
  101% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:48
  102axiom(requires(containerOpen(Agent, Container), Time),
  103   
  104    [ holds_at(awake(Agent), Time),
  105      not(holds_at(containerIsOpen(Container), Time)),
  106      holds_at(holding(Agent, Container), Time)
  107    ]).
  108
  109
  110% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:50
  111%; An effect axiom states that
  112%; if an agent opens a container,
  113%; the container will be open:
  114% [agent,container,time]
  115% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:54
  116% Initiates(ContainerOpen(agent,container),ContainerIsOpen(container),time).
  117axiom(initiates(containerOpen(Agent, Container), containerIsOpen(Container), Time),
  118    []).
  119
  120
  121% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:56
  122%; A precondition axiom states that
  123%; for an agent to close a container,
  124%; the agent must be awake,
  125%; the container must be open, and
  126%; the agent must be holding the container.
  127% [agent,container,time]
  128% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:62
  129% Happens(ContainerClose(agent,container),time) ->
  130% HoldsAt(Awake(agent),time) &
  131% HoldsAt(ContainerIsOpen(container),time) &
  132% HoldsAt(Holding(agent,container),time).
  133% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:65
  134axiom(requires(containerClose(Agent, Container), Time),
  135   
  136    [ holds_at(awake(Agent), Time),
  137      holds_at(containerIsOpen(Container), Time),
  138      holds_at(holding(Agent, Container), Time)
  139    ]).
  140
  141
  142% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:67
  143%; An effect axiom states that
  144%; if an agent closes a container,
  145%; the container will no longer be open:
  146% [agent,container,time]
  147% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:71
  148% Terminates(ContainerClose(agent,container),ContainerIsOpen(container),time).
  149axiom(terminates(containerClose(Agent, Container), containerIsOpen(Container), Time),
  150    []).
  151
  152
  153% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ecnet/Container.e:73
  154%; End of file.