1:-include(library('ec_planner/ec_test_incl')).    2:-expects_dialect(pfc).    3 %  loading(always,'ectest/ec_reader_test_foundations.e').
    4%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    5%; FILE: foundations/Root.e
    6%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    7%;
    8%; Copyright (c) 2005 IBM Corporation and others.
    9%; All rights reserved. This program and the accompanying materials
   10%; are made available under the terms of the Common Public License v1.0
   11%; which accompanies this distribution, and is available at
   12%; http://www.eclipse.org/legal/cpl-v10.html
   13%;
   14%; Contributors:
   15%; IBM - Initial implementation
   16%;
   17
   18% sort boolean
   19==> sort(boolean).
   20
   21% sort integer
   22==> sort(integer).
   23
   24% reified sort predicate
   25 %  reified_sort(predicate).
   26==> mpred_prop(predicate,reified_sort).
   27
   28% reified sort function
   29 %  reified_sort(function).
   30==> mpred_prop(function,reified_sort).
   31%; End of file.
   32%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   33%; FILE: foundations/EC.e
   34%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   35%;
   36%; Copyright (c) 2005 IBM Corporation and others.
   37%; All rights reserved. This program and the accompanying materials
   38%; are made available under the terms of the Common Public License v1.0
   39%; which accompanies this distribution, and is available at
   40%; http://www.eclipse.org/legal/cpl-v10.html
   41%;
   42%; Contributors:
   43%; IBM - Initial implementation
   44%;
   45%; Event Calculus (EC)
   46%;
   47%; @incollection{MillerShanahan:2002,
   48%;   author = "Rob Miller and Murray Shanahan",
   49%;   year = "2002",
   50%;   title = "Some alternative formulations of the event calculus",
   51%;   editor = "Antonis C. Kakas and Fariba Sadri",
   52%;   booktitle = "Computational Logic: Logic Programming and Beyond: Essays in Honour of \uppercase{R}obert \uppercase{A}. \uppercase{K}owalski, Part \uppercase{II}",
   53%;   series = "Lecture Notes in Computer Science",
   54%;   volume = "2408",
   55%;   pages = "452--490",
   56%;   address = "Berlin",
   57%;   publisher = "Springer",
   58%; }
   59%;
   60
   61% sort time: integer
   62==> subsort(time,integer).
   63
   64% sort offset: integer
   65==> subsort(offset,integer).
   66
   67% reified sort fluent
   68 %  reified_sort(fluent).
   69==> mpred_prop(fluent,reified_sort).
   70
   71% reified sort event
   72 %  reified_sort(event).
   73==> mpred_prop(event,reified_sort).
   74
   75% predicate Happens(event,time)
   76 %  predicate(happens(event,time)).
   77==> mpred_prop(happens(event,time),predicate).
   78==> meta_argtypes(happens(event,time)).
   79
   80% predicate HoldsAt(fluent,time)
   81 %  predicate(holds_at(fluent,time)).
   82==> mpred_prop(holds_at(fluent,time),predicate).
   83==> meta_argtypes(holds_at(fluent,time)).
   84
   85% predicate ReleasedAt(fluent,time)
   86 %  predicate(releasedAt(fluent,time)).
   87==> mpred_prop(releasedAt(fluent,time),predicate).
   88==> meta_argtypes(releasedAt(fluent,time)).
   89
   90% predicate Initiates(event,fluent,time)
   91 %  predicate(initiates(event,fluent,time)).
   92==> mpred_prop(initiates(event,fluent,time),predicate).
   93==> meta_argtypes(initiates(event,fluent,time)).
   94
   95% predicate Terminates(event,fluent,time)
   96 %  predicate(terminates(event,fluent,time)).
   97==> mpred_prop(terminates(event,fluent,time),predicate).
   98==> meta_argtypes(terminates(event,fluent,time)).
   99
  100% predicate Releases(event,fluent,time)
  101 %  predicate(releases(event,fluent,time)).
  102==> mpred_prop(releases(event,fluent,time),predicate).
  103==> meta_argtypes(releases(event,fluent,time)).
  104
  105% predicate Trajectory(fluent,time,fluent,offset)
  106 %  predicate(trajectory(fluent,time,fluent,offset)).
  107==> mpred_prop(trajectory(fluent,time,fluent,offset),predicate).
  108==> meta_argtypes(trajectory(fluent,time,fluent,offset)).
  109
  110
  111% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:70
  112%; End of file.
  113%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  114%; FILE: foundations/DEC.e
  115%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  116%;
  117%; Copyright (c) 2005 IBM Corporation and others.
  118%; All rights reserved. This program and the accompanying materials
  119%; are made available under the terms of the Common Public License v1.0
  120%; which accompanies this distribution, and is available at
  121%; http://www.eclipse.org/legal/cpl-v10.html
  122%;
  123%; Contributors:
  124%; IBM - Initial implementation
  125%;
  126%; Discrete Event Calculus (DEC)
  127%;
  128%; @article{Mueller:2004a,
  129%;   author = "Erik T. Mueller",
  130%;   year = "2004",
  131%;   title = "Event calculus reasoning through satisfiability",
  132%;   journal = "Journal of Logic and Computation",
  133%;   volume = "14",
  134%;   number = "5",
  135%;   pages = "703--730",
  136%; }
  137%;
  138
  139% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:101
  140% sort time: integer
  141% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:102
  142==> subsort(time,integer).
  143
  144% sort offset: integer
  145% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:103
  146==> subsort(offset,integer).
  147
  148% reified sort fluent
  149 %  reified_sort(fluent).
  150% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:105
  151==> mpred_prop(fluent,reified_sort).
  152
  153% reified sort event
  154 %  reified_sort(event).
  155% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:106
  156==> mpred_prop(event,reified_sort).
  157
  158% predicate Happens(event,time)
  159 %  predicate(happens(event,time)).
  160% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:108
  161==> mpred_prop(happens(event,time),predicate).
  162==> meta_argtypes(happens(event,time)).
  163
  164% predicate HoldsAt(fluent,time)
  165 %  predicate(holds_at(fluent,time)).
  166% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:109
  167==> mpred_prop(holds_at(fluent,time),predicate).
  168==> meta_argtypes(holds_at(fluent,time)).
  169
  170% predicate ReleasedAt(fluent,time)
  171 %  predicate(releasedAt(fluent,time)).
  172% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:110
  173==> mpred_prop(releasedAt(fluent,time),predicate).
  174==> meta_argtypes(releasedAt(fluent,time)).
  175
  176% predicate Initiates(event,fluent,time)
  177 %  predicate(initiates(event,fluent,time)).
  178% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:112
  179==> mpred_prop(initiates(event,fluent,time),predicate).
  180==> meta_argtypes(initiates(event,fluent,time)).
  181
  182% predicate Terminates(event,fluent,time)
  183 %  predicate(terminates(event,fluent,time)).
  184% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:113
  185==> mpred_prop(terminates(event,fluent,time),predicate).
  186==> meta_argtypes(terminates(event,fluent,time)).
  187
  188% predicate Releases(event,fluent,time)
  189 %  predicate(releases(event,fluent,time)).
  190% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:114
  191==> mpred_prop(releases(event,fluent,time),predicate).
  192==> meta_argtypes(releases(event,fluent,time)).
  193
  194
  195% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:115
  196% [fluent,time]
  197% (HoldsAt(fluent,time) &
  198%  !ReleasedAt(fluent,time+1) &
  199%  !({event} Happens(event,time) & Terminates(event,fluent,time))) ->
  200% HoldsAt(fluent,time+1).
  201% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:119
  202axiom(holds_at(Fluent, start),
  203   
  204    [ not(happens(Event, t)),
  205      holds_at(Fluent, t),
  206      not(releasedAt(Fluent, t+1)),
  207      b(t, start),
  208      ignore(t+1=start)
  209    ]).
  210axiom(holds_at(Fluent, start),
  211   
  212    [ not(terminates(Event, Fluent, t)),
  213      holds_at(Fluent, t),
  214      not(releasedAt(Fluent, t+1)),
  215      b(t, start),
  216      ignore(t+1=start)
  217    ]).
  218
  219
  220% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:121
  221% [fluent,time]
  222% (!HoldsAt(fluent,time) &
  223%  !ReleasedAt(fluent,time+1) &
  224%  !({event} Happens(event,time) & Initiates(event,fluent,time))) ->
  225% !HoldsAt(fluent,time+1).
  226% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:125
  227axiom(not(holds_at(Fluent, start)),
  228   
  229    [ not(happens(Event, t)),
  230      not(holds_at(Fluent, t)),
  231      not(releasedAt(Fluent, t+1)),
  232      b(t, start),
  233      ignore(t+1=start)
  234    ]).
  235axiom(not(holds_at(Fluent, start)),
  236   
  237    [ not(initiates(Event, Fluent, t)),
  238      not(holds_at(Fluent, t)),
  239      not(releasedAt(Fluent, t+1)),
  240      b(t, start),
  241      ignore(t+1=start)
  242    ]).
  243
  244
  245% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:127
  246% [fluent,time]
  247% (!ReleasedAt(fluent,time) &
  248%  !({event} Happens(event,time) & Releases(event,fluent,time))) ->
  249% !ReleasedAt(fluent,time+1).
  250% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:130
  251axiom(not(releasedAt(Fluent, Time+1)),
  252   
  253    [ not(happens(Event, Time)),
  254      not(releasedAt(Fluent, Time))
  255    ]).
  256axiom(not(releasedAt(Fluent, Time+1)),
  257   
  258    [ not(releases(Event, Fluent, Time)),
  259      not(releasedAt(Fluent, Time))
  260    ]).
  261
  262
  263% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:132
  264% [fluent,time]
  265% (ReleasedAt(fluent,time) &
  266%  !({event} Happens(event,time) &
  267%    (Initiates(event,fluent,time) |
  268%     Terminates(event,fluent,time)))) ->
  269% ReleasedAt(fluent,time+1).
  270% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:137
  271axiom(releasedAt(Fluent, Time+1),
  272    [not(happens(Event, Time)), releasedAt(Fluent, Time)]).
  273axiom(releasedAt(Fluent, Time+1),
  274   
  275    [ not(initiates(Event, Fluent, Time)),
  276      not(terminates(Event, Fluent, Time)),
  277      releasedAt(Fluent, Time)
  278    ]).
  279
  280
  281% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:139
  282% [event,fluent,time]
  283% (Happens(event,time) & Initiates(event,fluent,time)) ->
  284% (HoldsAt(fluent,time+1) & !ReleasedAt(fluent,time+1)).
  285
  286 /*   if((happens(Event, Time), initiates(Event, Fluent, Time)),
  287          (holds_at(Fluent, Time+1), not(releasedAt(Fluent, Time+1)))).
  288 */
  289
  290 /*  not(happens(Happens_Param, Maptime)) :-
  291       initiates(Happens_Param, Holds_at_Param, Maptime),
  292       (   not(holds_at(Holds_at_Param, Maptime+1))
  293       ;   releasedAt(Holds_at_Param, Maptime+1)
  294       ).
  295 */
  296% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:141
  297axiom(not(happens(Happens_Param, t)),
  298   
  299    [ not(holds_at(Holds_at_Param, start)),
  300      initiates(Happens_Param, Holds_at_Param, t),
  301      b(t, start),
  302      ignore(t+1=start)
  303    ]).
  304axiom(not(happens(Happens_Param, t)),
  305   
  306    [ releasedAt(Holds_at_Param, t+1),
  307      initiates(Happens_Param, Holds_at_Param, t)
  308    ]).
  309
  310 /*  not(initiates(Initiates_Param, Holds_at_Param8, Maptime6)) :-
  311       happens(Initiates_Param, Maptime6),
  312       (   not(holds_at(Holds_at_Param8, Maptime6+1))
  313       ;   releasedAt(Holds_at_Param8, Maptime6+1)
  314       ).
  315 */
  316axiom(not(initiates(Initiates_Param, Holds_at_Param8, t)),
  317   
  318    [ not(holds_at(Holds_at_Param8, start)),
  319      happens(Initiates_Param, t),
  320      b(t, start),
  321      ignore(t+1=start)
  322    ]).
  323axiom(not(initiates(Initiates_Param, Holds_at_Param8, t)),
  324    [releasedAt(Holds_at_Param8, t+1), happens(Initiates_Param, t)]).
  325
  326 /*  holds_at(Holds_at_Param10, Maptime9+1) :-
  327       happens(Happens_Param11, Maptime9),
  328       initiates(Happens_Param11, Holds_at_Param10, Maptime9).
  329 */
  330axiom(holds_at(Holds_at_Param10, start),
  331   
  332    [ happens(Happens_Param11, t),
  333      initiates(Happens_Param11, Holds_at_Param10, t),
  334      b(t, start),
  335      ignore(t+1=start)
  336    ]).
  337
  338 /*  not(releasedAt(ReleasedAt_Param, Maptime12+1)) :-
  339       happens(Happens_Param14, Maptime12),
  340       initiates(Happens_Param14, ReleasedAt_Param, Maptime12).
  341 */
  342axiom(not(releasedAt(ReleasedAt_Param, Maptime12+1)),
  343   
  344    [ happens(Happens_Param14, Maptime12),
  345      initiates(Happens_Param14, ReleasedAt_Param, Maptime12)
  346    ]).
  347
  348
  349% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:143
  350% [event,fluent,time]
  351% (Happens(event,time) & Terminates(event,fluent,time)) ->
  352% (!HoldsAt(fluent,time+1) & !ReleasedAt(fluent,time+1)).
  353
  354 /*   if((happens(Event, Time), terminates(Event, Fluent, Time)),
  355          (not(holds_at(Fluent, Time+1)), not(releasedAt(Fluent, Time+1)))).
  356 */
  357
  358 /*  not(happens(Happens_Param, Maptime)) :-
  359       terminates(Happens_Param, Holds_at_Param, Maptime),
  360       (   holds_at(Holds_at_Param, Maptime+1)
  361       ;   releasedAt(Holds_at_Param, Maptime+1)
  362       ).
  363 */
  364% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:145
  365axiom(not(happens(Happens_Param, t)),
  366   
  367    [ holds_at(Holds_at_Param, start),
  368      terminates(Happens_Param, Holds_at_Param, t),
  369      b(t, start),
  370      ignore(t+1=start)
  371    ]).
  372axiom(not(happens(Happens_Param, t)),
  373   
  374    [ releasedAt(Holds_at_Param, t+1),
  375      terminates(Happens_Param, Holds_at_Param, t)
  376    ]).
  377
  378 /*  not(terminates(Terminates_Param, Holds_at_Param8, Maptime6)) :-
  379       happens(Terminates_Param, Maptime6),
  380       (   holds_at(Holds_at_Param8, Maptime6+1)
  381       ;   releasedAt(Holds_at_Param8, Maptime6+1)
  382       ).
  383 */
  384axiom(not(terminates(Terminates_Param, Holds_at_Param8, t)),
  385   
  386    [ holds_at(Holds_at_Param8, start),
  387      happens(Terminates_Param, t),
  388      b(t, start),
  389      ignore(t+1=start)
  390    ]).
  391axiom(not(terminates(Terminates_Param, Holds_at_Param8, t)),
  392    [releasedAt(Holds_at_Param8, t+1), happens(Terminates_Param, t)]).
  393
  394 /*  not(holds_at(Holds_at_Param10, Maptime9+1)) :-
  395       happens(Happens_Param11, Maptime9),
  396       terminates(Happens_Param11, Holds_at_Param10, Maptime9).
  397 */
  398axiom(not(holds_at(Holds_at_Param10, start)),
  399   
  400    [ happens(Happens_Param11, t),
  401      terminates(Happens_Param11, Holds_at_Param10, t),
  402      b(t, start),
  403      ignore(t+1=start)
  404    ]).
  405
  406 /*  not(releasedAt(ReleasedAt_Param, Maptime12+1)) :-
  407       happens(Happens_Param14, Maptime12),
  408       terminates(Happens_Param14, ReleasedAt_Param, Maptime12).
  409 */
  410axiom(not(releasedAt(ReleasedAt_Param, Maptime12+1)),
  411   
  412    [ happens(Happens_Param14, Maptime12),
  413      terminates(Happens_Param14, ReleasedAt_Param, Maptime12)
  414    ]).
  415
  416
  417% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:147
  418% [event,fluent,time]
  419% (Happens(event,time) & Releases(event,fluent,time)) ->
  420% ReleasedAt(fluent,time+1).
  421% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:149
  422axiom(releasedAt(Fluent, Time+1),
  423   
  424    [ happens(Event, Time),
  425      releases(Event, Fluent, Time)
  426    ]).
  427
  428
  429% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:151
  430%; End of file.
  431%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  432%; FILE: foundations/ECCausal.e
  433%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  434%;
  435%; Copyright (c) 2005 IBM Corporation and others.
  436%; All rights reserved. This program and the accompanying materials
  437%; are made available under the terms of the Common Public License v1.0
  438%; which accompanies this distribution, and is available at
  439%; http://www.eclipse.org/legal/cpl-v10.html
  440%;
  441%; Contributors:
  442%; IBM - Initial implementation
  443%;
  444%; Causal Constraints
  445%;
  446%; @inproceedings{Shanahan:1999a,
  447%;   author = "Murray Shanahan",
  448%;   year = "1999",
  449%;   title = "The ramification problem in the event calculus",
  450%;   booktitle = "\uppercase{P}roceedings of the \uppercase{S}ixteenth \uppercase{I}nternational \uppercase{J}oint \uppercase{C}onference on \uppercase{A}rtificial \uppercase{I}ntelligence",
  451%;   pages = "140--146",
  452%;   address = "San Mateo, CA",
  453%;   publisher = "Morgan Kaufmann",
  454%; }
  455%;
  456
  457% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:182
  458% predicate Started(fluent,time)
  459 %  predicate(started(fluent,time)).
  460% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:183
  461==> mpred_prop(started(fluent,time),predicate).
  462==> meta_argtypes(started(fluent,time)).
  463
  464% predicate Stopped(fluent,time)
  465 %  predicate(stopped(fluent,time)).
  466% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:184
  467==> mpred_prop(stopped(fluent,time),predicate).
  468==> meta_argtypes(stopped(fluent,time)).
  469
  470
  471% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:185
  472% [fluent,time]
  473% Started(fluent,time) <->
  474% (HoldsAt(fluent,time) |
  475%  ({event} Happens(event,time) & Initiates(event,fluent,time))).
  476
  477 /*  started(Fluent, Time) <->
  478       (   holds_at(Fluent, Time)
  479       ;   exists([Event],
  480                   (happens(Event, Time), initiates(Event, Fluent, Time)))
  481       ).
  482 */
  483% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:188
  484axiom(started(Fluent, Time),
  485    [holds_at(Fluent, Time)]).
  486axiom(started(Fluent, Time),
  487   
  488    [ happens(Event, Time),
  489      initiates(Event, Fluent, Time)
  490    ]).
  491
  492 /*   if(started(Fluent, Time),
  493          (holds_at(Fluent, Time);exists([Event],  (happens(Event, Time), initiates(Event, Fluent, Time))))).
  494 */
  495
  496 /*  not(started(Started_Param, Time3)) :-
  497       not(holds_at(Started_Param, Time3)),
  498       (   not(happens(Happens_Param, Time3))
  499       ;   not(initiates(Happens_Param, Started_Param, Time3))
  500       ).
  501 */
  502axiom(not(started(Started_Param, Time3)),
  503   
  504    [ not(happens(Happens_Param, Time3)),
  505      not(holds_at(Started_Param, Time3))
  506    ]).
  507axiom(not(started(Started_Param, Time3)),
  508   
  509    [ not(initiates(Happens_Param, Started_Param, Time3)),
  510      not(holds_at(Started_Param, Time3))
  511    ]).
  512
  513 /*  holds_at(Holds_at_Param, Time6) :-
  514       (   not(happens(Happens_Param8, Time6))
  515       ;   not(initiates(Happens_Param8, Holds_at_Param, Time6))
  516       ),
  517       started(Holds_at_Param, Time6).
  518 */
  519axiom(holds_at(Holds_at_Param, Time6),
  520   
  521    [ not(happens(Happens_Param8, Time6)),
  522      started(Holds_at_Param, Time6)
  523    ]).
  524axiom(holds_at(Holds_at_Param, Time6),
  525   
  526    [ not(initiates(Happens_Param8, Holds_at_Param, Time6)),
  527      started(Holds_at_Param, Time6)
  528    ]).
  529
  530 /*  happens(Happens_Param10, Maptime) :-
  531       not(holds_at(Holds_at_Param11, Maptime)),
  532       started(Holds_at_Param11, Maptime).
  533 */
  534axiom(happens(Happens_Param10, Maptime),
  535   
  536    [ not(holds_at(Holds_at_Param11, Maptime)),
  537      started(Holds_at_Param11, Maptime)
  538    ]).
  539
  540 /*  initiates(Initiates_Param, Holds_at_Param14, Time12) :-
  541       not(holds_at(Holds_at_Param14, Time12)),
  542       started(Holds_at_Param14, Time12).
  543 */
  544axiom(initiates(Initiates_Param, Holds_at_Param14, Time12),
  545   
  546    [ not(holds_at(Holds_at_Param14, Time12)),
  547      started(Holds_at_Param14, Time12)
  548    ]).
  549
  550
  551% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:190
  552% [fluent,time]
  553% Stopped(fluent,time) <->
  554% (!HoldsAt(fluent,time) |
  555%  ({event} Happens(event,time) & Terminates(event,fluent,time))).
  556
  557 /*  stopped(Fluent, Time) <->
  558       (   not(holds_at(Fluent, Time))
  559       ;   exists([Event],
  560                   (happens(Event, Time), terminates(Event, Fluent, Time)))
  561       ).
  562 */
  563% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:193
  564axiom(stopped(Fluent, Time),
  565    [not(holds_at(Fluent, Time))]).
  566axiom(stopped(Fluent, Time),
  567   
  568    [ happens(Event, Time),
  569      terminates(Event, Fluent, Time)
  570    ]).
  571
  572 /*   if(stopped(Fluent, Time),
  573          (not(holds_at(Fluent, Time));exists([Event],  (happens(Event, Time), terminates(Event, Fluent, Time))))).
  574 */
  575
  576 /*  not(stopped(Stopped_Param, Time3)) :-
  577       holds_at(Stopped_Param, Time3),
  578       (   not(happens(Happens_Param, Time3))
  579       ;   not(terminates(Happens_Param, Stopped_Param, Time3))
  580       ).
  581 */
  582axiom(not(stopped(Stopped_Param, Time3)),
  583   
  584    [ not(happens(Happens_Param, Time3)),
  585      holds_at(Stopped_Param, Time3)
  586    ]).
  587axiom(not(stopped(Stopped_Param, Time3)),
  588   
  589    [ not(terminates(Happens_Param, Stopped_Param, Time3)),
  590      holds_at(Stopped_Param, Time3)
  591    ]).
  592
  593 /*  not(holds_at(Holds_at_Param, Time6)) :-
  594       (   not(happens(Happens_Param8, Time6))
  595       ;   not(terminates(Happens_Param8, Holds_at_Param, Time6))
  596       ),
  597       stopped(Holds_at_Param, Time6).
  598 */
  599axiom(not(holds_at(Holds_at_Param, Time6)),
  600   
  601    [ not(happens(Happens_Param8, Time6)),
  602      stopped(Holds_at_Param, Time6)
  603    ]).
  604axiom(not(holds_at(Holds_at_Param, Time6)),
  605   
  606    [ not(terminates(Happens_Param8, Holds_at_Param, Time6)),
  607      stopped(Holds_at_Param, Time6)
  608    ]).
  609
  610 /*  happens(Happens_Param10, Maptime) :-
  611       holds_at(Holds_at_Param11, Maptime),
  612       stopped(Holds_at_Param11, Maptime).
  613 */
  614axiom(happens(Happens_Param10, Maptime),
  615   
  616    [ holds_at(Holds_at_Param11, Maptime),
  617      stopped(Holds_at_Param11, Maptime)
  618    ]).
  619
  620 /*  terminates(Terminates_Param, Holds_at_Param14, Time12) :-
  621       holds_at(Holds_at_Param14, Time12),
  622       stopped(Holds_at_Param14, Time12).
  623 */
  624axiom(terminates(Terminates_Param, Holds_at_Param14, Time12),
  625   
  626    [ holds_at(Holds_at_Param14, Time12),
  627      stopped(Holds_at_Param14, Time12)
  628    ]).
  629
  630% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:195
  631% predicate Initiated(fluent,time)
  632 %  predicate(initiated(fluent,time)).
  633% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:196
  634==> mpred_prop(initiated(fluent,time),predicate).
  635==> meta_argtypes(initiated(fluent,time)).
  636
  637% predicate Terminated(fluent,time)
  638 %  predicate(terminated(fluent,time)).
  639% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:197
  640==> mpred_prop(terminated(fluent,time),predicate).
  641==> meta_argtypes(terminated(fluent,time)).
  642
  643
  644% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:198
  645% [fluent,time]
  646% Initiated(fluent,time) <->
  647% (Started(fluent,time) &
  648%  !({event} Happens(event,time) & Terminates(event,fluent,time))).
  649
  650 /*  initiated(Fluent, Time) <->
  651       started(Fluent, Time),
  652       not(exists([Event],
  653                   (happens(Event, Time), terminates(Event, Fluent, Time)))).
  654 */
  655% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:201
  656axiom(initiated(Fluent, Time),
  657    [not(happens(Event, Time)), started(Fluent, Time)]).
  658axiom(initiated(Fluent, Time),
  659   
  660    [ not(terminates(Event, Fluent, Time)),
  661      started(Fluent, Time)
  662    ]).
  663
  664 /*   if(initiated(Fluent, Time),
  665          (started(Fluent, Time), not(exists([Event],  (happens(Event, Time), terminates(Event, Fluent, Time)))))).
  666 */
  667
  668 /*  not(initiated(Initiated_Param, Maptime)) :-
  669       (   not(started(Initiated_Param, Maptime))
  670       ;   happens(Happens_Param, Maptime),
  671           terminates(Happens_Param, Initiated_Param, Maptime)
  672       ).
  673 */
  674axiom(not(initiated(Initiated_Param, Maptime)),
  675    [not(started(Initiated_Param, Maptime))]).
  676axiom(not(initiated(Initiated_Param, Maptime)),
  677   
  678    [ happens(Happens_Param, Maptime),
  679      terminates(Happens_Param, Initiated_Param, Maptime)
  680    ]).
  681
  682 /*  started(Started_Param, Started_Ret) :-
  683       initiated(Started_Param, Started_Ret).
  684 */
  685axiom(started(Started_Param, Started_Ret),
  686    [initiated(Started_Param, Started_Ret)]).
  687
  688 /*  not(happens(Happens_Param9, Maptime8)) :-
  689       terminates(Happens_Param9, Initiated_Param10, Maptime8),
  690       initiated(Initiated_Param10, Maptime8).
  691 */
  692axiom(not(happens(Happens_Param9, Maptime8)),
  693   
  694    [ terminates(Happens_Param9, Initiated_Param10, Maptime8),
  695      initiated(Initiated_Param10, Maptime8)
  696    ]).
  697
  698 /*  not(terminates(Terminates_Param, Initiated_Param13, Maptime11)) :-
  699       happens(Terminates_Param, Maptime11),
  700       initiated(Initiated_Param13, Maptime11).
  701 */
  702axiom(not(terminates(Terminates_Param, Initiated_Param13, Maptime11)),
  703   
  704    [ happens(Terminates_Param, Maptime11),
  705      initiated(Initiated_Param13, Maptime11)
  706    ]).
  707
  708
  709% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:203
  710% [fluent,time]
  711% Terminated(fluent,time) <->
  712% (Stopped(fluent,time) &
  713%  !({event} Happens(event,time) & Initiates(event,fluent,time))).
  714
  715 /*  terminated(Fluent, Time) <->
  716       stopped(Fluent, Time),
  717       not(exists([Event],
  718                   (happens(Event, Time), initiates(Event, Fluent, Time)))).
  719 */
  720% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:206
  721axiom(terminated(Fluent, Time),
  722    [not(happens(Event, Time)), stopped(Fluent, Time)]).
  723axiom(terminated(Fluent, Time),
  724   
  725    [ not(initiates(Event, Fluent, Time)),
  726      stopped(Fluent, Time)
  727    ]).
  728
  729 /*   if(terminated(Fluent, Time),
  730          (stopped(Fluent, Time), not(exists([Event],  (happens(Event, Time), initiates(Event, Fluent, Time)))))).
  731 */
  732
  733 /*  not(terminated(Terminated_Param, Maptime)) :-
  734       (   not(stopped(Terminated_Param, Maptime))
  735       ;   happens(Happens_Param, Maptime),
  736           initiates(Happens_Param, Terminated_Param, Maptime)
  737       ).
  738 */
  739axiom(not(terminated(Terminated_Param, Maptime)),
  740    [not(stopped(Terminated_Param, Maptime))]).
  741axiom(not(terminated(Terminated_Param, Maptime)),
  742   
  743    [ happens(Happens_Param, Maptime),
  744      initiates(Happens_Param, Terminated_Param, Maptime)
  745    ]).
  746
  747 /*  stopped(Stopped_Param, Stopped_Ret) :-
  748       terminated(Stopped_Param, Stopped_Ret).
  749 */
  750axiom(stopped(Stopped_Param, Stopped_Ret),
  751    [terminated(Stopped_Param, Stopped_Ret)]).
  752
  753 /*  not(happens(Happens_Param9, Maptime8)) :-
  754       initiates(Happens_Param9, Terminated_Param10, Maptime8),
  755       terminated(Terminated_Param10, Maptime8).
  756 */
  757axiom(not(happens(Happens_Param9, Maptime8)),
  758   
  759    [ initiates(Happens_Param9, Terminated_Param10, Maptime8),
  760      terminated(Terminated_Param10, Maptime8)
  761    ]).
  762
  763 /*  not(initiates(Initiates_Param, Terminated_Param13, Maptime11)) :-
  764       happens(Initiates_Param, Maptime11),
  765       terminated(Terminated_Param13, Maptime11).
  766 */
  767axiom(not(initiates(Initiates_Param, Terminated_Param13, Maptime11)),
  768   
  769    [ happens(Initiates_Param, Maptime11),
  770      terminated(Terminated_Param13, Maptime11)
  771    ]).
  772
  773
  774% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:208
  775%; End of file.
  776%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  777%; FILE: foundations/ECTraj.e
  778%; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  779%;
  780%; Copyright (c) 2005 IBM Corporation and others.
  781%; All rights reserved. This program and the accompanying materials
  782%; are made available under the terms of the Common Public License v1.0
  783%; which accompanies this distribution, and is available at
  784%; http://www.eclipse.org/legal/cpl-v10.html
  785%;
  786%; Contributors:
  787%; IBM - Initial implementation
  788%;
  789%; @incollection{MillerShanahan:2002,
  790%;   author = "Rob Miller and Murray Shanahan",
  791%;   year = "2002",
  792%;   title = "Some alternative formulations of the event calculus",
  793%;   editor = "Antonis C. Kakas and Fariba Sadri",
  794%;   booktitle = "Computational Logic: Logic Programming and Beyond: Essays in Honour of \uppercase{R}obert \uppercase{A}. \uppercase{K}owalski, Part \uppercase{II}",
  795%;   series = "Lecture Notes in Computer Science",
  796%;   volume = "2408",
  797%;   pages = "452--490",
  798%;   address = "Berlin",
  799%;   publisher = "Springer",
  800%; }
  801%;
  802
  803% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:240
  804% predicate Clipped(time,fluent,time)
  805 %  predicate(clipped(time,fluent,time)).
  806% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:241
  807==> mpred_prop(clipped(time,fluent,time),predicate).
  808==> meta_argtypes(clipped(time,fluent,time)).
  809
  810% predicate Declipped(time,fluent,time)
  811 %  predicate(declipped(time,fluent,time)).
  812% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:242
  813==> mpred_prop(declipped(time,fluent,time),predicate).
  814==> meta_argtypes(declipped(time,fluent,time)).
  815
  816% predicate Trajectory(fluent,time,fluent,offset)
  817 %  predicate(trajectory(fluent,time,fluent,offset)).
  818% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:244
  819==> mpred_prop(trajectory(fluent,time,fluent,offset),predicate).
  820==> meta_argtypes(trajectory(fluent,time,fluent,offset)).
  821
  822% predicate AntiTrajectory(fluent,time,fluent,offset)
  823 %  predicate(antiTrajectory(fluent,time,fluent,offset)).
  824% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:245
  825==> mpred_prop(antiTrajectory(fluent,time,fluent,offset),predicate).
  826==> meta_argtypes(antiTrajectory(fluent,time,fluent,offset)).
  827
  828
  829% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:246
  830% [event,fluent,fluent2,offset,time]
  831% Happens(event,time) &
  832% Initiates(event,fluent,time) &
  833% 0 < offset &
  834% Trajectory(fluent,time,fluent2,offset) &
  835% !Clipped(time,fluent,time+offset) ->
  836% HoldsAt(fluent2,time+offset).
  837% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:252
  838axiom(holds_at(Fluent2, Time),
  839   
  840    [ happens(Event, Time),
  841      initiates(Event, Fluent, Time),
  842      comparison(0, 0, <),
  843      trajectory(Fluent, Time, Fluent2, 0),
  844      not(clipped(Time, Fluent, Time))
  845    ]).
  846
  847
  848% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:254
  849% [event,fluent,fluent2,offset,time]
  850% Happens(event,time) &
  851% Terminates(event,fluent,time) &
  852% 0 < offset &
  853% AntiTrajectory(fluent,time,fluent2,offset) &
  854% !Declipped(time,fluent,time+offset) ->
  855% HoldsAt(fluent2,time+offset).
  856% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:260
  857axiom(holds_at(Fluent2, Time),
  858   
  859    [ happens(Event, Time),
  860      terminates(Event, Fluent, Time),
  861      comparison(0, 0, <),
  862      antiTrajectory(Fluent, Time, Fluent2, 0),
  863      not(declipped(Time, Fluent, Time))
  864    ]).
  865
  866
  867% From /opt/logicmoo_workspace/packs_sys/small_adventure_games/prolog/ec_planner/ectest/ec_reader_test_foundations.e:262
  868%; End of file.