1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'examples/Mueller2006/Chapter7/HotAirBalloon.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%; @article{MillerShanahan:1999,
   15%;   author = "Rob Miller and Murray Shanahan",
   16%;   year = "1999",
   17%;   title = "The event calculus in classical logic---\uppercase{A}lternative axiomatisations",
   18%;   journal = "Link{\"{o}}ping Electronic Articles in Computer and Information Science",
   19%;   volume = "4",
   20%;   number = "016",
   21%; }
   22%;
   23%; @book{Mueller:2006,
   24%;   author = "Erik T. Mueller",
   25%;   year = "2006",
   26%;   title = "Commonsense Reasoning",
   27%;   address = "San Francisco",
   28%;   publisher = "Morgan Kaufmann/Elsevier",
   29%; }
   30%;
   31
   32% option encoding 3
   33:- set_ec_option(encoding, 3).   34
   35% option trajectory on
   36:- set_ec_option(trajectory, on).   37
   38% load foundations/Root.e
   39
   40% load foundations/EC.e
   41
   42% sort balloon
   43==> sort(balloon).
   44
   45% sort agent
   46==> sort(agent).
   47
   48% sort height: integer
   49==> subsort(height,integer).
   50
   51% agent Nathan
   52==> t(agent,nathan).
   53
   54% balloon Balloon
   55==> t(balloon,balloon).
   56
   57% fluent HeaterOn(balloon)
   58 %  fluent(heaterOn(balloon)).
   59==> mpred_prop(heaterOn(balloon),fluent).
   60==> meta_argtypes(heaterOn(balloon)).
   61
   62% fluent Height(balloon,height)
   63 %  fluent(height(balloon,height)).
   64==> mpred_prop(height(balloon,height),fluent).
   65==> meta_argtypes(height(balloon,height)).
   66
   67% noninertial Height
   68==> noninertial(height).
   69
   70% event TurnOnHeater(agent,balloon)
   71 %  event(turnOnHeater(agent,balloon)).
   72==> mpred_prop(turnOnHeater(agent,balloon),event).
   73==> meta_argtypes(turnOnHeater(agent,balloon)).
   74
   75% event TurnOffHeater(agent,balloon)
   76 %  event(turnOffHeater(agent,balloon)).
   77==> mpred_prop(turnOffHeater(agent,balloon),event).
   78==> meta_argtypes(turnOffHeater(agent,balloon)).
   79
   80
   81% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:48
   82%; Sigma
   83% [agent,balloon,time]
   84% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:51
   85% Initiates(TurnOnHeater(agent,balloon),HeaterOn(balloon),time).
   86axiom(initiates(turnOnHeater(Agent, Balloon), heaterOn(Balloon), Time),
   87    []).
   88
   89
   90% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:53
   91% [agent,balloon,time]
   92% Terminates(TurnOffHeater(agent,balloon),HeaterOn(balloon),time).
   93% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:54
   94axiom(terminates(turnOffHeater(Agent, Balloon), heaterOn(Balloon), Time),
   95    []).
   96
   97
   98% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:56
   99%; Delta
  100
  101% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:58
  102% Delta: 
  103next_axiom_uses(delta).
  104 
  105
  106
  107% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:58
  108% Happens(TurnOnHeater(Nathan,Balloon),0).
  109axiom(happens(turnOnHeater(nathan, balloon), t),
  110    [is_time(0)]).
  111
  112% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:59
  113% Delta: 
  114next_axiom_uses(delta).
  115 
  116
  117
  118% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:59
  119% Happens(TurnOffHeater(Nathan,Balloon),2).
  120axiom(happens(turnOffHeater(nathan, balloon), t2),
  121    [is_time(2), b(t, t2), ignore(t+2=t2)]).
  122
  123
  124% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:61
  125%; Psi
  126% [balloon,height1,height2,time]
  127% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:64
  128% HoldsAt(Height(balloon,height1),time) &
  129% HoldsAt(Height(balloon,height2),time) ->
  130% height1=height2.
  131% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:66
  132axiom(Height1=Height2,
  133   
  134    [ holds_at(height(Balloon, Height1), Time),
  135      holds_at(height(Balloon, Height2), Time)
  136    ]).
  137
  138
  139% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:68
  140%; Pi
  141% [balloon,height1,height2,offset,time]
  142% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:71
  143% HoldsAt(Height(balloon,height1),time) &
  144% height2 = (height1 + offset) ->
  145% Trajectory(HeaterOn(balloon),time,Height(balloon,height2),offset).
  146% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:73
  147axiom(trajectory(heaterOn(Balloon), Time, height(Balloon, Height2), Offset),
  148   
  149    [ holds_at(height(Balloon, Height1), Time),
  150      equals(Height2, Height1+Offset)
  151    ]).
  152
  153
  154% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:75
  155% [balloon,height1,height2,offset,time]
  156% HoldsAt(Height(balloon,height1),time) &
  157% height2 = (height1 - offset) ->
  158% AntiTrajectory(HeaterOn(balloon),time,Height(balloon,height2),offset).
  159% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:78
  160axiom(antiTrajectory(heaterOn(Balloon), Time, height(Balloon, Height2), Offset),
  161   
  162    [ holds_at(height(Balloon, Height1), Time),
  163      equals(Height2, Height1-Offset)
  164    ]).
  165
  166
  167% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:80
  168%; Gamma
  169
  170
  171% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:82
  172% HoldsAt(Height(Balloon,0),0).
  173axiom(initially(height(balloon, 0)),
  174    []).
  175
  176
  177% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:84
  178%; added:
  179
  180
  181% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:85
  182% !HoldsAt(HeaterOn(Balloon),0).
  183 %  not(initially(heaterOn(balloon))).
  184axiom(not(initially(heaterOn(balloon))),
  185    []).
  186
  187% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:87
  188% completion Delta Happens
  189% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:88
  190==> completion(delta).
  191==> completion(happens).
  192
  193% range time 0 3
  194% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:90
  195==> range(time,0,3).
  196
  197% range height 0 2
  198% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:91
  199==> range(height,0,2).
  200
  201% range offset 1 2
  202% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter7/HotAirBalloon.e:92
  203==> range(offset,1,2).
  204%; End of file.