1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'examples/Mueller2006/Chapter12/Device.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%; @book{Mueller:2006,
   15%;   author = "Erik T. Mueller",
   16%;   year = "2006",
   17%;   title = "Commonsense Reasoning",
   18%;   address = "San Francisco",
   19%;   publisher = "Morgan Kaufmann/Elsevier",
   20%; }
   21%;
   22
   23% load foundations/Root.e
   24
   25% load foundations/EC.e
   26
   27% sort agent
   28==> sort(agent).
   29
   30% sort device
   31==> sort(device).
   32
   33% agent Nathan
   34==> t(agent,nathan).
   35
   36% device Device1, AntiqueDevice1
   37==> t(device,device1).
   38==> t(device,antiqueDevice1).
   39
   40% predicate Ab1(device,time)
   41 %  predicate(ab1(device,time)).
   42==> mpred_prop(ab1(device,time),predicate).
   43==> meta_argtypes(ab1(device,time)).
   44
   45% fluent On(device)
   46 %  fluent(on(device)).
   47==> mpred_prop(on(device),fluent).
   48==> meta_argtypes(on(device)).
   49
   50% fluent PluggedIn(device)
   51 %  fluent(pluggedIn(device)).
   52==> mpred_prop(pluggedIn(device),fluent).
   53==> meta_argtypes(pluggedIn(device)).
   54
   55% fluent BrokenSwitch(device)
   56 %  fluent(brokenSwitch(device)).
   57==> mpred_prop(brokenSwitch(device),fluent).
   58==> meta_argtypes(brokenSwitch(device)).
   59
   60% event TurnOn(agent,device)
   61 %  event(turnOn(agent,device)).
   62==> mpred_prop(turnOn(agent,device),event).
   63==> meta_argtypes(turnOn(agent,device)).
   64
   65
   66% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:36
   67%; Sigma
   68% [agent,device,time]
   69% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:39
   70% !Ab1(device,time) ->
   71% Initiates(TurnOn(agent,device),On(device),time).
   72% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:40
   73axiom(initiates(turnOn(Agent, Device), on(Device), Time),
   74    [not(ab1(Device, Time))]).
   75
   76
   77% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:42
   78%; Delta
   79
   80
   81% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:44
   82% Happens(TurnOn(Nathan,Device1),0).
   83axiom(happens(turnOn(nathan, device1), t),
   84    [is_time(0)]).
   85
   86
   87% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:46
   88%; Theta
   89
   90% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:48
   91% Theta: 
   92next_axiom_uses(theta).
   93 
   94
   95
   96% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:48
   97% [device,time]
   98 % HoldsAt(BrokenSwitch(device),time) -> Ab1(device,time).
   99axiom(ab1(Device, Time),
  100    [holds_at(brokenSwitch(Device), Time)]).
  101
  102% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:49
  103% Theta: 
  104next_axiom_uses(theta).
  105 
  106
  107
  108% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:49
  109% [device,time]
  110 % !HoldsAt(PluggedIn(device),time) -> Ab1(device,time).
  111axiom(ab1(Device, Time),
  112    [not(holds_at(pluggedIn(Device), Time))]).
  113
  114% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:50
  115% Theta: 
  116next_axiom_uses(theta).
  117 
  118
  119
  120% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:50
  121% [time]
  122 % Ab1(AntiqueDevice1,time).
  123ab1(antiqueDevice1,Time).
  124
  125
  126% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:52
  127%; Gamma
  128
  129
  130% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:54
  131% !HoldsAt(On(Device1),0).
  132 %  not(initially(on(device1))).
  133axiom(not(initially(on(device1))),
  134    []).
  135
  136
  137% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:55
  138% !HoldsAt(BrokenSwitch(Device1),0).
  139 %  not(initially(brokenSwitch(device1))).
  140axiom(not(initially(brokenSwitch(device1))),
  141    []).
  142
  143
  144% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:56
  145% HoldsAt(PluggedIn(Device1),0).
  146axiom(initially(pluggedIn(device1)),
  147    []).
  148
  149
  150% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:58
  151%; added:
  152% [time]
  153 % !HoldsAt(On(AntiqueDevice1),time).
  154 %  not(holds_at(on(antiqueDevice1),Time)).
  155% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:59
  156axiom(not(holds_at(on(antiqueDevice1), Time1)),
  157    []).
  158
  159
  160% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:60
  161% [time]
  162 % HoldsAt(PluggedIn(AntiqueDevice1),time).
  163holds_at(pluggedIn(antiqueDevice1),Time).
  164
  165
  166% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:62
  167%; entailed:
  168%; HoldsAt(On(Device1),1).
  169
  170% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:65
  171% completion Theta Ab1
  172% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:66
  173==> completion(theta).
  174==> completion(ab1).
  175
  176% completion Happens
  177% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:67
  178==> completion(happens).
  179
  180% range time 0 1
  181% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:69
  182==> range(time,0,1).
  183
  184% range offset 1 1
  185% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/Device.e:70
  186==> range(offset,1,1).
  187%; End of file.