1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'examples/Mueller2006/Chapter12/ErraticDevice.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% fluent Erratic(device)
   60 %  fluent(erratic(device)).
   61==> mpred_prop(erratic(device),fluent).
   62==> meta_argtypes(erratic(device)).
   63
   64% fluent DeterminingFluent(device)
   65 %  fluent(determiningFluent(device)).
   66==> mpred_prop(determiningFluent(device),fluent).
   67==> meta_argtypes(determiningFluent(device)).
   68
   69% noninertial DeterminingFluent
   70==> noninertial(determiningFluent).
   71
   72% event TurnOn(agent,device)
   73 %  event(turnOn(agent,device)).
   74==> mpred_prop(turnOn(agent,device),event).
   75==> meta_argtypes(turnOn(agent,device)).
   76
   77
   78% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:40
   79%; Sigma
   80% [agent,device,time]
   81% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:43
   82% !Ab1(device,time) ->
   83% Initiates(TurnOn(agent,device),On(device),time).
   84% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:44
   85axiom(initiates(turnOn(Agent, Device), on(Device), Time),
   86    [not(ab1(Device, Time))]).
   87
   88
   89% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:46
   90%; Delta
   91
   92
   93% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:48
   94% Happens(TurnOn(Nathan,Device1),0).
   95axiom(happens(turnOn(nathan, device1), t),
   96    [is_time(0)]).
   97
   98
   99% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:50
  100%; Theta
  101
  102% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:53
  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/ErraticDevice.e:53
  109% [device,time]
  110 % HoldsAt(BrokenSwitch(device),time) -> Ab1(device,time).
  111axiom(ab1(Device, Time),
  112    [holds_at(brokenSwitch(Device), Time)]).
  113
  114% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:54
  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/ErraticDevice.e:54
  121% [device,time]
  122% HoldsAt(Erratic(device),time) & HoldsAt(DeterminingFluent(device),time) ->
  123% Ab1(device,time).
  124% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:56
  125axiom(ab1(Device, Time),
  126   
  127    [ holds_at(erratic(Device), Time),
  128      holds_at(determiningFluent(Device), Time)
  129    ]).
  130
  131% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:58
  132% Theta: 
  133next_axiom_uses(theta).
  134 
  135
  136
  137% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:58
  138% [device,time]
  139 % !HoldsAt(PluggedIn(device),time) -> Ab1(device,time).
  140axiom(ab1(Device, Time),
  141    [not(holds_at(pluggedIn(Device), Time))]).
  142
  143
  144% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:60
  145%; Gamma
  146
  147
  148% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:62
  149% !HoldsAt(On(Device1),0).
  150 %  not(initially(on(device1))).
  151axiom(not(initially(on(device1))),
  152    []).
  153
  154
  155% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:63
  156% !HoldsAt(BrokenSwitch(Device1),0).
  157 %  not(initially(brokenSwitch(device1))).
  158axiom(not(initially(brokenSwitch(device1))),
  159    []).
  160
  161
  162% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:64
  163% HoldsAt(Erratic(Device1),0).
  164axiom(initially(erratic(device1)),
  165    []).
  166
  167
  168% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:65
  169% HoldsAt(PluggedIn(Device1),0).
  170axiom(initially(pluggedIn(device1)),
  171    []).
  172
  173
  174% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:67
  175%; added:
  176
  177
  178% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:68
  179% HoldsAt(DeterminingFluent(Device1),1).
  180holds_at(determiningFluent(device1),1).
  181
  182% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:70
  183% completion Theta Ab1
  184% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:71
  185==> completion(theta).
  186==> completion(ab1).
  187
  188% completion Happens
  189% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:72
  190==> completion(happens).
  191
  192% range time 0 1
  193% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:74
  194==> range(time,0,1).
  195
  196% range offset 1 1
  197% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/examples/Mueller2006/Chapter12/ErraticDevice.e:75
  198==> range(offset,1,1).
  199%; End of file.