1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'examples/Mueller2006/Chapter12/BrokenDevice.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
   37==> t(device,device1).
   38
   39% predicate Ab1(device,time)
   40 %  predicate(ab1(device,time)).
   41==> mpred_prop(ab1(device,time),predicate).
   42==> meta_argtypes(ab1(device,time)).
   43
   44% fluent On(device)
   45 %  fluent(on(device)).
   46==> mpred_prop(on(device),fluent).
   47==> meta_argtypes(on(device)).
   48
   49% fluent PluggedIn(device)
   50 %  fluent(pluggedIn(device)).
   51==> mpred_prop(pluggedIn(device),fluent).
   52==> meta_argtypes(pluggedIn(device)).
   53
   54% fluent BrokenSwitch(device)
   55 %  fluent(brokenSwitch(device)).
   56==> mpred_prop(brokenSwitch(device),fluent).
   57==> meta_argtypes(brokenSwitch(device)).
   58
   59% event TurnOn(agent,device)
   60 %  event(turnOn(agent,device)).
   61==> mpred_prop(turnOn(agent,device),event).
   62==> meta_argtypes(turnOn(agent,device)).
   63
   64
   65% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:36
   66%; Sigma
   67% [agent,device,time]
   68% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:39
   69% !Ab1(device,time) ->
   70% Initiates(TurnOn(agent,device),On(device),time).
   71% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:40
   72axiom(initiates(turnOn(Agent, Device), on(Device), Time),
   73    [not(ab1(Device, Time))]).
   74
   75
   76% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:42
   77%; Delta
   78
   79
   80% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:44
   81% Happens(TurnOn(Nathan,Device1),0).
   82axiom(happens(turnOn(nathan, device1), t),
   83    [is_time(0)]).
   84
   85
   86% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:46
   87%; Theta
   88
   89% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:48
   90% Theta: 
   91next_axiom_uses(theta).
   92 
   93
   94
   95% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:48
   96% [device,time]
   97 % HoldsAt(BrokenSwitch(device),time) -> Ab1(device,time).
   98axiom(ab1(Device, Time),
   99    [holds_at(brokenSwitch(Device), Time)]).
  100
  101% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:49
  102% Theta: 
  103next_axiom_uses(theta).
  104 
  105
  106
  107% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:49
  108% [device,time]
  109 % !HoldsAt(PluggedIn(device),time) -> Ab1(device,time).
  110axiom(ab1(Device, Time),
  111    [not(holds_at(pluggedIn(Device), Time))]).
  112
  113
  114% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:51
  115%; Gamma
  116
  117
  118% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:53
  119% !HoldsAt(On(Device1),0).
  120 %  not(initially(on(device1))).
  121axiom(not(initially(on(device1))),
  122    []).
  123
  124
  125% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:54
  126% HoldsAt(BrokenSwitch(Device1),0).
  127axiom(initially(brokenSwitch(device1)),
  128    []).
  129
  130
  131% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:56
  132%; added:
  133
  134
  135% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:57
  136% HoldsAt(PluggedIn(Device1),0).
  137axiom(initially(pluggedIn(device1)),
  138    []).
  139
  140
  141% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:59
  142%; entailed:
  143%; !HoldsAt(On(Device1),1).
  144
  145% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:62
  146% completion Theta Ab1
  147% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:63
  148==> completion(theta).
  149==> completion(ab1).
  150
  151% completion Happens
  152% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:64
  153==> completion(happens).
  154
  155% range time 0 1
  156% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:66
  157==> range(time,0,1).
  158
  159% range offset 1 1
  160% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/BrokenDevice.e:67
  161==> range(offset,1,1).
  162%; End of file.