1% ectest/ec_reader_test.e:1
    2% translate: begining  File: ectest/ec_reader_test.e.pro 
    3% 
    4% 
    5% 
    6% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    7% ; FILE: foundations/Root.e
    8% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
    9% ectest/ec_reader_test.e:7
   10% 
   11% ;
   12% ; Copyright (c) 2005 IBM Corporation and others.
   13% ; All rights reserved. This program and the accompanying materials
   14% ; are made available under the terms of the Common Public License v1.0
   15% ; which accompanies this distribution, and is available at
   16% ; http://www.eclipse.org/legal/cpl-v10.html
   17% ;
   18% ; Contributors:
   19% ; IBM - Initial implementation
   20% ;
   21% ectest/ec_reader_test.e:18
   22% sort boolean
   23sort(boolean).
   24
   25% sort integer
   26sort(integer).
   27
   28% reified sort predicate
   29reified_sort(predicate).
   30
   31% reified sort function
   32reified_sort(function).
   33
   34% 
   35% ; End of file.
   36% ectest/ec_reader_test.e:24
   37% 
   38% 
   39% 
   40% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   41% ; FILE: foundations/EC.e
   42% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
   43% ectest/ec_reader_test.e:30
   44% 
   45% ;
   46% ; Copyright (c) 2005 IBM Corporation and others.
   47% ; All rights reserved. This program and the accompanying materials
   48% ; are made available under the terms of the Common Public License v1.0
   49% ; which accompanies this distribution, and is available at
   50% ; http://www.eclipse.org/legal/cpl-v10.html
   51% ;
   52% ; Contributors:
   53% ; IBM - Initial implementation
   54% ;
   55% ; Event Calculus (EC)
   56% ;
   57% ; @incollection{MillerShanahan:2002,
   58% ;   author = "Rob Miller and Murray Shanahan",
   59% ;   year = "2002",
   60% ;   title = "Some alternative formulations of the event calculus",
   61% ;   editor = "Antonis C. Kakas and Fariba Sadri",
   62% ;   booktitle = "Computational Logic: Logic Programming and Beyond: Essays in Honour of \uppercase{R}obert \uppercase{A}. \uppercase{K}owalski, Part \uppercase{II}",
   63% ;   series = "Lecture Notes in Computer Science",
   64% ;   volume = "2408",
   65% ;   pages = "452--490",
   66% ;   address = "Berlin",
   67% ;   publisher = "Springer",
   68% ; }
   69% ;
   70% ectest/ec_reader_test.e:56
   71% 
   72% sort time: integer
   73subsort(time, integer).
   74
   75% sort offset: integer
   76subsort(offset, integer).
   77
   78% 
   79% reified sort fluent
   80reified_sort(fluent).
   81
   82% reified sort event
   83reified_sort(event).
   84
   85% ectest/ec_reader_test.e:62
   86% 
   87% predicate Happens(event,time)
   88predicate(happens(event, time)).
   89
   90% predicate HoldsAt(fluent,time)
   91predicate(holds_at(fluent, time)).
   92
   93% predicate ReleasedAt(fluent,time)
   94predicate(releasedAt(fluent, time)).
   95
   96% predicate Initiates(event,fluent,time)
   97predicate(initiates(event, fluent, time)).
   98
   99% predicate Terminates(event,fluent,time)
  100predicate(terminates(event, fluent, time)).
  101
  102% ectest/ec_reader_test.e:68
  103% predicate Releases(event,fluent,time)
  104predicate(releases(event, fluent, time)).
  105
  106% predicate Trajectory(fluent,time,fluent,offset)
  107predicate(trajectory(fluent, time, fluent, offset)).
  108
  109% 
  110% ; End of file.
  111% 
  112% 
  113% ectest/ec_reader_test.e:74
  114% 
  115% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  116% ; FILE: foundations/DEC.e
  117% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  118% 
  119% ;
  120% ; Copyright (c) 2005 IBM Corporation and others.
  121% ; All rights reserved. This program and the accompanying materials
  122% ; are made available under the terms of the Common Public License v1.0
  123% ; which accompanies this distribution, and is available at
  124% ; http://www.eclipse.org/legal/cpl-v10.html
  125% ;
  126% ; Contributors:
  127% ; IBM - Initial implementation
  128% ;
  129% ; Discrete Event Calculus (DEC)
  130% ;
  131% ; @article{Mueller:2004a,
  132% ;   author = "Erik T. Mueller",
  133% ;   year = "2004",
  134% ;   title = "Event calculus reasoning through satisfiability",
  135% ;   journal = "Journal of Logic and Computation",
  136% ;   volume = "14",
  137% ;   number = "5",
  138% ;   pages = "703--730",
  139% ; }
  140% ;
  141% ectest/ec_reader_test.e:101
  142% 
  143% sort time: integer
  144subsort(time, integer).
  145
  146% sort offset: integer
  147subsort(offset, integer).
  148
  149% 
  150% reified sort fluent
  151reified_sort(fluent).
  152
  153% reified sort event
  154reified_sort(event).
  155
  156% ectest/ec_reader_test.e:107
  157% 
  158% predicate Happens(event,time)
  159predicate(happens(event, time)).
  160
  161% predicate HoldsAt(fluent,time)
  162predicate(holds_at(fluent, time)).
  163
  164% predicate ReleasedAt(fluent,time)
  165predicate(releasedAt(fluent, time)).
  166
  167% 
  168% predicate Initiates(event,fluent,time)
  169predicate(initiates(event, fluent, time)).
  170
  171% ectest/ec_reader_test.e:113
  172% predicate Terminates(event,fluent,time)
  173predicate(terminates(event, fluent, time)).
  174
  175% predicate Releases(event,fluent,time)
  176predicate(releases(event, fluent, time)).
  177
  178% 
  179% ectest/ec_reader_test.e:116
  180% [fluent,time]% 
  181% (HoldsAt(fluent,time) &
  182%  !ReleasedAt(fluent,time+1) &
  183%  !({event} Happens(event,time) & Terminates(event,fluent,time))) ->
  184% HoldsAt(fluent,time+1).
  185holds_at(Fluent, Time), not(releasedAt(Fluent, Time+1)), not(exists([Event],  (happens(Event, Time), terminates(Event, Fluent, Time)))) ->
  186	holds_at(Fluent, Time+1).
  187
  188% 
  189% 
  190% ectest/ec_reader_test.e:122
  191% [fluent,time]% 
  192% (!HoldsAt(fluent,time) &
  193%  !ReleasedAt(fluent,time+1) &
  194%  !({event} Happens(event,time) & Initiates(event,fluent,time))) ->
  195% !HoldsAt(fluent,time+1).
  196not(holds_at(Fluent, Time)), not(releasedAt(Fluent, Time+1)), not(exists([Event],  (happens(Event, Time), initiates(Event, Fluent, Time)))) ->
  197	not(holds_at(Fluent, Time+1)).
  198
  199% 
  200% 
  201% ectest/ec_reader_test.e:128
  202% [fluent,time]% 
  203% (!ReleasedAt(fluent,time) &
  204%  !({event} Happens(event,time) & Releases(event,fluent,time))) ->
  205% !ReleasedAt(fluent,time+1).
  206not(releasedAt(Fluent, Time)), not(exists([Event],  (happens(Event, Time), releases(Event, Fluent, Time)))) ->
  207	not(releasedAt(Fluent, Time+1)).
  208
  209% 
  210% 
  211% ectest/ec_reader_test.e:133
  212% [fluent,time]% 
  213% (ReleasedAt(fluent,time) &
  214%  !({event} Happens(event,time) &
  215%    (Initiates(event,fluent,time) |
  216%     Terminates(event,fluent,time)))) ->
  217% ReleasedAt(fluent,time+1).
  218releasedAt(Fluent, Time), not(exists([Event],  (happens(Event, Time), (initiates(Event, Fluent, Time);terminates(Event, Fluent, Time))))) ->
  219	releasedAt(Fluent, Time+1).
  220
  221% 
  222% ectest/ec_reader_test.e:139
  223% 
  224% ectest/ec_reader_test.e:140
  225% [event,fluent,time]% 
  226% (Happens(event,time) & Initiates(event,fluent,time)) ->
  227% (HoldsAt(fluent,time+1) & !ReleasedAt(fluent,time+1)).
  228happens(Event, Time), initiates(Event, Fluent, Time) ->
  229	holds_at(Fluent, Time+1),
  230	not(releasedAt(Fluent, Time+1)).
  231
  232% 
  233% 
  234% ectest/ec_reader_test.e:144
  235% [event,fluent,time]% 
  236% (Happens(event,time) & Terminates(event,fluent,time)) ->
  237% (!HoldsAt(fluent,time+1) & !ReleasedAt(fluent,time+1)).
  238happens(Event, Time), terminates(Event, Fluent, Time) ->
  239	not(holds_at(Fluent, Time+1)),
  240	not(releasedAt(Fluent, Time+1)).
  241
  242% 
  243% 
  244% ectest/ec_reader_test.e:148
  245% [event,fluent,time]% 
  246% (Happens(event,time) & Releases(event,fluent,time)) ->
  247% ReleasedAt(fluent,time+1).
  248happens(Event, Time), releases(Event, Fluent, Time) ->
  249	releasedAt(Fluent, Time+1).
  250
  251% 
  252% 
  253% ; End of file.
  254% 
  255% ectest/ec_reader_test.e:154
  256% 
  257% 
  258% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  259% ; FILE: foundations/ECCausal.e
  260% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  261% 
  262% ;
  263% ; Copyright (c) 2005 IBM Corporation and others.
  264% ; All rights reserved. This program and the accompanying materials
  265% ; are made available under the terms of the Common Public License v1.0
  266% ; which accompanies this distribution, and is available at
  267% ; http://www.eclipse.org/legal/cpl-v10.html
  268% ;
  269% ; Contributors:
  270% ; IBM - Initial implementation
  271% ;
  272% ; Causal Constraints
  273% ;
  274% ; @inproceedings{Shanahan:1999a,
  275% ;   author = "Murray Shanahan",
  276% ;   year = "1999",
  277% ;   title = "The ramification problem in the event calculus",
  278% ;   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",
  279% ;   pages = "140--146",
  280% ;   address = "San Mateo, CA",
  281% ;   publisher = "Morgan Kaufmann",
  282% ; }
  283% ;
  284% ectest/ec_reader_test.e:182
  285% 
  286% predicate Started(fluent,time)
  287predicate(started(fluent, time)).
  288
  289% predicate Stopped(fluent,time)
  290predicate(stopped(fluent, time)).
  291
  292% 
  293% ectest/ec_reader_test.e:186
  294% [fluent,time]% 
  295% Started(fluent,time) <->
  296% (HoldsAt(fluent,time) |
  297%  ({event} Happens(event,time) & Initiates(event,fluent,time))).
  298started(Fluent, Time) <->
  299	(   holds_at(Fluent, Time)
  300	;   exists([Event],
  301		   (happens(Event, Time), initiates(Event, Fluent, Time)))
  302	).
  303
  304% 
  305% 
  306% ectest/ec_reader_test.e:191
  307% [fluent,time]% 
  308% Stopped(fluent,time) <->
  309% (!HoldsAt(fluent,time) |
  310%  ({event} Happens(event,time) & Terminates(event,fluent,time))).
  311stopped(Fluent, Time) <->
  312	(   not(holds_at(Fluent, Time))
  313	;   exists([Event],
  314		   (happens(Event, Time), terminates(Event, Fluent, Time)))
  315	).
  316
  317% 
  318% 
  319% predicate Initiated(fluent,time)
  320predicate(initiated(fluent, time)).
  321
  322% ectest/ec_reader_test.e:197
  323% predicate Terminated(fluent,time)
  324predicate(terminated(fluent, time)).
  325
  326% 
  327% ectest/ec_reader_test.e:199
  328% [fluent,time]% 
  329% Initiated(fluent,time) <->
  330% (Started(fluent,time) &
  331%  !({event} Happens(event,time) & Terminates(event,fluent,time))).
  332initiated(Fluent, Time) <->
  333	started(Fluent, Time),
  334	not(exists([Event],
  335		   (happens(Event, Time), terminates(Event, Fluent, Time)))).
  336
  337% 
  338% 
  339% ectest/ec_reader_test.e:204
  340% [fluent,time]% 
  341% Terminated(fluent,time) <->
  342% (Stopped(fluent,time) &
  343%  !({event} Happens(event,time) & Initiates(event,fluent,time))).
  344terminated(Fluent, Time) <->
  345	stopped(Fluent, Time),
  346	not(exists([Event],
  347		   (happens(Event, Time), initiates(Event, Fluent, Time)))).
  348
  349% 
  350% 
  351% ; End of file.
  352% ectest/ec_reader_test.e:210
  353% 
  354% 
  355% 
  356% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  357% ; FILE: foundations/ECTraj.e
  358% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  359% ectest/ec_reader_test.e:216
  360% 
  361% ;
  362% ; Copyright (c) 2005 IBM Corporation and others.
  363% ; All rights reserved. This program and the accompanying materials
  364% ; are made available under the terms of the Common Public License v1.0
  365% ; which accompanies this distribution, and is available at
  366% ; http://www.eclipse.org/legal/cpl-v10.html
  367% ;
  368% ; Contributors:
  369% ; IBM - Initial implementation
  370% ;
  371% ; @incollection{MillerShanahan:2002,
  372% ;   author = "Rob Miller and Murray Shanahan",
  373% ;   year = "2002",
  374% ;   title = "Some alternative formulations of the event calculus",
  375% ;   editor = "Antonis C. Kakas and Fariba Sadri",
  376% ;   booktitle = "Computational Logic: Logic Programming and Beyond: Essays in Honour of \uppercase{R}obert \uppercase{A}. \uppercase{K}owalski, Part \uppercase{II}",
  377% ;   series = "Lecture Notes in Computer Science",
  378% ;   volume = "2408",
  379% ;   pages = "452--490",
  380% ;   address = "Berlin",
  381% ;   publisher = "Springer",
  382% ; }
  383% ;
  384% ectest/ec_reader_test.e:240
  385% 
  386% predicate Clipped(time,fluent,time)
  387predicate(clipped(time, fluent, time)).
  388
  389% predicate Declipped(time,fluent,time)
  390predicate(declipped(time, fluent, time)).
  391
  392% 
  393% predicate Trajectory(fluent,time,fluent,offset)
  394predicate(trajectory(fluent, time, fluent, offset)).
  395
  396% predicate AntiTrajectory(fluent,time,fluent,offset)
  397predicate(antiTrajectory(fluent, time, fluent, offset)).
  398
  399% ectest/ec_reader_test.e:246
  400% 
  401% ectest/ec_reader_test.e:247
  402% [event,fluent,fluent2,offset,time]% 
  403% Happens(event,time) &
  404% Initiates(event,fluent,time) &
  405% 0 < offset &
  406% Trajectory(fluent,time,fluent2,offset) &
  407% !Clipped(time,fluent,time+offset) ->
  408% HoldsAt(fluent2,time+offset).
  409happens(Event, Time), initiates(Event, Fluent, Time), 0<Offset, trajectory(Fluent, Time, Fluent2, Offset), not(clipped(Time, Fluent, Time+Offset)) ->
  410	holds_at(Fluent2, Time+Offset).
  411
  412% ectest/ec_reader_test.e:253
  413% 
  414% 
  415% ectest/ec_reader_test.e:255
  416% [event,fluent,fluent2,offset,time]% 
  417% Happens(event,time) &
  418% Terminates(event,fluent,time) &
  419% 0 < offset &
  420% AntiTrajectory(fluent,time,fluent2,offset) &
  421% !Declipped(time,fluent,time+offset) ->
  422% HoldsAt(fluent2,time+offset).
  423happens(Event, Time), terminates(Event, Fluent, Time), 0<Offset, antiTrajectory(Fluent, Time, Fluent2, Offset), not(declipped(Time, Fluent, Time+Offset)) ->
  424	holds_at(Fluent2, Time+Offset).
  425
  426% ectest/ec_reader_test.e:261
  427% 
  428% 
  429% ; End of file.
  430% 
  431% 
  432% 
  433% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  434% ; FILE: ecnet/Ontology.e
  435% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  436% ectest/ec_reader_test.e:270
  437% 
  438% ;
  439% ; Copyright (c) 2005 IBM Corporation and others.
  440% ; All rights reserved. This program and the accompanying materials
  441% ; are made available under the terms of the Common Public License v1.0
  442% ; which accompanies this distribution, and is available at
  443% ; http://www.eclipse.org/legal/cpl-v10.html
  444% ;
  445% ; Contributors:
  446% ; IBM - Initial implementation
  447% ;
  448% ; integer
  449% ;
  450% ectest/ec_reader_test.e:283
  451% 
  452% sort diameter: integer
  453subsort(diameter, integer).
  454
  455% 
  456% ; object
  457% 
  458% sort object
  459sort(object).
  460
  461% ectest/ec_reader_test.e:289
  462% 
  463% sort agent: object
  464subsort(agent, object).
  465
  466% 
  467% sort physobj: object
  468subsort(physobj, object).
  469
  470% sort bed: physobj
  471subsort(bed, physobj).
  472
  473% sort snowflake: physobj
  474subsort(snowflake, physobj).
  475
  476% ectest/ec_reader_test.e:295
  477% sort sky: physobj
  478subsort(sky, physobj).
  479
  480% 
  481% sort stuff: physobj
  482subsort(stuff, physobj).
  483
  484% 
  485% sort surface: physobj
  486subsort(surface, physobj).
  487
  488% sort ground: surface
  489subsort(ground, surface).
  490
  491% ectest/ec_reader_test.e:301
  492% 
  493% sort snow: stuff
  494subsort(snow, stuff).
  495
  496% sort ball
  497sort(ball).
  498
  499% 
  500% sort food: physobj
  501subsort(food, physobj).
  502
  503% sort fruit: food
  504subsort(fruit, food).
  505
  506% ectest/ec_reader_test.e:307
  507% sort orange: fruit
  508subsort(orange, fruit).
  509
  510% sort salad: food
  511subsort(salad, food).
  512
  513% 
  514% sort clothing: physobj
  515subsort(clothing, physobj).
  516
  517% sort scarf: clothing
  518subsort(scarf, clothing).
  519
  520% sort hat: clothing
  521subsort(hat, clothing).
  522
  523% ectest/ec_reader_test.e:313
  524% 
  525% sort vegetablematter: physobj
  526subsort(vegetablematter, physobj).
  527
  528% sort coal: vegetablematter
  529subsort(coal, vegetablematter).
  530
  531% 
  532% sort bodypart: physobj
  533subsort(bodypart, physobj).
  534
  535% sort hand: bodypart
  536subsort(hand, bodypart).
  537
  538% ectest/ec_reader_test.e:319
  539% 
  540% sort papertowels: physobj
  541subsort(papertowels, physobj).
  542
  543% sort device: physobj
  544subsort(device, physobj).
  545
  546% sort electronicdevice: device
  547subsort(electronicdevice, device).
  548
  549% sort lamp: electronicdevice
  550subsort(lamp, electronicdevice).
  551
  552% 
  553% ectest/ec_reader_test.e:325
  554% sort cat: physobj
  555subsort(cat, physobj).
  556
  557% sort horse: physobj
  558subsort(horse, physobj).
  559
  560% 
  561% sort weapon: physobj
  562subsort(weapon, physobj).
  563
  564% sort gun: weapon
  565subsort(gun, weapon).
  566
  567% sort bomb: weapon
  568subsort(bomb, weapon).
  569
  570% ectest/ec_reader_test.e:331
  571% sort bullet: weapon
  572subsort(bullet, weapon).
  573
  574% 
  575% ; location
  576% 
  577% sort location
  578sort(location).
  579
  580% sort room: location, outside: location
  581subsort(room, location).
  582
  583subsort(outside, location).
  584
  585% ectest/ec_reader_test.e:337
  586% 
  587% ; portal
  588% 
  589% sort portal
  590sort(portal).
  591
  592% sort door: portal, staircase: portal
  593subsort(door, portal).
  594
  595subsort(staircase, portal).
  596
  597% sort street: portal
  598subsort(street, portal).
  599
  600% ectest/ec_reader_test.e:343
  601% sort track: portal
  602subsort(track, portal).
  603
  604% 
  605% sort building
  606sort(building).
  607
  608% 
  609% sort fire: object
  610subsort(fire, object).
  611
  612% sort smoke: physobj
  613subsort(smoke, physobj).
  614
  615% ectest/ec_reader_test.e:349
  616% 
  617% sort furniture: physobj
  618subsort(furniture, physobj).
  619
  620% sort chair: furniture
  621subsort(chair, furniture).
  622
  623% sort table: furniture
  624subsort(table, furniture).
  625
  626% 
  627% sort bill: physobj
  628subsort(bill, physobj).
  629
  630% ectest/ec_reader_test.e:355
  631% sort ticket: physobj
  632subsort(ticket, physobj).
  633
  634% sort envelope: physobj
  635subsort(envelope, physobj).
  636
  637% 
  638% sort text: physobj
  639subsort(text, physobj).
  640
  641% sort book: text
  642subsort(book, text).
  643
  644% sort letter: text
  645subsort(letter, text).
  646
  647% ectest/ec_reader_test.e:361
  648% sort menu: text
  649subsort(menu, text).
  650
  651% 
  652% sort paper: physobj
  653subsort(paper, physobj).
  654
  655% 
  656% sort content
  657sort(content).
  658
  659% sort script
  660sort(script).
  661
  662% ectest/ec_reader_test.e:367
  663% 
  664% sort container: physobj
  665subsort(container, physobj).
  666
  667% sort cigarette: physobj
  668subsort(cigarette, physobj).
  669
  670% sort ashtray: physobj
  671subsort(ashtray, physobj).
  672
  673% sort umbrella: physobj
  674subsort(umbrella, physobj).
  675
  676% 
  677% ectest/ec_reader_test.e:373
  678% sort pen: physobj
  679subsort(pen, physobj).
  680
  681% 
  682% ; End of file.
  683% 
  684% 
  685% 
  686% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  687% ; FILE: ecnet/RTSpace.e
  688% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  689% ectest/ec_reader_test.e:382
  690% 
  691% ;
  692% ; Copyright (c) 2005 IBM Corporation and others.
  693% ; All rights reserved. This program and the accompanying materials
  694% ; are made available under the terms of the Common Public License v1.0
  695% ; which accompanies this distribution, and is available at
  696% ; http://www.eclipse.org/legal/cpl-v10.html
  697% ;
  698% ; Contributors:
  699% ; IBM - Initial implementation
  700% ;
  701% ; RTSpace: room-scale topological space
  702% ;
  703% ; We use topological and metric representations of space,
  704% ; at two levels of granularity---room-scale and object-scale.
  705% ; The RTSpace representation deals with topological space at
  706% ; the scale of rooms and outdoor locations.
  707% ; This representation of space consists of locations, which
  708% ; are connected by portals. There are two types of locations:
  709% ; rooms and outside areas (outsides).
  710% ;
  711% ectest/ec_reader_test.e:403
  712% 
  713% ; object is at location.
  714% fluent At(object,location)
  715fluent(at(object, location)).
  716
  717% manualrelease At
  718manualrelease(at).
  719
  720% 
  721% ectest/ec_reader_test.e:408
  722% [object1,location,time]% 
  723% (
  724% ectest/ec_reader_test.e:409
  725% {object2} PartOf(object1,object2)) ->
  726% ReleasedAt(At(object1,location),time).
  727exists([Object2],  (partOf(Object1, Object2)->releasedAt(at(Object1, Location), Time))).
  728
  729% 
  730% 
  731% ; A state constraint says that an object
  732% ; is at one location at a time:
  733% ectest/ec_reader_test.e:414
  734% [object,location1,location2,time]% 
  735% HoldsAt(At(object,location1),time) &
  736% HoldsAt(At(object,location2),time) ->
  737% location1=location2.
  738holds_at(at(Object, Location1), Time), holds_at(at(Object, Location2), Time) ->
  739	Location1=Location2.
  740
  741% 
  742% 
  743% ; connectivity
  744% ectest/ec_reader_test.e:420
  745% 
  746% ; Side one of portal is location.
  747% function Side1(portal): location
  748function(side1(portal), location).
  749
  750% ; Side two of portal is location.
  751% function Side2(portal): location
  752function(side2(portal), location).
  753
  754% 
  755% ; The building of room is building.
  756% ectest/ec_reader_test.e:427
  757% function BuildingOf(room): building
  758function(buildingOf(room), building).
  759
  760% 
  761% ; object is at a location that has portal.
  762% fluent NearPortal(object,portal)
  763fluent(nearPortal(object, portal)).
  764
  765% noninertial NearPortal
  766noninertial(nearPortal).
  767
  768% 
  769% ; A state constraint says that an object is near
  770% ; a portal if and only if there is a location such that
  771% ; the object is at the location and one of the sides
  772% ; of the portal is the location:
  773% ectest/ec_reader_test.e:437
  774% [object,portal,time]% 
  775% HoldsAt(NearPortal(object,portal),time) <->
  776% ectest/ec_reader_test.e:439
  777% {location}% 
  778%  (Side1(portal)=location|
  779%   Side2(portal)=location) &
  780%  HoldsAt(At(object,location),time).
  781exists([Location],  (holds_at(nearPortal(Object, Portal), Time)<->(side1(Portal)=Location;side2(Portal)=Location), holds_at(at(Object, Location), Time))).
  782
  783% 
  784% 
  785% ; locking and unlocking doors
  786% ectest/ec_reader_test.e:445
  787% 
  788% ; agent unlocks door.
  789% event DoorUnlock(agent,door)
  790event(doorUnlock(agent, door)).
  791
  792% ; agent locks door.
  793% event DoorLock(agent,door)
  794event(doorLock(agent, door)).
  795
  796% ; door is unlocked.
  797% ectest/ec_reader_test.e:451
  798% fluent DoorUnlocked(door)
  799fluent(doorUnlocked(door)).
  800
  801% 
  802% ; A precondition axiom states that
  803% ; for an agent to unlock a door,
  804% ; the agent must be awake,
  805% ; the door must not already be unlocked, and
  806% ; the agent must be near the door:
  807% ectest/ec_reader_test.e:458
  808% [agent,door,time]% 
  809% Happens(DoorUnlock(agent,door),time) ->
  810% HoldsAt(Awake(agent),time) &
  811% !HoldsAt(DoorUnlocked(door),time) &
  812% HoldsAt(NearPortal(agent,door),time).
  813happens(doorUnlock(Agent, Door), Time) ->
  814	holds_at(awake(Agent), Time),
  815	not(holds_at(doorUnlocked(Door), Time)),
  816	holds_at(nearPortal(Agent, Door), Time).
  817
  818% 
  819% 
  820% ; An effect axiom states that
  821% ; if an agent unlocks a door,
  822% ; the door will be unlocked:
  823% ectest/ec_reader_test.e:467
  824% [agent,door,time]% 
  825% Initiates(DoorUnlock(agent,door),DoorUnlocked(door),time).
  826initiates(doorUnlock(Agent, Door), doorUnlocked(Door), Time).
  827
  828% 
  829% 
  830% ; A precondition axiom states that
  831% ; for an agent to lock a door,
  832% ; the agent must be awake,
  833% ; the door must be unlocked, and
  834% ; the agent must be near the door:
  835% ectest/ec_reader_test.e:475
  836% [agent,door,time]% 
  837% Happens(DoorLock(agent,door),time) ->
  838% HoldsAt(Awake(agent),time) &
  839% HoldsAt(DoorUnlocked(door),time) &
  840% HoldsAt(NearPortal(agent,door),time).
  841happens(doorLock(Agent, Door), Time) ->
  842	holds_at(awake(Agent), Time),
  843	holds_at(doorUnlocked(Door), Time),
  844	holds_at(nearPortal(Agent, Door), Time).
  845
  846% 
  847% 
  848% ; An effect axiom states that
  849% ; if an agent locks a door,
  850% ; the door will no longer be unlocked.
  851% ectest/ec_reader_test.e:484
  852% [agent,door,time]% 
  853% Terminates(DoorLock(agent,door),DoorUnlocked(door),time).
  854terminates(doorLock(Agent, Door), doorUnlocked(Door), Time).
  855
  856% 
  857% 
  858% ; A state constraint says that if a door is open,
  859% ; it is unlocked:
  860% ectest/ec_reader_test.e:489
  861% [door,time]% 
  862% HoldsAt(DoorIsOpen(door),time) -> HoldsAt(DoorUnlocked(door),time).
  863holds_at(doorIsOpen(Door), Time) ->
  864	holds_at(doorUnlocked(Door), Time).
  865
  866% 
  867% 
  868% ; opening and closing doors
  869% 
  870% ; agent opens door.
  871% ectest/ec_reader_test.e:495
  872% event DoorOpen(agent,door)
  873event(doorOpen(agent, door)).
  874
  875% ; agent closes door.
  876% event DoorClose(agent,door)
  877event(doorClose(agent, door)).
  878
  879% ; door is open.
  880% fluent DoorIsOpen(door)
  881fluent(doorIsOpen(door)).
  882
  883% 
  884% ; A precondition axiom states that
  885% ; for an agent to open a door,
  886% ; the agent must be awake,
  887% ; the door must not already be open,
  888% ; the door must be unlocked, and
  889% ; the agent must be near the door:
  890% ectest/ec_reader_test.e:507
  891% [agent,door,time]% 
  892% Happens(DoorOpen(agent,door),time) ->
  893% HoldsAt(Awake(agent),time) &
  894% !HoldsAt(DoorIsOpen(door),time) &
  895% HoldsAt(DoorUnlocked(door),time) &
  896% HoldsAt(NearPortal(agent,door),time).
  897happens(doorOpen(Agent, Door), Time) ->
  898	holds_at(awake(Agent), Time),
  899	not(holds_at(doorIsOpen(Door), Time)),
  900	holds_at(doorUnlocked(Door), Time),
  901	holds_at(nearPortal(Agent, Door), Time).
  902
  903% 
  904% ectest/ec_reader_test.e:513
  905% 
  906% ; An effect axiom states that
  907% ; if an agent opens a door,
  908% ; the door will be open:
  909% ectest/ec_reader_test.e:517
  910% [agent,door,time]% 
  911% Initiates(DoorOpen(agent,door),DoorIsOpen(door),time).
  912initiates(doorOpen(Agent, Door), doorIsOpen(Door), Time).
  913
  914% 
  915% 
  916% ; A precondition axiom states that
  917% ; for an agent to close a door,
  918% ; the agent must be awake,
  919% ; the door must be open,
  920% ; the door must be unlocked, and
  921% ; the agent must be near the door:
  922% ectest/ec_reader_test.e:526
  923% [agent,door,time]% 
  924% Happens(DoorClose(agent,door),time) ->
  925% HoldsAt(Awake(agent),time) &
  926% HoldsAt(DoorIsOpen(door),time) &
  927% HoldsAt(DoorUnlocked(door),time) &
  928% HoldsAt(NearPortal(agent,door),time).
  929happens(doorClose(Agent, Door), Time) ->
  930	holds_at(awake(Agent), Time),
  931	holds_at(doorIsOpen(Door), Time),
  932	holds_at(doorUnlocked(Door), Time),
  933	holds_at(nearPortal(Agent, Door), Time).
  934
  935% 
  936% ectest/ec_reader_test.e:532
  937% 
  938% ; An effect axiom states that
  939% ; if an agent closes a door,
  940% ; the door will no longer be open:
  941% ectest/ec_reader_test.e:536
  942% [agent,door,time]% 
  943% Terminates(DoorClose(agent,door),DoorIsOpen(door),time).
  944terminates(doorClose(Agent, Door), doorIsOpen(Door), Time).
  945
  946% 
  947% 
  948% ; passing through doors
  949% 
  950% ; agent walks through side one of door.
  951% ectest/ec_reader_test.e:542
  952% event WalkThroughDoor12(agent,door)
  953event(walkThroughDoor12(agent, door)).
  954
  955% ; agent walks through side two of door.
  956% event WalkThroughDoor21(agent,door)
  957event(walkThroughDoor21(agent, door)).
  958
  959% 
  960% ; Precondition axioms state that
  961% ; for an agent to walk through a side of a door,
  962% ; the agent must be awake and standing,
  963% ; the door must be open, and
  964% ; the agent must be at the side of the door that
  965% ; the agent walks through:
  966% ectest/ec_reader_test.e:552
  967% [agent,door,time]% 
  968% Happens(WalkThroughDoor12(agent,door),time) ->
  969% HoldsAt(Awake(agent),time) &
  970% HoldsAt(Standing(agent),time) &
  971% HoldsAt(DoorIsOpen(door),time) &
  972% HoldsAt(At(agent,Side1(door)),time).
  973happens(walkThroughDoor12(Agent, Door), Time) ->
  974	holds_at(awake(Agent), Time),
  975	holds_at(standing(Agent), Time),
  976	holds_at(doorIsOpen(Door), Time),
  977	holds_at(at(Agent, side1(Door)), Time).
  978
  979% 
  980% ectest/ec_reader_test.e:558
  981% 
  982% ectest/ec_reader_test.e:559
  983% [agent,door,time]% 
  984% Happens(WalkThroughDoor21(agent,door),time) ->
  985% HoldsAt(Awake(agent),time) &
  986% HoldsAt(Standing(agent),time) &
  987% HoldsAt(DoorIsOpen(door),time) &
  988% HoldsAt(At(agent,Side2(door)),time).
  989happens(walkThroughDoor21(Agent, Door), Time) ->
  990	holds_at(awake(Agent), Time),
  991	holds_at(standing(Agent), Time),
  992	holds_at(doorIsOpen(Door), Time),
  993	holds_at(at(Agent, side2(Door)), Time).
  994
  995% 
  996% ectest/ec_reader_test.e:565
  997% 
  998% ; Effect axioms state that
  999% ; if an agent walks through one side of a door,
 1000% ; the agent will be at the other side of the door:
 1001% ectest/ec_reader_test.e:569
 1002% [agent,door,location,time]% 
 1003% Side2(door)=location ->
 1004% Initiates(WalkThroughDoor12(agent,door),At(agent,location),time).
 1005side2(Door)=Location ->
 1006	initiates(walkThroughDoor12(Agent, Door),
 1007		  at(Agent, Location),
 1008		  Time).
 1009
 1010% 
 1011% 
 1012% ectest/ec_reader_test.e:573
 1013% [agent,door,location,time]% 
 1014% Side1(door)=location ->
 1015% Initiates(WalkThroughDoor21(agent,door),At(agent,location),time).
 1016side1(Door)=Location ->
 1017	initiates(walkThroughDoor21(Agent, Door),
 1018		  at(Agent, Location),
 1019		  Time).
 1020
 1021% 
 1022% 
 1023% ectest/ec_reader_test.e:577
 1024% [agent,door,location,time]% 
 1025% Side1(door)=location ->
 1026% Terminates(WalkThroughDoor12(agent,door),At(agent,location),time).
 1027side1(Door)=Location ->
 1028	terminates(walkThroughDoor12(Agent, Door),
 1029		   at(Agent, Location),
 1030		   Time).
 1031
 1032% 
 1033% 
 1034% ectest/ec_reader_test.e:581
 1035% [agent,door,location,time]% 
 1036% Side2(door)=location ->
 1037% Terminates(WalkThroughDoor21(agent,door),At(agent,location),time).
 1038side2(Door)=Location ->
 1039	terminates(walkThroughDoor21(Agent, Door),
 1040		   at(Agent, Location),
 1041		   Time).
 1042
 1043% 
 1044% 
 1045% ; walking from one end of a street to another
 1046% 
 1047% ; agent walks from the first end of street to the second end.
 1048% ectest/ec_reader_test.e:588
 1049% event WalkStreet12(agent,street)
 1050event(walkStreet12(agent, street)).
 1051
 1052% ; agent walks from the second end of street to the first end.
 1053% event WalkStreet21(agent,street)
 1054event(walkStreet21(agent, street)).
 1055
 1056% 
 1057% ; Precondition axioms state that
 1058% ; for an agent to walk from one end of a street to another,
 1059% ; the agent must be awake,
 1060% ; the agent must be standing, and
 1061% ; the agent must be at the first end of the street:
 1062% ectest/ec_reader_test.e:597
 1063% [agent,street,time]% 
 1064% Happens(WalkStreet12(agent,street),time) ->
 1065% HoldsAt(Awake(agent),time) &
 1066% HoldsAt(Standing(agent),time) &
 1067% HoldsAt(At(agent,Side1(street)),time).
 1068happens(walkStreet12(Agent, Street), Time) ->
 1069	holds_at(awake(Agent), Time),
 1070	holds_at(standing(Agent), Time),
 1071	holds_at(at(Agent, side1(Street)), Time).
 1072
 1073% 
 1074% 
 1075% ectest/ec_reader_test.e:603
 1076% [agent,street,time]% 
 1077% Happens(WalkStreet21(agent,street),time) ->
 1078% HoldsAt(Awake(agent),time) &
 1079% HoldsAt(Standing(agent),time) &
 1080% HoldsAt(At(agent,Side2(street)),time).
 1081happens(walkStreet21(Agent, Street), Time) ->
 1082	holds_at(awake(Agent), Time),
 1083	holds_at(standing(Agent), Time),
 1084	holds_at(at(Agent, side2(Street)), Time).
 1085
 1086% 
 1087% 
 1088% ; Effect axioms state that
 1089% ; if an agent walks from one end of a street to another,
 1090% ; the agent will be at the other end of the street:
 1091% ectest/ec_reader_test.e:612
 1092% [agent,street,location,time]% 
 1093% Side2(street)=location ->
 1094% Initiates(WalkStreet12(agent,street),At(agent,location),time).
 1095side2(Street)=Location ->
 1096	initiates(walkStreet12(Agent, Street),
 1097		  at(Agent, Location),
 1098		  Time).
 1099
 1100% 
 1101% 
 1102% ectest/ec_reader_test.e:616
 1103% [agent,street,location,time]% 
 1104% Side1(street)=location ->
 1105% Initiates(WalkStreet21(agent,street),At(agent,location),time).
 1106side1(Street)=Location ->
 1107	initiates(walkStreet21(Agent, Street),
 1108		  at(Agent, Location),
 1109		  Time).
 1110
 1111% 
 1112% 
 1113% ectest/ec_reader_test.e:620
 1114% [agent,street,location,time]% 
 1115% Side1(street)=location ->
 1116% Terminates(WalkStreet12(agent,street),At(agent,location),time).
 1117side1(Street)=Location ->
 1118	terminates(walkStreet12(Agent, Street),
 1119		   at(Agent, Location),
 1120		   Time).
 1121
 1122% 
 1123% 
 1124% ectest/ec_reader_test.e:624
 1125% [agent,street,location,time]% 
 1126% Side2(street)=location ->
 1127% Terminates(WalkStreet21(agent,street),At(agent,location),time).
 1128side2(Street)=Location ->
 1129	terminates(walkStreet21(Agent, Street),
 1130		   at(Agent, Location),
 1131		   Time).
 1132
 1133% 
 1134% 
 1135% ; floors
 1136% 
 1137% ; The floor of room is integer.
 1138% ectest/ec_reader_test.e:631
 1139% function Floor(room): integer
 1140function(floor(room), integer).
 1141
 1142% 
 1143% ; walking up and down staircases
 1144% 
 1145% ; agent walks down staircase.
 1146% event WalkDownStaircase(agent,staircase)
 1147event(walkDownStaircase(agent, staircase)).
 1148
 1149% ectest/ec_reader_test.e:637
 1150% ; agent walks up staircase.
 1151% event WalkUpStaircase(agent,staircase)
 1152event(walkUpStaircase(agent, staircase)).
 1153
 1154% 
 1155% ; Precondition axioms state that
 1156% ; for an agent to walk down (up) a staircase,
 1157% ; the agent must be awake, standing, and
 1158% ; at the top (bottom) of the staircase:
 1159% ectest/ec_reader_test.e:644
 1160% [agent,staircase,time]% 
 1161% Happens(WalkDownStaircase(agent,staircase),time) ->
 1162% HoldsAt(Awake(agent),time) &
 1163% HoldsAt(Standing(agent),time) &
 1164% HoldsAt(At(agent,Side2(staircase)),time).
 1165happens(walkDownStaircase(Agent, Staircase), Time) ->
 1166	holds_at(awake(Agent), Time),
 1167	holds_at(standing(Agent), Time),
 1168	holds_at(at(Agent, side2(Staircase)), Time).
 1169
 1170% 
 1171% 
 1172% ectest/ec_reader_test.e:650
 1173% [agent,staircase,time]% 
 1174% Happens(WalkUpStaircase(agent,staircase),time) ->
 1175% HoldsAt(Awake(agent),time) &
 1176% HoldsAt(Standing(agent),time) &
 1177% HoldsAt(At(agent,Side1(staircase)),time).
 1178happens(walkUpStaircase(Agent, Staircase), Time) ->
 1179	holds_at(awake(Agent), Time),
 1180	holds_at(standing(Agent), Time),
 1181	holds_at(at(Agent, side1(Staircase)), Time).
 1182
 1183% 
 1184% 
 1185% ; Effect axioms state that
 1186% ; if an agent walks down (up) a staircase,
 1187% ; the agent will be at the bottom (top) of the staircase:
 1188% ectest/ec_reader_test.e:659
 1189% [agent,staircase,room,time]% 
 1190% Side1(staircase)=room ->
 1191% Initiates(WalkDownStaircase(agent,staircase),At(agent,room),time).
 1192side1(Staircase)=Room ->
 1193	initiates(walkDownStaircase(Agent, Staircase),
 1194		  at(Agent, Room),
 1195		  Time).
 1196
 1197% 
 1198% 
 1199% ectest/ec_reader_test.e:663
 1200% [agent,staircase,room,time]% 
 1201% Side2(staircase)=room ->
 1202% Terminates(WalkDownStaircase(agent,staircase),At(agent,room),time).
 1203side2(Staircase)=Room ->
 1204	terminates(walkDownStaircase(Agent, Staircase),
 1205		   at(Agent, Room),
 1206		   Time).
 1207
 1208% 
 1209% 
 1210% ectest/ec_reader_test.e:667
 1211% [agent,staircase,room,time]% 
 1212% Side2(staircase)=room ->
 1213% Initiates(WalkUpStaircase(agent,staircase),At(agent,room),time).
 1214side2(Staircase)=Room ->
 1215	initiates(walkUpStaircase(Agent, Staircase),
 1216		  at(Agent, Room),
 1217		  Time).
 1218
 1219% 
 1220% 
 1221% ectest/ec_reader_test.e:671
 1222% [agent,staircase,room,time]% 
 1223% Side1(staircase)=room ->
 1224% Terminates(WalkUpStaircase(agent,staircase),At(agent,room),time).
 1225side1(Staircase)=Room ->
 1226	terminates(walkUpStaircase(Agent, Staircase),
 1227		   at(Agent, Room),
 1228		   Time).
 1229
 1230% 
 1231% 
 1232% ; A state constraint says that if an agent is outside,
 1233% ; the agent is dressed.
 1234% ectest/ec_reader_test.e:677
 1235% [agent,outside,time]% 
 1236% HoldsAt(At(agent,outside),time) ->
 1237% HoldsAt(Dressed(agent),time).
 1238holds_at(at(Agent, Outside), Time) ->
 1239	holds_at(dressed(Agent), Time).
 1240
 1241% 
 1242% 
 1243% ; room looks out onto outside.
 1244% function LookOutOnto(room): outside
 1245function(lookOutOnto(room), outside).
 1246
 1247% ectest/ec_reader_test.e:683
 1248% 
 1249% ; location1 is adjacent to location2.
 1250% predicate Adjacent(location,location)
 1251predicate(adjacent(location, location)).
 1252
 1253% 
 1254% ; A state constraint says that
 1255% ; two locations are adjacent if and only if
 1256% ; they have a portal in common:
 1257% ectest/ec_reader_test.e:690
 1258% [location1,location2] % Adjacent(location1,location2) <->
 1259% ectest/ec_reader_test.e:691
 1260% {portal}% 
 1261% (Side1(portal)=location1 &
 1262%  Side2(portal)=location2) |
 1263% (Side2(portal)=location1 &
 1264%  Side1(portal)=location2).
 1265exists([Portal],  (adjacent(Location1, Location2)<->side1(Portal)=Location1, side2(Portal)=Location2;side2(Portal)=Location1, side1(Portal)=Location2)).
 1266
 1267% 
 1268% 
 1269% ; The ground of outside is ground.
 1270% ectest/ec_reader_test.e:698
 1271% function GroundOf(outside): ground
 1272function(groundOf(outside), ground).
 1273
 1274% ; The sky of outside is sky.
 1275% function SkyOf(outside): sky
 1276function(skyOf(outside), sky).
 1277
 1278% 
 1279% ; State constraints fix the location of ground and sky:
 1280% ectest/ec_reader_test.e:703
 1281% [outside,ground,time]% 
 1282% GroundOf(outside) = ground ->
 1283% HoldsAt(At(ground,outside),time).
 1284groundOf(Outside)=Ground ->
 1285	holds_at(at(Ground, Outside), Time).
 1286
 1287% 
 1288% 
 1289% ectest/ec_reader_test.e:707
 1290% [outside,sky,time]% 
 1291% SkyOf(outside) = sky ->
 1292% HoldsAt(At(sky,outside),time).
 1293skyOf(Outside)=Sky ->
 1294	holds_at(at(Sky, Outside), Time).
 1295
 1296% 
 1297% 
 1298% ; End of file.
 1299% 
 1300% ectest/ec_reader_test.e:713
 1301% 
 1302% 
 1303% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 1304% ; FILE: ecnet/OTSpace.e
 1305% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 1306% 
 1307% ;
 1308% ; Copyright (c) 2005 IBM Corporation and others.
 1309% ; All rights reserved. This program and the accompanying materials
 1310% ; are made available under the terms of the Common Public License v1.0
 1311% ; which accompanies this distribution, and is available at
 1312% ; http://www.eclipse.org/legal/cpl-v10.html
 1313% ;
 1314% ; Contributors:
 1315% ; IBM - Initial implementation
 1316% ;
 1317% ; OTSpace: object-scale topological space
 1318% ;
 1319% ; The OTSpace representation deals with topological space at
 1320% ; the scale of objects such as agents (humans and animals)
 1321% ; and physical objects.
 1322% ;
 1323% ectest/ec_reader_test.e:735
 1324% 
 1325% ; PartOf
 1326% 
 1327% ; physobj is a part of object.
 1328% predicate PartOf(physobj,object)
 1329predicate(partOf(physobj, object)).
 1330
 1331% 
 1332% ; A state constraint says that if a physical object
 1333% ; is part of an object, the location of the
 1334% ; physical object is the same as the location of the object:
 1335% ectest/ec_reader_test.e:744
 1336% [physobj,object,location,time]% 
 1337% PartOf(physobj,object) &
 1338% HoldsAt(At(object,location),time) ->
 1339% HoldsAt(At(physobj,location),time).
 1340partOf(Physobj, Object), holds_at(at(Object, Location), Time) ->
 1341	holds_at(at(Physobj, Location), Time).
 1342
 1343% 
 1344% 
 1345% ; rolling a snowball bigger
 1346% ectest/ec_reader_test.e:750
 1347% 
 1348% ; agent rolls stuff1 along stuff2.
 1349% event RollAlong(agent,stuff,stuff)
 1350event(rollAlong(agent, stuff, stuff)).
 1351
 1352% ; The diameter of ball is diameter.
 1353% fluent Diameter(ball,diameter)
 1354fluent(diameter(ball, diameter)).
 1355
 1356% 
 1357% ; A state constraint says that a ball has a unique diameter:
 1358% ectest/ec_reader_test.e:757
 1359% [ball,diameter1,diameter2,time]% 
 1360% HoldsAt(Diameter(ball,diameter1),time) &
 1361% HoldsAt(Diameter(ball,diameter2),time) ->
 1362% diameter1=diameter2.
 1363holds_at(diameter(Ball, Diameter1), Time), holds_at(diameter(Ball, Diameter2), Time) ->
 1364	Diameter1=Diameter2.
 1365
 1366% 
 1367% 
 1368% ; Effect axiom state that if an agent rolls some snow along
 1369% ; some other snow, the diameter of the first snow will increase:
 1370% ectest/ec_reader_test.e:764
 1371% [agent,snow1,snow2,diameter1,diameter2,time]% 
 1372% HoldsAt(Diameter(snow1,diameter1),time) &
 1373% diameter2 = diameter1+1 ->
 1374% Initiates(RollAlong(agent,snow1,snow2),
 1375%           Diameter(snow1,diameter2),
 1376%           time).
 1377holds_at(diameter(Snow1, Diameter1), Time), Diameter2=Diameter1+1 ->
 1378	initiates(rollAlong(Agent, Snow1, Snow2),
 1379		  diameter(Snow1, Diameter2),
 1380		  Time).
 1381
 1382% 
 1383% ectest/ec_reader_test.e:770
 1384% 
 1385% ectest/ec_reader_test.e:771
 1386% [agent,snow1,snow2,diameter1,time]% 
 1387% HoldsAt(Diameter(snow1,diameter1),time) ->
 1388% Terminates(RollAlong(agent,snow1,snow2),
 1389%            Diameter(snow1,diameter1),
 1390%            time).
 1391holds_at(diameter(Snow1, Diameter1), Time) ->
 1392	terminates(rollAlong(Agent, Snow1, Snow2),
 1393		   diameter(Snow1, Diameter1),
 1394		   Time).
 1395
 1396% 
 1397% 
 1398% ; A precondition axiom states that
 1399% ; for an agent to roll some snow along some other snow,
 1400% ; there must be a location such that
 1401% ; the agent is at the location,
 1402% ; the first snow is at the location, and
 1403% ; the second snow is at the location:
 1404% ;[agent,snow1,snow2,time]
 1405% ;Happens(RollAlong(agent,snow1,snow2),time) ->
 1406% ;{location}
 1407% ;HoldsAt(At(agent,location),time) &
 1408% ;HoldsAt(At(snow1,location),time) &
 1409% ;HoldsAt(At(snow2,location),time).
 1410% ectest/ec_reader_test.e:789
 1411% 
 1412% ; motion
 1413% 
 1414% ; object moves (in place).
 1415% event Move(object)
 1416event(move(object)).
 1417
 1418% 
 1419% ; Holding
 1420% ectest/ec_reader_test.e:796
 1421% 
 1422% ; agent is holding physobj.
 1423% fluent Holding(agent,physobj)
 1424fluent(holding(agent, physobj)).
 1425
 1426% ; agent holds or picks up physobj.
 1427% event Hold(agent,physobj)
 1428event(hold(agent, physobj)).
 1429
 1430% ; agent picks up some stuff1 from stuff2.
 1431% ectest/ec_reader_test.e:802
 1432% event HoldSome(agent,stuff,stuff)
 1433event(holdSome(agent, stuff, stuff)).
 1434
 1435% ; agent releases or lets go of physobj.
 1436% event LetGoOf(agent,physobj)
 1437event(letGoOf(agent, physobj)).
 1438
 1439% 
 1440% ; An effect axiom states that if an agent holds
 1441% ; a physical object, the agent will be holding the
 1442% ; physical object:
 1443% ectest/ec_reader_test.e:809
 1444% [agent,physobj,time]% 
 1445% Initiates(Hold(agent,physobj),Holding(agent,physobj),time).
 1446initiates(hold(Agent, Physobj), holding(Agent, Physobj), Time).
 1447
 1448% 
 1449% 
 1450% ; A precondition axiom states that
 1451% ; for an agent to hold a physical object,
 1452% ; there must be a location such that
 1453% ; the agent is at the location and
 1454% ; the physical object is at the location:
 1455% ;[agent,physobj,time]
 1456% ;Happens(Hold(agent,physobj),time) ->
 1457% ;{location}
 1458% ;  HoldsAt(At(agent,location),time) &
 1459% ;  HoldsAt(At(physobj,location),time).
 1460% ectest/ec_reader_test.e:822
 1461% 
 1462% ; An effect axiom states that if an agent
 1463% ; lets go of a physical object, the agent is no longer holding
 1464% ; the physical object:
 1465% ectest/ec_reader_test.e:826
 1466% [agent,physobj,time]% 
 1467% Terminates(LetGoOf(agent,physobj),Holding(agent,physobj),time).
 1468terminates(letGoOf(Agent, Physobj), holding(Agent, Physobj), Time).
 1469
 1470% 
 1471% 
 1472% ; A precondition axiom states that
 1473% ; for an agent to let go of a physical object,
 1474% ; the agent must be holding the physical object:
 1475% ectest/ec_reader_test.e:832
 1476% [agent,physobj,time]% 
 1477% Happens(LetGoOf(agent,physobj),time) ->
 1478% HoldsAt(Holding(agent,physobj),time).
 1479happens(letGoOf(Agent, Physobj), Time) ->
 1480	holds_at(holding(Agent, Physobj), Time).
 1481
 1482% 
 1483% 
 1484% ; A releases axiom states that if an agent holds
 1485% ; a physical object,
 1486% ; the physical object's location will be released
 1487% ; from inertia:
 1488% ectest/ec_reader_test.e:840
 1489% [agent,physobj,location,time]% 
 1490% Releases(Hold(agent,physobj),At(physobj,location),time).
 1491releases(hold(Agent, Physobj), at(Physobj, Location), Time).
 1492
 1493% 
 1494% 
 1495% ; A state constraint says that if an agent is holding
 1496% ; a physical object and the agent is at a location,
 1497% ; the physical object is also at the location:
 1498% ectest/ec_reader_test.e:846
 1499% [agent,physobj,location,time]% 
 1500% HoldsAt(Holding(agent,physobj),time) &
 1501% HoldsAt(At(agent,location),time) ->
 1502% HoldsAt(At(physobj,location),time).
 1503holds_at(holding(Agent, Physobj), Time), holds_at(at(Agent, Location), Time) ->
 1504	holds_at(at(Physobj, Location), Time).
 1505
 1506% 
 1507% 
 1508% ; A releases axiom states that if an agent holds
 1509% ; a physical object,
 1510% ; the locations of the parts of the physical object
 1511% ; will be released from inertia:
 1512% ectest/ec_reader_test.e:855
 1513% [agent,physobj1,physobj2,location,time]% 
 1514% PartOf(physobj1,physobj2) ->
 1515% Releases(Hold(agent,physobj2),At(physobj1,location),time).
 1516partOf(Physobj1, Physobj2) ->
 1517	releases(hold(Agent, Physobj2),
 1518		 at(Physobj1, Location),
 1519		 Time).
 1520
 1521% 
 1522% 
 1523% ; Further, if an agent holds a physical object,
 1524% ; the locations of the physical objects of which
 1525% ; the physical object is a part
 1526% ; will be released from inertia:
 1527% ectest/ec_reader_test.e:863
 1528% [agent,physobj1,physobj2,location,time]% 
 1529% PartOf(physobj1,physobj2) ->
 1530% Releases(Hold(agent,physobj1),At(physobj2,location),time).
 1531partOf(Physobj1, Physobj2) ->
 1532	releases(hold(Agent, Physobj1),
 1533		 at(Physobj2, Location),
 1534		 Time).
 1535
 1536% 
 1537% 
 1538% ;[agent,physobj,location1,location2,time]
 1539% ;(!{object} PartOf(physobj,object)) &
 1540% ;HoldsAt(At(agent,location1),time) &
 1541% ;location1 != location2 ->
 1542% ;Terminates(LetGoOf(agent,physobj),At(physobj,location2),time).
 1543% ectest/ec_reader_test.e:872
 1544% 
 1545% ectest/ec_reader_test.e:873
 1546% [agent,physobj,location,time]% 
 1547% (!{object} PartOf(physobj,object)) &
 1548% HoldsAt(At(agent,location),time) ->
 1549% Initiates(LetGoOf(agent,physobj),At(physobj,location),time).
 1550not(exists([Object], partOf(Physobj, Object))), holds_at(at(Agent, Location), Time) ->
 1551	initiates(letGoOf(Agent, Physobj),
 1552		  at(Physobj, Location),
 1553		  Time).
 1554
 1555% 
 1556% 
 1557% ;[agent,physobj1,physobj2,location1,location2,time]
 1558% ;PartOf(physobj1,physobj2) &
 1559% ;(!{object} PartOf(physobj2,object)) &
 1560% ;HoldsAt(At(agent,location1),time) &
 1561% ;location1 != location2 ->
 1562% ;Terminates(LetGoOf(agent,physobj1),At(physobj2,location2),time).
 1563% ectest/ec_reader_test.e:884
 1564% 
 1565% ectest/ec_reader_test.e:885
 1566% [agent,physobj1,physobj2,location,time]% 
 1567% PartOf(physobj1,physobj2) &
 1568% (!{object} PartOf(physobj2,object)) &
 1569% HoldsAt(At(agent,location),time) ->
 1570% Initiates(LetGoOf(agent,physobj1),At(physobj2,location),time).
 1571partOf(Physobj1, Physobj2), not(exists([Object], partOf(Physobj2, Object))), holds_at(at(Agent, Location), Time) ->
 1572	initiates(letGoOf(Agent, Physobj1),
 1573		  at(Physobj2, Location),
 1574		  Time).
 1575
 1576% 
 1577% 
 1578% ; An effect axiom states that if an agent is at a location
 1579% ; and lets go of a physical object, the physical object
 1580% ; will be at the location:
 1581% ectest/ec_reader_test.e:894
 1582% [agent,physobj,location,time]% 
 1583% HoldsAt(At(agent,location),time) ->
 1584% Initiates(LetGoOf(agent,physobj),At(physobj,location),time).
 1585holds_at(at(Agent, Location), Time) ->
 1586	initiates(letGoOf(Agent, Physobj),
 1587		  at(Physobj, Location),
 1588		  Time).
 1589
 1590% 
 1591% 
 1592% ; An effect axiom states that if an agent picks up
 1593% ; some stuff out of some other stuff, the agent will
 1594% ; be holding the first stuff:
 1595% ectest/ec_reader_test.e:901
 1596% [agent,stuff1,stuff2,time]% 
 1597% Initiates(HoldSome(agent,stuff1,stuff2),
 1598%           Holding(agent,stuff1),
 1599%           time).
 1600initiates(holdSome(Agent, Stuff1, Stuff2), holding(Agent, Stuff1), Time).
 1601
 1602% 
 1603% 
 1604% ; A precondition axiom states that
 1605% ; for an agent to pick up some stuff out of some other stuff,
 1606% ; the first stuff must be a part of the second stuff and
 1607% ; there must be a location such that the agent is at the location,
 1608% ; the first stuff is at the location, and the second stuff is
 1609% ; at the location:
 1610% ectest/ec_reader_test.e:912
 1611% [agent,stuff1,stuff2,time]% 
 1612% Happens(HoldSome(agent,stuff1,stuff2),time) ->
 1613% PartOf(stuff1,stuff2) &
 1614% ectest/ec_reader_test.e:915
 1615% {location}% 
 1616%   HoldsAt(At(agent,location),time) &
 1617%   HoldsAt(At(stuff1,location),time) &
 1618%   HoldsAt(At(stuff2,location),time).
 1619exists([Location],  (happens(holdSome(Agent, Stuff1, Stuff2), Time)->partOf(Stuff1, Stuff2), holds_at(at(Agent, Location), Time), holds_at(at(Stuff1, Location), Time), holds_at(at(Stuff2, Location), Time))).
 1620
 1621% 
 1622% 
 1623% ; A releases axiom states that if an agent picks up some
 1624% ; stuff out of some other stuff,
 1625% ; the first stuff's location will be released
 1626% ; from inertia:
 1627% ectest/ec_reader_test.e:924
 1628% 
 1629% 
 1630% ectest/ec_reader_test.e:926
 1631% [agent,stuff1,stuff2,location,time]% 
 1632% Releases(HoldSome(agent,stuff1,stuff2),At(stuff1,location),time).
 1633releases(holdSome(Agent, Stuff1, Stuff2), at(Stuff1, Location), Time).
 1634
 1635% 
 1636% 
 1637% ; Inside
 1638% 
 1639% ; physobj1 is inside physobj2.
 1640% ectest/ec_reader_test.e:932
 1641% fluent Inside(physobj,physobj)
 1642fluent(inside(physobj, physobj)).
 1643
 1644% ; agent puts physobj1 inside physobj2.
 1645% event PutInside(agent,physobj,physobj)
 1646event(putInside(agent, physobj, physobj)).
 1647
 1648% ; agent takes physobj1 out of physobj2.
 1649% event TakeOutOf(agent,physobj,physobj)
 1650event(takeOutOf(agent, physobj, physobj)).
 1651
 1652% 
 1653% ; A state constraint says that a physical object cannot
 1654% ; be inside itself:
 1655% ectest/ec_reader_test.e:940
 1656% 
 1657% ectest/ec_reader_test.e:941
 1658% [physobj1,physobj2,time]% 
 1659% HoldsAt(Inside(physobj1,physobj2),time) ->
 1660% physobj1!=physobj2.
 1661holds_at(inside(Physobj1, Physobj2), Time) ->
 1662	Physobj1\=Physobj2.
 1663
 1664% 
 1665% 
 1666% holdsAt(inside(physobj1,physobj2),time) -> physobj1 != physobj2.
 1667holds_at(inside(physobj1, physobj2), time) ->
 1668	physobj1\=physobj2.
 1669
 1670% 
 1671% 
 1672% ectest/ec_reader_test.e:947
 1673% 
 1674% ; A state constraint says that if a physical object is
 1675% ; inside another physical object, the second physical object
 1676% ; is not inside the first physical object:
 1677% ectest/ec_reader_test.e:951
 1678% [physobj1,physobj2,time]% 
 1679% HoldsAt(Inside(physobj1,physobj2),time) ->
 1680% !HoldsAt(Inside(physobj2,physobj1),time).
 1681holds_at(inside(Physobj1, Physobj2), Time) ->
 1682	not(holds_at(inside(Physobj2, Physobj1), Time)).
 1683
 1684% 
 1685% 
 1686% ; An effect axiom states that if an agent puts a physical
 1687% ; object inside another physical object, the first
 1688% ; physical object will be inside the second physical object:
 1689% ectest/ec_reader_test.e:958
 1690% [agent,physobj1,physobj2,time]% 
 1691% Initiates(PutInside(agent,physobj1,physobj2),
 1692%           Inside(physobj1,physobj2),time).
 1693initiates(putInside(Agent, Physobj1, Physobj2), inside(Physobj1, Physobj2), Time).
 1694
 1695% 
 1696% 
 1697% ; An effect axiom states that if an agent puts a physical
 1698% ; object inside another physical object, the agent will
 1699% ; no longer be holding the first physical object:
 1700% ectest/ec_reader_test.e:965
 1701% [agent,physobj1,physobj2,time]% 
 1702% Terminates(PutInside(agent,physobj1,physobj2),
 1703%            Holding(agent,physobj1),time).
 1704terminates(putInside(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 1705
 1706% 
 1707% 
 1708% ; A precondition axiom states that
 1709% ; for an agent to put a physical object inside another
 1710% ; physical object,
 1711% ; the agent must be holding the first physical object
 1712% ; and there must be a location such that
 1713% ; the agent is at the location and
 1714% ; the second physical object is at the location:
 1715% ;[agent,physobj1,physobj2,time]
 1716% ;Happens(PutInside(agent,physobj1,physobj2),time) ->
 1717% ;HoldsAt(Holding(agent,physobj1),time) &
 1718% ;{location}
 1719% ; HoldsAt(At(agent,location),time) &
 1720% ; HoldsAt(At(physobj2,location),time).
 1721% ectest/ec_reader_test.e:982
 1722% 
 1723% ; An effect axiom states that
 1724% ; if an agent takes a physical object out of another
 1725% ; physical object, the first physical object
 1726% ; will no longer be inside the second physical object:
 1727% ectest/ec_reader_test.e:987
 1728% [agent,physobj1,physobj2,time]% 
 1729% Terminates(TakeOutOf(agent,physobj1,physobj2),
 1730%            Inside(physobj1,physobj2),time).
 1731terminates(takeOutOf(Agent, Physobj1, Physobj2), inside(Physobj1, Physobj2), Time).
 1732
 1733% 
 1734% 
 1735% ; A precondition axiom states that
 1736% ; for an agent to take a physical object out of another
 1737% ; physical object,
 1738% ; the first physical object must be inside the second physical object
 1739% ; and there must be a location such that
 1740% ; the agent is at the location,
 1741% ; the first physical object is at the location, and
 1742% ; the second physical object is at the location:
 1743% ectest/ec_reader_test.e:999
 1744% [agent,physobj1,physobj2,time]% 
 1745% Happens(TakeOutOf(agent,physobj1,physobj2),time) ->
 1746% HoldsAt(Inside(physobj1,physobj2),time) &
 1747% ectest/ec_reader_test.e:1002
 1748% {location}% 
 1749%  HoldsAt(At(agent,location),time) &
 1750%  HoldsAt(At(physobj1,location),time) &
 1751%  HoldsAt(At(physobj2,location),time).
 1752exists([Location],  (happens(takeOutOf(Agent, Physobj1, Physobj2), Time)->holds_at(inside(Physobj1, Physobj2), Time), holds_at(at(Agent, Location), Time), holds_at(at(Physobj1, Location), Time), holds_at(at(Physobj2, Location), Time))).
 1753
 1754% 
 1755% 
 1756% ; A releases axiom states that if an agent puts a physical
 1757% ; object inside another physical object,
 1758% ; the first physical object's location will be released
 1759% ; from inertia:
 1760% ectest/ec_reader_test.e:1011
 1761% [agent,physobj1,physobj2,location,time]% 
 1762% Releases(PutInside(agent,physobj1,physobj2),
 1763%          At(physobj1,location),time).
 1764releases(putInside(Agent, Physobj1, Physobj2), at(Physobj1, Location), Time).
 1765
 1766% 
 1767% 
 1768% ; A state constraint says that if a physical object is inside
 1769% ; another physical object and the second physical object is
 1770% ; at a location, the first physical object is also at the location:
 1771% ectest/ec_reader_test.e:1018
 1772% [physobj1,physobj2,location,time]% 
 1773% HoldsAt(Inside(physobj1,physobj2),time) &
 1774% HoldsAt(At(physobj2,location),time) ->
 1775% HoldsAt(At(physobj1,location),time).
 1776holds_at(inside(Physobj1, Physobj2), Time), holds_at(at(Physobj2, Location), Time) ->
 1777	holds_at(at(Physobj1, Location), Time).
 1778
 1779% 
 1780% 
 1781% ; An effect axiom states that if an agent takes a physical
 1782% ; object out of another physical object,
 1783% ; the agent will be holding the first physical object:
 1784% ectest/ec_reader_test.e:1026
 1785% [agent,physobj1,physobj2,time]% 
 1786% Initiates(TakeOutOf(agent,physobj1,physobj2),
 1787%           Holding(agent,physobj1),
 1788%           time).
 1789initiates(takeOutOf(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 1790
 1791% 
 1792% 
 1793% ; On
 1794% ectest/ec_reader_test.e:1032
 1795% 
 1796% ; physobj1 is on physobj2.
 1797% fluent On(physobj,physobj)
 1798fluent(on(physobj, physobj)).
 1799
 1800% 
 1801% ; agent places physobj1 on physobj2.
 1802% event PlaceOn(agent,physobj,physobj)
 1803event(placeOn(agent, physobj, physobj)).
 1804
 1805% ectest/ec_reader_test.e:1038
 1806% ; agent takes physobj1 off of physobj2.
 1807% event TakeOffOf(agent,physobj,physobj)
 1808event(takeOffOf(agent, physobj, physobj)).
 1809
 1810% 
 1811% ; A state constraint says that a physical object cannot
 1812% ; be on itself:
 1813% ectest/ec_reader_test.e:1043
 1814% [physobj1,physobj2,time]% 
 1815% HoldsAt(On(physobj1,physobj2),time) ->
 1816% physobj1!=physobj2.
 1817holds_at(on(Physobj1, Physobj2), Time) ->
 1818	Physobj1\=Physobj2.
 1819
 1820% 
 1821% 
 1822% ; A state constraint says that if a physical object is
 1823% ; on another physical object, the second physical object
 1824% ; is not on the first physical object:
 1825% ectest/ec_reader_test.e:1050
 1826% [physobj1,physobj2,time]% 
 1827% HoldsAt(On(physobj1,physobj2),time) ->
 1828% !HoldsAt(On(physobj2,physobj1),time).
 1829holds_at(on(Physobj1, Physobj2), Time) ->
 1830	not(holds_at(on(Physobj2, Physobj1), Time)).
 1831
 1832% 
 1833% 
 1834% ; An effect axiom states that if an agent places a physical
 1835% ; object on another physical object, the first
 1836% ; physical object will be on the second physical object:
 1837% ectest/ec_reader_test.e:1057
 1838% [agent,physobj1,physobj2,time]% 
 1839% Initiates(PlaceOn(agent,physobj1,physobj2),
 1840%           On(physobj1,physobj2),time).
 1841initiates(placeOn(Agent, Physobj1, Physobj2), on(Physobj1, Physobj2), Time).
 1842
 1843% 
 1844% 
 1845% ; An effect axiom states that if an agent places a physical
 1846% ; object on another physical object, the agent will
 1847% ; no longer be holding the first physical object:
 1848% ectest/ec_reader_test.e:1064
 1849% [agent,physobj1,physobj2,time]% 
 1850% Terminates(PlaceOn(agent,physobj1,physobj2),
 1851%            Holding(agent,physobj1),time).
 1852terminates(placeOn(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 1853
 1854% 
 1855% 
 1856% ; A precondition axiom states that
 1857% ; for an agent to place a physical object on another
 1858% ; physical object,
 1859% ; the agent must be holding the first physical object
 1860% ; and there must be a location such that
 1861% ; the agent is at the location and
 1862% ; the second physical object is at the location:
 1863% ;[agent,physobj1,physobj2,time]
 1864% ;Happens(PlaceOn(agent,physobj1,physobj2),time) ->
 1865% ;HoldsAt(Holding(agent,physobj1),time) &
 1866% ;{location}
 1867% ; HoldsAt(At(agent,location),time) &
 1868% ; HoldsAt(At(physobj2,location),time).
 1869% ectest/ec_reader_test.e:1081
 1870% 
 1871% ; An effect axiom states that
 1872% ; if an agent takes a physical object off of another
 1873% ; physical object, the first physical object
 1874% ; will no longer be on the second physical object:
 1875% ectest/ec_reader_test.e:1086
 1876% [agent,physobj1,physobj2,time]% 
 1877% Terminates(TakeOffOf(agent,physobj1,physobj2),
 1878%            On(physobj1,physobj2),time).
 1879terminates(takeOffOf(Agent, Physobj1, Physobj2), on(Physobj1, Physobj2), Time).
 1880
 1881% 
 1882% 
 1883% ; An effect axiom states that if an agent takes a physical
 1884% ; object off of another physical object,
 1885% ; the agent will be holding the first physical object:
 1886% ectest/ec_reader_test.e:1093
 1887% [agent,physobj1,physobj2,time]% 
 1888% Initiates(TakeOffOf(agent,physobj1,physobj2),
 1889%           Holding(agent,physobj1),time).
 1890initiates(takeOffOf(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 1891
 1892% 
 1893% 
 1894% ; A precondition axiom states that
 1895% ; for an agent to take a physical object off of another
 1896% ; physical object,
 1897% ; the first physical object must be on the second physical object
 1898% ; and there must be a location such that
 1899% ; the agent is at the location and
 1900% ; the first physical object is at the location:
 1901% ; the second physical object is at the location:
 1902% ectest/ec_reader_test.e:1105
 1903% [agent,physobj1,physobj2,time]% 
 1904% Happens(TakeOffOf(agent,physobj1,physobj2),time) ->
 1905% HoldsAt(On(physobj1,physobj2),time) &
 1906% ectest/ec_reader_test.e:1108
 1907% {location}% 
 1908%  HoldsAt(At(agent,location),time) &
 1909%  HoldsAt(At(physobj1,location),time) &
 1910%  HoldsAt(At(physobj2,location),time).
 1911exists([Location],  (happens(takeOffOf(Agent, Physobj1, Physobj2), Time)->holds_at(on(Physobj1, Physobj2), Time), holds_at(at(Agent, Location), Time), holds_at(at(Physobj1, Location), Time), holds_at(at(Physobj2, Location), Time))).
 1912
 1913% 
 1914% 
 1915% ; A releases axiom states that if an agent places a physical
 1916% ; object on another physical object,
 1917% ; the first physical object's location will be released
 1918% ; from inertia:
 1919% ectest/ec_reader_test.e:1117
 1920% [agent,physobj1,physobj2,location,time]% 
 1921% Releases(PlaceOn(agent,physobj1,physobj2),
 1922%          At(physobj1,location),
 1923%          time).
 1924releases(placeOn(Agent, Physobj1, Physobj2), at(Physobj1, Location), Time).
 1925
 1926% 
 1927% 
 1928% ; A state constraint says that if a physical object is on
 1929% ; another physical object and the second physical object is
 1930% ; at a location, the first physical object is also at the location:
 1931% ectest/ec_reader_test.e:1125
 1932% [physobj1,physobj2,location,time]% 
 1933% HoldsAt(On(physobj1,physobj2),time) &
 1934% HoldsAt(At(physobj2,location),time) ->
 1935% HoldsAt(At(physobj1,location),time).
 1936holds_at(on(Physobj1, Physobj2), Time), holds_at(at(Physobj2, Location), Time) ->
 1937	holds_at(at(Physobj1, Location), Time).
 1938
 1939% 
 1940% 
 1941% fluent Near(agent,object)
 1942fluent(near(agent, object)).
 1943
 1944% ectest/ec_reader_test.e:1131
 1945% event WalkFromTo(agent,object,object)
 1946event(walkFromTo(agent, object, object)).
 1947
 1948% event WalkFrom(agent,object)
 1949event(walkFrom(agent, object)).
 1950
 1951% event RunFromTo(agent,object,object)
 1952event(runFromTo(agent, object, object)).
 1953
 1954% 
 1955% ectest/ec_reader_test.e:1135
 1956% [agent,object1,object2,time]% 
 1957% Initiates(WalkFromTo(agent,object1,object2),
 1958%           Near(agent,object2),
 1959%           time).
 1960initiates(walkFromTo(Agent, Object1, Object2), near(Agent, Object2), Time).
 1961
 1962% 
 1963% 
 1964% ectest/ec_reader_test.e:1140
 1965% [agent,object1,object2,time]% 
 1966% Terminates(WalkFromTo(agent,object1,object2),
 1967%            Near(agent,object1),
 1968%            time).
 1969terminates(walkFromTo(Agent, Object1, Object2), near(Agent, Object1), Time).
 1970
 1971% 
 1972% 
 1973% ectest/ec_reader_test.e:1145
 1974% [agent,object1,object2,time]% 
 1975% Happens(WalkFromTo(agent,object1,object2),time) ->
 1976% ectest/ec_reader_test.e:1147
 1977% {location}% 
 1978% HoldsAt(At(agent,location),time) &
 1979% HoldsAt(At(object1,location),time) &
 1980% HoldsAt(At(object2,location),time).
 1981exists([Location],  (happens(walkFromTo(Agent, Object1, Object2), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Object1, Location), Time), holds_at(at(Object2, Location), Time))).
 1982
 1983% 
 1984% 
 1985% ectest/ec_reader_test.e:1152
 1986% [agent,object1,object2,time]% 
 1987% Initiates(RunFromTo(agent,object1,object2),
 1988%           Near(agent,object2),
 1989%           time).
 1990initiates(runFromTo(Agent, Object1, Object2), near(Agent, Object2), Time).
 1991
 1992% 
 1993% 
 1994% ectest/ec_reader_test.e:1157
 1995% [agent,object1,object2,time]% 
 1996% Terminates(RunFromTo(agent,object1,object2),
 1997%            Near(agent,object1),
 1998%            time).
 1999terminates(runFromTo(Agent, Object1, Object2), near(Agent, Object1), Time).
 2000
 2001% 
 2002% 
 2003% ectest/ec_reader_test.e:1162
 2004% [agent,object1,object2,time]% 
 2005% Happens(RunFromTo(agent,object1,object2),time) ->
 2006% ectest/ec_reader_test.e:1164
 2007% {location}% 
 2008% HoldsAt(At(agent,location),time) &
 2009% HoldsAt(At(object1,location),time) &
 2010% HoldsAt(At(object2,location),time).
 2011exists([Location],  (happens(runFromTo(Agent, Object1, Object2), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Object1, Location), Time), holds_at(at(Object2, Location), Time))).
 2012
 2013% 
 2014% 
 2015% ectest/ec_reader_test.e:1169
 2016% [agent,object,time]% 
 2017% Terminates(WalkFrom(agent,object),
 2018%            Near(agent,object),
 2019%            time).
 2020terminates(walkFrom(Agent, Object), near(Agent, Object), Time).
 2021
 2022% 
 2023% 
 2024% ectest/ec_reader_test.e:1174
 2025% [agent,object,location,door,time]% 
 2026% HoldsAt(Near(agent,object),time) &
 2027% HoldsAt(At(agent,location),time) &
 2028% HoldsAt(At(object,location),time) &
 2029% Side1(door)=location &
 2030% Happens(WalkThroughDoor12(agent,door),time) ->
 2031% Happens(WalkFrom(agent,object),time).
 2032holds_at(near(Agent, Object), Time), holds_at(at(Agent, Location), Time), holds_at(at(Object, Location), Time), side1(Door)=Location, happens(walkThroughDoor12(Agent, Door), Time) ->
 2033	happens(walkFrom(Agent, Object), Time).
 2034
 2035% ectest/ec_reader_test.e:1180
 2036% 
 2037% 
 2038% ectest/ec_reader_test.e:1182
 2039% [agent,object,location,door,time]% 
 2040% HoldsAt(Near(agent,object),time) &
 2041% HoldsAt(At(agent,location),time) &
 2042% HoldsAt(At(object,location),time) &
 2043% Side2(door)=location &
 2044% Happens(WalkThroughDoor21(agent,door),time) ->
 2045% Happens(WalkFrom(agent,object),time).
 2046holds_at(near(Agent, Object), Time), holds_at(at(Agent, Location), Time), holds_at(at(Object, Location), Time), side2(Door)=Location, happens(walkThroughDoor21(Agent, Door), Time) ->
 2047	happens(walkFrom(Agent, Object), Time).
 2048
 2049% ectest/ec_reader_test.e:1188
 2050% 
 2051% 
 2052% ectest/ec_reader_test.e:1190
 2053% [agent,object,room,staircase,time]% 
 2054% HoldsAt(Near(agent,object),time) &
 2055% HoldsAt(At(agent,room),time) &
 2056% HoldsAt(At(object,room),time) &
 2057% Side1(staircase)=room &
 2058% Happens(WalkUpStaircase(agent,staircase),time) ->
 2059% Happens(WalkFrom(agent,object),time).
 2060holds_at(near(Agent, Object), Time), holds_at(at(Agent, Room), Time), holds_at(at(Object, Room), Time), side1(Staircase)=Room, happens(walkUpStaircase(Agent, Staircase), Time) ->
 2061	happens(walkFrom(Agent, Object), Time).
 2062
 2063% ectest/ec_reader_test.e:1196
 2064% 
 2065% 
 2066% ectest/ec_reader_test.e:1198
 2067% [agent,object,room,staircase,time]% 
 2068% HoldsAt(Near(agent,object),time) &
 2069% HoldsAt(At(agent,room),time) &
 2070% HoldsAt(At(object,room),time) &
 2071% Side2(staircase)=room &
 2072% Happens(WalkDownStaircase(agent,staircase),time) ->
 2073% Happens(WalkFrom(agent,object),time).
 2074holds_at(near(Agent, Object), Time), holds_at(at(Agent, Room), Time), holds_at(at(Object, Room), Time), side2(Staircase)=Room, happens(walkDownStaircase(Agent, Staircase), Time) ->
 2075	happens(walkFrom(Agent, Object), Time).
 2076
 2077% ectest/ec_reader_test.e:1204
 2078% 
 2079% 
 2080% ; End of file.
 2081% 
 2082% 
 2083% 
 2084% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2085% ; FILE: ecnet/OMSpace.e
 2086% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2087% ectest/ec_reader_test.e:1213
 2088% 
 2089% ;
 2090% ; Copyright (c) 2005 IBM Corporation and others.
 2091% ; All rights reserved. This program and the accompanying materials
 2092% ; are made available under the terms of the Common Public License v1.0
 2093% ; which accompanies this distribution, and is available at
 2094% ; http://www.eclipse.org/legal/cpl-v10.html
 2095% ;
 2096% ; Contributors:
 2097% ; IBM - Initial implementation
 2098% ;
 2099% ; OMSpace: object-scale metric space
 2100% ;
 2101% ; The OMSpace representation deals with metric space at
 2102% ; the scale of objects.
 2103% ;
 2104% ; @article{Morgenstern:2001,
 2105% ;   author = "Morgenstern, Leora",
 2106% ;   year = "2001",
 2107% ;   title = "Mid-sized axiomatizations of commonsense problems: A case study in egg cracking",
 2108% ;   journal = "Studia Logica",
 2109% ;   volume = "67",
 2110% ;   pages = "333--384",
 2111% ; }
 2112% ;
 2113% ; @article{Shanahan:2003,
 2114% ;   author = "Shanahan, Murray",
 2115% ;   year = "2004",
 2116% ;   title = "An attempt to formalise a non-trivial benchmark problem in common sense reasoning",
 2117% ;   journal = "Artificial Intelligence",
 2118% ;   volume = "153",
 2119% ;   pages = "141--165",
 2120% ; }
 2121% ;
 2122% ectest/ec_reader_test.e:1247
 2123% 
 2124% sort height: integer
 2125subsort(height, integer).
 2126
 2127% sort distance: integer
 2128subsort(distance, integer).
 2129
 2130% 
 2131% ; Height
 2132% 
 2133% ; The height of object is height.
 2134% ectest/ec_reader_test.e:1254
 2135% fluent Height(object,height)
 2136fluent(height(object, height)).
 2137
 2138% 
 2139% ; State constraint represent the fact that each
 2140% ; object has a unique height:
 2141% ectest/ec_reader_test.e:1258
 2142% [object,height1,height2,time]% 
 2143% HoldsAt(Height(object,height1),time) &
 2144% HoldsAt(Height(object,height2),time) ->
 2145% height1=height2.
 2146holds_at(height(Object, Height1), Time), holds_at(height(Object, Height2), Time) ->
 2147	Height1=Height2.
 2148
 2149% 
 2150% 
 2151% ectest/ec_reader_test.e:1263
 2152% [object,time]% 
 2153% ectest/ec_reader_test.e:1264
 2154% {height}% 
 2155% HoldsAt(Height(object,height),time).
 2156exists([Height], holds_at(height(Object, Height), Time)).
 2157
 2158% 
 2159% 
 2160% ; falling
 2161% 
 2162% ; physobj1 is falling from physobj2 to physobj3.
 2163% ectest/ec_reader_test.e:1270
 2164% fluent FallingFromTo(physobj,physobj,physobj)
 2165fluent(fallingFromTo(physobj, physobj, physobj)).
 2166
 2167% ; physobj1 starts falling from physobj2 to physobj3.
 2168% event StartFallingFromTo(physobj,physobj,physobj)
 2169event(startFallingFromTo(physobj, physobj, physobj)).
 2170
 2171% ; physobj1 collides with physobj2.
 2172% event CollideWith(physobj,physobj)
 2173event(collideWith(physobj, physobj)).
 2174
 2175% 
 2176% ; An effect axiom states that if a first physical object starts
 2177% ; falling from a second physical object to a third physical
 2178% ; object, the first physical object will be falling from the
 2179% ; second physical object to the third physical object:
 2180% ectest/ec_reader_test.e:1280
 2181% [physobj1,physobj2,physobj3,time]% 
 2182% Initiates(StartFallingFromTo(physobj1,physobj2,physobj3),
 2183%           FallingFromTo(physobj1,physobj2,physobj3),
 2184%           time).
 2185initiates(startFallingFromTo(Physobj1, Physobj2, Physobj3), fallingFromTo(Physobj1, Physobj2, Physobj3), Time).
 2186
 2187% 
 2188% 
 2189% ; A precondition axiom states that for
 2190% ; a first physical object to start
 2191% ; falling from a second physical object to a third physical
 2192% ; object,
 2193% ; the height of the first physical object and the
 2194% ; second physical object must be the same.
 2195% ectest/ec_reader_test.e:1291
 2196% [physobj1,physobj2,physobj3,height1,height2,time]% 
 2197% Happens(StartFallingFromTo(physobj1,physobj2,physobj3),time) &
 2198% HoldsAt(Height(physobj1,height1),time) &
 2199% HoldsAt(Height(physobj2,height2),time) ->
 2200% height1=height2.
 2201happens(startFallingFromTo(Physobj1, Physobj2, Physobj3), Time), holds_at(height(Physobj1, Height1), Time), holds_at(height(Physobj2, Height2), Time) ->
 2202	Height1=Height2.
 2203
 2204% 
 2205% 
 2206% ; A state constraint says that a physical object
 2207% ; cannot fall from itself, cannot fall to itself,
 2208% ; and cannot fall from and to the same physical object:
 2209% ectest/ec_reader_test.e:1300
 2210% [physobj1,physobj2,physobj3,time]% 
 2211% HoldsAt(FallingFromTo(physobj1,physobj2,physobj3),time) ->
 2212% physobj1!=physobj2 &
 2213% physobj1!=physobj3 &
 2214% physobj2!=physobj3.
 2215holds_at(fallingFromTo(Physobj1, Physobj2, Physobj3), Time) ->
 2216	Physobj1\=Physobj2,
 2217	Physobj1\=Physobj3,
 2218	Physobj2\=Physobj3.
 2219
 2220% 
 2221% 
 2222% ; A state constraint says that the sky cannot fall:
 2223% ectest/ec_reader_test.e:1307
 2224% [sky,physobj1,physobj2,time]% 
 2225% !HoldsAt(FallingFromTo(sky,physobj1,physobj2),time).
 2226not(holds_at(fallingFromTo(Sky, Physobj1, Physobj2), Time)).
 2227
 2228% 
 2229% 
 2230% ; A releases axiom states that if
 2231% ; if a first physical object starts
 2232% ; falling from a second physical object to a third physical
 2233% ; object, the height of the first physical object
 2234% ; will be released from inertia:
 2235% ectest/ec_reader_test.e:1315
 2236% [physobj1,physobj2,physobj3,height,time]% 
 2237% Releases(StartFallingFromTo(physobj1,physobj2,physobj3),
 2238%          Height(physobj1,height),
 2239%          time).
 2240releases(startFallingFromTo(Physobj1, Physobj2, Physobj3), height(Physobj1, Height), Time).
 2241
 2242% 
 2243% 
 2244% ; A trajectory axiom states that
 2245% ; if a first physical object starts falling
 2246% ; from a second physical object
 2247% ; to a third physical object
 2248% ; at a time and
 2249% ; the first physical object has a height at the time,
 2250% ; then the first physical object will have a height
 2251% ; equal to the height minus an offset
 2252% ; at a time equal to the time plus the offset:
 2253% ectest/ec_reader_test.e:1329
 2254% [physobj1,physobj2,physobj3,height1,height2,offset,time]% 
 2255% HoldsAt(Height(physobj1,height1),time) &
 2256% height2=height1-offset ->
 2257% Trajectory(FallingFromTo(physobj1,physobj2,physobj3),time,
 2258%            Height(physobj1,height2),offset).
 2259holds_at(height(Physobj1, Height1), Time), Height2=Height1-Offset ->
 2260	trajectory(fallingFromTo(Physobj1, Physobj2, Physobj3),
 2261		   Time,
 2262		   height(Physobj1, Height2),
 2263		   Offset).
 2264
 2265% 
 2266% 
 2267% ; A trigger axiom states that
 2268% ; if a first physical object is falling
 2269% ; from a second physical object
 2270% ; to a third physical object and
 2271% ; the height of the first physical object
 2272% ; is the same as the height of the third physical object,
 2273% ; the first physical object collides with the
 2274% ; third physical object:
 2275% ectest/ec_reader_test.e:1343
 2276% [physobj1,physobj2,physobj3,height,time]% 
 2277% HoldsAt(FallingFromTo(physobj1,physobj2,physobj3),time) &
 2278% HoldsAt(Height(physobj1,height),time) &
 2279% HoldsAt(Height(physobj3,height),time) ->
 2280% Happens(CollideWith(physobj1,physobj3),time).
 2281holds_at(fallingFromTo(Physobj1, Physobj2, Physobj3), Time), holds_at(height(Physobj1, Height), Time), holds_at(height(Physobj3, Height), Time) ->
 2282	happens(collideWith(Physobj1, Physobj3), Time).
 2283
 2284% 
 2285% 
 2286% ; An effect axiom states that
 2287% ; if a first physical object is falling
 2288% ; from a second physical object
 2289% ; to a third physical object and
 2290% ; the first physical object collides with
 2291% ; the third physical object,
 2292% ; the first physical object will be on the third physical object:
 2293% ectest/ec_reader_test.e:1356
 2294% [physobj1,physobj2,physobj3,time]% 
 2295% HoldsAt(FallingFromTo(physobj1,physobj2,physobj3),time) ->
 2296% Initiates(CollideWith(physobj1,physobj3),
 2297%           On(physobj1,physobj3),
 2298%           time).
 2299holds_at(fallingFromTo(Physobj1, Physobj2, Physobj3), Time) ->
 2300	initiates(collideWith(Physobj1, Physobj3),
 2301		  on(Physobj1, Physobj3),
 2302		  Time).
 2303
 2304% 
 2305% 
 2306% ; An effect axiom states that
 2307% ; if a physical object collides with another
 2308% ; physical object,
 2309% ; the height of the first physical object will
 2310% ; be the height of the second physical object:
 2311% ectest/ec_reader_test.e:1367
 2312% [physobj1,physobj2,height,time]% 
 2313% HoldsAt(Height(physobj2,height),time) ->
 2314% Initiates(CollideWith(physobj1,physobj2),
 2315%           Height(physobj1,height),
 2316%           time).
 2317holds_at(height(Physobj2, Height), Time) ->
 2318	initiates(collideWith(Physobj1, Physobj2),
 2319		  height(Physobj1, Height),
 2320		  Time).
 2321
 2322% 
 2323% 
 2324% ;[physobj1,physobj2,height1,height2,time]
 2325% ;HoldsAt(Height(physobj2,height1),time) &
 2326% ;height1 != height2 ->
 2327% ;Terminates(CollideWith(physobj1,physobj2),
 2328% ;           Height(physobj1,height2),
 2329% ;           time).
 2330% ectest/ec_reader_test.e:1379
 2331% 
 2332% ; An effect axiom states that
 2333% ; if a first physical object is falling
 2334% ; from a second physical object
 2335% ; to a third physical object and
 2336% ; the first physical object collides with
 2337% ; the third physical object,
 2338% ; the first physical object will no longer be
 2339% ; falling from the second physical object to the
 2340% ; third physical object:
 2341% ectest/ec_reader_test.e:1389
 2342% [physobj1,physobj2,physobj3,time]% 
 2343% HoldsAt(FallingFromTo(physobj1,physobj2,physobj3),time) ->
 2344% Terminates(CollideWith(physobj1,physobj3),
 2345%            FallingFromTo(physobj1,physobj2,physobj3),
 2346%            time).
 2347holds_at(fallingFromTo(Physobj1, Physobj2, Physobj3), Time) ->
 2348	terminates(collideWith(Physobj1, Physobj3),
 2349		   fallingFromTo(Physobj1, Physobj2, Physobj3),
 2350		   Time).
 2351
 2352% 
 2353% 
 2354% ; flying
 2355% ectest/ec_reader_test.e:1396
 2356% 
 2357% ; agent is flying from physobj1 to physobj2.
 2358% fluent FlyingFromTo(agent,physobj,physobj)
 2359fluent(flyingFromTo(agent, physobj, physobj)).
 2360
 2361% ; agent starts flying from physobj1 to physobj2.
 2362% event StartFlyingFromTo(agent,physobj,physobj)
 2363event(startFlyingFromTo(agent, physobj, physobj)).
 2364
 2365% ; agent reaches physobj.
 2366% ectest/ec_reader_test.e:1402
 2367% event Reach(agent,physobj)
 2368event(reach(agent, physobj)).
 2369
 2370% 
 2371% ; An effect axiom states that if an agent starts
 2372% ; flying from a physical object to another physical object,
 2373% ; the agent will be flying from the first physical object
 2374% ; to the second physical object:
 2375% ectest/ec_reader_test.e:1408
 2376% [agent,physobj1,physobj2,time]% 
 2377% Initiates(StartFlyingFromTo(agent,physobj1,physobj2),
 2378%           FlyingFromTo(agent,physobj1,physobj2),
 2379%           time).
 2380initiates(startFlyingFromTo(Agent, Physobj1, Physobj2), flyingFromTo(Agent, Physobj1, Physobj2), Time).
 2381
 2382% 
 2383% 
 2384% ; A precondition axiom states that for
 2385% ; an agent to start flying from a physical object to
 2386% ; another physical object,
 2387% ; the height of the agent and
 2388% ; the first physical object must be the same:
 2389% ectest/ec_reader_test.e:1418
 2390% [agent,physobj1,physobj2,height1,height2,time]% 
 2391% Happens(StartFlyingFromTo(agent,physobj1,physobj2),time) &
 2392% HoldsAt(Height(agent,height1),time) &
 2393% HoldsAt(Height(physobj1,height2),time) ->
 2394% height1=height2.
 2395happens(startFlyingFromTo(Agent, Physobj1, Physobj2), Time), holds_at(height(Agent, Height1), Time), holds_at(height(Physobj1, Height2), Time) ->
 2396	Height1=Height2.
 2397
 2398% 
 2399% 
 2400% ; A state constraint says that an agent
 2401% ; cannot fly from and to the same physical object:
 2402% ectest/ec_reader_test.e:1426
 2403% [agent,physobj1,physobj2,time]% 
 2404% HoldsAt(FlyingFromTo(agent,physobj1,physobj2),time) ->
 2405% physobj1!=physobj2.
 2406holds_at(flyingFromTo(Agent, Physobj1, Physobj2), Time) ->
 2407	Physobj1\=Physobj2.
 2408
 2409% 
 2410% 
 2411% ; A releases axiom states that if an agent
 2412% ; starts flying from a physical object to another
 2413% ; physical object, the height of the agent will
 2414% ; be released from inertia:
 2415% ectest/ec_reader_test.e:1434
 2416% [agent,physobj1,physobj2,height,time]% 
 2417% Releases(StartFlyingFromTo(agent,physobj1,physobj2),
 2418%          Height(agent,height),
 2419%          time).
 2420releases(startFlyingFromTo(Agent, Physobj1, Physobj2), height(Agent, Height), Time).
 2421
 2422% 
 2423% 
 2424% ; A trajectory axiom states that
 2425% ; if an agent starts flying from
 2426% ; from a physical object
 2427% ; to another physical object
 2428% ; at a time and
 2429% ; the agent has a height at the time,
 2430% ; then the agent will have a height
 2431% ; equal to the height plus an offset
 2432% ; at a time equal to the time plus the offset:
 2433% ectest/ec_reader_test.e:1448
 2434% [agent,physobj1,physobj2,height1,height2,offset,time]% 
 2435% HoldsAt(Height(agent,height1),time) &
 2436% height2=height1+offset ->
 2437% Trajectory(FlyingFromTo(agent,physobj1,physobj2),time,
 2438%            Height(agent,height2),offset).
 2439holds_at(height(Agent, Height1), Time), Height2=Height1+Offset ->
 2440	trajectory(flyingFromTo(Agent, Physobj1, Physobj2),
 2441		   Time,
 2442		   height(Agent, Height2),
 2443		   Offset).
 2444
 2445% 
 2446% 
 2447% ; A trigger axiom states that
 2448% ; if an agent is flying
 2449% ; from a physical object
 2450% ; to another physical object and
 2451% ; the height of the agent
 2452% ; is the same as the height of the second physical object,
 2453% ; the agent reaches the second physical object:
 2454% ectest/ec_reader_test.e:1461
 2455% [agent,physobj1,physobj2,height,time]% 
 2456% HoldsAt(FlyingFromTo(agent,physobj1,physobj2),time) &
 2457% HoldsAt(Height(agent,height),time) &
 2458% HoldsAt(Height(physobj2,height),time) ->
 2459% Happens(Reach(agent,physobj2),time).
 2460holds_at(flyingFromTo(Agent, Physobj1, Physobj2), Time), holds_at(height(Agent, Height), Time), holds_at(height(Physobj2, Height), Time) ->
 2461	happens(reach(Agent, Physobj2), Time).
 2462
 2463% 
 2464% 
 2465% ; An effect axiom states that
 2466% ; if an agent reaches a physical object,
 2467% ; the height of the agent will be the
 2468% ; height of the physical object:
 2469% ectest/ec_reader_test.e:1471
 2470% [agent,physobj,height,time]% 
 2471% HoldsAt(Height(physobj,height),time) ->
 2472% Initiates(Reach(agent,physobj),Height(agent,height),time).
 2473holds_at(height(Physobj, Height), Time) ->
 2474	initiates(reach(Agent, Physobj),
 2475		  height(Agent, Height),
 2476		  Time).
 2477
 2478% 
 2479% 
 2480% ;[agent,physobj,height1,height2,time]
 2481% ;HoldsAt(Height(physobj,height1),time) &
 2482% ;height1!=height2 ->
 2483% ;Terminates(Reach(agent,physobj),Height(agent,height2),time).
 2484% ectest/ec_reader_test.e:1479
 2485% 
 2486% ; An effect axiom states that
 2487% ; if an agent is flying
 2488% ; from a physical object
 2489% ; to another physical object and
 2490% ; the agent reaches the second physical object,
 2491% ; the agent will no longer be
 2492% ; flying from the first physical object
 2493% ; to the second physical object:
 2494% ectest/ec_reader_test.e:1488
 2495% [agent,physobj1,physobj2,time]% 
 2496% HoldsAt(FlyingFromTo(agent,physobj1,physobj2),time) ->
 2497% Terminates(Reach(agent,physobj2),
 2498%            FlyingFromTo(agent,physobj1,physobj2),
 2499%            time).
 2500holds_at(flyingFromTo(Agent, Physobj1, Physobj2), Time) ->
 2501	terminates(reach(Agent, Physobj2),
 2502		   flyingFromTo(Agent, Physobj1, Physobj2),
 2503		   Time).
 2504
 2505% 
 2506% 
 2507% ; A releases axiom states that
 2508% ; if an agent holds a physical object,
 2509% ; the height of the physical object is released from inertia:
 2510% ectest/ec_reader_test.e:1497
 2511% [agent,physobj,height,time]% 
 2512% Releases(Hold(agent,physobj),Height(physobj,height),time).
 2513releases(hold(Agent, Physobj), height(Physobj, Height), Time).
 2514
 2515% 
 2516% 
 2517% ;[agent,physobj,height1,height2,time]
 2518% ;(!{object} PartOf(physobj,object)) &
 2519% ;HoldsAt(Height(physobj,height1),time) &
 2520% ;height1 != height2 ->
 2521% ;Terminates(LetGoOf(agent,physobj),Height(physobj,height2),time).
 2522% ectest/ec_reader_test.e:1505
 2523% 
 2524% ectest/ec_reader_test.e:1506
 2525% [agent,physobj,height,time]% 
 2526% (!{object} PartOf(physobj,object)) &
 2527% HoldsAt(Height(physobj,height),time) ->
 2528% Initiates(LetGoOf(agent,physobj),Height(physobj,height),time).
 2529not(exists([Object], partOf(Physobj, Object))), holds_at(height(Physobj, Height), Time) ->
 2530	initiates(letGoOf(Agent, Physobj),
 2531		  height(Physobj, Height),
 2532		  Time).
 2533
 2534% 
 2535% 
 2536% ; A state constraint says that
 2537% ; if an agent is holding a physical object and
 2538% ; the height of the agent is height,
 2539% ; the height of the physical object is height:
 2540% ectest/ec_reader_test.e:1515
 2541% [agent,physobj,height,time]% 
 2542% HoldsAt(Holding(agent,physobj),time) &
 2543% HoldsAt(Height(agent,height),time) ->
 2544% HoldsAt(Height(physobj,height),time).
 2545holds_at(holding(Agent, Physobj), Time), holds_at(height(Agent, Height), Time) ->
 2546	holds_at(height(Physobj, Height), Time).
 2547
 2548% 
 2549% 
 2550% ; A state constraint says that if a physical object
 2551% ; is part of an object,
 2552% ; the height of the physical object
 2553% ; is the same as the height of the object:
 2554% ectest/ec_reader_test.e:1524
 2555% [physobj,object,height,time]% 
 2556% PartOf(physobj,object) &
 2557% HoldsAt(Height(object,height),time) ->
 2558% HoldsAt(Height(physobj,height),time).
 2559partOf(Physobj, Object), holds_at(height(Object, Height), Time) ->
 2560	holds_at(height(Physobj, Height), Time).
 2561
 2562% 
 2563% 
 2564% ;event Catch(agent,physobj)
 2565% ;event HitFromTo(agent,physobj,object,object)
 2566% ;fluent Distance(physobj,physobj,distance)
 2567% ;fluent FlyingAcrossFromTo(physobj,object,object)
 2568% ectest/ec_reader_test.e:1533
 2569% 
 2570% ;[agent,physobj1,physobj2,physobj3,time]
 2571% ;Initiates(HitFromTo(agent,physobj1,physobj2,physobj3),
 2572% ;          FlyingAcrossFromTo(physobj1,physobj2,physobj3),
 2573% ;          time).
 2574% 
 2575% ;[agent,physobj1,physobj2,physobj3,distance,time]
 2576% ;Releases(HitFromTo(agent,physobj1,physobj2,physobj3),
 2577% ;         Distance(physobj1,physobj2,distance),
 2578% ;         time).
 2579% ectest/ec_reader_test.e:1543
 2580% 
 2581% ;[agent,physobj1,physobj2,physobj3,distance,time]
 2582% ;Releases(HitFromTo(agent,physobj1,physobj2,physobj3),
 2583% ;         Distance(physobj1,physobj3,distance),
 2584% ;         time).
 2585% 
 2586% ;[physobj1,physobj2,physobj3,offset,time]
 2587% ;Trajectory(FlyingAcrossFromTo(physobj1,physobj2,physobj3),time,
 2588% ;           Distance(physobj1,physobj2,offset),offset).
 2589% ectest/ec_reader_test.e:1552
 2590% 
 2591% ;[physobj1,physobj2,physobj3,distance1,distance2,offset,time]
 2592% ;HoldsAt(Distance(physobj2,physobj3,distance1),time) &
 2593% ;distance2 = distance1 - time ->
 2594% ;Trajectory(FlyingAcrossFromTo(physobj1,physobj2,physobj3),time,
 2595% ;           Distance(physobj1,physobj3,distance2),offset).
 2596% ectest/ec_reader_test.e:1558
 2597% 
 2598% ;[agent,physobj1,physobj2,physobj3,time]
 2599% ;HoldsAt(FlyingAcrossFromTo(physobj1,physobj2,physobj3),time) ->
 2600% ;Initiates(Catch(agent,physobj1),
 2601% ;          Holding(agent,physobj1),
 2602% ;          time).
 2603% ectest/ec_reader_test.e:1564
 2604% 
 2605% ;[agent,physobj1,physobj2,physobj3,time]
 2606% ;HoldsAt(FlyingAcrossFromTo(physobj1,physobj2,physobj3),time) ->
 2607% ;Terminates(Catch(agent,physobj1),
 2608% ;           FlyingAcrossFromTo(physobj1,physobj2,physobj3),
 2609% ;           time).
 2610% ectest/ec_reader_test.e:1570
 2611% 
 2612% ; End of file.
 2613% 
 2614% 
 2615% 
 2616% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2617% ; FILE: ecnet/GSpace.e
 2618% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2619% ectest/ec_reader_test.e:1578
 2620% 
 2621% ;
 2622% ; Copyright (c) 2005 IBM Corporation and others.
 2623% ; All rights reserved. This program and the accompanying materials
 2624% ; are made available under the terms of the Common Public License v1.0
 2625% ; which accompanies this distribution, and is available at
 2626% ; http://www.eclipse.org/legal/cpl-v10.html
 2627% ;
 2628% ; Contributors:
 2629% ; IBM - Initial implementation
 2630% ;
 2631% ; GSpace: grid space
 2632% ;
 2633% ; @book{Mueller:1998,
 2634% ;   author = "Erik T. Mueller",
 2635% ;   year = "1998",
 2636% ;   title = "Natural Language Processing with \uppercase{T}hought\uppercase{T}reasure",
 2637% ;   address = "New York",
 2638% ;   publisher = "Signiform",
 2639% ; }
 2640% ;
 2641% ectest/ec_reader_test.e:1599
 2642% 
 2643% sort coord: integer
 2644subsort(coord, integer).
 2645
 2646% sort grid
 2647sort(grid).
 2648
 2649% 
 2650% ; object is at (coord1, coord2) in grid.
 2651% fluent GridAt(grid,object,coord,coord)
 2652fluent(gridAt(grid, object, coord, coord)).
 2653
 2654% ectest/ec_reader_test.e:1605
 2655% 
 2656% ; agent walks from (coord1, coord2)
 2657% ; to (coord3, coord4) in grid.
 2658% event GridWalk(grid,agent,coord,coord,coord,coord)
 2659event(gridWalk(grid, agent, coord, coord, coord, coord)).
 2660
 2661% 
 2662% ; A state constraint says that for a given grid an
 2663% ; object is at one cell in that grid at a time:
 2664% ectest/ec_reader_test.e:1612
 2665% [grid,object,coord1,coord2,coord3,coord4,time]% 
 2666% HoldsAt(GridAt(grid,object,coord1,coord2),time) &
 2667% HoldsAt(GridAt(grid,object,coord3,coord4),time) ->
 2668% coord1=coord3 & coord2=coord4.
 2669holds_at(gridAt(Grid, Object, Coord1, Coord2), Time), holds_at(gridAt(Grid, Object, Coord3, Coord4), Time) ->
 2670	Coord1=Coord3,
 2671	Coord2=Coord4.
 2672
 2673% 
 2674% 
 2675% ; An effect axiom states that
 2676% ; if an agent walks from one cell in a grid to another cell,
 2677% ; the agent will be at second cell:
 2678% ectest/ec_reader_test.e:1620
 2679% [grid,agent,coord1,coord2,coord3,coord4,time]% 
 2680% Initiates(GridWalk(grid,agent,coord1,coord2,coord3,coord4),
 2681%           GridAt(grid,agent,coord3,coord4),
 2682%           time).
 2683initiates(gridWalk(Grid, Agent, Coord1, Coord2, Coord3, Coord4), gridAt(Grid, Agent, Coord3, Coord4), Time).
 2684
 2685% 
 2686% 
 2687% ; An effect axiom states that
 2688% ; if an agent walks from one cell in a grid to another cell,
 2689% ; the agent will no longer be at the first cell:
 2690% ectest/ec_reader_test.e:1628
 2691% [grid,agent,coord1,coord2,coord3,coord4,time]% 
 2692% Terminates(GridWalk(grid,agent,coord1,coord2,coord3,coord4),
 2693%            GridAt(grid,agent,coord1,coord2),
 2694%            time).
 2695terminates(gridWalk(Grid, Agent, Coord1, Coord2, Coord3, Coord4), gridAt(Grid, Agent, Coord1, Coord2), Time).
 2696
 2697% 
 2698% 
 2699% ; A precondition axiom states that for an agent to walk
 2700% ; from one cell in a grid to another cell, the agent
 2701% ; must be at the first cell, the second cell must not
 2702% ; be occupied, and the first cell must be adjacent to
 2703% ; the second cell:
 2704% ectest/ec_reader_test.e:1638
 2705% [grid,agent,coord1,coord2,coord3,coord4,time]% 
 2706% Happens(GridWalk(grid,agent,coord1,coord2,coord3,coord4),time) ->
 2707% HoldsAt(GridAt(grid,agent,coord1,coord2),time) &
 2708% (!{object} HoldsAt(GridAt(grid,object,coord3,coord4),time)) &
 2709% (coord1=coord3 |
 2710%  coord1=coord3+1 |
 2711%  coord1=coord3-1) &
 2712% (coord2=coord4 |
 2713%  coord2=coord4+1 |
 2714%  coord2=coord4-1).
 2715happens(gridWalk(Grid, Agent, Coord1, Coord2, Coord3, Coord4), Time) ->
 2716	holds_at(gridAt(Grid, Agent, Coord1, Coord2),
 2717		 Time),
 2718	not(exists([Object],
 2719		   holds_at(gridAt(Grid,
 2720				   Object,
 2721				   Coord3,
 2722				   Coord4),
 2723			    Time))),
 2724	(   Coord1=Coord3
 2725	;   Coord1=Coord3+1
 2726	;   Coord1=Coord3-1
 2727	),
 2728	(   Coord2=Coord4
 2729	;   Coord2=Coord4+1
 2730	;   Coord2=Coord4-1
 2731	).
 2732
 2733% ectest/ec_reader_test.e:1647
 2734% 
 2735% 
 2736% ; End of file.
 2737% 
 2738% 
 2739% 
 2740% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2741% ; FILE: ecnet/PolySpace.e
 2742% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2743% ectest/ec_reader_test.e:1656
 2744% 
 2745% ;
 2746% ; Copyright (c) 2005 IBM Corporation and others.
 2747% ; All rights reserved. This program and the accompanying materials
 2748% ; are made available under the terms of the Common Public License v1.0
 2749% ; which accompanies this distribution, and is available at
 2750% ; http://www.eclipse.org/legal/cpl-v10.html
 2751% ;
 2752% ; Contributors:
 2753% ; IBM - Initial implementation
 2754% ;
 2755% ; @phdthesis{Cassimatis:2002,
 2756% ;   author = "Nicholas L. Cassimatis",
 2757% ;   year = "2002",
 2758% ;   title = "Polyscheme: A Cognitive Architecture for Integrating Multiple Representation and Inference Schemes",
 2759% ;   address = "Cambridge, MA",
 2760% ;   school = "Program in Media Arts and Sciences, School of Architecture and Planning, Massachusetts Institute of Technology",
 2761% ; }
 2762% ;
 2763% ectest/ec_reader_test.e:1675
 2764% 
 2765% ; sorts
 2766% sort object
 2767sort(object).
 2768
 2769% sort xcoord: integer
 2770subsort(xcoord, integer).
 2771
 2772% sort ycoord: integer
 2773subsort(ycoord, integer).
 2774
 2775% sort grid
 2776sort(grid).
 2777
 2778% ectest/ec_reader_test.e:1681
 2779% sort shape
 2780sort(shape).
 2781
 2782% sort color
 2783sort(color).
 2784
 2785% 
 2786% ; constants
 2787% shape Round,Square
 2788t(shape, round).
 2789
 2790t(shape, square).
 2791
 2792% color Red,Green
 2793t(color, red).
 2794
 2795t(color, green).
 2796
 2797% ectest/ec_reader_test.e:1687
 2798% 
 2799% ; predicates, fluents, and events
 2800% predicate Equal(object,object)
 2801predicate(equal(object, object)).
 2802
 2803% predicate Shape(object,shape)
 2804predicate(shape(object, shape)).
 2805
 2806% predicate Color(object,color)
 2807predicate(color(object, color)).
 2808
 2809% fluent Location(grid,object,xcoord,ycoord)
 2810fluent(location(grid, object, xcoord, ycoord)).
 2811
 2812% ectest/ec_reader_test.e:1693
 2813% event Move(grid,object,xcoord,ycoord,xcoord,ycoord)
 2814event(move(grid, object, xcoord, ycoord, xcoord, ycoord)).
 2815
 2816% 
 2817% ; axioms
 2818% 
 2819% ectest/ec_reader_test.e:1697
 2820% [object1,object2] % Equal(object1,object2) -> Equal(object2,object1).
 2821equal(Object1, Object2) ->
 2822	equal(Object2, Object1).
 2823
 2824% 
 2825% 
 2826% ; objects have unique shape
 2827% ectest/ec_reader_test.e:1700
 2828% [object,shape1,shape2]% 
 2829% Shape(object,shape1) & Shape(object,shape2) ->
 2830% shape1=shape2.
 2831shape(Object, Shape1), shape(Object, Shape2) ->
 2832	Shape1=Shape2.
 2833
 2834% 
 2835% 
 2836% ; objects have unique color
 2837% ectest/ec_reader_test.e:1705
 2838% [object,color1,color2]% 
 2839% Color(object,color1) & Color(object,color2) ->
 2840% color1=color2.
 2841color(Object, Color1), color(Object, Color2) ->
 2842	Color1=Color2.
 2843
 2844% 
 2845% 
 2846% ; if objects are the same, they have the same shape
 2847% ectest/ec_reader_test.e:1710
 2848% [object1,object2]% 
 2849% Equal(object1,object2) ->
 2850% ({shape} Shape(object1,shape) & Shape(object2,shape)).
 2851equal(Object1, Object2) ->
 2852	exists([Shape],
 2853	       (shape(Object1, Shape), shape(Object2, Shape))).
 2854
 2855% 
 2856% 
 2857% ; if objects are the same, they have the same color
 2858% ectest/ec_reader_test.e:1715
 2859% [object1,object2]% 
 2860% Equal(object1,object2) ->
 2861% ({color} Color(object1,color) & Color(object2,color)).
 2862equal(Object1, Object2) ->
 2863	exists([Color],
 2864	       (color(Object1, Color), color(Object2, Color))).
 2865
 2866% 
 2867% 
 2868% ; if objects are the same, they have the same location
 2869% ectest/ec_reader_test.e:1720
 2870% [grid,object1,object2,xcoord1,ycoord1,xcoord2,ycoord2,time]% 
 2871% Equal(object1,object2) ->
 2872% (HoldsAt(Location(grid,object1,xcoord1,ycoord1),time) &
 2873%  HoldsAt(Location(grid,object2,xcoord2,ycoord2),time) ->
 2874%  xcoord1=xcoord2 & ycoord1=ycoord2).
 2875equal(Object1, Object2) ->
 2876	( holds_at(location(Grid, Object1, Xcoord1, Ycoord1), Time), holds_at(location(Grid, Object2, Xcoord2, Ycoord2), Time)->Xcoord1=Xcoord2, Ycoord1=Ycoord2
 2877	).
 2878
 2879% 
 2880% 
 2881% ; object in one location at a time
 2882% ectest/ec_reader_test.e:1727
 2883% [grid,object,xcoord1,ycoord1,xcoord2,ycoord2,time]% 
 2884% HoldsAt(Location(grid,object,xcoord1,ycoord1),time) &
 2885% HoldsAt(Location(grid,object,xcoord2,ycoord2),time) ->
 2886% xcoord1=xcoord2 & ycoord1=ycoord2.
 2887holds_at(location(Grid, Object, Xcoord1, Ycoord1), Time), holds_at(location(Grid, Object, Xcoord2, Ycoord2), Time) ->
 2888	Xcoord1=Xcoord2,
 2889	Ycoord1=Ycoord2.
 2890
 2891% 
 2892% 
 2893% ; objects have locations
 2894% ectest/ec_reader_test.e:1733
 2895% [grid,object,time]% 
 2896% (
 2897% ectest/ec_reader_test.e:1734
 2898% {xcoord,ycoord} HoldsAt(Location(grid,object,xcoord,ycoord),time)).
 2899exists([Xcoord, Ycoord], holds_at(location(Grid, Object, Xcoord, Ycoord), Time)).
 2900
 2901% 
 2902% 
 2903% ; different objects are not at same location
 2904% ectest/ec_reader_test.e:1737
 2905% [grid,object1,object2,xcoord1,ycoord1,time]% 
 2906% HoldsAt(Location(grid,object1,xcoord1,ycoord1),time) &
 2907% HoldsAt(Location(grid,object2,xcoord1,ycoord1),time) ->
 2908% Equal(object1,object2).
 2909holds_at(location(Grid, Object1, Xcoord1, Ycoord1), Time), holds_at(location(Grid, Object2, Xcoord1, Ycoord1), Time) ->
 2910	equal(Object1, Object2).
 2911
 2912% 
 2913% 
 2914% ; moving to a location causes an object to be at that location
 2915% ectest/ec_reader_test.e:1743
 2916% [grid,object,xcoord1,ycoord1,xcoord2,ycoord2,time]% 
 2917% Initiates(Move(grid,object,xcoord1,ycoord1,xcoord2,ycoord2),
 2918%           Location(grid,object,xcoord2,ycoord2),
 2919%           time).
 2920initiates(move(Grid, Object, Xcoord1, Ycoord1, Xcoord2, Ycoord2), location(Grid, Object, Xcoord2, Ycoord2), Time).
 2921
 2922% 
 2923% 
 2924% ; moving to a location causes the object no longer to be at its previous
 2925% ; location
 2926% ectest/ec_reader_test.e:1750
 2927% [grid,object,xcoord1,ycoord1,xcoord2,ycoord2,time]% 
 2928% Terminates(Move(grid,object,xcoord1,ycoord1,xcoord2,ycoord2),
 2929%            Location(grid,object,xcoord1,ycoord1),
 2930%            time).
 2931terminates(move(Grid, Object, Xcoord1, Ycoord1, Xcoord2, Ycoord2), location(Grid, Object, Xcoord1, Ycoord1), Time).
 2932
 2933% 
 2934% 
 2935% ;; allow diagonal movements
 2936% ;[grid,object,xcoord1,ycoord1,xcoord2,ycoord2,time]
 2937% ;Happens(Move(grid,object,xcoord1,ycoord1,xcoord2,ycoord2),time) ->
 2938% ;HoldsAt(Location(grid,object,xcoord1,ycoord1),time) &
 2939% ;(xcoord1=xcoord2 |
 2940% ; xcoord1=xcoord2+1 |
 2941% ; xcoord1=xcoord2-1) &
 2942% ;(ycoord1=ycoord2 |
 2943% ; ycoord1=ycoord2+1 |
 2944% ; ycoord1=ycoord2-1).
 2945% ectest/ec_reader_test.e:1765
 2946% 
 2947% ; only allow right angle movements
 2948% ectest/ec_reader_test.e:1767
 2949% [grid,object,xcoord1,ycoord1,xcoord2,ycoord2,time]% 
 2950% Happens(Move(grid,object,xcoord1,ycoord1,xcoord2,ycoord2),time) ->
 2951% HoldsAt(Location(grid,object,xcoord1,ycoord1),time) &
 2952% ((xcoord1=xcoord2 & (ycoord1=ycoord2+1 | ycoord1=ycoord2-1)) |
 2953%  (ycoord1=ycoord2 & (xcoord1=xcoord2+1 | xcoord1=xcoord2-1))).
 2954happens(move(Grid, Object, Xcoord1, Ycoord1, Xcoord2, Ycoord2), Time) ->
 2955	holds_at(location(Grid, Object, Xcoord1, Ycoord1),
 2956		 Time),
 2957	(   Xcoord1=Xcoord2,
 2958	    (   Ycoord1=Ycoord2+1
 2959	    ;   Ycoord1=Ycoord2-1
 2960	    )
 2961	;   Ycoord1=Ycoord2,
 2962	    (   Xcoord1=Xcoord2+1
 2963	    ;   Xcoord1=Xcoord2-1
 2964	    )
 2965	).
 2966
 2967% 
 2968% 
 2969% ; End of file.
 2970% ectest/ec_reader_test.e:1774
 2971% 
 2972% 
 2973% 
 2974% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2975% ; FILE: ecnet/HandTo.e
 2976% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 2977% ectest/ec_reader_test.e:1780
 2978% 
 2979% ;
 2980% ; Copyright (c) 2005 IBM Corporation and others.
 2981% ; All rights reserved. This program and the accompanying materials
 2982% ; are made available under the terms of the Common Public License v1.0
 2983% ; which accompanies this distribution, and is available at
 2984% ; http://www.eclipse.org/legal/cpl-v10.html
 2985% ;
 2986% ; Contributors:
 2987% ; IBM - Initial implementation
 2988% ;
 2989% ectest/ec_reader_test.e:1791
 2990% 
 2991% event HandTo(agent,agent,physobj)
 2992event(handTo(agent, agent, physobj)).
 2993
 2994% 
 2995% ectest/ec_reader_test.e:1794
 2996% [agent1,agent2,physobj,time]% 
 2997% Initiates(HandTo(agent1,agent2,physobj),
 2998%           Holding(agent2,physobj),
 2999%           time).
 3000initiates(handTo(Agent1, Agent2, Physobj), holding(Agent2, Physobj), Time).
 3001
 3002% 
 3003% 
 3004% ectest/ec_reader_test.e:1799
 3005% [agent1,agent2,physobj,time]% 
 3006% Terminates(HandTo(agent1,agent2,physobj),
 3007%            Holding(agent1,physobj),
 3008%            time).
 3009terminates(handTo(Agent1, Agent2, Physobj), holding(Agent1, Physobj), Time).
 3010
 3011% 
 3012% 
 3013% ectest/ec_reader_test.e:1804
 3014% [agent1,agent2,physobj,time]% 
 3015% Happens(HandTo(agent1,agent2,physobj),time) ->
 3016% HoldsAt(Holding(agent1,physobj),time).
 3017happens(handTo(Agent1, Agent2, Physobj), Time) ->
 3018	holds_at(holding(Agent1, Physobj), Time).
 3019
 3020% 
 3021% 
 3022% event ShakeHands(agent,agent)
 3023event(shakeHands(agent, agent)).
 3024
 3025% 
 3026% ectest/ec_reader_test.e:1810
 3027% event WriteOn(agent,paper,pen)
 3028event(writeOn(agent, paper, pen)).
 3029
 3030% 
 3031% 
 3032% 
 3033% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3034% ; FILE: ecnet/Container.e
 3035% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3036% ectest/ec_reader_test.e:1817
 3037% 
 3038% ;
 3039% ; Copyright (c) 2005 IBM Corporation and others.
 3040% ; All rights reserved. This program and the accompanying materials
 3041% ; are made available under the terms of the Common Public License v1.0
 3042% ; which accompanies this distribution, and is available at
 3043% ; http://www.eclipse.org/legal/cpl-v10.html
 3044% ;
 3045% ; Contributors:
 3046% ; IBM - Initial implementation
 3047% ;
 3048% ;
 3049% ; Container: container
 3050% ;
 3051% ectest/ec_reader_test.e:1831
 3052% 
 3053% ; linkage to OTSpace(M):
 3054% ectest/ec_reader_test.e:1833
 3055% [agent,container1,container2,time]% 
 3056% Happens(TakeOutOf(agent,container1,container2),time) ->
 3057% HoldsAt(ContainerIsOpen(container2),time).
 3058happens(takeOutOf(Agent, Container1, Container2), Time) ->
 3059	holds_at(containerIsOpen(Container2), Time).
 3060
 3061% 
 3062% 
 3063% ectest/ec_reader_test.e:1837
 3064% [agent,container1,container2,time]% 
 3065% Happens(PutInside(agent,container1,container2),time) ->
 3066% HoldsAt(ContainerIsOpen(container2),time).
 3067happens(putInside(Agent, Container1, Container2), Time) ->
 3068	holds_at(containerIsOpen(Container2), Time).
 3069
 3070% 
 3071% 
 3072% ; agent opens container.
 3073% event ContainerOpen(agent,container)
 3074event(containerOpen(agent, container)).
 3075
 3076% ectest/ec_reader_test.e:1843
 3077% 
 3078% ; agent closes container.
 3079% event ContainerClose(agent,container)
 3080event(containerClose(agent, container)).
 3081
 3082% 
 3083% ; container is open.
 3084% fluent ContainerIsOpen(container)
 3085fluent(containerIsOpen(container)).
 3086
 3087% ectest/ec_reader_test.e:1849
 3088% 
 3089% fluent ContainerClosed(container)
 3090fluent(containerClosed(container)).
 3091
 3092% noninertial ContainerClosed
 3093noninertial(containerClosed).
 3094
 3095% 
 3096% ectest/ec_reader_test.e:1853
 3097% [container,time]% 
 3098% HoldsAt(ContainerClosed(container),time) <->
 3099% !HoldsAt(ContainerIsOpen(container),time).
 3100holds_at(containerClosed(Container), Time) <->
 3101	not(holds_at(containerIsOpen(Container), Time)).
 3102
 3103% 
 3104% 
 3105% ; A precondition axiom states that
 3106% ; for an agent to open a container,
 3107% ; the agent must be awake,
 3108% ; the container must not already be open, and
 3109% ; the agent must be holding the container.
 3110% ectest/ec_reader_test.e:1862
 3111% [agent,container,time]% 
 3112% Happens(ContainerOpen(agent,container),time) ->
 3113% HoldsAt(Awake(agent),time) &
 3114% !HoldsAt(ContainerIsOpen(container),time) &
 3115% HoldsAt(Holding(agent,container),time).
 3116happens(containerOpen(Agent, Container), Time) ->
 3117	holds_at(awake(Agent), Time),
 3118	not(holds_at(containerIsOpen(Container), Time)),
 3119	holds_at(holding(Agent, Container), Time).
 3120
 3121% 
 3122% 
 3123% ; An effect axiom states that
 3124% ; if an agent opens a container,
 3125% ; the container will be open:
 3126% ectest/ec_reader_test.e:1871
 3127% [agent,container,time]% 
 3128% Initiates(ContainerOpen(agent,container),ContainerIsOpen(container),time).
 3129initiates(containerOpen(Agent, Container), containerIsOpen(Container), Time).
 3130
 3131% 
 3132% 
 3133% ; A precondition axiom states that
 3134% ; for an agent to close a container,
 3135% ; the agent must be awake,
 3136% ; the container must be open, and
 3137% ; the agent must be holding the container.
 3138% ectest/ec_reader_test.e:1879
 3139% [agent,container,time]% 
 3140% Happens(ContainerClose(agent,container),time) ->
 3141% HoldsAt(Awake(agent),time) &
 3142% HoldsAt(ContainerIsOpen(container),time) &
 3143% HoldsAt(Holding(agent,container),time).
 3144happens(containerClose(Agent, Container), Time) ->
 3145	holds_at(awake(Agent), Time),
 3146	holds_at(containerIsOpen(Container), Time),
 3147	holds_at(holding(Agent, Container), Time).
 3148
 3149% 
 3150% 
 3151% ; An effect axiom states that
 3152% ; if an agent closes a container,
 3153% ; the container will no longer be open:
 3154% ectest/ec_reader_test.e:1888
 3155% [agent,container,time]% 
 3156% Terminates(ContainerClose(agent,container),ContainerIsOpen(container),time).
 3157terminates(containerClose(Agent, Container), containerIsOpen(Container), Time).
 3158
 3159% 
 3160% 
 3161% ; End of file.
 3162% 
 3163% 
 3164% ectest/ec_reader_test.e:1894
 3165% 
 3166% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3167% ; FILE: ecnet/SpeechAct.e
 3168% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3169% 
 3170% ;
 3171% ; Copyright (c) 2005 IBM Corporation and others.
 3172% ; All rights reserved. This program and the accompanying materials
 3173% ; are made available under the terms of the Common Public License v1.0
 3174% ; which accompanies this distribution, and is available at
 3175% ; http://www.eclipse.org/legal/cpl-v10.html
 3176% ;
 3177% ; Contributors:
 3178% ; IBM - Initial implementation
 3179% ;
 3180% ; The SpeechAct representation deals with a few speech acts
 3181% ; \fullcite{Searle:1969}.
 3182% ;
 3183% ; @book{Searle:1969,
 3184% ;   author = "John R. Searle",
 3185% ;   year = "1969",
 3186% ;   title = "Speech Acts: An Essay in the Philosophy of Language",
 3187% ;   address = "Cambridge",
 3188% ;   publisher = "Cambridge University Press",
 3189% ; }
 3190% ;
 3191% ; We handle
 3192% ; the illocutionary acts of
 3193% ; inviting someone into one's house (a form of request) and
 3194% ; greeting someone,
 3195% ; and the expressive speech act of crying for joy.
 3196% ;
 3197% ectest/ec_reader_test.e:1926
 3198% 
 3199% ; inviting in
 3200% 
 3201% ; agent1 invites agent2 into room.
 3202% event InviteIn(agent,agent,room)
 3203event(inviteIn(agent, agent, room)).
 3204
 3205% ; agent1 is invited into room by agent2.
 3206% ectest/ec_reader_test.e:1932
 3207% fluent InvitedIn(agent,room,agent)
 3208fluent(invitedIn(agent, room, agent)).
 3209
 3210% 
 3211% ; A precondition axiom states that for
 3212% ; an agent to invite another agent into a room,
 3213% ; the first agent must be in the room and
 3214% ; there must be an outside area such that
 3215% ; the second agent is at the outside area and
 3216% ; the outside area is adjacent to the room:
 3217% ectest/ec_reader_test.e:1940
 3218% [agent1,agent2,room,time]% 
 3219% Happens(InviteIn(agent1,agent2,room),time) ->
 3220% HoldsAt(At(agent1,room),time) &
 3221% ectest/ec_reader_test.e:1943
 3222% {outside}% 
 3223% HoldsAt(At(agent2,outside),time) &
 3224% Adjacent(room,outside).
 3225exists([Outside],  (happens(inviteIn(Agent1, Agent2, Room), Time)->holds_at(at(Agent1, Room), Time), holds_at(at(Agent2, Outside), Time), adjacent(Room, Outside))).
 3226
 3227% 
 3228% 
 3229% ; An effect axiom states that if
 3230% ; an agent invites another agent into a room,
 3231% ; the second agent will be invited into the room by the first agent:
 3232% ectest/ec_reader_test.e:1950
 3233% [agent1,agent2,room,time]% 
 3234% Initiates(InviteIn(agent1,agent2,room),
 3235%           InvitedIn(agent2,room,agent1),
 3236%           time).
 3237initiates(inviteIn(Agent1, Agent2, Room), invitedIn(Agent2, Room, Agent1), Time).
 3238
 3239% 
 3240% 
 3241% ; agent intends to walk into room.
 3242% ectest/ec_reader_test.e:1956
 3243% event IntendToWalkIn(agent,room)
 3244event(intendToWalkIn(agent, room)).
 3245
 3246% ; agent has the intention to walk into room.
 3247% fluent IntentionToWalkIn(agent,room)
 3248fluent(intentionToWalkIn(agent, room)).
 3249
 3250% ; agent acts on the intention to walk into room.
 3251% fluent ActOnIntentionToWalkIn(agent,room)
 3252fluent(actOnIntentionToWalkIn(agent, room)).
 3253
 3254% noninertial ActOnIntentionToWalkIn
 3255noninertial(actOnIntentionToWalkIn).
 3256
 3257% ectest/ec_reader_test.e:1962
 3258% 
 3259% ; A trigger axiom states that
 3260% ; if an agent is invited into a room by another agent,
 3261% ; the first agent likes the second agent, and
 3262% ; the first agent does not already have the intention to
 3263% ; walk into the room,
 3264% ; the first agent intends to walk into the room:
 3265% ectest/ec_reader_test.e:1969
 3266% [agent1,agent2,room,time]% 
 3267% HoldsAt(InvitedIn(agent1,room,agent2),time) &
 3268% HoldsAt(Like(agent1,agent2),time) &
 3269% !HoldsAt(IntentionToWalkIn(agent1,room),time) ->
 3270% Happens(IntendToWalkIn(agent1,room),time).
 3271holds_at(invitedIn(Agent1, Room, Agent2), Time), holds_at(like(Agent1, Agent2), Time), not(holds_at(intentionToWalkIn(Agent1, Room), Time)) ->
 3272	happens(intendToWalkIn(Agent1, Room), Time).
 3273
 3274% 
 3275% 
 3276% ; An effect axiom states that
 3277% ; if an agent intends to walk into a room,
 3278% ; the agent will have the intention to walk into the room:
 3279% ectest/ec_reader_test.e:1978
 3280% [agent,room,time]% 
 3281% Initiates(IntendToWalkIn(agent,room),
 3282%           IntentionToWalkIn(agent,room),
 3283%           time).
 3284initiates(intendToWalkIn(Agent, Room), intentionToWalkIn(Agent, Room), Time).
 3285
 3286% 
 3287% 
 3288% ; Two trigger axioms state that
 3289% ; if an agent has the intention to walk into a room,
 3290% ; the agent acts on the intention to walk into the room,
 3291% ; the agent is at a location,
 3292% ; side one (two) of a door is the room,
 3293% ; side two (one) of the door is the location,
 3294% ; agent will walk through side two (one) of the door:
 3295% ectest/ec_reader_test.e:1990
 3296% [agent,room,location,door,time]% 
 3297% HoldsAt(IntentionToWalkIn(agent,room),time) &
 3298% HoldsAt(ActOnIntentionToWalkIn(agent,room),time) &
 3299% HoldsAt(At(agent,location),time) &
 3300% Side1(door)=room &
 3301% Side2(door)=location ->
 3302% Happens(WalkThroughDoor21(agent,door),time).
 3303holds_at(intentionToWalkIn(Agent, Room), Time), holds_at(actOnIntentionToWalkIn(Agent, Room), Time), holds_at(at(Agent, Location), Time), side1(Door)=Room, side2(Door)=Location ->
 3304	happens(walkThroughDoor21(Agent, Door), Time).
 3305
 3306% ectest/ec_reader_test.e:1996
 3307% 
 3308% 
 3309% ectest/ec_reader_test.e:1998
 3310% [agent,room,location,door,time]% 
 3311% HoldsAt(IntentionToWalkIn(agent,room),time) &
 3312% HoldsAt(ActOnIntentionToWalkIn(agent,room),time) &
 3313% HoldsAt(At(agent,location),time) &
 3314% Side2(door)=room &
 3315% Side1(door)=location ->
 3316% Happens(WalkThroughDoor12(agent,door),time).
 3317holds_at(intentionToWalkIn(Agent, Room), Time), holds_at(actOnIntentionToWalkIn(Agent, Room), Time), holds_at(at(Agent, Location), Time), side2(Door)=Room, side1(Door)=Location ->
 3318	happens(walkThroughDoor12(Agent, Door), Time).
 3319
 3320% ectest/ec_reader_test.e:2004
 3321% 
 3322% 
 3323% ; Two effect axioms state that
 3324% ; if side one (two) of a door is a room and
 3325% ; an agent walks through side two (one) of the door,
 3326% ; the agent will no longer have the intention to
 3327% ; walk into the room:
 3328% ectest/ec_reader_test.e:2011
 3329% [agent,room,door,time]% 
 3330% Side1(door)=room ->
 3331% Terminates(WalkThroughDoor21(agent,door),
 3332%            IntentionToWalkIn(agent,room),
 3333%            time).
 3334side1(Door)=Room ->
 3335	terminates(walkThroughDoor21(Agent, Door),
 3336		   intentionToWalkIn(Agent, Room),
 3337		   Time).
 3338
 3339% 
 3340% 
 3341% ectest/ec_reader_test.e:2017
 3342% [agent,room,door,time]% 
 3343% Side2(door)=room ->
 3344% Terminates(WalkThroughDoor12(agent,door),
 3345%            IntentionToWalkIn(agent,room),
 3346%            time).
 3347side2(Door)=Room ->
 3348	terminates(walkThroughDoor12(Agent, Door),
 3349		   intentionToWalkIn(Agent, Room),
 3350		   Time).
 3351
 3352% 
 3353% 
 3354% ; agent greets object.
 3355% ectest/ec_reader_test.e:2024
 3356% event Greet(agent,object)
 3357event(greet(agent, object)).
 3358
 3359% 
 3360% event SayPleasedToMeet(agent,agent)
 3361event(sayPleasedToMeet(agent, agent)).
 3362
 3363% 
 3364% ; agent says goodbye to object.
 3365% event SayGoodbye(agent,object)
 3366event(sayGoodbye(agent, object)).
 3367
 3368% ectest/ec_reader_test.e:2030
 3369% 
 3370% event TalkAbout(agent,content)
 3371event(talkAbout(agent, content)).
 3372
 3373% 
 3374% event Converse(agent,agent)
 3375event(converse(agent, agent)).
 3376
 3377% 
 3378% ectest/ec_reader_test.e:2035
 3379% [agent1,agent2,time]% 
 3380% Happens(Converse(agent1,agent2),time) ->
 3381% ectest/ec_reader_test.e:2037
 3382% {location}% 
 3383% HoldsAt(At(agent1,location),time) &
 3384% HoldsAt(At(agent2,location),time).
 3385exists([Location],  (happens(converse(Agent1, Agent2), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 3386
 3387% 
 3388% 
 3389% ; A precondition axiom states that for
 3390% ; an agent to greet an object,
 3391% ; there must be a location such that
 3392% ; the agent is at the location and
 3393% ; the object is at the location:
 3394% ectest/ec_reader_test.e:2046
 3395% [agent,object,time]% 
 3396% Happens(Greet(agent,object),time) ->
 3397% ectest/ec_reader_test.e:2048
 3398% {location}% 
 3399% HoldsAt(At(agent,location),time) &
 3400% HoldsAt(At(object,location),time).
 3401exists([Location],  (happens(greet(Agent, Object), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Object, Location), Time))).
 3402
 3403% 
 3404% 
 3405% ectest/ec_reader_test.e:2052
 3406% [agent,object,time]% 
 3407% Happens(SayGoodbye(agent,object),time) ->
 3408% ectest/ec_reader_test.e:2054
 3409% {location}% 
 3410% HoldsAt(At(agent,location),time) &
 3411% HoldsAt(At(object,location),time).
 3412exists([Location],  (happens(sayGoodbye(Agent, Object), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Object, Location), Time))).
 3413
 3414% 
 3415% 
 3416% ; speech: expression of emotions
 3417% 
 3418% ; agent cries for joy.
 3419% ectest/ec_reader_test.e:2061
 3420% event CryForJoy(agent)
 3421event(cryForJoy(agent)).
 3422
 3423% 
 3424% ; A precondition axiom states that for
 3425% ; an agent to cry for joy,
 3426% ; the agent must be happy:
 3427% 
 3428% ectest/ec_reader_test.e:2067
 3429% [agent,time]% 
 3430% Happens(CryForJoy(agent),time) ->
 3431% HoldsAt(Happy(agent),time).
 3432happens(cryForJoy(Agent), Time) ->
 3433	holds_at(happy(Agent), Time).
 3434
 3435% 
 3436% 
 3437% event Threaten(agent,agent,weapon)
 3438event(threaten(agent, agent, weapon)).
 3439
 3440% 
 3441% ectest/ec_reader_test.e:2073
 3442% event ReleaseFromThreat(agent,agent)
 3443event(releaseFromThreat(agent, agent)).
 3444
 3445% 
 3446% fluent ThreatenedBy(agent,agent)
 3447fluent(threatenedBy(agent, agent)).
 3448
 3449% 
 3450% ectest/ec_reader_test.e:2077
 3451% [agent1,agent2,weapon,time]% 
 3452% Happens(Threaten(agent1,agent2,weapon), time) ->
 3453% HoldsAt(Holding(agent1,weapon),time) &
 3454% ectest/ec_reader_test.e:2080
 3455% {location}% 
 3456% HoldsAt(At(agent1,location),time) &
 3457% HoldsAt(At(agent2,location),time).
 3458exists([Location],  (happens(threaten(Agent1, Agent2, Weapon), Time)->holds_at(holding(Agent1, Weapon), Time), holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 3459
 3460% 
 3461% 
 3462% ectest/ec_reader_test.e:2084
 3463% [agent1,agent2,weapon,time]% 
 3464% Happens(Threaten(agent1,agent2,weapon), time) ->
 3465% Happens(BecomeAngryAt(agent2,agent1),time).
 3466happens(threaten(Agent1, Agent2, Weapon), Time) ->
 3467	happens(becomeAngryAt(Agent2, Agent1), Time).
 3468
 3469% 
 3470% 
 3471% ectest/ec_reader_test.e:2088
 3472% [agent1,agent2,weapon,time]% 
 3473% Initiates(Threaten(agent1,agent2,weapon),
 3474%           ThreatenedBy(agent2,agent1),
 3475%           time).
 3476initiates(threaten(Agent1, Agent2, Weapon), threatenedBy(Agent2, Agent1), Time).
 3477
 3478% 
 3479% 
 3480% ectest/ec_reader_test.e:2093
 3481% [agent1,agent2,time]% 
 3482% Terminates(ReleaseFromThreat(agent1,agent2),
 3483%            ThreatenedBy(agent2,agent1),
 3484%            time).
 3485terminates(releaseFromThreat(Agent1, Agent2), threatenedBy(Agent2, Agent1), Time).
 3486
 3487% 
 3488% 
 3489% event Order(agent,agent,physobj)
 3490event(order(agent, agent, physobj)).
 3491
 3492% ectest/ec_reader_test.e:2099
 3493% 
 3494% fluent KnowOrder(agent,agent,physobj)
 3495fluent(knowOrder(agent, agent, physobj)).
 3496
 3497% 
 3498% ectest/ec_reader_test.e:2102
 3499% [agent1,agent2,physobj,time]% 
 3500% Initiates(Order(agent1,agent2,physobj),
 3501%           KnowOrder(agent2,agent1,physobj),
 3502%           time).
 3503initiates(order(Agent1, Agent2, Physobj), knowOrder(Agent2, Agent1, Physobj), Time).
 3504
 3505% 
 3506% 
 3507% ectest/ec_reader_test.e:2107
 3508% [agent1,agent2,physobj,time]% 
 3509% Happens(Order(agent1,agent2,physobj),time) ->
 3510% ectest/ec_reader_test.e:2109
 3511% {location}% 
 3512% HoldsAt(At(agent1,location),time) &
 3513% HoldsAt(At(agent2,location),time).
 3514exists([Location],  (happens(order(Agent1, Agent2, Physobj), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 3515
 3516% 
 3517% 
 3518% event Request(agent,agent,physobj)
 3519event(request(agent, agent, physobj)).
 3520
 3521% 
 3522% ectest/ec_reader_test.e:2115
 3523% fluent KnowRequest(agent,agent,physobj)
 3524fluent(knowRequest(agent, agent, physobj)).
 3525
 3526% 
 3527% ectest/ec_reader_test.e:2117
 3528% [agent1,agent2,physobj,time]% 
 3529% Initiates(Request(agent1,agent2,physobj),
 3530%           KnowRequest(agent2,agent1,physobj),
 3531%           time).
 3532initiates(request(Agent1, Agent2, Physobj), knowRequest(Agent2, Agent1, Physobj), Time).
 3533
 3534% 
 3535% 
 3536% ectest/ec_reader_test.e:2122
 3537% [agent1,agent2,physobj,time]% 
 3538% Happens(Request(agent1,agent2,physobj),time) ->
 3539% ectest/ec_reader_test.e:2124
 3540% {location}% 
 3541% HoldsAt(At(agent1,location),time) &
 3542% HoldsAt(At(agent2,location),time).
 3543exists([Location],  (happens(request(Agent1, Agent2, Physobj), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 3544
 3545% 
 3546% 
 3547% ; End of file.
 3548% 
 3549% ectest/ec_reader_test.e:2130
 3550% 
 3551% 
 3552% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3553% ; FILE: ecnet/Sleep.e
 3554% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 3555% 
 3556% ;
 3557% ; Copyright (c) 2005 IBM Corporation and others.
 3558% ; All rights reserved. This program and the accompanying materials
 3559% ; are made available under the terms of the Common Public License v1.0
 3560% ; which accompanies this distribution, and is available at
 3561% ; http://www.eclipse.org/legal/cpl-v10.html
 3562% ;
 3563% ; Contributors:
 3564% ; IBM - Initial implementation
 3565% ;
 3566% ; The Sleep representation deals with the activity of sleeping and
 3567% ; body posture.
 3568% ; It is similar to the finite automaton representation of sleep
 3569% ; used in ThoughtTreasure \fullcite[chap. 7]{Mueller:1998}.
 3570% ;
 3571% ; @book{Mueller:1998,
 3572% ;   author = "Erik T. Mueller",
 3573% ;   year = "1998",
 3574% ;   title = "Natural Language Processing with \uppercase{T}hought\uppercase{T}reasure",
 3575% ;   address = "New York",
 3576% ;   publisher = "Signiform",
 3577% ; }
 3578% ;
 3579% ectest/ec_reader_test.e:2159
 3580% 
 3581% ; sleep
 3582% 
 3583% ; agent wakes up.
 3584% event WakeUp(agent)
 3585event(wakeUp(agent)).
 3586
 3587% 
 3588% ; agent gets tired.
 3589% ectest/ec_reader_test.e:2166
 3590% event GetTired(agent)
 3591event(getTired(agent)).
 3592
 3593% 
 3594% ; agent falls asleep.
 3595% event FallAsleep(agent)
 3596event(fallAsleep(agent)).
 3597
 3598% 
 3599% ; agent is asleep.
 3600% ectest/ec_reader_test.e:2172
 3601% fluent Sleep0(agent)
 3602fluent(sleep0(agent)).
 3603
 3604% ; agent is awake and in bed.
 3605% fluent Sleep1(agent)
 3606fluent(sleep1(agent)).
 3607
 3608% ; agent is awake, out of bed, and undressed.
 3609% fluent Sleep2(agent)
 3610fluent(sleep2(agent)).
 3611
 3612% ; agent is awake and dressed.
 3613% ectest/ec_reader_test.e:2178
 3614% fluent Sleep3(agent)
 3615fluent(sleep3(agent)).
 3616
 3617% ; agent is tired and dressed.
 3618% fluent Sleep4(agent)
 3619fluent(sleep4(agent)).
 3620
 3621% ; agent is tired and undressed.
 3622% fluent Sleep5(agent)
 3623fluent(sleep5(agent)).
 3624
 3625% ; agent is in bed, waiting to fall asleep.
 3626% ectest/ec_reader_test.e:2184
 3627% fluent Sleep6(agent)
 3628fluent(sleep6(agent)).
 3629
 3630% 
 3631% ; At any time, an agent is in one of seven sleep states:
 3632% xor Sleep0, Sleep1, Sleep2, Sleep3, Sleep4, Sleep5, Sleep6
 3633xor([sleep0, sleep1, sleep2, sleep3, sleep4, sleep5, sleep6]).
 3634
 3635% 
 3636% ; constraints
 3637% ectest/ec_reader_test.e:2190
 3638% 
 3639% ; agent is asleep.
 3640% fluent Asleep(agent)
 3641fluent(asleep(agent)).
 3642
 3643% ; agent is awake.
 3644% fluent Awake(agent)
 3645fluent(awake(agent)).
 3646
 3647% noninertial Asleep
 3648noninertial(asleep).
 3649
 3650% ectest/ec_reader_test.e:2196
 3651% noninertial Awake
 3652noninertial(awake).
 3653
 3654% 
 3655% ; Sleep0 indicates that the agent is asleep:
 3656% ectest/ec_reader_test.e:2199
 3657% [agent,time] % HoldsAt(Asleep(agent),time) <-> HoldsAt(Sleep0(agent),time).
 3658holds_at(asleep(Agent), Time) <->
 3659	holds_at(sleep0(Agent), Time).
 3660
 3661% 
 3662% 
 3663% ; In all other sleep states, the agent is awake:
 3664% ectest/ec_reader_test.e:2202
 3665% [agent,time]% 
 3666% HoldsAt(Awake(agent),time) <->
 3667% HoldsAt(Sleep1(agent),time) |
 3668% HoldsAt(Sleep2(agent),time) |
 3669% HoldsAt(Sleep3(agent),time) |
 3670% HoldsAt(Sleep4(agent),time) |
 3671% HoldsAt(Sleep5(agent),time) |
 3672% HoldsAt(Sleep6(agent),time).
 3673holds_at(awake(Agent), Time) <->
 3674	(   holds_at(sleep1(Agent), Time)
 3675	;   holds_at(sleep2(Agent), Time)
 3676	;   holds_at(sleep3(Agent), Time)
 3677	;   holds_at(sleep4(Agent), Time)
 3678	;   holds_at(sleep5(Agent), Time)
 3679	;   holds_at(sleep6(Agent), Time)
 3680	).
 3681
 3682% ectest/ec_reader_test.e:2209
 3683% 
 3684% 
 3685% ; A number of axioms are used to specify the transitions of
 3686% ; a finite automaton.
 3687% ;--
 3688% 
 3689% ; Waking up causes a transition from Sleep0
 3690% ; to Sleep1:
 3691% ectest/ec_reader_test.e:2217
 3692% [agent,time] % Terminates(WakeUp(agent),Sleep0(agent),time).
 3693terminates(wakeUp(Agent), sleep0(Agent), Time).
 3694
 3695% 
 3696% 
 3697% ectest/ec_reader_test.e:2219
 3698% [agent,time] % Initiates(WakeUp(agent),Sleep1(agent),time).
 3699initiates(wakeUp(Agent), sleep1(Agent), Time).
 3700
 3701% 
 3702% 
 3703% ectest/ec_reader_test.e:2221
 3704% [agent,time] % Happens(WakeUp(agent),time) -> HoldsAt(Sleep0(agent),time).
 3705happens(wakeUp(Agent), Time) ->
 3706	holds_at(sleep0(Agent), Time).
 3707
 3708% 
 3709% 
 3710% ;--
 3711% 
 3712% ; Getting out of bed causes a transition from Sleep1
 3713% ; to Sleep2:
 3714% ectest/ec_reader_test.e:2227
 3715% [agent,bed,time] % Terminates(RiseFrom(agent,bed),Sleep1(agent),time).
 3716terminates(riseFrom(Agent, Bed), sleep1(Agent), Time).
 3717
 3718% 
 3719% 
 3720% ectest/ec_reader_test.e:2229
 3721% [agent,bed,time] % Initiates(RiseFrom(agent,bed),Sleep2(agent),time).
 3722initiates(riseFrom(Agent, Bed), sleep2(Agent), Time).
 3723
 3724% 
 3725% 
 3726% ectest/ec_reader_test.e:2231
 3727% [agent,bed,time]% 
 3728% Happens(RiseFrom(agent,bed),time) -> HoldsAt(Sleep1(agent),time).
 3729happens(riseFrom(Agent, Bed), Time) ->
 3730	holds_at(sleep1(Agent), Time).
 3731
 3732% 
 3733% 
 3734% ;--
 3735% 
 3736% ; Getting dressed causes a transition from Sleep2
 3737% ; to Sleep3, the normal state of awakeness:
 3738% ectest/ec_reader_test.e:2238
 3739% [agent,time] % Terminates(GetDressed(agent),Sleep2(agent),time).
 3740terminates(getDressed(Agent), sleep2(Agent), Time).
 3741
 3742% 
 3743% 
 3744% ectest/ec_reader_test.e:2240
 3745% [agent,time] % Initiates(GetDressed(agent),Sleep3(agent),time).
 3746initiates(getDressed(Agent), sleep3(Agent), Time).
 3747
 3748% 
 3749% 
 3750% ectest/ec_reader_test.e:2242
 3751% [agent,time] % Happens(GetDressed(agent),time) -> HoldsAt(Sleep2(agent),time).
 3752happens(getDressed(Agent), Time) ->
 3753	holds_at(sleep2(Agent), Time).
 3754
 3755% 
 3756% 
 3757% ;--
 3758% 
 3759% ; Getting tired causes a transition from Sleep3
 3760% ; to Sleep4:
 3761% ectest/ec_reader_test.e:2248
 3762% [agent,time] % Terminates(GetTired(agent),Sleep3(agent),time).
 3763terminates(getTired(Agent), sleep3(Agent), Time).
 3764
 3765% 
 3766% 
 3767% ectest/ec_reader_test.e:2250
 3768% [agent,time] % Initiates(GetTired(agent),Sleep4(agent),time).
 3769initiates(getTired(Agent), sleep4(Agent), Time).
 3770
 3771% 
 3772% 
 3773% ectest/ec_reader_test.e:2252
 3774% [agent,time] % Happens(GetTired(agent),time) -> HoldsAt(Sleep3(agent),time).
 3775happens(getTired(Agent), Time) ->
 3776	holds_at(sleep3(Agent), Time).
 3777
 3778% 
 3779% 
 3780% ;--
 3781% 
 3782% ; Getting undressed causes a transition from Sleep4
 3783% ; to Sleep5:
 3784% ectest/ec_reader_test.e:2258
 3785% [agent,time] % Terminates(GetUndressed(agent),Sleep4(agent),time).
 3786terminates(getUndressed(Agent), sleep4(Agent), Time).
 3787
 3788% 
 3789% 
 3790% ectest/ec_reader_test.e:2260
 3791% [agent,time] % Initiates(GetUndressed(agent),Sleep5(agent),time).
 3792initiates(getUndressed(Agent), sleep5(Agent), Time).
 3793
 3794% 
 3795% 
 3796% ectest/ec_reader_test.e:2262
 3797% [agent,time] % Happens(GetUndressed(agent),time) -> HoldsAt(Sleep4(agent),time).
 3798happens(getUndressed(Agent), Time) ->
 3799	holds_at(sleep4(Agent), Time).
 3800
 3801% 
 3802% 
 3803% ;--
 3804% 
 3805% ; Lying on a bed causes a transition from Sleep5
 3806% ; to Sleep6:
 3807% ectest/ec_reader_test.e:2268
 3808% [agent,bed,time] % Terminates(LieOn(agent,bed),Sleep5(agent),time).
 3809terminates(lieOn(Agent, Bed), sleep5(Agent), Time).
 3810
 3811% 
 3812% 
 3813% ectest/ec_reader_test.e:2270
 3814% [agent,bed,time] % Initiates(LieOn(agent,bed),Sleep6(agent),time).
 3815initiates(lieOn(Agent, Bed), sleep6(Agent), Time).
 3816
 3817% 
 3818% 
 3819% ectest/ec_reader_test.e:2272
 3820% [agent,bed,time] % Happens(LieOn(agent,bed),time) -> HoldsAt(Sleep5(agent),time).
 3821happens(lieOn(Agent, Bed), Time) ->
 3822	holds_at(sleep5(Agent), Time).
 3823
 3824% 
 3825% 
 3826% ;--
 3827% 
 3828% ; Falling asleep causes a transition from Sleep6
 3829% ; to Sleep0:
 3830% ectest/ec_reader_test.e:2278
 3831% [agent,time] % Terminates(FallAsleep(agent),Sleep6(agent),time).
 3832terminates(fallAsleep(Agent), sleep6(Agent), Time).
 3833
 3834% 
 3835% 
 3836% ectest/ec_reader_test.e:2280
 3837% [agent,time] % Initiates(FallAsleep(agent),Sleep0(agent),time).
 3838initiates(fallAsleep(Agent), sleep0(Agent), Time).
 3839
 3840% 
 3841% 
 3842% ectest/ec_reader_test.e:2282
 3843% [agent,time] % Happens(FallAsleep(agent),time) -> HoldsAt(Sleep6(agent),time).
 3844happens(fallAsleep(Agent), Time) ->
 3845	holds_at(sleep6(Agent), Time).
 3846
 3847% 
 3848% 
 3849% ;--
 3850% 
 3851% ; agent acts on being in state Sleep5.
 3852% fluent ActOnSleep5(agent)
 3853fluent(actOnSleep5(agent)).
 3854
 3855% ectest/ec_reader_test.e:2288
 3856% noninertial ActOnSleep5
 3857noninertial(actOnSleep5).
 3858
 3859% 
 3860% ; We reduce the number of models by asserting that
 3861% ; an agent only acts on being in state Sleep5 while in
 3862% ; that state:
 3863% ectest/ec_reader_test.e:2293
 3864% [agent,time]% 
 3865% !HoldsAt(Sleep5(agent),time) ->
 3866% !HoldsAt(ActOnSleep5(agent),time).
 3867not(holds_at(sleep5(Agent), Time)) ->
 3868	not(holds_at(actOnSleep5(Agent), Time)).
 3869
 3870% 
 3871% 
 3872% ; Undressed is like IntentionToPlay
 3873% ; ActOnSleep5 is like ActOnIntentionToPlay
 3874% ectest/ec_reader_test.e:2299
 3875% 
 3876% ; A trigger axiom states that if an agent is in state Sleep5,
 3877% ; the agent acts on this state, the agent is in a room, and
 3878% ; a bed is at the room, the agent lies on the bed:
 3879% ectest/ec_reader_test.e:2303
 3880% [agent,room,bed,time]% 
 3881% HoldsAt(Sleep5(agent),time) &
 3882% HoldsAt(ActOnSleep5(agent),time) &
 3883% HoldsAt(At(agent,room),time) &
 3884% HoldsAt(At(bed,room),time) ->
 3885% Happens(LieOn(agent,bed),time).
 3886holds_at(sleep5(Agent), Time), holds_at(actOnSleep5(Agent), Time), holds_at(at(Agent, Room), Time), holds_at(at(Bed, Room), Time) ->
 3887	happens(lieOn(Agent, Bed), Time).
 3888
 3889% 
 3890% ectest/ec_reader_test.e:2309
 3891% 
 3892% ; A precondition axiom states that for
 3893% ; an agent to lie on a bed,
 3894% ; the agent must be in state Sleep5,
 3895% ; the agent must act on this state, and
 3896% ; there must be a room such that
 3897% ; the agent is in the room and the bed is in the room:
 3898% ectest/ec_reader_test.e:2316
 3899% [agent,bed,time]% 
 3900% Happens(LieOn(agent,bed),time) ->
 3901% HoldsAt(Sleep5(agent),time) &
 3902% HoldsAt(ActOnSleep5(agent),time) &
 3903% ectest/ec_reader_test.e:2320
 3904% {room}% 
 3905%  HoldsAt(At(agent,room),time) &
 3906%  HoldsAt(At(bed,room),time).
 3907exists([Room],  (happens(lieOn(Agent, Bed), Time)->holds_at(sleep5(Agent), Time), holds_at(actOnSleep5(Agent), Time), holds_at(at(Agent, Room), Time), holds_at(at(Bed, Room), Time))).
 3908
 3909% 
 3910% 
 3911% ; (body) posture
 3912% 
 3913% ; agent lies on physobj.
 3914% ectest/ec_reader_test.e:2327
 3915% event LieOn(agent,physobj)
 3916event(lieOn(agent, physobj)).
 3917
 3918% 
 3919% ; agent sits on physobj.
 3920% event SitOn(agent,physobj)
 3921event(sitOn(agent, physobj)).
 3922
 3923% 
 3924% ectest/ec_reader_test.e:2332
 3925% [agent,physobj,time]% 
 3926% Happens(SitOn(agent,physobj),time) ->
 3927% ectest/ec_reader_test.e:2334
 3928% {location}% 
 3929%  HoldsAt(At(agent,location),time) &
 3930%  HoldsAt(At(physobj,location),time).
 3931exists([Location],  (happens(sitOn(Agent, Physobj), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Physobj, Location), Time))).
 3932
 3933% 
 3934% 
 3935% ; agent rises from physobj.
 3936% event RiseFrom(agent,physobj)
 3937event(riseFrom(agent, physobj)).
 3938
 3939% ectest/ec_reader_test.e:2340
 3940% 
 3941% ; agent is lying on physobj.
 3942% fluent LyingOn(agent,physobj)
 3943fluent(lyingOn(agent, physobj)).
 3944
 3945% ; agent is sitting on physobj.
 3946% fluent SittingOn(agent,physobj)
 3947fluent(sittingOn(agent, physobj)).
 3948
 3949% ; agent is standing.
 3950% ectest/ec_reader_test.e:2346
 3951% fluent Standing(agent)
 3952fluent(standing(agent)).
 3953
 3954% 
 3955% ; agent is lying down.
 3956% fluent Lying(agent)
 3957fluent(lying(agent)).
 3958
 3959% ; agent is sitting.
 3960% fluent Sitting(agent)
 3961fluent(sitting(agent)).
 3962
 3963% ectest/ec_reader_test.e:2352
 3964% noninertial Lying
 3965noninertial(lying).
 3966
 3967% noninertial Sitting
 3968noninertial(sitting).
 3969
 3970% 
 3971% ; At any time, an agent is either lying, sitting, or standing:
 3972% xor Lying, Sitting, Standing
 3973xor([lying, sitting, standing]).
 3974
 3975% 
 3976% ectest/ec_reader_test.e:2358
 3977% [agent,physobj,time]% 
 3978% HoldsAt(LyingOn(agent,physobj),time) ->
 3979% HoldsAt(Lying(agent),time).
 3980holds_at(lyingOn(Agent, Physobj), Time) ->
 3981	holds_at(lying(Agent), Time).
 3982
 3983% 
 3984% 
 3985% ectest/ec_reader_test.e:2362
 3986% [agent,physobj,time]% 
 3987% HoldsAt(SittingOn(agent,physobj),time) ->
 3988% HoldsAt(Sitting(agent),time).
 3989holds_at(sittingOn(Agent, Physobj), Time) ->
 3990	holds_at(sitting(Agent), Time).
 3991
 3992% 
 3993% 
 3994% ; State constraints represent that an agent can lie or sit
 3995% ; on at most one object at a time:
 3996% ectest/ec_reader_test.e:2368
 3997% [agent,physobj1,physobj2,time]% 
 3998% HoldsAt(LyingOn(agent,physobj1),time) &
 3999% HoldsAt(LyingOn(agent,physobj2),time) ->
 4000% physobj1=physobj2.
 4001holds_at(lyingOn(Agent, Physobj1), Time), holds_at(lyingOn(Agent, Physobj2), Time) ->
 4002	Physobj1=Physobj2.
 4003
 4004% 
 4005% 
 4006% ectest/ec_reader_test.e:2373
 4007% [agent,physobj1,physobj2,time]% 
 4008% HoldsAt(SittingOn(agent,physobj1),time) &
 4009% HoldsAt(SittingOn(agent,physobj2),time) ->
 4010% physobj1=physobj2.
 4011holds_at(sittingOn(Agent, Physobj1), Time), holds_at(sittingOn(Agent, Physobj2), Time) ->
 4012	Physobj1=Physobj2.
 4013
 4014% 
 4015% 
 4016% ; An effect axiom states that if an agent is standing and
 4017% ; lies on a physical object, the agent will be lying on
 4018% ; the physical object:
 4019% ectest/ec_reader_test.e:2381
 4020% [agent,physobj,time]% 
 4021% HoldsAt(Standing(agent),time) ->
 4022% Initiates(LieOn(agent,physobj),
 4023%           LyingOn(agent,physobj),
 4024%           time).
 4025holds_at(standing(Agent), Time) ->
 4026	initiates(lieOn(Agent, Physobj),
 4027		  lyingOn(Agent, Physobj),
 4028		  Time).
 4029
 4030% 
 4031% 
 4032% ; An effect axiom states that if an agent
 4033% ; lies on a physical object, the agent will no longer
 4034% ; be standing:
 4035% ectest/ec_reader_test.e:2390
 4036% [agent,physobj,time]% 
 4037% Terminates(LieOn(agent,physobj),
 4038%            Standing(agent),
 4039%            time).
 4040terminates(lieOn(Agent, Physobj), standing(Agent), Time).
 4041
 4042% 
 4043% 
 4044% ; An effect axiom states that if an agent is standing and
 4045% ; sits on a physical object, the agent will be sitting on
 4046% ; the physical object:
 4047% ectest/ec_reader_test.e:2398
 4048% [agent,physobj,time]% 
 4049% HoldsAt(Standing(agent),time) ->
 4050% Initiates(SitOn(agent,physobj),
 4051%           SittingOn(agent,physobj),
 4052%           time).
 4053holds_at(standing(Agent), Time) ->
 4054	initiates(sitOn(Agent, Physobj),
 4055		  sittingOn(Agent, Physobj),
 4056		  Time).
 4057
 4058% 
 4059% 
 4060% ; An effect axiom states that if an agent
 4061% ; sits on a physical object, the agent will no longer
 4062% ; be standing:
 4063% ectest/ec_reader_test.e:2407
 4064% [agent,physobj,time]% 
 4065% Terminates(SitOn(agent,physobj),
 4066%            Standing(agent),
 4067%            time).
 4068terminates(sitOn(Agent, Physobj), standing(Agent), Time).
 4069
 4070% 
 4071% 
 4072% ; An effect axiom states that if an agent
 4073% ; is sitting or lying on a physical object and
 4074% ; the agent rises from the physical object,
 4075% ; the agent will be standing:
 4076% ectest/ec_reader_test.e:2416
 4077% [agent,physobj,time]% 
 4078% (HoldsAt(SittingOn(agent,physobj),time) |
 4079%  HoldsAt(LyingOn(agent,physobj),time)) ->
 4080% Initiates(RiseFrom(agent,physobj),
 4081%           Standing(agent),
 4082%           time).
 4083holds_at(sittingOn(Agent, Physobj), Time);holds_at(lyingOn(Agent, Physobj), Time) ->
 4084	initiates(riseFrom(Agent, Physobj),
 4085		  standing(Agent),
 4086		  Time).
 4087
 4088% 
 4089% ectest/ec_reader_test.e:2422
 4090% 
 4091% ; An effect axiom states that if an agent is sitting on
 4092% ; a physical object and the agent rises from the physical
 4093% ; object, the agent will no longer be sitting on the
 4094% ; physical object:
 4095% ectest/ec_reader_test.e:2427
 4096% [agent,physobj,time]% 
 4097% HoldsAt(SittingOn(agent,physobj),time) ->
 4098% Terminates(RiseFrom(agent,physobj),
 4099%            SittingOn(agent,physobj),
 4100%            time).
 4101holds_at(sittingOn(Agent, Physobj), Time) ->
 4102	terminates(riseFrom(Agent, Physobj),
 4103		   sittingOn(Agent, Physobj),
 4104		   Time).
 4105
 4106% 
 4107% 
 4108% ; An effect axiom states that if an agent is lying on
 4109% ; a physical object and the agent rises from the physical
 4110% ; object, the agent will no longer be lying on the
 4111% ; physical object:
 4112% ectest/ec_reader_test.e:2437
 4113% [agent,physobj,time]% 
 4114% HoldsAt(LyingOn(agent,physobj),time) ->
 4115% Terminates(RiseFrom(agent,physobj),
 4116%            LyingOn(agent,physobj),
 4117%            time).
 4118holds_at(lyingOn(Agent, Physobj), Time) ->
 4119	terminates(riseFrom(Agent, Physobj),
 4120		   lyingOn(Agent, Physobj),
 4121		   Time).
 4122
 4123% 
 4124% 
 4125% ; dressing
 4126% ectest/ec_reader_test.e:2444
 4127% 
 4128% ; agent gets undressed.
 4129% event GetDressed(agent)
 4130event(getDressed(agent)).
 4131
 4132% ; agent gets dressed.
 4133% event GetUndressed(agent)
 4134event(getUndressed(agent)).
 4135
 4136% ; agent is dressed.
 4137% ectest/ec_reader_test.e:2450
 4138% fluent Dressed(agent)
 4139fluent(dressed(agent)).
 4140
 4141% 
 4142% ; Effect axioms deal with getting dressed and undressed:
 4143% ectest/ec_reader_test.e:2453
 4144% [agent,time] % Initiates(GetDressed(agent),Dressed(agent),time).
 4145initiates(getDressed(Agent), dressed(Agent), Time).
 4146
 4147% 
 4148% ectest/ec_reader_test.e:2454
 4149% [agent,time] % Terminates(GetUndressed(agent),Dressed(agent),time).
 4150terminates(getUndressed(Agent), dressed(Agent), Time).
 4151
 4152% 
 4153% 
 4154% ; End of file.
 4155% 
 4156% 
 4157% 
 4158% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4159% ; FILE: ecnet/Sleeping.e
 4160% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4161% ectest/ec_reader_test.e:2463
 4162% 
 4163% ;
 4164% ; Copyright (c) 2005 IBM Corporation and others.
 4165% ; All rights reserved. This program and the accompanying materials
 4166% ; are made available under the terms of the Common Public License v1.0
 4167% ; which accompanies this distribution, and is available at
 4168% ; http://www.eclipse.org/legal/cpl-v10.html
 4169% ;
 4170% ; Contributors:
 4171% ; IBM - Initial implementation
 4172% ;
 4173% ; @article{Mueller:2004c,
 4174% ;   author = "Erik T. Mueller",
 4175% ;   year = "2004",
 4176% ;   title = "Understanding script-based stories using commonsense reasoning",
 4177% ;   journal = "Cognitive Systems Research",
 4178% ;   volume = "5",
 4179% ;   number = "4",
 4180% ;   pages = "307--340",
 4181% ; }
 4182% ;
 4183% ectest/ec_reader_test.e:2484
 4184% 
 4185% option modeldiff on
 4186option(modeldiff, on).
 4187
 4188% 
 4189% ignore Love, ThreatenedBy
 4190ignore(love).
 4191
 4192ignore(threatenedBy).
 4193
 4194% ignore LookOutOnto, Floor, BuildingOf, SkyOf, GroundOf
 4195ignore(lookOutOnto).
 4196
 4197ignore(floor).
 4198
 4199ignore(buildingOf).
 4200
 4201ignore(skyOf).
 4202
 4203ignore(groundOf).
 4204
 4205% ignore Inside, Near
 4206ignore(inside).
 4207
 4208ignore(near).
 4209
 4210% ectest/ec_reader_test.e:2490
 4211% ignore See
 4212ignore(see).
 4213
 4214% 
 4215% ignore ActOnSleep5
 4216ignore(actOnSleep5).
 4217
 4218% 
 4219% option renaming off
 4220option(renaming, off).
 4221
 4222% 
 4223% ectest/ec_reader_test.e:2496
 4224% load foundations/Root.e
 4225load('foundations/Root.e').
 4226
 4227% load foundations/EC.e
 4228load('foundations/EC.e').
 4229
 4230% load answers/Mueller2003/Ontology.e
 4231load('answers/Mueller2003/Ontology.e').
 4232
 4233% load answers/Mueller2004c/RTSpaceM.e
 4234load('answers/Mueller2004c/RTSpaceM.e').
 4235
 4236% load answers/Mueller2004c/OTSpaceM.e
 4237load('answers/Mueller2004c/OTSpaceM.e').
 4238
 4239% load answers/Mueller2004c/Cognition.e
 4240load('answers/Mueller2004c/Cognition.e').
 4241
 4242% ectest/ec_reader_test.e:2502
 4243% load answers/Mueller2003/Sleep.e
 4244load('answers/Mueller2003/Sleep.e').
 4245
 4246% 
 4247% door Door1
 4248t(door, door1).
 4249
 4250% 
 4251% room Room0
 4252t(room, room0).
 4253
 4254% 
 4255% ectest/ec_reader_test.e:2508
 4256% room Room1
 4257t(room, room1).
 4258
 4259% 
 4260% Side1(Door1)=Room0.
 4261side1(door1)=room0.
 4262
 4263% 
 4264% Side2(Door1)=Room1.
 4265side2(door1)=room1.
 4266
 4267% 
 4268% 
 4269% agent Sleeper1
 4270t(agent, sleeper1).
 4271
 4272% ectest/ec_reader_test.e:2514
 4273% 
 4274% bed Bed1
 4275t(bed, bed1).
 4276
 4277% 
 4278% outside Outside1
 4279t(outside, outside1).
 4280
 4281% 
 4282% ; initial state
 4283% ectest/ec_reader_test.e:2520
 4284% [agent,object] % !HoldsAt(Holding(agent,object),0).
 4285not(holds_at(holding(Agent, Object), 0)).
 4286
 4287% 
 4288% ectest/ec_reader_test.e:2521
 4289% [agent,physobj] % !HoldsAt(SittingOn(agent,physobj),0).
 4290not(holds_at(sittingOn(Agent, Physobj), 0)).
 4291
 4292% 
 4293% ectest/ec_reader_test.e:2522
 4294% [agent,physobj] % !HoldsAt(LyingOn(agent,physobj),0).
 4295not(holds_at(lyingOn(Agent, Physobj), 0)).
 4296
 4297% 
 4298% HoldsAt(Dressed(Sleeper1),0).
 4299holds_at(dressed(sleeper1), 0).
 4300
 4301% 
 4302% HoldsAt(Awake(Sleeper1),0).
 4303holds_at(awake(sleeper1), 0).
 4304
 4305% 
 4306% HoldsAt(Sleep3(Sleeper1),0).
 4307holds_at(sleep3(sleeper1), 0).
 4308
 4309% 
 4310% HoldsAt(Standing(Sleeper1),0).
 4311holds_at(standing(sleeper1), 0).
 4312
 4313% 
 4314% HoldsAt(DoorUnlocked(Door1),0).
 4315holds_at(doorUnlocked(door1), 0).
 4316
 4317% 
 4318% ectest/ec_reader_test.e:2528
 4319% HoldsAt(DoorIsOpen(Door1),0).
 4320holds_at(doorIsOpen(door1), 0).
 4321
 4322% 
 4323% HoldsAt(At(Sleeper1,Room0),0).
 4324holds_at(at(sleeper1, room0), 0).
 4325
 4326% 
 4327% HoldsAt(At(Bed1,Room1),0).
 4328holds_at(at(bed1, room1), 0).
 4329
 4330% 
 4331% 
 4332% ; narrative
 4333% Happens(GetTired(Sleeper1),0).
 4334happens(getTired(sleeper1), 0).
 4335
 4336% 
 4337% ectest/ec_reader_test.e:2534
 4338% Happens(WalkThroughDoor12(Sleeper1,Door1),1).
 4339happens(walkThroughDoor12(sleeper1, door1), 1).
 4340
 4341% 
 4342% Happens(GetUndressed(Sleeper1),2).
 4343happens(getUndressed(sleeper1), 2).
 4344
 4345% 
 4346% Happens(LieOn(Sleeper1,Bed1),3).
 4347happens(lieOn(sleeper1, bed1), 3).
 4348
 4349% 
 4350% Happens(FallAsleep(Sleeper1),4).
 4351happens(fallAsleep(sleeper1), 4).
 4352
 4353% 
 4354% Happens(Dream(Sleeper1),5).
 4355happens(dream(sleeper1), 5).
 4356
 4357% 
 4358% Happens(WakeUp(Sleeper1),6).
 4359happens(wakeUp(sleeper1), 6).
 4360
 4361% 
 4362% ectest/ec_reader_test.e:2540
 4363% Happens(RiseFrom(Sleeper1,Bed1),7).
 4364happens(riseFrom(sleeper1, bed1), 7).
 4365
 4366% 
 4367% Happens(GetDressed(Sleeper1),8).
 4368happens(getDressed(sleeper1), 8).
 4369
 4370% 
 4371% Happens(WalkThroughDoor21(Sleeper1,Door1),9).
 4372happens(walkThroughDoor21(sleeper1, door1), 9).
 4373
 4374% 
 4375% 
 4376% range time 0 10
 4377range(time, 0, 10).
 4378
 4379% range offset 0 0
 4380range(offset, 0, 0).
 4381
 4382% ectest/ec_reader_test.e:2546
 4383% range diameter 0 0
 4384range(diameter, 0, 0).
 4385
 4386% 
 4387% completion Happens
 4388completion(happens).
 4389
 4390% 
 4391% ; End of file.
 4392% 
 4393% ectest/ec_reader_test.e:2552
 4394% 
 4395% 
 4396% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4397% ; FILE: ecnet/Rest.e
 4398% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4399% 
 4400% ;
 4401% ; Copyright (c) 2005 IBM Corporation and others.
 4402% ; All rights reserved. This program and the accompanying materials
 4403% ; are made available under the terms of the Common Public License v1.0
 4404% ; which accompanies this distribution, and is available at
 4405% ; http://www.eclipse.org/legal/cpl-v10.html
 4406% ;
 4407% ; Contributors:
 4408% ; IBM - Initial implementation
 4409% ;
 4410% ; @article{Mueller:InPress,
 4411% ;   author = "Erik T. Mueller",
 4412% ;   year = "in press",
 4413% ;   title = "Modelling space and time in narratives about restaurants",
 4414% ;   journal = "Literary and Linguistic Computing",
 4415% ; }
 4416% ;
 4417% ectest/ec_reader_test.e:2575
 4418% 
 4419% option renaming off
 4420option(renaming, off).
 4421
 4422% option encoding 3
 4423option(encoding, 3).
 4424
 4425% 
 4426% load foundations/Root.e
 4427load('foundations/Root.e').
 4428
 4429% load foundations/EC.e
 4430load('foundations/EC.e').
 4431
 4432% ectest/ec_reader_test.e:2581
 4433% load answers/Mueller2003/Ontology.e
 4434load('answers/Mueller2003/Ontology.e').
 4435
 4436% load answers/MuellerInPress/RepRest.e
 4437load('answers/MuellerInPress/RepRest.e').
 4438
 4439% 
 4440% door MainEntrance1
 4441t(door, mainEntrance1).
 4442
 4443% 
 4444% ; room-scale topological space
 4445% ectest/ec_reader_test.e:2587
 4446% outside Street1
 4447t(outside, street1).
 4448
 4449% room DiningRoom1
 4450t(room, diningRoom1).
 4451
 4452% door KitchenDoor1
 4453t(door, kitchenDoor1).
 4454
 4455% room Kitchen1
 4456t(room, kitchen1).
 4457
 4458% Side1(MainEntrance1)=Street1.
 4459side1(mainEntrance1)=street1.
 4460
 4461% 
 4462% Side2(MainEntrance1)=DiningRoom1.
 4463side2(mainEntrance1)=diningRoom1.
 4464
 4465% 
 4466% ectest/ec_reader_test.e:2593
 4467% Side1(KitchenDoor1)=DiningRoom1.
 4468side1(kitchenDoor1)=diningRoom1.
 4469
 4470% 
 4471% Side2(KitchenDoor1)=Kitchen1.
 4472side2(kitchenDoor1)=kitchen1.
 4473
 4474% 
 4475% 
 4476% agent Customer1
 4477t(agent, customer1).
 4478
 4479% menu Menu1
 4480t(menu, menu1).
 4481
 4482% chair Chair1
 4483t(chair, chair1).
 4484
 4485% ectest/ec_reader_test.e:2599
 4486% food Food1
 4487t(food, food1).
 4488
 4489% HoldsAt(At(Customer1,Street1),0).
 4490holds_at(at(customer1, street1), 0).
 4491
 4492% 
 4493% HoldsAt(Hungry(Customer1),0).
 4494holds_at(hungry(customer1), 0).
 4495
 4496% 
 4497% HoldsAt(At(Chair1,DiningRoom1),0).
 4498holds_at(at(chair1, diningRoom1), 0).
 4499
 4500% 
 4501% HoldsAt(At(Menu1,DiningRoom1),0).
 4502holds_at(at(menu1, diningRoom1), 0).
 4503
 4504% 
 4505% HoldsAt(On(Menu1,Table1),0).
 4506holds_at(on(menu1, table1), 0).
 4507
 4508% 
 4509% ectest/ec_reader_test.e:2605
 4510% HoldsAt(At(Food1,Kitchen1),0).
 4511holds_at(at(food1, kitchen1), 0).
 4512
 4513% 
 4514% 
 4515% waiter Waiter1
 4516t(waiter, waiter1).
 4517
 4518% cook Cook1
 4519t(cook, cook1).
 4520
 4521% 
 4522% ; props
 4523% ectest/ec_reader_test.e:2611
 4524% table Table1
 4525t(table, table1).
 4526
 4527% bill Bill1
 4528t(bill, bill1).
 4529
 4530% 
 4531% ; restaurant
 4532% restaurant Restaurant1
 4533t(restaurant, restaurant1).
 4534
 4535% CookOf(Restaurant1)=Cook1.
 4536cookOf(restaurant1)=cook1.
 4537
 4538% 
 4539% ectest/ec_reader_test.e:2617
 4540% TableOf(Restaurant1)=Table1.
 4541tableOf(restaurant1)=table1.
 4542
 4543% 
 4544% WaiterOf(Restaurant1)=Waiter1.
 4545waiterOf(restaurant1)=waiter1.
 4546
 4547% 
 4548% KitchenDoorOf(Restaurant1)=KitchenDoor1.
 4549kitchenDoorOf(restaurant1)=kitchenDoor1.
 4550
 4551% 
 4552% BillOf(Restaurant1)=Bill1.
 4553billOf(restaurant1)=bill1.
 4554
 4555% 
 4556% 
 4557% ; prune
 4558% ectest/ec_reader_test.e:2623
 4559% sort ona, onb
 4560sort(ona).
 4561
 4562sort(onb).
 4563
 4564% fluent! On(ona,onb)
 4565fluent(on(ona, onb)).
 4566
 4567% event! PlaceOn(agent,ona,onb)
 4568event(placeOn(agent, ona, onb)).
 4569
 4570% event! TakeOffOf(agent,ona,onb)
 4571event(takeOffOf(agent, ona, onb)).
 4572
 4573% 
 4574% sort ordera, orderb, orderc
 4575sort(ordera).
 4576
 4577sort(orderb).
 4578
 4579sort(orderc).
 4580
 4581% ectest/ec_reader_test.e:2629
 4582% event! Order(ordera,orderb,orderc)
 4583event(order(ordera, orderb, orderc)).
 4584
 4585% fluent! KnowOrder(orderb,ordera,orderc)
 4586fluent(knowOrder(orderb, ordera, orderc)).
 4587
 4588% 
 4589% sort requesta, requestb, requestc
 4590sort(requesta).
 4591
 4592sort(requestb).
 4593
 4594sort(requestc).
 4595
 4596% event! Request(requesta,requestb,requestc)
 4597event(request(requesta, requestb, requestc)).
 4598
 4599% fluent! KnowRequest(requestb,requesta,requestc)
 4600fluent(knowRequest(requestb, requesta, requestc)).
 4601
 4602% ectest/ec_reader_test.e:2635
 4603% 
 4604% sort holda, holdb, holdc
 4605sort(holda).
 4606
 4607sort(holdb).
 4608
 4609sort(holdc).
 4610
 4611% event! TakeOffOf(holda,holdb,holdc)
 4612event(takeOffOf(holda, holdb, holdc)).
 4613
 4614% event! PickUp(holda,holdb)
 4615event(pickUp(holda, holdb)).
 4616
 4617% event! LetGoOf(holda,holdb)
 4618event(letGoOf(holda, holdb)).
 4619
 4620% event! Hold(holda,holdb)
 4621event(hold(holda, holdb)).
 4622
 4623% ectest/ec_reader_test.e:2641
 4624% fluent! Holding(holda,holdb)
 4625fluent(holding(holda, holdb)).
 4626
 4627% 
 4628% sort sita, sitb
 4629sort(sita).
 4630
 4631sort(sitb).
 4632
 4633% event! LieOn(sita,sitb)
 4634event(lieOn(sita, sitb)).
 4635
 4636% event! SitOn(sita,sitb)
 4637event(sitOn(sita, sitb)).
 4638
 4639% event! RiseFrom(sita,sitb)
 4640event(riseFrom(sita, sitb)).
 4641
 4642% ectest/ec_reader_test.e:2647
 4643% fluent! LyingOn(sita,sitb)
 4644fluent(lyingOn(sita, sitb)).
 4645
 4646% fluent! SittingOn(sita,sitb)
 4647fluent(sittingOn(sita, sitb)).
 4648
 4649% 
 4650% sort greeta, greetb
 4651sort(greeta).
 4652
 4653sort(greetb).
 4654
 4655% event! Greet(greeta,greetb)
 4656event(greet(greeta, greetb)).
 4657
 4658% 
 4659% ectest/ec_reader_test.e:2653
 4660% ona! Menu1, Food1, Bill1
 4661t(ona, menu1).
 4662
 4663t(ona, food1).
 4664
 4665t(ona, bill1).
 4666
 4667% onb! Table1
 4668t(onb, table1).
 4669
 4670% ordera! Customer1, Waiter1
 4671t(ordera, customer1).
 4672
 4673t(ordera, waiter1).
 4674
 4675% orderb! Waiter1, Cook1
 4676t(orderb, waiter1).
 4677
 4678t(orderb, cook1).
 4679
 4680% orderc! Food1
 4681t(orderc, food1).
 4682
 4683% requesta! Customer1
 4684t(requesta, customer1).
 4685
 4686% ectest/ec_reader_test.e:2659
 4687% requestb! Waiter1
 4688t(requestb, waiter1).
 4689
 4690% requestc! Bill1
 4691t(requestc, bill1).
 4692
 4693% holda! Customer1, Waiter1
 4694t(holda, customer1).
 4695
 4696t(holda, waiter1).
 4697
 4698% holdb! Menu1, Food1, Bill1
 4699t(holdb, menu1).
 4700
 4701t(holdb, food1).
 4702
 4703t(holdb, bill1).
 4704
 4705% holdc! Table1
 4706t(holdc, table1).
 4707
 4708% sita! Customer1
 4709t(sita, customer1).
 4710
 4711% ectest/ec_reader_test.e:2665
 4712% sitb! Chair1
 4713t(sitb, chair1).
 4714
 4715% greeta! Customer1, Waiter1
 4716t(greeta, customer1).
 4717
 4718t(greeta, waiter1).
 4719
 4720% greetb! Customer1, Waiter1
 4721t(greetb, customer1).
 4722
 4723t(greetb, waiter1).
 4724
 4725% 
 4726% ; initial situation
 4727% HoldsAt(At(Waiter1,DiningRoom1),0).
 4728holds_at(at(waiter1, diningRoom1), 0).
 4729
 4730% 
 4731% ectest/ec_reader_test.e:2671
 4732% HoldsAt(At(Cook1,Kitchen1),0).
 4733holds_at(at(cook1, kitchen1), 0).
 4734
 4735% 
 4736% HoldsAt(At(Table1,DiningRoom1),0).
 4737holds_at(at(table1, diningRoom1), 0).
 4738
 4739% 
 4740% !HoldsAt(On(Bill1,Table1),0).
 4741not(holds_at(on(bill1, table1), 0)).
 4742
 4743% 
 4744% HoldsAt(At(Bill1,DiningRoom1),0).
 4745holds_at(at(bill1, diningRoom1), 0).
 4746
 4747% 
 4748% ectest/ec_reader_test.e:2675
 4749% [agent] % HoldsAt(Standing(agent),0).
 4750holds_at(standing(Agent), 0).
 4751
 4752% 
 4753% ectest/ec_reader_test.e:2676
 4754% [agent,object] % !HoldsAt(Holding(agent,object),0).
 4755not(holds_at(holding(Agent, Object), 0)).
 4756
 4757% 
 4758% ectest/ec_reader_test.e:2677
 4759% [agent1,agent2,physobj] % !HoldsAt(KnowOrder(agent1,agent2,physobj),0).
 4760not(holds_at(knowOrder(Agent1, Agent2, Physobj), 0)).
 4761
 4762% 
 4763% ectest/ec_reader_test.e:2678
 4764% [agent1,agent2,physobj] % !HoldsAt(KnowRequest(agent1,agent2,physobj),0).
 4765not(holds_at(knowRequest(Agent1, Agent2, Physobj), 0)).
 4766
 4767% 
 4768% HoldsAt(BeWaiter0(Waiter1),0).
 4769holds_at(beWaiter0(waiter1), 0).
 4770
 4771% 
 4772% HoldsAt(BeCook0(Cook1),0).
 4773holds_at(beCook0(cook1), 0).
 4774
 4775% 
 4776% ectest/ec_reader_test.e:2681
 4777% [food] % !HoldsAt(FoodPrepared(food),0).
 4778not(holds_at(foodPrepared(Food), 0)).
 4779
 4780% 
 4781% !HoldsAt(Hungry(Cook1),0).
 4782not(holds_at(hungry(cook1), 0)).
 4783
 4784% 
 4785% !HoldsAt(Hungry(Waiter1),0).
 4786not(holds_at(hungry(waiter1), 0)).
 4787
 4788% 
 4789% 
 4790% Happens(WalkThroughDoor12(Customer1,MainEntrance1),0).
 4791happens(walkThroughDoor12(customer1, mainEntrance1), 0).
 4792
 4793% 
 4794% Happens(Greet(Waiter1,Customer1),1).
 4795happens(greet(waiter1, customer1), 1).
 4796
 4797% 
 4798% ectest/ec_reader_test.e:2687
 4799% Happens(SitOn(Customer1,Chair1),2).
 4800happens(sitOn(customer1, chair1), 2).
 4801
 4802% 
 4803% Happens(TakeOffOf(Customer1,Menu1,Table1),3).
 4804happens(takeOffOf(customer1, menu1, table1), 3).
 4805
 4806% 
 4807% Happens(Order(Customer1,Waiter1,Food1),4).
 4808happens(order(customer1, waiter1, food1), 4).
 4809
 4810% 
 4811% Happens(PlaceOn(Customer1,Menu1,Table1),5).
 4812happens(placeOn(customer1, menu1, table1), 5).
 4813
 4814% 
 4815% Happens(Eat(Customer1,Food1),11).
 4816happens(eat(customer1, food1), 11).
 4817
 4818% 
 4819% Happens(Request(Customer1,Waiter1,Bill1),12).
 4820happens(request(customer1, waiter1, bill1), 12).
 4821
 4822% 
 4823% ectest/ec_reader_test.e:2693
 4824% Happens(Pay(Customer1,Waiter1),15).
 4825happens(pay(customer1, waiter1), 15).
 4826
 4827% 
 4828% Happens(Tip(Customer1,Waiter1),15).
 4829happens(tip(customer1, waiter1), 15).
 4830
 4831% 
 4832% Happens(RiseFrom(Customer1,Chair1),16).
 4833happens(riseFrom(customer1, chair1), 16).
 4834
 4835% 
 4836% Happens(SayGoodbye(Customer1,Waiter1),17).
 4837happens(sayGoodbye(customer1, waiter1), 17).
 4838
 4839% 
 4840% Happens(WalkThroughDoor21(Customer1,MainEntrance1),18).
 4841happens(walkThroughDoor21(customer1, mainEntrance1), 18).
 4842
 4843% 
 4844% 
 4845% ectest/ec_reader_test.e:2699
 4846% range time 0 19
 4847range(time, 0, 19).
 4848
 4849% range offset 0 0
 4850range(offset, 0, 0).
 4851
 4852% range diameter 0 0
 4853range(diameter, 0, 0).
 4854
 4855% 
 4856% completion Happens
 4857completion(happens).
 4858
 4859% 
 4860% ; End of file.
 4861% ectest/ec_reader_test.e:2706
 4862% 
 4863% 
 4864% 
 4865% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4866% ; FILE: ecnet/RepRest.e
 4867% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 4868% ectest/ec_reader_test.e:2712
 4869% 
 4870% ;
 4871% ; Copyright (c) 2005 IBM Corporation and others.
 4872% ; All rights reserved. This program and the accompanying materials
 4873% ; are made available under the terms of the Common Public License v1.0
 4874% ; which accompanies this distribution, and is available at
 4875% ; http://www.eclipse.org/legal/cpl-v10.html
 4876% ;
 4877% ; Contributors:
 4878% ; IBM - Initial implementation
 4879% ;
 4880% ; @article{Mueller:InPress,
 4881% ;   author = "Erik T. Mueller",
 4882% ;   year = "in press",
 4883% ;   title = "Modelling space and time in narratives about restaurants",
 4884% ;   journal = "Literary and Linguistic Computing",
 4885% ; }
 4886% ;
 4887% ectest/ec_reader_test.e:2730
 4888% 
 4889% ;sort boolean
 4890% ;sort integer
 4891% ;reified sort predicate
 4892% ;reified sort function
 4893% ;
 4894% ;sort time: integer
 4895% ;sort offset: integer
 4896% ;
 4897% ;reified sort fluent
 4898% ;reified sort event
 4899% ;
 4900% ;predicate Happens(event,time)
 4901% ;predicate HoldsAt(fluent,time)
 4902% ;predicate ReleasedAt(fluent,time)
 4903% ;predicate Initiates(event,fluent,time)
 4904% ;predicate Terminates(event,fluent,time)
 4905% ;predicate Releases(event,fluent,time)
 4906% ;
 4907% ;sort diameter: integer
 4908% ;
 4909% ;sort object
 4910% ;
 4911% ;sort agent: object
 4912% ;
 4913% ;sort physobj: object
 4914% ;sort bed: physobj
 4915% ;sort snowflake: physobj
 4916% ;sort sky: physobj
 4917% ;
 4918% ;sort stuff: physobj
 4919% ;
 4920% ;sort surface: physobj
 4921% ;sort ground: surface
 4922% ;
 4923% ;sort snow: stuff
 4924% ;sort ball
 4925% ;
 4926% ;sort food: physobj
 4927% ;sort fruit: food
 4928% ;sort orange: fruit
 4929% ;sort salad: food
 4930% ;
 4931% ;sort clothing: physobj
 4932% ;sort scarf: clothing
 4933% ;sort hat: clothing
 4934% ;
 4935% ;sort vegetablematter: physobj
 4936% ;sort coal: vegetablematter
 4937% ;
 4938% ;sort bodypart: physobj
 4939% ;sort hand: bodypart
 4940% ;
 4941% ;sort papertowels: physobj
 4942% ;sort device: physobj
 4943% ;sort electronicdevice: device
 4944% ;sort lamp: electronicdevice
 4945% ;
 4946% ;sort cat: physobj
 4947% ;
 4948% ;sort weapon: physobj
 4949% ;sort gun: weapon
 4950% ;sort bomb: weapon
 4951% ;sort bullet: weapon
 4952% ;
 4953% ;sort location
 4954% ;sort room: location, outside: location
 4955% ;
 4956% ;sort portal
 4957% ;sort door: portal, staircase: portal
 4958% ;sort street: portal
 4959% ;
 4960% ;sort building
 4961% ;
 4962% ;sort fire: object
 4963% ;
 4964% ;sort furniture: physobj
 4965% ;sort chair: furniture
 4966% ;sort table: furniture
 4967% ;
 4968% ;sort menu: physobj
 4969% ;sort bill: physobj
 4970% ;
 4971% ;sort script
 4972% ;
 4973% ectest/ec_reader_test.e:2815
 4974% fluent Holding(agent,physobj)
 4975fluent(holding(agent, physobj)).
 4976
 4977% event PickUp(agent,physobj)
 4978event(pickUp(agent, physobj)).
 4979
 4980% event LetGoOf(agent,physobj)
 4981event(letGoOf(agent, physobj)).
 4982
 4983% 
 4984% ectest/ec_reader_test.e:2819
 4985% [agent,physobj,time]% 
 4986% Initiates(PickUp(agent,physobj),Holding(agent,physobj),time).
 4987initiates(pickUp(Agent, Physobj), holding(Agent, Physobj), Time).
 4988
 4989% 
 4990% 
 4991% ectest/ec_reader_test.e:2822
 4992% [agent,physobj,time]% 
 4993% Happens(PickUp(agent,physobj),time) ->
 4994% ectest/ec_reader_test.e:2824
 4995% {location}% 
 4996%   HoldsAt(At(agent,location),time) &
 4997%   HoldsAt(At(physobj,location),time).
 4998exists([Location],  (happens(pickUp(Agent, Physobj), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Physobj, Location), Time))).
 4999
 5000% 
 5001% 
 5002% ectest/ec_reader_test.e:2828
 5003% [agent,physobj,time]% 
 5004% Terminates(LetGoOf(agent,physobj),Holding(agent,physobj),time).
 5005terminates(letGoOf(Agent, Physobj), holding(Agent, Physobj), Time).
 5006
 5007% 
 5008% 
 5009% ectest/ec_reader_test.e:2831
 5010% [agent,physobj,time]% 
 5011% Happens(LetGoOf(agent,physobj),time) ->
 5012% HoldsAt(Holding(agent,physobj),time).
 5013happens(letGoOf(Agent, Physobj), Time) ->
 5014	holds_at(holding(Agent, Physobj), Time).
 5015
 5016% 
 5017% 
 5018% ectest/ec_reader_test.e:2835
 5019% [agent,physobj,location,time]% 
 5020% Releases(PickUp(agent,physobj),At(physobj,location),time).
 5021releases(pickUp(Agent, Physobj), at(Physobj, Location), Time).
 5022
 5023% 
 5024% 
 5025% ectest/ec_reader_test.e:2838
 5026% [agent,physobj,location,time]% 
 5027% HoldsAt(Holding(agent,physobj),time) &
 5028% HoldsAt(At(agent,location),time) ->
 5029% HoldsAt(At(physobj,location),time).
 5030holds_at(holding(Agent, Physobj), Time), holds_at(at(Agent, Location), Time) ->
 5031	holds_at(at(Physobj, Location), Time).
 5032
 5033% 
 5034% 
 5035% ;[agent,physobj,location1,location2,time]
 5036% ;HoldsAt(At(agent,location1),time) &
 5037% ;location1!=location2 ->
 5038% ;Terminates(LetGoOf(agent,physobj),At(physobj,location2),time).
 5039% ectest/ec_reader_test.e:2847
 5040% 
 5041% ectest/ec_reader_test.e:2848
 5042% [agent,physobj,location,time]% 
 5043% HoldsAt(At(agent,location),time) ->
 5044% Initiates(LetGoOf(agent,physobj),At(physobj,location),time).
 5045holds_at(at(Agent, Location), Time) ->
 5046	initiates(letGoOf(Agent, Physobj),
 5047		  at(Physobj, Location),
 5048		  Time).
 5049
 5050% 
 5051% 
 5052% fluent On(physobj,physobj)
 5053fluent(on(physobj, physobj)).
 5054
 5055% 
 5056% ectest/ec_reader_test.e:2854
 5057% event PlaceOn(agent,physobj,physobj)
 5058event(placeOn(agent, physobj, physobj)).
 5059
 5060% 
 5061% event TakeOffOf(agent,physobj,physobj)
 5062event(takeOffOf(agent, physobj, physobj)).
 5063
 5064% 
 5065% ectest/ec_reader_test.e:2858
 5066% [physobj1,physobj2,time]% 
 5067% HoldsAt(On(physobj1,physobj2),time) ->
 5068% physobj1!=physobj2.
 5069holds_at(on(Physobj1, Physobj2), Time) ->
 5070	Physobj1\=Physobj2.
 5071
 5072% 
 5073% 
 5074% ectest/ec_reader_test.e:2862
 5075% [physobj1,physobj2,time]% 
 5076% HoldsAt(On(physobj1,physobj2),time) ->
 5077% !HoldsAt(On(physobj2,physobj1),time).
 5078holds_at(on(Physobj1, Physobj2), Time) ->
 5079	not(holds_at(on(Physobj2, Physobj1), Time)).
 5080
 5081% 
 5082% 
 5083% ectest/ec_reader_test.e:2866
 5084% [agent,physobj1,physobj2,time]% 
 5085% Initiates(PlaceOn(agent,physobj1,physobj2),
 5086%           On(physobj1,physobj2),time).
 5087initiates(placeOn(Agent, Physobj1, Physobj2), on(Physobj1, Physobj2), Time).
 5088
 5089% 
 5090% 
 5091% ectest/ec_reader_test.e:2870
 5092% [agent,physobj1,physobj2,time]% 
 5093% Terminates(PlaceOn(agent,physobj1,physobj2),
 5094%            Holding(agent,physobj1),time).
 5095terminates(placeOn(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 5096
 5097% 
 5098% 
 5099% ectest/ec_reader_test.e:2874
 5100% [agent,physobj1,physobj2,time]% 
 5101% Happens(PlaceOn(agent,physobj1,physobj2),time) ->
 5102% HoldsAt(Holding(agent,physobj1),time) &
 5103% ectest/ec_reader_test.e:2877
 5104% {location}% 
 5105%  HoldsAt(At(agent,location),time) &
 5106%  HoldsAt(At(physobj2,location),time).
 5107exists([Location],  (happens(placeOn(Agent, Physobj1, Physobj2), Time)->holds_at(holding(Agent, Physobj1), Time), holds_at(at(Agent, Location), Time), holds_at(at(Physobj2, Location), Time))).
 5108
 5109% 
 5110% 
 5111% ectest/ec_reader_test.e:2881
 5112% [agent,physobj1,physobj2,time]% 
 5113% Terminates(TakeOffOf(agent,physobj1,physobj2),
 5114%            On(physobj1,physobj2),time).
 5115terminates(takeOffOf(Agent, Physobj1, Physobj2), on(Physobj1, Physobj2), Time).
 5116
 5117% 
 5118% 
 5119% ectest/ec_reader_test.e:2885
 5120% [agent,physobj1,physobj2,time]% 
 5121% Initiates(TakeOffOf(agent,physobj1,physobj2),
 5122%           Holding(agent,physobj1),time).
 5123initiates(takeOffOf(Agent, Physobj1, Physobj2), holding(Agent, Physobj1), Time).
 5124
 5125% 
 5126% 
 5127% ectest/ec_reader_test.e:2889
 5128% [agent,physobj1,physobj2,location,time]% 
 5129% Releases(TakeOffOf(agent,physobj1,physobj2),
 5130%          At(physobj1,location),
 5131%          time).
 5132releases(takeOffOf(Agent, Physobj1, Physobj2), at(Physobj1, Location), Time).
 5133
 5134% 
 5135% 
 5136% ectest/ec_reader_test.e:2894
 5137% [agent,physobj1,physobj2,time]% 
 5138% Happens(TakeOffOf(agent,physobj1,physobj2),time) ->
 5139% HoldsAt(On(physobj1,physobj2),time) &
 5140% ectest/ec_reader_test.e:2897
 5141% {location}% 
 5142%  HoldsAt(At(agent,location),time) &
 5143%  HoldsAt(At(physobj1,location),time) &
 5144%  HoldsAt(At(physobj2,location),time).
 5145exists([Location],  (happens(takeOffOf(Agent, Physobj1, Physobj2), Time)->holds_at(on(Physobj1, Physobj2), Time), holds_at(at(Agent, Location), Time), holds_at(at(Physobj1, Location), Time), holds_at(at(Physobj2, Location), Time))).
 5146
 5147% 
 5148% 
 5149% ectest/ec_reader_test.e:2902
 5150% [agent,physobj1,physobj2,location,time]% 
 5151% Releases(PlaceOn(agent,physobj1,physobj2),
 5152%          At(physobj1,location),
 5153%          time).
 5154releases(placeOn(Agent, Physobj1, Physobj2), at(Physobj1, Location), Time).
 5155
 5156% 
 5157% 
 5158% ectest/ec_reader_test.e:2907
 5159% [physobj1,physobj2,location,time]% 
 5160% HoldsAt(On(physobj1,physobj2),time) &
 5161% HoldsAt(At(physobj2,location),time) ->
 5162% HoldsAt(At(physobj1,location),time).
 5163holds_at(on(Physobj1, Physobj2), Time), holds_at(at(Physobj2, Location), Time) ->
 5164	holds_at(at(Physobj1, Location), Time).
 5165
 5166% 
 5167% 
 5168% fluent At(object,location)
 5169fluent(at(object, location)).
 5170
 5171% ectest/ec_reader_test.e:2913
 5172% 
 5173% ectest/ec_reader_test.e:2914
 5174% [object,time]% 
 5175% ectest/ec_reader_test.e:2915
 5176% {location} % HoldsAt(At(object,location),time).
 5177exists([Location], holds_at(at(Object, Location), Time)).
 5178
 5179% 
 5180% 
 5181% ectest/ec_reader_test.e:2917
 5182% [object,location1,location2,time]% 
 5183% HoldsAt(At(object,location1),time) &
 5184% HoldsAt(At(object,location2),time) ->
 5185% location1=location2.
 5186holds_at(at(Object, Location1), Time), holds_at(at(Object, Location2), Time) ->
 5187	Location1=Location2.
 5188
 5189% 
 5190% 
 5191% function Side1(portal): location
 5192function(side1(portal), location).
 5193
 5194% ectest/ec_reader_test.e:2923
 5195% function Side2(portal): location
 5196function(side2(portal), location).
 5197
 5198% 
 5199% fluent NearPortal(object,portal)
 5200fluent(nearPortal(object, portal)).
 5201
 5202% noninertial NearPortal
 5203noninertial(nearPortal).
 5204
 5205% 
 5206% ectest/ec_reader_test.e:2928
 5207% [object,portal,time]% 
 5208% HoldsAt(NearPortal(object,portal),time) <->
 5209% ectest/ec_reader_test.e:2930
 5210% {location}% 
 5211%  (Side1(portal)=location|
 5212%   Side2(portal)=location) &
 5213%  HoldsAt(At(object,location),time).
 5214exists([Location],  (holds_at(nearPortal(Object, Portal), Time)<->(side1(Portal)=Location;side2(Portal)=Location), holds_at(at(Object, Location), Time))).
 5215
 5216% 
 5217% 
 5218% event WalkThroughDoor12(agent,door)
 5219event(walkThroughDoor12(agent, door)).
 5220
 5221% ectest/ec_reader_test.e:2936
 5222% event WalkThroughDoor21(agent,door)
 5223event(walkThroughDoor21(agent, door)).
 5224
 5225% 
 5226% ectest/ec_reader_test.e:2938
 5227% [agent,door,time]% 
 5228% Happens(WalkThroughDoor12(agent,door),time) ->
 5229% HoldsAt(Standing(agent),time) &
 5230% HoldsAt(At(agent,Side1(door)),time).
 5231happens(walkThroughDoor12(Agent, Door), Time) ->
 5232	holds_at(standing(Agent), Time),
 5233	holds_at(at(Agent, side1(Door)), Time).
 5234
 5235% 
 5236% 
 5237% ectest/ec_reader_test.e:2943
 5238% [agent,door,time]% 
 5239% Happens(WalkThroughDoor21(agent,door),time) ->
 5240% HoldsAt(Standing(agent),time) &
 5241% HoldsAt(At(agent,Side2(door)),time).
 5242happens(walkThroughDoor21(Agent, Door), Time) ->
 5243	holds_at(standing(Agent), Time),
 5244	holds_at(at(Agent, side2(Door)), Time).
 5245
 5246% 
 5247% 
 5248% ectest/ec_reader_test.e:2948
 5249% [agent,door,location,time]% 
 5250% Side2(door)=location ->
 5251% Initiates(WalkThroughDoor12(agent,door),At(agent,location),time).
 5252side2(Door)=Location ->
 5253	initiates(walkThroughDoor12(Agent, Door),
 5254		  at(Agent, Location),
 5255		  Time).
 5256
 5257% 
 5258% 
 5259% ectest/ec_reader_test.e:2952
 5260% [agent,door,location,time]% 
 5261% Side1(door)=location ->
 5262% Initiates(WalkThroughDoor21(agent,door),At(agent,location),time).
 5263side1(Door)=Location ->
 5264	initiates(walkThroughDoor21(Agent, Door),
 5265		  at(Agent, Location),
 5266		  Time).
 5267
 5268% 
 5269% 
 5270% ectest/ec_reader_test.e:2956
 5271% [agent,door,location,time]% 
 5272% Side1(door)=location ->
 5273% Terminates(WalkThroughDoor12(agent,door),At(agent,location),time).
 5274side1(Door)=Location ->
 5275	terminates(walkThroughDoor12(Agent, Door),
 5276		   at(Agent, Location),
 5277		   Time).
 5278
 5279% 
 5280% 
 5281% ectest/ec_reader_test.e:2960
 5282% [agent,door,location,time]% 
 5283% Side2(door)=location ->
 5284% Terminates(WalkThroughDoor21(agent,door),At(agent,location),time).
 5285side2(Door)=Location ->
 5286	terminates(walkThroughDoor21(Agent, Door),
 5287		   at(Agent, Location),
 5288		   Time).
 5289
 5290% 
 5291% 
 5292% fluent Hungry(agent)
 5293fluent(hungry(agent)).
 5294
 5295% 
 5296% ectest/ec_reader_test.e:2966
 5297% fluent Satiated(agent)
 5298fluent(satiated(agent)).
 5299
 5300% noninertial Satiated
 5301noninertial(satiated).
 5302
 5303% 
 5304% ectest/ec_reader_test.e:2969
 5305% [agent,time] % HoldsAt(Hungry(agent),time) <-> !HoldsAt(Satiated(agent),time).
 5306holds_at(hungry(Agent), Time) <->
 5307	not(holds_at(satiated(Agent), Time)).
 5308
 5309% 
 5310% 
 5311% event Eat(agent,food)
 5312event(eat(agent, food)).
 5313
 5314% 
 5315% ectest/ec_reader_test.e:2973
 5316% [agent,food,time]% 
 5317% Happens(Eat(agent,food),time) ->
 5318% ectest/ec_reader_test.e:2975
 5319% {location}% 
 5320% HoldsAt(At(agent,location),time) &
 5321% HoldsAt(At(food,location),time).
 5322exists([Location],  (happens(eat(Agent, Food), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Food, Location), Time))).
 5323
 5324% 
 5325% 
 5326% ectest/ec_reader_test.e:2979
 5327% [agent,food,time]% 
 5328% Terminates(Eat(agent,food),Hungry(agent),time).
 5329terminates(eat(Agent, Food), hungry(Agent), Time).
 5330
 5331% 
 5332% 
 5333% sort restaurant: script
 5334subsort(restaurant, script).
 5335
 5336% sort waiter: agent
 5337subsort(waiter, agent).
 5338
 5339% sort cook: agent
 5340subsort(cook, agent).
 5341
 5342% ectest/ec_reader_test.e:2985
 5343% 
 5344% function BillOf(restaurant): bill
 5345function(billOf(restaurant), bill).
 5346
 5347% function CookOf(restaurant): cook
 5348function(cookOf(restaurant), cook).
 5349
 5350% function TableOf(restaurant): table
 5351function(tableOf(restaurant), table).
 5352
 5353% function WaiterOf(restaurant): waiter
 5354function(waiterOf(restaurant), waiter).
 5355
 5356% function KitchenDoorOf(restaurant): door
 5357function(kitchenDoorOf(restaurant), door).
 5358
 5359% ectest/ec_reader_test.e:2991
 5360% 
 5361% fluent BeWaiter0(waiter)
 5362fluent(beWaiter0(waiter)).
 5363
 5364% 
 5365% fluent BeWaiter1(waiter)
 5366fluent(beWaiter1(waiter)).
 5367
 5368% 
 5369% fluent BeWaiter2(waiter)
 5370fluent(beWaiter2(waiter)).
 5371
 5372% ectest/ec_reader_test.e:2997
 5373% 
 5374% fluent BeWaiter3(waiter)
 5375fluent(beWaiter3(waiter)).
 5376
 5377% 
 5378% fluent BeWaiter4(waiter)
 5379fluent(beWaiter4(waiter)).
 5380
 5381% 
 5382% fluent BeWaiter5(waiter)
 5383fluent(beWaiter5(waiter)).
 5384
 5385% ectest/ec_reader_test.e:3003
 5386% 
 5387% fluent BeWaiter6(waiter)
 5388fluent(beWaiter6(waiter)).
 5389
 5390% 
 5391% fluent BeWaiter7(waiter)
 5392fluent(beWaiter7(waiter)).
 5393
 5394% 
 5395% fluent BeWaiter8(waiter)
 5396fluent(beWaiter8(waiter)).
 5397
 5398% ectest/ec_reader_test.e:3009
 5399% 
 5400% fluent BeWaiter9(waiter)
 5401fluent(beWaiter9(waiter)).
 5402
 5403% 
 5404% xor BeWaiter0, BeWaiter1, BeWaiter2, BeWaiter3, BeWaiter4, BeWaiter5, BeWaiter6, BeWaiter7, BeWaiter8, BeWaiter9
 5405xor([beWaiter0, beWaiter1, beWaiter2, beWaiter3, beWaiter4, beWaiter5, beWaiter6, beWaiter7, beWaiter8, beWaiter9]).
 5406
 5407% 
 5408% ectest/ec_reader_test.e:3014
 5409% [waiter,agent,time]% 
 5410% HoldsAt(BeWaiter0(waiter),time) ->
 5411% Terminates(Greet(waiter,agent),
 5412%            BeWaiter0(waiter),
 5413%            time).
 5414holds_at(beWaiter0(Waiter), Time) ->
 5415	terminates(greet(Waiter, Agent),
 5416		   beWaiter0(Waiter),
 5417		   Time).
 5418
 5419% 
 5420% 
 5421% ectest/ec_reader_test.e:3020
 5422% [waiter,agent,time]% 
 5423% HoldsAt(BeWaiter0(waiter),time) ->
 5424% Initiates(Greet(waiter,agent),
 5425%           BeWaiter1(waiter),
 5426%           time).
 5427holds_at(beWaiter0(Waiter), Time) ->
 5428	initiates(greet(Waiter, Agent),
 5429		  beWaiter1(Waiter),
 5430		  Time).
 5431
 5432% 
 5433% 
 5434% ectest/ec_reader_test.e:3026
 5435% [waiter,agent,food,time]% 
 5436% HoldsAt(BeWaiter1(waiter),time) ->
 5437% Terminates(Order(agent,waiter,food),
 5438%            BeWaiter1(waiter),
 5439%            time).
 5440holds_at(beWaiter1(Waiter), Time) ->
 5441	terminates(order(Agent, Waiter, Food),
 5442		   beWaiter1(Waiter),
 5443		   Time).
 5444
 5445% 
 5446% 
 5447% ectest/ec_reader_test.e:3032
 5448% [waiter,agent,food,time]% 
 5449% HoldsAt(BeWaiter1(waiter),time) ->
 5450% Initiates(Order(agent,waiter,food),
 5451%           BeWaiter2(waiter),
 5452%           time).
 5453holds_at(beWaiter1(Waiter), Time) ->
 5454	initiates(order(Agent, Waiter, Food),
 5455		  beWaiter2(Waiter),
 5456		  Time).
 5457
 5458% 
 5459% 
 5460% ectest/ec_reader_test.e:3038
 5461% [restaurant,waiter,time]% 
 5462% WaiterOf(restaurant)=waiter &
 5463% HoldsAt(BeWaiter2(waiter),time) ->
 5464% Happens(WalkThroughDoor12(waiter,KitchenDoorOf(restaurant)),time).
 5465waiterOf(Restaurant)=Waiter, holds_at(beWaiter2(Waiter), Time) ->
 5466	happens(walkThroughDoor12(Waiter,
 5467				  kitchenDoorOf(Restaurant)),
 5468		Time).
 5469
 5470% 
 5471% 
 5472% ectest/ec_reader_test.e:3043
 5473% [restaurant,waiter,door,time]% 
 5474% HoldsAt(BeWaiter2(waiter),time) &
 5475% WaiterOf(restaurant)=waiter &
 5476% KitchenDoorOf(restaurant)=door ->
 5477% Terminates(WalkThroughDoor12(waiter,door),
 5478%            BeWaiter2(waiter),
 5479%            time).
 5480holds_at(beWaiter2(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 5481	terminates(walkThroughDoor12(Waiter, Door),
 5482		   beWaiter2(Waiter),
 5483		   Time).
 5484
 5485% ectest/ec_reader_test.e:3049
 5486% 
 5487% 
 5488% ectest/ec_reader_test.e:3051
 5489% [restaurant,waiter,door,time]% 
 5490% HoldsAt(BeWaiter2(waiter),time) &
 5491% WaiterOf(restaurant)=waiter &
 5492% KitchenDoorOf(restaurant)=door ->
 5493% Initiates(WalkThroughDoor12(waiter,door),
 5494%           BeWaiter3(waiter),
 5495%           time).
 5496holds_at(beWaiter2(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 5497	initiates(walkThroughDoor12(Waiter, Door),
 5498		  beWaiter3(Waiter),
 5499		  Time).
 5500
 5501% ectest/ec_reader_test.e:3057
 5502% 
 5503% 
 5504% ectest/ec_reader_test.e:3059
 5505% [restaurant,food,time]% 
 5506% HoldsAt(BeWaiter3(WaiterOf(restaurant)),time) &
 5507% ({agent} HoldsAt(KnowOrder(WaiterOf(restaurant),agent,food),time)) ->
 5508% Happens(Order(WaiterOf(restaurant),CookOf(restaurant),food),time).
 5509holds_at(beWaiter3(waiterOf(Restaurant)), Time), exists([Agent], holds_at(knowOrder(waiterOf(Restaurant), Agent, Food), Time)) ->
 5510	happens(order(waiterOf(Restaurant),
 5511		      cookOf(Restaurant),
 5512		      Food),
 5513		Time).
 5514
 5515% 
 5516% 
 5517% ectest/ec_reader_test.e:3064
 5518% [restaurant,waiter,cook,food,time]% 
 5519% WaiterOf(restaurant)=waiter &
 5520% CookOf(restaurant)=cook &
 5521% HoldsAt(BeWaiter3(waiter),time) ->
 5522% Terminates(Order(waiter,cook,food),
 5523%            BeWaiter3(waiter),
 5524%            time).
 5525waiterOf(Restaurant)=Waiter, cookOf(Restaurant)=Cook, holds_at(beWaiter3(Waiter), Time) ->
 5526	terminates(order(Waiter, Cook, Food),
 5527		   beWaiter3(Waiter),
 5528		   Time).
 5529
 5530% ectest/ec_reader_test.e:3070
 5531% 
 5532% 
 5533% ectest/ec_reader_test.e:3072
 5534% [restaurant,waiter,cook,food,time]% 
 5535% WaiterOf(restaurant)=waiter &
 5536% CookOf(restaurant)=cook &
 5537% HoldsAt(BeWaiter3(waiter),time) ->
 5538% Initiates(Order(waiter,cook,food),
 5539%           BeWaiter4(waiter),
 5540%           time).
 5541waiterOf(Restaurant)=Waiter, cookOf(Restaurant)=Cook, holds_at(beWaiter3(Waiter), Time) ->
 5542	initiates(order(Waiter, Cook, Food),
 5543		  beWaiter4(Waiter),
 5544		  Time).
 5545
 5546% ectest/ec_reader_test.e:3078
 5547% 
 5548% 
 5549% ectest/ec_reader_test.e:3080
 5550% [waiter,food,time]% 
 5551% HoldsAt(BeWaiter4(waiter),time) &
 5552% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) &
 5553% HoldsAt(FoodPrepared(food),time) ->
 5554% Happens(PickUp(waiter,food),time).
 5555holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)), holds_at(foodPrepared(Food), Time) ->
 5556	happens(pickUp(Waiter, Food), Time).
 5557
 5558% 
 5559% 
 5560% ectest/ec_reader_test.e:3086
 5561% [waiter,food,time]% 
 5562% HoldsAt(BeWaiter4(waiter),time) &
 5563% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) ->
 5564% Terminates(PickUp(waiter,food),
 5565%            BeWaiter4(waiter),
 5566%            time).
 5567holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)) ->
 5568	terminates(pickUp(Waiter, Food),
 5569		   beWaiter4(Waiter),
 5570		   Time).
 5571
 5572% 
 5573% ectest/ec_reader_test.e:3092
 5574% 
 5575% ectest/ec_reader_test.e:3093
 5576% [waiter,food,time]% 
 5577% HoldsAt(BeWaiter4(waiter),time) &
 5578% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) ->
 5579% Initiates(PickUp(waiter,food),
 5580%           BeWaiter5(waiter),
 5581%           time).
 5582holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)) ->
 5583	initiates(pickUp(Waiter, Food),
 5584		  beWaiter5(Waiter),
 5585		  Time).
 5586
 5587% 
 5588% ectest/ec_reader_test.e:3099
 5589% 
 5590% ectest/ec_reader_test.e:3100
 5591% [restaurant,waiter,time]% 
 5592% WaiterOf(restaurant)=waiter &
 5593% HoldsAt(BeWaiter5(waiter),time) ->
 5594% Happens(WalkThroughDoor21(waiter,KitchenDoorOf(restaurant)),time).
 5595waiterOf(Restaurant)=Waiter, holds_at(beWaiter5(Waiter), Time) ->
 5596	happens(walkThroughDoor21(Waiter,
 5597				  kitchenDoorOf(Restaurant)),
 5598		Time).
 5599
 5600% 
 5601% 
 5602% ectest/ec_reader_test.e:3105
 5603% [restaurant,waiter,door,time]% 
 5604% HoldsAt(BeWaiter5(waiter),time) &
 5605% WaiterOf(restaurant)=waiter &
 5606% KitchenDoorOf(restaurant)=door ->
 5607% Terminates(WalkThroughDoor21(waiter,door),
 5608%            BeWaiter5(waiter),
 5609%            time).
 5610holds_at(beWaiter5(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 5611	terminates(walkThroughDoor21(Waiter, Door),
 5612		   beWaiter5(Waiter),
 5613		   Time).
 5614
 5615% ectest/ec_reader_test.e:3111
 5616% 
 5617% 
 5618% ectest/ec_reader_test.e:3113
 5619% [restaurant,waiter,door,time]% 
 5620% HoldsAt(BeWaiter5(waiter),time) &
 5621% WaiterOf(restaurant)=waiter &
 5622% KitchenDoorOf(restaurant)=door ->
 5623% Initiates(WalkThroughDoor21(waiter,door),
 5624%           BeWaiter6(waiter),
 5625%           time).
 5626holds_at(beWaiter5(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 5627	initiates(walkThroughDoor21(Waiter, Door),
 5628		  beWaiter6(Waiter),
 5629		  Time).
 5630
 5631% ectest/ec_reader_test.e:3119
 5632% 
 5633% 
 5634% ectest/ec_reader_test.e:3121
 5635% [restaurant,waiter,table,food,time]% 
 5636% WaiterOf(restaurant)=waiter &
 5637% TableOf(restaurant)=table &
 5638% HoldsAt(BeWaiter6(waiter),time) &
 5639% HoldsAt(Holding(waiter,food),time) ->
 5640% Happens(PlaceOn(waiter,food,table),time).
 5641waiterOf(Restaurant)=Waiter, tableOf(Restaurant)=Table, holds_at(beWaiter6(Waiter), Time), holds_at(holding(Waiter, Food), Time) ->
 5642	happens(placeOn(Waiter, Food, Table), Time).
 5643
 5644% 
 5645% ectest/ec_reader_test.e:3127
 5646% 
 5647% ectest/ec_reader_test.e:3128
 5648% [waiter,food,table,time]% 
 5649% HoldsAt(BeWaiter6(waiter),time) ->
 5650% Terminates(PlaceOn(waiter,food,table),
 5651%            BeWaiter6(waiter),
 5652%            time).
 5653holds_at(beWaiter6(Waiter), Time) ->
 5654	terminates(placeOn(Waiter, Food, Table),
 5655		   beWaiter6(Waiter),
 5656		   Time).
 5657
 5658% 
 5659% 
 5660% ectest/ec_reader_test.e:3134
 5661% [waiter,food,table,time]% 
 5662% HoldsAt(BeWaiter6(waiter),time) ->
 5663% Initiates(PlaceOn(waiter,food,table),
 5664%           BeWaiter7(waiter),
 5665%           time).
 5666holds_at(beWaiter6(Waiter), Time) ->
 5667	initiates(placeOn(Waiter, Food, Table),
 5668		  beWaiter7(Waiter),
 5669		  Time).
 5670
 5671% 
 5672% 
 5673% ectest/ec_reader_test.e:3140
 5674% [waiter,agent,bill,time]% 
 5675% HoldsAt(BeWaiter7(waiter),time) ->
 5676% Terminates(Request(agent,waiter,bill),
 5677%            BeWaiter7(waiter),
 5678%            time).
 5679holds_at(beWaiter7(Waiter), Time) ->
 5680	terminates(request(Agent, Waiter, Bill),
 5681		   beWaiter7(Waiter),
 5682		   Time).
 5683
 5684% 
 5685% 
 5686% ectest/ec_reader_test.e:3146
 5687% [waiter,agent,bill,time]% 
 5688% HoldsAt(BeWaiter7(waiter),time) ->
 5689% Initiates(Request(agent,waiter,bill),
 5690%           BeWaiter8(waiter),
 5691%           time).
 5692holds_at(beWaiter7(Waiter), Time) ->
 5693	initiates(request(Agent, Waiter, Bill),
 5694		  beWaiter8(Waiter),
 5695		  Time).
 5696
 5697% 
 5698% 
 5699% ectest/ec_reader_test.e:3152
 5700% [restaurant,waiter,bill,time]% 
 5701% WaiterOf(restaurant)=waiter &
 5702% BillOf(restaurant)=bill &
 5703% HoldsAt(BeWaiter8(waiter),time) ->
 5704% Happens(PickUp(waiter,bill),time).
 5705waiterOf(Restaurant)=Waiter, billOf(Restaurant)=Bill, holds_at(beWaiter8(Waiter), Time) ->
 5706	happens(pickUp(Waiter, Bill), Time).
 5707
 5708% 
 5709% 
 5710% ectest/ec_reader_test.e:3158
 5711% [waiter,bill,time]% 
 5712% HoldsAt(BeWaiter8(waiter),time) ->
 5713% Terminates(PickUp(waiter,bill),
 5714%            BeWaiter8(waiter),
 5715%            time).
 5716holds_at(beWaiter8(Waiter), Time) ->
 5717	terminates(pickUp(Waiter, Bill),
 5718		   beWaiter8(Waiter),
 5719		   Time).
 5720
 5721% 
 5722% 
 5723% ectest/ec_reader_test.e:3164
 5724% [waiter,bill,time]% 
 5725% HoldsAt(BeWaiter8(waiter),time) ->
 5726% Initiates(PickUp(waiter,bill),
 5727%           BeWaiter9(waiter),
 5728%           time).
 5729holds_at(beWaiter8(Waiter), Time) ->
 5730	initiates(pickUp(Waiter, Bill),
 5731		  beWaiter9(Waiter),
 5732		  Time).
 5733
 5734% 
 5735% 
 5736% ectest/ec_reader_test.e:3170
 5737% [restaurant,waiter,bill,table,time]% 
 5738% WaiterOf(restaurant)=waiter &
 5739% BillOf(restaurant)=bill &
 5740% TableOf(restaurant)=table &
 5741% HoldsAt(BeWaiter9(waiter),time) ->
 5742% Happens(PlaceOn(waiter,bill,table),time).
 5743waiterOf(Restaurant)=Waiter, billOf(Restaurant)=Bill, tableOf(Restaurant)=Table, holds_at(beWaiter9(Waiter), Time) ->
 5744	happens(placeOn(Waiter, Bill, Table), Time).
 5745
 5746% 
 5747% ectest/ec_reader_test.e:3176
 5748% 
 5749% ectest/ec_reader_test.e:3177
 5750% [waiter,bill,table,time]% 
 5751% HoldsAt(BeWaiter9(waiter),time) ->
 5752% Terminates(PlaceOn(waiter,bill,table),
 5753%            BeWaiter9(waiter),
 5754%            time).
 5755holds_at(beWaiter9(Waiter), Time) ->
 5756	terminates(placeOn(Waiter, Bill, Table),
 5757		   beWaiter9(Waiter),
 5758		   Time).
 5759
 5760% 
 5761% 
 5762% ectest/ec_reader_test.e:3183
 5763% [waiter,bill,table,time]% 
 5764% HoldsAt(BeWaiter9(waiter),time) ->
 5765% Initiates(PlaceOn(waiter,bill,table),
 5766%           BeWaiter0(waiter),
 5767%           time).
 5768holds_at(beWaiter9(Waiter), Time) ->
 5769	initiates(placeOn(Waiter, Bill, Table),
 5770		  beWaiter0(Waiter),
 5771		  Time).
 5772
 5773% 
 5774% 
 5775% ectest/ec_reader_test.e:3189
 5776% fluent BeCook0(cook)
 5777fluent(beCook0(cook)).
 5778
 5779% 
 5780% fluent BeCook1(cook)
 5781fluent(beCook1(cook)).
 5782
 5783% 
 5784% xor BeCook0, BeCook1
 5785xor([beCook0, beCook1]).
 5786
 5787% 
 5788% ectest/ec_reader_test.e:3195
 5789% [cook,agent,food,time]% 
 5790% HoldsAt(BeCook0(cook),time) ->
 5791% Terminates(Order(agent,cook,food),
 5792%            BeCook0(cook),
 5793%            time).
 5794holds_at(beCook0(Cook), Time) ->
 5795	terminates(order(Agent, Cook, Food),
 5796		   beCook0(Cook),
 5797		   Time).
 5798
 5799% 
 5800% 
 5801% ectest/ec_reader_test.e:3201
 5802% [cook,agent,food,time]% 
 5803% HoldsAt(BeCook0(cook),time) ->
 5804% Initiates(Order(agent,cook,food),
 5805%           BeCook1(cook),
 5806%           time).
 5807holds_at(beCook0(Cook), Time) ->
 5808	initiates(order(Agent, Cook, Food),
 5809		  beCook1(Cook),
 5810		  Time).
 5811
 5812% 
 5813% 
 5814% ectest/ec_reader_test.e:3207
 5815% event FoodPrepare(agent,food)
 5816event(foodPrepare(agent, food)).
 5817
 5818% 
 5819% fluent FoodPrepared(food)
 5820fluent(foodPrepared(food)).
 5821
 5822% 
 5823% ectest/ec_reader_test.e:3211
 5824% [agent,food,time]% 
 5825% Initiates(FoodPrepare(agent,food),
 5826%           FoodPrepared(food),
 5827%           time).
 5828initiates(foodPrepare(Agent, Food), foodPrepared(Food), Time).
 5829
 5830% 
 5831% 
 5832% ectest/ec_reader_test.e:3216
 5833% [agent,food,time]% 
 5834% Happens(FoodPrepare(agent,food),time) ->
 5835% ectest/ec_reader_test.e:3218
 5836% {location}% 
 5837% HoldsAt(At(agent,location),time) &
 5838% HoldsAt(At(food,location),time).
 5839exists([Location],  (happens(foodPrepare(Agent, Food), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Food, Location), Time))).
 5840
 5841% 
 5842% 
 5843% ectest/ec_reader_test.e:3222
 5844% [cook,agent,food,time]% 
 5845% HoldsAt(BeCook1(cook),time) &
 5846% HoldsAt(KnowOrder(cook,agent,food),time) ->
 5847% Happens(FoodPrepare(cook,food),time).
 5848holds_at(beCook1(Cook), Time), holds_at(knowOrder(Cook, Agent, Food), Time) ->
 5849	happens(foodPrepare(Cook, Food), Time).
 5850
 5851% 
 5852% 
 5853% ectest/ec_reader_test.e:3227
 5854% [cook,food,time]% 
 5855% HoldsAt(BeCook1(cook),time) ->
 5856% Terminates(FoodPrepare(cook,food),
 5857%            BeCook1(cook),
 5858%            time).
 5859holds_at(beCook1(Cook), Time) ->
 5860	terminates(foodPrepare(Cook, Food),
 5861		   beCook1(Cook),
 5862		   Time).
 5863
 5864% 
 5865% 
 5866% ectest/ec_reader_test.e:3233
 5867% [cook,food,time]% 
 5868% HoldsAt(BeCook1(cook),time) ->
 5869% Initiates(FoodPrepare(cook,food),
 5870%           BeCook0(cook),
 5871%           time).
 5872holds_at(beCook1(Cook), Time) ->
 5873	initiates(foodPrepare(Cook, Food),
 5874		  beCook0(Cook),
 5875		  Time).
 5876
 5877% 
 5878% 
 5879% ectest/ec_reader_test.e:3239
 5880% event Pay(agent,agent)
 5881event(pay(agent, agent)).
 5882
 5883% 
 5884% event Tip(agent,agent)
 5885event(tip(agent, agent)).
 5886
 5887% 
 5888% ectest/ec_reader_test.e:3243
 5889% [agent,physobj,time]% 
 5890% Happens(LieOn(agent,physobj),time) ->
 5891% ectest/ec_reader_test.e:3245
 5892% {room}% 
 5893%  HoldsAt(At(agent,room),time) &
 5894%  HoldsAt(At(physobj,room),time).
 5895exists([Room],  (happens(lieOn(Agent, Physobj), Time)->holds_at(at(Agent, Room), Time), holds_at(at(Physobj, Room), Time))).
 5896
 5897% 
 5898% 
 5899% ectest/ec_reader_test.e:3249
 5900% [agent,physobj,time]% 
 5901% Happens(SitOn(agent,physobj),time) ->
 5902% ectest/ec_reader_test.e:3251
 5903% {room}% 
 5904%  HoldsAt(At(agent,room),time) &
 5905%  HoldsAt(At(physobj,room),time).
 5906exists([Room],  (happens(sitOn(Agent, Physobj), Time)->holds_at(at(Agent, Room), Time), holds_at(at(Physobj, Room), Time))).
 5907
 5908% 
 5909% 
 5910% event LieOn(agent,physobj)
 5911event(lieOn(agent, physobj)).
 5912
 5913% 
 5914% ectest/ec_reader_test.e:3257
 5915% event SitOn(agent,physobj)
 5916event(sitOn(agent, physobj)).
 5917
 5918% 
 5919% event RiseFrom(agent,physobj)
 5920event(riseFrom(agent, physobj)).
 5921
 5922% 
 5923% fluent LyingOn(agent,physobj)
 5924fluent(lyingOn(agent, physobj)).
 5925
 5926% fluent SittingOn(agent,physobj)
 5927fluent(sittingOn(agent, physobj)).
 5928
 5929% ectest/ec_reader_test.e:3263
 5930% fluent Standing(agent)
 5931fluent(standing(agent)).
 5932
 5933% 
 5934% fluent Lying(agent)
 5935fluent(lying(agent)).
 5936
 5937% fluent Sitting(agent)
 5938fluent(sitting(agent)).
 5939
 5940% noninertial Lying
 5941noninertial(lying).
 5942
 5943% noninertial Sitting
 5944noninertial(sitting).
 5945
 5946% ectest/ec_reader_test.e:3269
 5947% 
 5948% xor Lying, Sitting, Standing
 5949xor([lying, sitting, standing]).
 5950
 5951% 
 5952% ectest/ec_reader_test.e:3272
 5953% [agent,physobj,time]% 
 5954% HoldsAt(LyingOn(agent,physobj),time) ->
 5955% HoldsAt(Lying(agent),time).
 5956holds_at(lyingOn(Agent, Physobj), Time) ->
 5957	holds_at(lying(Agent), Time).
 5958
 5959% 
 5960% 
 5961% ectest/ec_reader_test.e:3276
 5962% [agent,physobj,time]% 
 5963% HoldsAt(SittingOn(agent,physobj),time) ->
 5964% HoldsAt(Sitting(agent),time).
 5965holds_at(sittingOn(Agent, Physobj), Time) ->
 5966	holds_at(sitting(Agent), Time).
 5967
 5968% 
 5969% 
 5970% ectest/ec_reader_test.e:3280
 5971% [agent,physobj1,physobj2,time]% 
 5972% HoldsAt(LyingOn(agent,physobj1),time) &
 5973% HoldsAt(LyingOn(agent,physobj2),time) ->
 5974% physobj1=physobj2.
 5975holds_at(lyingOn(Agent, Physobj1), Time), holds_at(lyingOn(Agent, Physobj2), Time) ->
 5976	Physobj1=Physobj2.
 5977
 5978% 
 5979% 
 5980% ectest/ec_reader_test.e:3285
 5981% [agent,physobj1,physobj2,time]% 
 5982% HoldsAt(SittingOn(agent,physobj1),time) &
 5983% HoldsAt(SittingOn(agent,physobj2),time) ->
 5984% physobj1=physobj2.
 5985holds_at(sittingOn(Agent, Physobj1), Time), holds_at(sittingOn(Agent, Physobj2), Time) ->
 5986	Physobj1=Physobj2.
 5987
 5988% 
 5989% 
 5990% ectest/ec_reader_test.e:3290
 5991% [agent,physobj,time]% 
 5992% HoldsAt(Standing(agent),time) ->
 5993% Initiates(LieOn(agent,physobj),
 5994%           LyingOn(agent,physobj),
 5995%           time).
 5996holds_at(standing(Agent), Time) ->
 5997	initiates(lieOn(Agent, Physobj),
 5998		  lyingOn(Agent, Physobj),
 5999		  Time).
 6000
 6001% 
 6002% 
 6003% ectest/ec_reader_test.e:3296
 6004% [agent,physobj,time]% 
 6005% Terminates(LieOn(agent,physobj),
 6006%            Standing(agent),
 6007%            time).
 6008terminates(lieOn(Agent, Physobj), standing(Agent), Time).
 6009
 6010% 
 6011% 
 6012% ectest/ec_reader_test.e:3301
 6013% [agent,physobj,time]% 
 6014% HoldsAt(Standing(agent),time) ->
 6015% Initiates(SitOn(agent,physobj),
 6016%           SittingOn(agent,physobj),
 6017%           time).
 6018holds_at(standing(Agent), Time) ->
 6019	initiates(sitOn(Agent, Physobj),
 6020		  sittingOn(Agent, Physobj),
 6021		  Time).
 6022
 6023% 
 6024% 
 6025% ectest/ec_reader_test.e:3307
 6026% [agent,physobj,time]% 
 6027% Terminates(SitOn(agent,physobj),
 6028%            Standing(agent),
 6029%            time).
 6030terminates(sitOn(Agent, Physobj), standing(Agent), Time).
 6031
 6032% 
 6033% 
 6034% ectest/ec_reader_test.e:3312
 6035% [agent,physobj,time]% 
 6036% (HoldsAt(SittingOn(agent,physobj),time) |
 6037%  HoldsAt(LyingOn(agent,physobj),time)) ->
 6038% Initiates(RiseFrom(agent,physobj),
 6039%           Standing(agent),
 6040%           time).
 6041holds_at(sittingOn(Agent, Physobj), Time);holds_at(lyingOn(Agent, Physobj), Time) ->
 6042	initiates(riseFrom(Agent, Physobj),
 6043		  standing(Agent),
 6044		  Time).
 6045
 6046% 
 6047% ectest/ec_reader_test.e:3318
 6048% 
 6049% ectest/ec_reader_test.e:3319
 6050% [agent,physobj,time]% 
 6051% HoldsAt(LyingOn(agent,physobj),time) ->
 6052% Terminates(RiseFrom(agent,physobj),
 6053%            LyingOn(agent,physobj),
 6054%            time).
 6055holds_at(lyingOn(Agent, Physobj), Time) ->
 6056	terminates(riseFrom(Agent, Physobj),
 6057		   lyingOn(Agent, Physobj),
 6058		   Time).
 6059
 6060% 
 6061% 
 6062% ectest/ec_reader_test.e:3325
 6063% [agent,physobj,time]% 
 6064% HoldsAt(SittingOn(agent,physobj),time) ->
 6065% Terminates(RiseFrom(agent,physobj),
 6066%            SittingOn(agent,physobj),
 6067%            time).
 6068holds_at(sittingOn(Agent, Physobj), Time) ->
 6069	terminates(riseFrom(Agent, Physobj),
 6070		   sittingOn(Agent, Physobj),
 6071		   Time).
 6072
 6073% 
 6074% 
 6075% ectest/ec_reader_test.e:3331
 6076% event Greet(agent,agent)
 6077event(greet(agent, agent)).
 6078
 6079% 
 6080% event SayGoodbye(agent,agent)
 6081event(sayGoodbye(agent, agent)).
 6082
 6083% 
 6084% ectest/ec_reader_test.e:3335
 6085% [agent1,agent2,time]% 
 6086% Happens(Greet(agent1,agent2),time) ->
 6087% ectest/ec_reader_test.e:3337
 6088% {location}% 
 6089% HoldsAt(At(agent1,location),time) &
 6090% HoldsAt(At(agent2,location),time).
 6091exists([Location],  (happens(greet(Agent1, Agent2), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 6092
 6093% 
 6094% 
 6095% ectest/ec_reader_test.e:3341
 6096% [agent1,agent2,time]% 
 6097% Happens(SayGoodbye(agent1,agent2),time) ->
 6098% ectest/ec_reader_test.e:3343
 6099% {location}% 
 6100% HoldsAt(At(agent1,location),time) &
 6101% HoldsAt(At(agent2,location),time).
 6102exists([Location],  (happens(sayGoodbye(Agent1, Agent2), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 6103
 6104% 
 6105% 
 6106% event Order(agent,agent,physobj)
 6107event(order(agent, agent, physobj)).
 6108
 6109% 
 6110% ectest/ec_reader_test.e:3349
 6111% fluent KnowOrder(agent,agent,physobj)
 6112fluent(knowOrder(agent, agent, physobj)).
 6113
 6114% 
 6115% ectest/ec_reader_test.e:3351
 6116% [agent1,agent2,physobj,time]% 
 6117% Initiates(Order(agent1,agent2,physobj),
 6118%           KnowOrder(agent2,agent1,physobj),
 6119%           time).
 6120initiates(order(Agent1, Agent2, Physobj), knowOrder(Agent2, Agent1, Physobj), Time).
 6121
 6122% 
 6123% 
 6124% ectest/ec_reader_test.e:3356
 6125% [agent1,agent2,physobj,time]% 
 6126% Happens(Order(agent1,agent2,physobj),time) ->
 6127% ectest/ec_reader_test.e:3358
 6128% {location}% 
 6129% HoldsAt(At(agent1,location),time) &
 6130% HoldsAt(At(agent2,location),time).
 6131exists([Location],  (happens(order(Agent1, Agent2, Physobj), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 6132
 6133% 
 6134% 
 6135% event Request(agent,agent,physobj)
 6136event(request(agent, agent, physobj)).
 6137
 6138% 
 6139% ectest/ec_reader_test.e:3364
 6140% fluent KnowRequest(agent,agent,physobj)
 6141fluent(knowRequest(agent, agent, physobj)).
 6142
 6143% 
 6144% ectest/ec_reader_test.e:3366
 6145% [agent1,agent2,physobj,time]% 
 6146% Initiates(Request(agent1,agent2,physobj),
 6147%           KnowRequest(agent2,agent1,physobj),
 6148%           time).
 6149initiates(request(Agent1, Agent2, Physobj), knowRequest(Agent2, Agent1, Physobj), Time).
 6150
 6151% 
 6152% 
 6153% ectest/ec_reader_test.e:3371
 6154% [agent1,agent2,physobj,time]% 
 6155% Happens(Request(agent1,agent2,physobj),time) ->
 6156% ectest/ec_reader_test.e:3373
 6157% {location}% 
 6158% HoldsAt(At(agent1,location),time) &
 6159% HoldsAt(At(agent2,location),time).
 6160exists([Location],  (happens(request(Agent1, Agent2, Physobj), Time)->holds_at(at(Agent1, Location), Time), holds_at(at(Agent2, Location), Time))).
 6161
 6162% 
 6163% 
 6164% ; End of file.
 6165% 
 6166% ectest/ec_reader_test.e:3379
 6167% 
 6168% 
 6169% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 6170% ; FILE: ecnet/Diving.e
 6171% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 6172% 
 6173% ;
 6174% ; Copyright (c) 2005 IBM Corporation and others.
 6175% ; All rights reserved. This program and the accompanying materials
 6176% ; are made available under the terms of the Common Public License v1.0
 6177% ; which accompanies this distribution, and is available at
 6178% ; http://www.eclipse.org/legal/cpl-v10.html
 6179% ;
 6180% ; Contributors:
 6181% ; IBM - Initial implementation
 6182% ;
 6183% ; scuba diving
 6184% ;
 6185% ectest/ec_reader_test.e:3397
 6186% 
 6187% sort object
 6188sort(object).
 6189
 6190% sort agent: object
 6191subsort(agent, object).
 6192
 6193% sort diver: agent
 6194subsort(diver, agent).
 6195
 6196% sort depth: integer
 6197subsort(depth, integer).
 6198
 6199% sort boat: object
 6200subsort(boat, object).
 6201
 6202% ectest/ec_reader_test.e:3403
 6203% 
 6204% ; reference line, anchor line, shotline, SMB line, ...
 6205% sort line: object
 6206subsort(line, object).
 6207
 6208% 
 6209% sort equipment: object
 6210subsort(equipment, object).
 6211
 6212% sort weight: equipment
 6213subsort(weight, equipment).
 6214
 6215% ectest/ec_reader_test.e:3409
 6216% sort fin: equipment
 6217subsort(fin, equipment).
 6218
 6219% sort airtank: equipment
 6220subsort(airtank, equipment).
 6221
 6222% 
 6223% ; buoyancy compensator (BC)
 6224% ; buoyancy control device (BCD)
 6225% sort computer: equipment
 6226subsort(computer, equipment).
 6227
 6228% ectest/ec_reader_test.e:3415
 6229% sort bc: equipment
 6230subsort(bc, equipment).
 6231
 6232% 
 6233% fluent AtDepth(object,depth)
 6234fluent(atDepth(object, depth)).
 6235
 6236% 
 6237% ectest/ec_reader_test.e:3419
 6238% [object,depth1,depth2,time]% 
 6239% HoldsAt(AtDepth(object,depth1),time) &
 6240% HoldsAt(AtDepth(object,depth2),time) ->
 6241% depth1 = depth2.
 6242holds_at(atDepth(Object, Depth1), Time), holds_at(atDepth(Object, Depth2), Time) ->
 6243	Depth1=Depth2.
 6244
 6245% 
 6246% 
 6247% event Ascend(diver,depth)
 6248event(ascend(diver, depth)).
 6249
 6250% ectest/ec_reader_test.e:3425
 6251% 
 6252% event Descend(diver,depth)
 6253event(descend(diver, depth)).
 6254
 6255% 
 6256% ectest/ec_reader_test.e:3428
 6257% [diver,depth1,depth2,time]% 
 6258% HoldsAt(AtDepth(diver,depth1),time) &
 6259% Happens(Descend(diver,depth2),time) ->
 6260% depth2>depth1.
 6261holds_at(atDepth(Diver, Depth1), Time), happens(descend(Diver, Depth2), Time) ->
 6262	Depth2>Depth1.
 6263
 6264% 
 6265% 
 6266% ectest/ec_reader_test.e:3433
 6267% [diver,depth1,depth2,time]% 
 6268% HoldsAt(AtDepth(diver,depth1),time) &
 6269% Happens(Ascend(diver,depth2),time) ->
 6270% depth2<depth1.
 6271holds_at(atDepth(Diver, Depth1), Time), happens(ascend(Diver, Depth2), Time) ->
 6272	Depth2<Depth1.
 6273
 6274% 
 6275% 
 6276% ectest/ec_reader_test.e:3438
 6277% [diver,depth,time]% 
 6278% Initiates(Descend(diver,depth),AtDepth(diver,depth),time).
 6279initiates(descend(Diver, Depth), atDepth(Diver, Depth), Time).
 6280
 6281% 
 6282% 
 6283% ectest/ec_reader_test.e:3441
 6284% [diver,depth1,depth2,time]% 
 6285% HoldsAt(AtDepth(diver,depth1),time) ->
 6286% Terminates(Descend(diver,depth2),AtDepth(diver,depth1),time).
 6287holds_at(atDepth(Diver, Depth1), Time) ->
 6288	terminates(descend(Diver, Depth2),
 6289		   atDepth(Diver, Depth1),
 6290		   Time).
 6291
 6292% 
 6293% 
 6294% ectest/ec_reader_test.e:3445
 6295% [diver,depth,time]% 
 6296% Initiates(Ascend(diver,depth),AtDepth(diver,depth),time).
 6297initiates(ascend(Diver, Depth), atDepth(Diver, Depth), Time).
 6298
 6299% 
 6300% 
 6301% ectest/ec_reader_test.e:3448
 6302% [diver,depth1,depth2,time]% 
 6303% HoldsAt(AtDepth(diver,depth1),time) ->
 6304% Terminates(Ascend(diver,depth2),AtDepth(diver,depth1),time).
 6305holds_at(atDepth(Diver, Depth1), Time) ->
 6306	terminates(ascend(Diver, Depth2),
 6307		   atDepth(Diver, Depth1),
 6308		   Time).
 6309
 6310% 
 6311% 
 6312% fluent Wearing(diver,equipment)
 6313fluent(wearing(diver, equipment)).
 6314
 6315% 
 6316% ectest/ec_reader_test.e:3454
 6317% event PutOn(diver,equipment)
 6318event(putOn(diver, equipment)).
 6319
 6320% 
 6321% event TakeOff(diver,equipment)
 6322event(takeOff(diver, equipment)).
 6323
 6324% 
 6325% event Lose(diver,equipment)
 6326event(lose(diver, equipment)).
 6327
 6328% 
 6329% ectest/ec_reader_test.e:3460
 6330% [diver,equipment,depth,time]% 
 6331% Releases(PutOn(diver,equipment),AtDepth(equipment,depth),time).
 6332releases(putOn(Diver, Equipment), atDepth(Equipment, Depth), Time).
 6333
 6334% 
 6335% 
 6336% ectest/ec_reader_test.e:3463
 6337% [diver,equipment,time]% 
 6338% Releases(PutOn(diver,equipment),UnderWater(equipment),time).
 6339releases(putOn(Diver, Equipment), underWater(Equipment), Time).
 6340
 6341% 
 6342% 
 6343% ectest/ec_reader_test.e:3466
 6344% [diver,equipment,time]% 
 6345% Happens(PutOn(diver,equipment),time) ->
 6346% !{diver1} HoldsAt(Wearing(diver1,equipment),time).
 6347happens(putOn(Diver, Equipment), Time) ->
 6348	not(exists([Diver1],
 6349		   holds_at(wearing(Diver1, Equipment), Time))).
 6350
 6351% 
 6352% 
 6353% ectest/ec_reader_test.e:3470
 6354% [diver,depth,equipment,time]% 
 6355% HoldsAt(Wearing(diver,equipment),time) ->
 6356% (HoldsAt(AtDepth(diver,depth),time) <->
 6357%  HoldsAt(AtDepth(equipment,depth),time)).
 6358holds_at(wearing(Diver, Equipment), Time) ->
 6359	( holds_at(atDepth(Diver, Depth), Time)<->holds_at(atDepth(Equipment, Depth), Time)
 6360	).
 6361
 6362% 
 6363% 
 6364% ectest/ec_reader_test.e:3475
 6365% [diver,depth,object,time]% 
 6366% HoldsAt(Holding(diver,object),time) ->
 6367% (HoldsAt(AtDepth(diver,depth),time) <->
 6368%  HoldsAt(AtDepth(object,depth),time)).
 6369holds_at(holding(Diver, Object), Time) ->
 6370	( holds_at(atDepth(Diver, Depth), Time)<->holds_at(atDepth(Object, Depth), Time)
 6371	).
 6372
 6373% 
 6374% 
 6375% ectest/ec_reader_test.e:3480
 6376% [diver,equipment,time]% 
 6377% HoldsAt(Wearing(diver,equipment),time) ->
 6378% (HoldsAt(UnderWater(diver),time) <->
 6379%  HoldsAt(UnderWater(equipment),time)).
 6380holds_at(wearing(Diver, Equipment), Time) ->
 6381	( holds_at(underWater(Diver), Time)<->holds_at(underWater(Equipment), Time)
 6382	).
 6383
 6384% 
 6385% 
 6386% ectest/ec_reader_test.e:3485
 6387% [diver,object,time]% 
 6388% HoldsAt(Holding(diver,object),time) ->
 6389% (HoldsAt(UnderWater(diver),time) <->
 6390%  HoldsAt(UnderWater(object),time)).
 6391holds_at(holding(Diver, Object), Time) ->
 6392	( holds_at(underWater(Diver), Time)<->holds_at(underWater(Object), Time)
 6393	).
 6394
 6395% 
 6396% 
 6397% ectest/ec_reader_test.e:3490
 6398% [diver,depth,equipment,time]% 
 6399% HoldsAt(AtDepth(diver,depth),time) &
 6400% HoldsAt(Wearing(diver,equipment),time) ->
 6401% Initiates(TakeOff(diver,equipment),AtDepth(equipment,depth),time).
 6402holds_at(atDepth(Diver, Depth), Time), holds_at(wearing(Diver, Equipment), Time) ->
 6403	initiates(takeOff(Diver, Equipment),
 6404		  atDepth(Equipment, Depth),
 6405		  Time).
 6406
 6407% 
 6408% 
 6409% ectest/ec_reader_test.e:3495
 6410% [diver,depth,equipment,time]% 
 6411% !HoldsAt(AtDepth(diver,depth),time) &
 6412% HoldsAt(Wearing(diver,equipment),time) ->
 6413% Terminates(TakeOff(diver,equipment),AtDepth(equipment,depth),time).
 6414not(holds_at(atDepth(Diver, Depth), Time)), holds_at(wearing(Diver, Equipment), Time) ->
 6415	terminates(takeOff(Diver, Equipment),
 6416		   atDepth(Equipment, Depth),
 6417		   Time).
 6418
 6419% 
 6420% 
 6421% ectest/ec_reader_test.e:3500
 6422% [diver,equipment,time]% 
 6423% HoldsAt(UnderWater(diver),time) ->
 6424% Initiates(TakeOff(diver,equipment),UnderWater(equipment),time).
 6425holds_at(underWater(Diver), Time) ->
 6426	initiates(takeOff(Diver, Equipment),
 6427		  underWater(Equipment),
 6428		  Time).
 6429
 6430% 
 6431% 
 6432% ectest/ec_reader_test.e:3504
 6433% [diver,equipment,time]% 
 6434% !HoldsAt(UnderWater(diver),time) ->
 6435% Terminates(TakeOff(diver,equipment),UnderWater(equipment),time).
 6436not(holds_at(underWater(Diver), Time)) ->
 6437	terminates(takeOff(Diver, Equipment),
 6438		   underWater(Equipment),
 6439		   Time).
 6440
 6441% 
 6442% 
 6443% ectest/ec_reader_test.e:3508
 6444% [diver,equipment,depth,time]% 
 6445% HoldsAt(AtDepth(diver,depth),time) &
 6446% HoldsAt(Wearing(diver,equipment),time) ->
 6447% Initiates(Lose(diver,equipment),AtDepth(equipment,depth),time).
 6448holds_at(atDepth(Diver, Depth), Time), holds_at(wearing(Diver, Equipment), Time) ->
 6449	initiates(lose(Diver, Equipment),
 6450		  atDepth(Equipment, Depth),
 6451		  Time).
 6452
 6453% 
 6454% 
 6455% ectest/ec_reader_test.e:3513
 6456% [diver,equipment,depth,time]% 
 6457% !HoldsAt(AtDepth(diver,depth),time) &
 6458% HoldsAt(Wearing(diver,equipment),time) ->
 6459% Terminates(Lose(diver,equipment),AtDepth(equipment,depth),time).
 6460not(holds_at(atDepth(Diver, Depth), Time)), holds_at(wearing(Diver, Equipment), Time) ->
 6461	terminates(lose(Diver, Equipment),
 6462		   atDepth(Equipment, Depth),
 6463		   Time).
 6464
 6465% 
 6466% 
 6467% ectest/ec_reader_test.e:3518
 6468% [diver,equipment,time]% 
 6469% HoldsAt(UnderWater(diver),time) ->
 6470% Initiates(Lose(diver,equipment),UnderWater(equipment),time).
 6471holds_at(underWater(Diver), Time) ->
 6472	initiates(lose(Diver, Equipment),
 6473		  underWater(Equipment),
 6474		  Time).
 6475
 6476% 
 6477% 
 6478% ectest/ec_reader_test.e:3522
 6479% [diver,equipment,time]% 
 6480% !HoldsAt(UnderWater(diver),time) ->
 6481% Terminates(Lose(diver,equipment),UnderWater(equipment),time).
 6482not(holds_at(underWater(Diver), Time)) ->
 6483	terminates(lose(Diver, Equipment),
 6484		   underWater(Equipment),
 6485		   Time).
 6486
 6487% 
 6488% 
 6489% fluent Holding(diver,object)
 6490fluent(holding(diver, object)).
 6491
 6492% 
 6493% ectest/ec_reader_test.e:3528
 6494% [diver1,diver2,time]% 
 6495% HoldsAt(Holding(diver1,diver2),time) ->
 6496% !HoldsAt(Holding(diver2,diver1),time).
 6497holds_at(holding(Diver1, Diver2), Time) ->
 6498	not(holds_at(holding(Diver2, Diver1), Time)).
 6499
 6500% 
 6501% 
 6502% event Grab(diver,object)
 6503event(grab(diver, object)).
 6504
 6505% 
 6506% ectest/ec_reader_test.e:3534
 6507% event LetGoOf(diver,object)
 6508event(letGoOf(diver, object)).
 6509
 6510% 
 6511% ectest/ec_reader_test.e:3536
 6512% [diver,object,time]% 
 6513% Initiates(Grab(diver,object),Holding(diver,object),time).
 6514initiates(grab(Diver, Object), holding(Diver, Object), Time).
 6515
 6516% 
 6517% 
 6518% ectest/ec_reader_test.e:3539
 6519% [diver,object,time]% 
 6520% Terminates(LetGoOf(diver,object),Holding(diver,object),time).
 6521terminates(letGoOf(Diver, Object), holding(Diver, Object), Time).
 6522
 6523% 
 6524% 
 6525% ectest/ec_reader_test.e:3542
 6526% [diver,object,depth,time]% 
 6527% Releases(Grab(diver,object),AtDepth(object,depth),time).
 6528releases(grab(Diver, Object), atDepth(Object, Depth), Time).
 6529
 6530% 
 6531% 
 6532% ectest/ec_reader_test.e:3545
 6533% [diver,object,time]% 
 6534% Releases(Grab(diver,object),UnderWater(object),time).
 6535releases(grab(Diver, Object), underWater(Object), Time).
 6536
 6537% 
 6538% 
 6539% ectest/ec_reader_test.e:3548
 6540% [diver,object,depth,time]% 
 6541% HoldsAt(AtDepth(diver,depth),time) &
 6542% HoldsAt(Holding(diver,object),time) ->
 6543% Initiates(LetGoOf(diver,object),AtDepth(object,depth),time).
 6544holds_at(atDepth(Diver, Depth), Time), holds_at(holding(Diver, Object), Time) ->
 6545	initiates(letGoOf(Diver, Object),
 6546		  atDepth(Object, Depth),
 6547		  Time).
 6548
 6549% 
 6550% 
 6551% ectest/ec_reader_test.e:3553
 6552% [diver,object,depth,time]% 
 6553% !HoldsAt(AtDepth(diver,depth),time) &
 6554% HoldsAt(Holding(diver,object),time) ->
 6555% Terminates(LetGoOf(diver,object),AtDepth(object,depth),time).
 6556not(holds_at(atDepth(Diver, Depth), Time)), holds_at(holding(Diver, Object), Time) ->
 6557	terminates(letGoOf(Diver, Object),
 6558		   atDepth(Object, Depth),
 6559		   Time).
 6560
 6561% 
 6562% 
 6563% ectest/ec_reader_test.e:3558
 6564% [diver,object,time]% 
 6565% HoldsAt(UnderWater(diver),time) ->
 6566% Initiates(LetGoOf(diver,object),UnderWater(object),time).
 6567holds_at(underWater(Diver), Time) ->
 6568	initiates(letGoOf(Diver, Object),
 6569		  underWater(Object),
 6570		  Time).
 6571
 6572% 
 6573% 
 6574% ectest/ec_reader_test.e:3562
 6575% [diver,object,time]% 
 6576% !HoldsAt(UnderWater(diver),time) ->
 6577% Terminates(LetGoOf(diver,object),UnderWater(object),time).
 6578not(holds_at(underWater(Diver), Time)) ->
 6579	terminates(letGoOf(Diver, Object),
 6580		   underWater(Object),
 6581		   Time).
 6582
 6583% 
 6584% 
 6585% ectest/ec_reader_test.e:3566
 6586% [diver,equipment,time]% 
 6587% Initiates(PutOn(diver,equipment),Wearing(diver,equipment),time).
 6588initiates(putOn(Diver, Equipment), wearing(Diver, Equipment), Time).
 6589
 6590% 
 6591% 
 6592% ectest/ec_reader_test.e:3569
 6593% [diver,equipment,time]% 
 6594% Happens(PutOn(diver,equipment),time) ->
 6595% !HoldsAt(UnderWater(diver),time).
 6596happens(putOn(Diver, Equipment), Time) ->
 6597	not(holds_at(underWater(Diver), Time)).
 6598
 6599% 
 6600% 
 6601% ectest/ec_reader_test.e:3573
 6602% [diver,equipment,time]% 
 6603% Terminates(TakeOff(diver,equipment),Wearing(diver,equipment),time).
 6604terminates(takeOff(Diver, Equipment), wearing(Diver, Equipment), Time).
 6605
 6606% 
 6607% 
 6608% ectest/ec_reader_test.e:3576
 6609% [diver,equipment,time]% 
 6610% Terminates(Lose(diver,equipment),Wearing(diver,equipment),time).
 6611terminates(lose(Diver, Equipment), wearing(Diver, Equipment), Time).
 6612
 6613% 
 6614% 
 6615% fluent Vertical(diver)
 6616fluent(vertical(diver)).
 6617
 6618% 
 6619% fluent HorizontalDown(diver)
 6620fluent(horizontalDown(diver)).
 6621
 6622% ectest/ec_reader_test.e:3582
 6623% 
 6624% fluent Inverted(diver)
 6625fluent(inverted(diver)).
 6626
 6627% 
 6628% fluent HorizontalUp(diver)
 6629fluent(horizontalUp(diver)).
 6630
 6631% 
 6632% xor Vertical, HorizontalDown, Inverted, HorizontalUp
 6633xor([vertical, horizontalDown, inverted, horizontalUp]).
 6634
 6635% ectest/ec_reader_test.e:3588
 6636% 
 6637% event RotatePitch(diver)
 6638event(rotatePitch(diver)).
 6639
 6640% 
 6641% ectest/ec_reader_test.e:3591
 6642% [diver,time]% 
 6643% HoldsAt(Vertical(diver),time) ->
 6644% Initiates(RotatePitch(diver),HorizontalDown(diver),time).
 6645holds_at(vertical(Diver), Time) ->
 6646	initiates(rotatePitch(Diver),
 6647		  horizontalDown(Diver),
 6648		  Time).
 6649
 6650% 
 6651% 
 6652% ectest/ec_reader_test.e:3595
 6653% [diver,time]% 
 6654% HoldsAt(HorizontalDown(diver),time) ->
 6655% Initiates(RotatePitch(diver),Inverted(diver),time).
 6656holds_at(horizontalDown(Diver), Time) ->
 6657	initiates(rotatePitch(Diver), inverted(Diver), Time).
 6658
 6659% 
 6660% 
 6661% ectest/ec_reader_test.e:3599
 6662% [diver,time]% 
 6663% HoldsAt(HorizontalDown(diver),time) ->
 6664% Terminates(RotatePitch(diver),HorizontalDown(diver),time).
 6665holds_at(horizontalDown(Diver), Time) ->
 6666	terminates(rotatePitch(Diver),
 6667		   horizontalDown(Diver),
 6668		   Time).
 6669
 6670% 
 6671% 
 6672% ectest/ec_reader_test.e:3603
 6673% [diver,time]% 
 6674% HoldsAt(Inverted(diver),time) ->
 6675% Initiates(RotatePitch(diver),HorizontalUp(diver),time).
 6676holds_at(inverted(Diver), Time) ->
 6677	initiates(rotatePitch(Diver),
 6678		  horizontalUp(Diver),
 6679		  Time).
 6680
 6681% 
 6682% 
 6683% ectest/ec_reader_test.e:3607
 6684% [diver,time]% 
 6685% HoldsAt(Inverted(diver),time) ->
 6686% Terminates(RotatePitch(diver),Inverted(diver),time).
 6687holds_at(inverted(Diver), Time) ->
 6688	terminates(rotatePitch(Diver), inverted(Diver), Time).
 6689
 6690% 
 6691% 
 6692% ectest/ec_reader_test.e:3611
 6693% [diver,time]% 
 6694% HoldsAt(HorizontalUp(diver),time) ->
 6695% Initiates(RotatePitch(diver),Vertical(diver),time).
 6696holds_at(horizontalUp(Diver), Time) ->
 6697	initiates(rotatePitch(Diver), vertical(Diver), Time).
 6698
 6699% 
 6700% 
 6701% ectest/ec_reader_test.e:3615
 6702% [diver,time]% 
 6703% HoldsAt(HorizontalUp(diver),time) ->
 6704% Terminates(RotatePitch(diver),HorizontalUp(diver),time).
 6705holds_at(horizontalUp(Diver), Time) ->
 6706	terminates(rotatePitch(Diver),
 6707		   horizontalUp(Diver),
 6708		   Time).
 6709
 6710% 
 6711% 
 6712% event RotateYaw(diver)
 6713event(rotateYaw(diver)).
 6714
 6715% 
 6716% ; try taking out Holding condition here
 6717% ectest/ec_reader_test.e:3622
 6718% [diver,time]% 
 6719% Happens(Ascend1(diver),time) &
 6720% !Happens(RapidAscendToSurface(diver),time) &
 6721% !({diver1} HoldsAt(Holding(diver,diver1),time)) ->
 6722% Happens(RotateYaw(diver),time).
 6723happens(ascend1(Diver), Time), not(happens(rapidAscendToSurface(Diver), Time)), not(exists([Diver1], holds_at(holding(Diver, Diver1), Time))) ->
 6724	happens(rotateYaw(Diver), Time).
 6725
 6726% 
 6727% 
 6728% ectest/ec_reader_test.e:3628
 6729% fluent UnderWater(object)
 6730fluent(underWater(object)).
 6731
 6732% 
 6733% ectest/ec_reader_test.e:3630
 6734% [object,depth,time]% 
 6735% depth>% 0 &
 6736% HoldsAt(AtDepth(object,depth),time) ->
 6737% HoldsAt(UnderWater(object),time).
 6738Depth>0, holds_at(atDepth(Object, Depth), Time) ->
 6739	holds_at(underWater(Object), Time).
 6740
 6741% 
 6742% 
 6743% event EnterWater(object)
 6744event(enterWater(object)).
 6745
 6746% ectest/ec_reader_test.e:3636
 6747% 
 6748% event Surface(object)
 6749event(surface(object)).
 6750
 6751% 
 6752% ectest/ec_reader_test.e:3639
 6753% [object,time]% 
 6754% Initiates(EnterWater(object),UnderWater(object),time).
 6755initiates(enterWater(Object), underWater(Object), Time).
 6756
 6757% 
 6758% 
 6759% ectest/ec_reader_test.e:3642
 6760% [diver,time]% 
 6761% Happens(EnterWater(diver),time) ->
 6762% !{diver1} HoldsAt(Holding(diver1,diver),time).
 6763happens(enterWater(Diver), Time) ->
 6764	not(exists([Diver1],
 6765		   holds_at(holding(Diver1, Diver), Time))).
 6766
 6767% 
 6768% 
 6769% ectest/ec_reader_test.e:3646
 6770% [object,depth,time]% 
 6771% depth=% 0 ->
 6772% Initiates(EnterWater(object),AtDepth(object,depth),time).
 6773Depth=0 ->
 6774	initiates(enterWater(Object),
 6775		  atDepth(Object, Depth),
 6776		  Time).
 6777
 6778% 
 6779% 
 6780% ectest/ec_reader_test.e:3650
 6781% [object,time]% 
 6782% Terminates(Surface(object),UnderWater(object),time).
 6783terminates(surface(Object), underWater(Object), Time).
 6784
 6785% 
 6786% 
 6787% ectest/ec_reader_test.e:3653
 6788% [diver,time]% 
 6789% Terminates(Surface(diver),PositivelyBuoyant(diver),time).
 6790terminates(surface(Diver), positivelyBuoyant(Diver), Time).
 6791
 6792% 
 6793% 
 6794% ectest/ec_reader_test.e:3656
 6795% [diver,time]% 
 6796% Terminates(Surface(diver),NegativelyBuoyant(diver),time).
 6797terminates(surface(Diver), negativelyBuoyant(Diver), Time).
 6798
 6799% 
 6800% 
 6801% ectest/ec_reader_test.e:3659
 6802% [diver,time]% 
 6803% Terminates(Surface(diver),NeutrallyBuoyant(diver),time).
 6804terminates(surface(Diver), neutrallyBuoyant(Diver), Time).
 6805
 6806% 
 6807% 
 6808% ectest/ec_reader_test.e:3662
 6809% [object,depth,time]% 
 6810% Terminates(Surface(object),AtDepth(object,depth),time).
 6811terminates(surface(Object), atDepth(Object, Depth), Time).
 6812
 6813% 
 6814% 
 6815% ectest/ec_reader_test.e:3665
 6816% [diver,time] % Happens(EnterWater(diver),time) ->
 6817% HoldsAt(Vertical(diver),time).
 6818happens(enterWater(Diver), Time) ->
 6819	holds_at(vertical(Diver), Time).
 6820
 6821% 
 6822% 
 6823% fluent StandingOn(diver,boat)
 6824fluent(standingOn(diver, boat)).
 6825
 6826% 
 6827% event StandOn(diver,boat)
 6828event(standOn(diver, boat)).
 6829
 6830% ectest/ec_reader_test.e:3671
 6831% 
 6832% ectest/ec_reader_test.e:3672
 6833% [diver,boat,time]% 
 6834% Terminates(EnterWater(diver),StandingOn(diver,boat),time).
 6835terminates(enterWater(Diver), standingOn(Diver, Boat), Time).
 6836
 6837% 
 6838% 
 6839% ectest/ec_reader_test.e:3675
 6840% [diver,boat,time]% 
 6841% Initiates(StandOn(diver,boat),StandingOn(diver,boat),time).
 6842initiates(standOn(Diver, Boat), standingOn(Diver, Boat), Time).
 6843
 6844% 
 6845% 
 6846% fluent PositivelyBuoyant(diver)
 6847fluent(positivelyBuoyant(diver)).
 6848
 6849% 
 6850% fluent NeutrallyBuoyant(diver)
 6851fluent(neutrallyBuoyant(diver)).
 6852
 6853% ectest/ec_reader_test.e:3681
 6854% 
 6855% fluent NegativelyBuoyant(diver)
 6856fluent(negativelyBuoyant(diver)).
 6857
 6858% 
 6859% mutex PositivelyBuoyant, NeutrallyBuoyant, NegativelyBuoyant
 6860mutex(positivelyBuoyant).
 6861
 6862mutex(neutrallyBuoyant).
 6863
 6864mutex(negativelyBuoyant).
 6865
 6866% 
 6867% ectest/ec_reader_test.e:3686
 6868% [diver,time]% 
 6869% HoldsAt(PositivelyBuoyant(diver),time) ->
 6870% HoldsAt(UnderWater(diver),time).
 6871holds_at(positivelyBuoyant(Diver), Time) ->
 6872	holds_at(underWater(Diver), Time).
 6873
 6874% 
 6875% 
 6876% ectest/ec_reader_test.e:3690
 6877% [diver,time]% 
 6878% HoldsAt(NeutrallyBuoyant(diver),time) ->
 6879% HoldsAt(UnderWater(diver),time).
 6880holds_at(neutrallyBuoyant(Diver), Time) ->
 6881	holds_at(underWater(Diver), Time).
 6882
 6883% 
 6884% 
 6885% ectest/ec_reader_test.e:3694
 6886% [diver,time]% 
 6887% HoldsAt(NegativelyBuoyant(diver),time) ->
 6888% HoldsAt(UnderWater(diver),time).
 6889holds_at(negativelyBuoyant(Diver), Time) ->
 6890	holds_at(underWater(Diver), Time).
 6891
 6892% 
 6893% 
 6894% event PressDeflateButton(diver,bc)
 6895event(pressDeflateButton(diver, bc)).
 6896
 6897% 
 6898% ectest/ec_reader_test.e:3700
 6899% event PressDumpButton(diver,bc)
 6900event(pressDumpButton(diver, bc)).
 6901
 6902% 
 6903% event PressInflateButton(diver,bc)
 6904event(pressInflateButton(diver, bc)).
 6905
 6906% 
 6907% ectest/ec_reader_test.e:3704
 6908% [diver,bc,time]% 
 6909% Happens(PressDeflateButton(diver,bc),time) ->
 6910% HoldsAt(Vertical(diver),time) &
 6911% HoldsAt(UnderWater(bc),time).
 6912happens(pressDeflateButton(Diver, Bc), Time) ->
 6913	holds_at(vertical(Diver), Time),
 6914	holds_at(underWater(Bc), Time).
 6915
 6916% 
 6917% 
 6918% ectest/ec_reader_test.e:3709
 6919% [diver,bc,time]% 
 6920% Happens(PressDumpButton(diver,bc),time) ->
 6921% HoldsAt(Vertical(diver),time) &
 6922% HoldsAt(UnderWater(bc),time).
 6923happens(pressDumpButton(Diver, Bc), Time) ->
 6924	holds_at(vertical(Diver), Time),
 6925	holds_at(underWater(Bc), Time).
 6926
 6927% 
 6928% 
 6929% ectest/ec_reader_test.e:3714
 6930% [diver,bc,time] % Happens(PressDumpButton(diver,bc),time) ->
 6931% HoldsAt(UncontrolledBuoyancy(diver),time).
 6932happens(pressDumpButton(Diver, Bc), Time) ->
 6933	holds_at(uncontrolledBuoyancy(Diver), Time).
 6934
 6935% 
 6936% 
 6937% ectest/ec_reader_test.e:3717
 6938% [diver,bc,time]% 
 6939% HoldsAt(Wearing(diver,bc),time) ->
 6940% Initiates(PressDeflateButton(diver,bc),NegativelyBuoyant(diver),time).
 6941holds_at(wearing(Diver, Bc), Time) ->
 6942	initiates(pressDeflateButton(Diver, Bc),
 6943		  negativelyBuoyant(Diver),
 6944		  Time).
 6945
 6946% 
 6947% 
 6948% ectest/ec_reader_test.e:3721
 6949% [diver,bc,time]% 
 6950% HoldsAt(Wearing(diver,bc),time) ->
 6951% Terminates(PressDeflateButton(diver,bc),NeutrallyBuoyant(diver),time).
 6952holds_at(wearing(Diver, Bc), Time) ->
 6953	terminates(pressDeflateButton(Diver, Bc),
 6954		   neutrallyBuoyant(Diver),
 6955		   Time).
 6956
 6957% 
 6958% 
 6959% ectest/ec_reader_test.e:3725
 6960% [diver,bc,time]% 
 6961% HoldsAt(Wearing(diver,bc),time) ->
 6962% Terminates(PressDeflateButton(diver,bc),PositivelyBuoyant(diver),time).
 6963holds_at(wearing(Diver, Bc), Time) ->
 6964	terminates(pressDeflateButton(Diver, Bc),
 6965		   positivelyBuoyant(Diver),
 6966		   Time).
 6967
 6968% 
 6969% 
 6970% ectest/ec_reader_test.e:3729
 6971% [diver,bc,time]% 
 6972% HoldsAt(Wearing(diver,bc),time) ->
 6973% Initiates(PressDumpButton(diver,bc),NegativelyBuoyant(diver),time).
 6974holds_at(wearing(Diver, Bc), Time) ->
 6975	initiates(pressDumpButton(Diver, Bc),
 6976		  negativelyBuoyant(Diver),
 6977		  Time).
 6978
 6979% 
 6980% 
 6981% ectest/ec_reader_test.e:3733
 6982% [diver,bc,time]% 
 6983% HoldsAt(Wearing(diver,bc),time) ->
 6984% Terminates(PressDumpButton(diver,bc),NeutrallyBuoyant(diver),time).
 6985holds_at(wearing(Diver, Bc), Time) ->
 6986	terminates(pressDumpButton(Diver, Bc),
 6987		   neutrallyBuoyant(Diver),
 6988		   Time).
 6989
 6990% 
 6991% 
 6992% ectest/ec_reader_test.e:3737
 6993% [diver,bc,time]% 
 6994% HoldsAt(Wearing(diver,bc),time) ->
 6995% Terminates(PressDumpButton(diver,bc),PositivelyBuoyant(diver),time).
 6996holds_at(wearing(Diver, Bc), Time) ->
 6997	terminates(pressDumpButton(Diver, Bc),
 6998		   positivelyBuoyant(Diver),
 6999		   Time).
 7000
 7001% 
 7002% 
 7003% ectest/ec_reader_test.e:3741
 7004% [diver,bc,time]% 
 7005% HoldsAt(Wearing(diver,bc),time) ->
 7006% Initiates(PressInflateButton(diver,bc),NeutrallyBuoyant(diver),time).
 7007holds_at(wearing(Diver, Bc), Time) ->
 7008	initiates(pressInflateButton(Diver, Bc),
 7009		  neutrallyBuoyant(Diver),
 7010		  Time).
 7011
 7012% 
 7013% 
 7014% ectest/ec_reader_test.e:3745
 7015% [diver,bc,time]% 
 7016% HoldsAt(Wearing(diver,bc),time) ->
 7017% Terminates(PressInflateButton(diver,bc),PositivelyBuoyant(diver),time).
 7018holds_at(wearing(Diver, Bc), Time) ->
 7019	terminates(pressInflateButton(Diver, Bc),
 7020		   positivelyBuoyant(Diver),
 7021		   Time).
 7022
 7023% 
 7024% 
 7025% ectest/ec_reader_test.e:3749
 7026% [diver,bc,time]% 
 7027% HoldsAt(Wearing(diver,bc),time) ->
 7028% Terminates(PressInflateButton(diver,bc),NegativelyBuoyant(diver),time).
 7029holds_at(wearing(Diver, Bc), Time) ->
 7030	terminates(pressInflateButton(Diver, Bc),
 7031		   negativelyBuoyant(Diver),
 7032		   Time).
 7033
 7034% 
 7035% 
 7036% ectest/ec_reader_test.e:3753
 7037% [diver,weight,time]% 
 7038% HoldsAt(Wearing(diver,weight),time) ->
 7039% Initiates(TakeOff(diver,weight),PositivelyBuoyant(diver),time).
 7040holds_at(wearing(Diver, Weight), Time) ->
 7041	initiates(takeOff(Diver, Weight),
 7042		  positivelyBuoyant(Diver),
 7043		  Time).
 7044
 7045% 
 7046% 
 7047% ectest/ec_reader_test.e:3757
 7048% [diver,weight,time]% 
 7049% HoldsAt(Wearing(diver,weight),time) ->
 7050% Terminates(TakeOff(diver,weight),NegativelyBuoyant(diver),time).
 7051holds_at(wearing(Diver, Weight), Time) ->
 7052	terminates(takeOff(Diver, Weight),
 7053		   negativelyBuoyant(Diver),
 7054		   Time).
 7055
 7056% 
 7057% 
 7058% ectest/ec_reader_test.e:3761
 7059% [diver,weight,time]% 
 7060% HoldsAt(Wearing(diver,weight),time) ->
 7061% Terminates(TakeOff(diver,weight),NeutrallyBuoyant(diver),time).
 7062holds_at(wearing(Diver, Weight), Time) ->
 7063	terminates(takeOff(Diver, Weight),
 7064		   neutrallyBuoyant(Diver),
 7065		   Time).
 7066
 7067% 
 7068% 
 7069% fluent UncontrolledBuoyancy(diver)
 7070fluent(uncontrolledBuoyancy(diver)).
 7071
 7072% 
 7073% ectest/ec_reader_test.e:3767
 7074% event LoseBuoyancyControl(diver)
 7075event(loseBuoyancyControl(diver)).
 7076
 7077% 
 7078% predicate IsInexperiencedDiver(diver)
 7079predicate(isInexperiencedDiver(diver)).
 7080
 7081% 
 7082% ectest/ec_reader_test.e:3771
 7083% [diver,time]% 
 7084% Happens(LoseBuoyancyControl(diver),time) ->
 7085% IsInexperiencedDiver(diver).
 7086happens(loseBuoyancyControl(Diver), Time) ->
 7087	isInexperiencedDiver(Diver).
 7088
 7089% 
 7090% 
 7091% ectest/ec_reader_test.e:3775
 7092% [diver,time]% 
 7093% Initiates(LoseBuoyancyControl(diver),UncontrolledBuoyancy(diver),time).
 7094initiates(loseBuoyancyControl(Diver), uncontrolledBuoyancy(Diver), Time).
 7095
 7096% 
 7097% 
 7098% ectest/ec_reader_test.e:3778
 7099% [diver,time]% 
 7100% Initiates(LoseBuoyancyControl(diver),PositivelyBuoyant(diver),time).
 7101initiates(loseBuoyancyControl(Diver), positivelyBuoyant(Diver), Time).
 7102
 7103% 
 7104% 
 7105% ectest/ec_reader_test.e:3781
 7106% [diver,time]% 
 7107% Terminates(LoseBuoyancyControl(diver),NegativelyBuoyant(diver),time).
 7108terminates(loseBuoyancyControl(Diver), negativelyBuoyant(Diver), Time).
 7109
 7110% 
 7111% 
 7112% ectest/ec_reader_test.e:3784
 7113% [diver,time]% 
 7114% Terminates(LoseBuoyancyControl(diver),NeutrallyBuoyant(diver),time).
 7115terminates(loseBuoyancyControl(Diver), neutrallyBuoyant(Diver), Time).
 7116
 7117% 
 7118% 
 7119% ; determining fluent
 7120% fluent AscendDescendAmount(diver,depth)
 7121fluent(ascendDescendAmount(diver, depth)).
 7122
 7123% noninertial AscendDescendAmount
 7124noninertial(ascendDescendAmount).
 7125
 7126% ectest/ec_reader_test.e:3790
 7127% 
 7128% ectest/ec_reader_test.e:3791
 7129% [diver,depth1,depth2,time]% 
 7130% HoldsAt(AscendDescendAmount(diver,depth1),time) &
 7131% HoldsAt(AscendDescendAmount(diver,depth2),time) ->
 7132% depth1=depth2.
 7133holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(ascendDescendAmount(Diver, Depth2), Time) ->
 7134	Depth1=Depth2.
 7135
 7136% 
 7137% 
 7138% ectest/ec_reader_test.e:3796
 7139% [diver,depth,time]% 
 7140% Happens(Descend(diver,depth),time) ->
 7141% HoldsAt(NegativelyBuoyant(diver),time) &
 7142% ({depth1}
 7143%  HoldsAt(AscendDescendAmount(diver,depth1),time) &
 7144%  HoldsAt(AtDepth(diver,depth-depth1),time)).
 7145happens(descend(Diver, Depth), Time) ->
 7146	holds_at(negativelyBuoyant(Diver), Time),
 7147	exists([Depth1],
 7148	       (holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(atDepth(Diver, Depth-Depth1), Time))).
 7149
 7150% 
 7151% ectest/ec_reader_test.e:3802
 7152% 
 7153% event KickUp(diver)
 7154event(kickUp(diver)).
 7155
 7156% 
 7157% ectest/ec_reader_test.e:3805
 7158% [diver,depth,time]% 
 7159% Happens(Ascend(diver,depth),time) ->
 7160% (HoldsAt(PositivelyBuoyant(diver),time) |
 7161%  (HoldsAt(NeutrallyBuoyant(diver),time) & Happens(KickUp(diver),time))) &
 7162% ({depth1}
 7163%  HoldsAt(AscendDescendAmount(diver,depth1),time) &
 7164%  HoldsAt(AtDepth(diver,depth+depth1),time)).
 7165happens(ascend(Diver, Depth), Time) ->
 7166	(   holds_at(positivelyBuoyant(Diver), Time)
 7167	;   holds_at(neutrallyBuoyant(Diver), Time),
 7168	    happens(kickUp(Diver), Time)
 7169	),
 7170	exists([Depth1],
 7171	       (holds_at(ascendDescendAmount(Diver, Depth1), Time), holds_at(atDepth(Diver, Depth+Depth1), Time))).
 7172
 7173% ectest/ec_reader_test.e:3811
 7174% 
 7175% 
 7176% ectest/ec_reader_test.e:3813
 7177% [diver,time]% 
 7178% Happens(KickUp(diver),time) ->
 7179% HoldsAt(Vertical(diver),time).
 7180happens(kickUp(Diver), Time) ->
 7181	holds_at(vertical(Diver), Time).
 7182
 7183% 
 7184% 
 7185% event SwimAround(diver)
 7186event(swimAround(diver)).
 7187
 7188% 
 7189% ectest/ec_reader_test.e:3819
 7190% [diver,time]% 
 7191% Happens(SwimAround(diver),time) ->
 7192% HoldsAt(HorizontalDown(diver),time).
 7193happens(swimAround(Diver), Time) ->
 7194	holds_at(horizontalDown(Diver), Time).
 7195
 7196% 
 7197% 
 7198% ; signaling
 7199% 
 7200% ectest/ec_reader_test.e:3825
 7201% event SignalDescend(diver,diver)
 7202event(signalDescend(diver, diver)).
 7203
 7204% 
 7205% event SignalOutOfTime(diver,diver)
 7206event(signalOutOfTime(diver, diver)).
 7207
 7208% 
 7209% event SignalAscend(diver,diver)
 7210event(signalAscend(diver, diver)).
 7211
 7212% 
 7213% ;[diver1,diver2,time]
 7214% ;Happens(SignalAscend(diver1,diver2),time) ->
 7215% ;Happens(SignalOutOfTime(diver1,diver2),time-1).
 7216% ectest/ec_reader_test.e:3834
 7217% 
 7218% ;[diver1,diver2,time]
 7219% ;Happens(SignalDescend(diver1,diver2),time) ->
 7220% ;HoldsAt(See(diver1,diver2),time) &
 7221% ;HoldsAt(See(diver2,diver1),time).
 7222% 
 7223% ;[diver1,diver2,time]
 7224% ;Happens(SignalOutOfTime(diver1,diver2),time) ->
 7225% ;HoldsAt(See(diver1,diver2),time) &
 7226% ;HoldsAt(See(diver2,diver1),time).
 7227% ectest/ec_reader_test.e:3844
 7228% 
 7229% ;[diver1,diver2,time]
 7230% ;Happens(SignalAscend(diver1,diver2),time) ->
 7231% ;HoldsAt(See(diver1,diver2),time) &
 7232% ;HoldsAt(See(diver2,diver1),time).
 7233% 
 7234% ;event LookAt(agent,object)
 7235% ectest/ec_reader_test.e:3851
 7236% 
 7237% ;fluent See(agent,object)
 7238% 
 7239% ;[agent,object,time]
 7240% ;Initiates(LookAt(agent,object),See(agent,object),time).
 7241% 
 7242% ;[agent,object1,object2,time]
 7243% ;object1!=object2 ->
 7244% ;Terminates(LookAt(agent,object1),
 7245% ;           See(agent,object2),
 7246% ;           time).
 7247% ectest/ec_reader_test.e:3862
 7248% 
 7249% event Descend1(diver)
 7250event(descend1(diver)).
 7251
 7252% 
 7253% event Ascend1(diver)
 7254event(ascend1(diver)).
 7255
 7256% 
 7257% ;[diver,object,time]
 7258% ;Terminates(Descend1(diver),See(diver,object),time).
 7259% ectest/ec_reader_test.e:3869
 7260% 
 7261% ;[diver,object,time]
 7262% ;Terminates(Ascend1(diver),See(diver,object),time).
 7263% 
 7264% ;[diver,object,time]
 7265% ;Terminates(RotateYaw(diver),See(diver,object),time).
 7266% ectest/ec_reader_test.e:3875
 7267% 
 7268% event RapidAscendToSurface(diver)
 7269event(rapidAscendToSurface(diver)).
 7270
 7271% 
 7272% ectest/ec_reader_test.e:3878
 7273% [diver,time]% 
 7274% Happens(Descend1(diver),time) <->
 7275% ({depth} Happens(Descend(diver,depth),time)).
 7276happens(descend1(Diver), Time) <->
 7277	exists([Depth],
 7278	       happens(descend(Diver, Depth), Time)).
 7279
 7280% 
 7281% 
 7282% ectest/ec_reader_test.e:3882
 7283% [diver,time]% 
 7284% Happens(Ascend1(diver),time) <->
 7285% ({depth} Happens(Ascend(diver,depth),time)).
 7286happens(ascend1(Diver), Time) <->
 7287	exists([Depth],
 7288	       happens(ascend(Diver, Depth), Time)).
 7289
 7290% 
 7291% 
 7292% ectest/ec_reader_test.e:3886
 7293% [diver,time]% 
 7294% Happens(RapidAscendToSurface(diver),time) ->
 7295% Happens(Ascend(diver,0),time).
 7296happens(rapidAscendToSurface(Diver), Time) ->
 7297	happens(ascend(Diver, 0), Time).
 7298
 7299% 
 7300% 
 7301% event AscendLine(diver,line)
 7302event(ascendLine(diver, line)).
 7303
 7304% 
 7305% ectest/ec_reader_test.e:3892
 7306% [diver,line,time]% 
 7307% Happens(AscendLine(diver,line),time) ->
 7308% Happens(Ascend1(diver),time).
 7309happens(ascendLine(Diver, Line), Time) ->
 7310	happens(ascend1(Diver), Time).
 7311
 7312% 
 7313% 
 7314% fluent Disoriented(diver)
 7315fluent(disoriented(diver)).
 7316
 7317% 
 7318% ectest/ec_reader_test.e:3898
 7319% event BecomeDisoriented(diver)
 7320event(becomeDisoriented(diver)).
 7321
 7322% 
 7323% event BecomeReoriented(diver)
 7324event(becomeReoriented(diver)).
 7325
 7326% 
 7327% ectest/ec_reader_test.e:3902
 7328% [diver,time]% 
 7329% Initiates(BecomeDisoriented(diver),Disoriented(diver),time).
 7330initiates(becomeDisoriented(Diver), disoriented(Diver), Time).
 7331
 7332% 
 7333% 
 7334% ectest/ec_reader_test.e:3905
 7335% [diver,time]% 
 7336% Terminates(BecomeReoriented(diver),Disoriented(diver),time).
 7337terminates(becomeReoriented(Diver), disoriented(Diver), Time).
 7338
 7339% 
 7340% 
 7341% fluent DisturbedSilt()
 7342fluent(disturbedSilt()).
 7343
 7344% 
 7345% event DisturbSilt(diver)
 7346event(disturbSilt(diver)).
 7347
 7348% ectest/ec_reader_test.e:3911
 7349% 
 7350% ectest/ec_reader_test.e:3912
 7351% [diver,time]% 
 7352% Initiates(DisturbSilt(diver),DisturbedSilt(),time).
 7353initiates(disturbSilt(Diver), disturbedSilt(), Time).
 7354
 7355% 
 7356% 
 7357% ectest/ec_reader_test.e:3915
 7358% [diver,time]% 
 7359% Happens(BecomeDisoriented(diver),time) ->
 7360% (!HoldsAt(DisturbedSilt(),time-1) &
 7361%  HoldsAt(DisturbedSilt(),time)).
 7362happens(becomeDisoriented(Diver), Time) ->
 7363	not(holds_at(disturbedSilt(), Time-1)),
 7364	holds_at(disturbedSilt(), Time).
 7365
 7366% 
 7367% 
 7368% event Panic(diver)
 7369event(panic(diver)).
 7370
 7371% ectest/ec_reader_test.e:3921
 7372% 
 7373% ectest/ec_reader_test.e:3922
 7374% [diver,time] % Happens(Panic(diver),time) ->
 7375% HoldsAt(Disoriented(diver),time) |
 7376% HoldsAt(UncontrolledBuoyancy(diver),time) |
 7377% ({equipment} Happens(Lose(diver,equipment),time-1)) |
 7378% Happens(Vomit(diver),time-1).
 7379(   ( happens(panic(Diver), Time)->holds_at(disoriented(Diver), Time)
 7380    )
 7381;   holds_at(uncontrolledBuoyancy(Diver), Time)
 7382;   exists([Equipment],
 7383	   happens(lose(Diver, Equipment), Time-1))
 7384;   happens(vomit(Diver), Time-1)
 7385).
 7386
 7387% 
 7388% 
 7389% ectest/ec_reader_test.e:3928
 7390% event Vomit(diver)
 7391event(vomit(diver)).
 7392
 7393% 
 7394% ; conditions
 7395% 
 7396% fluent Unconscious(diver)
 7397fluent(unconscious(diver)).
 7398
 7399% 
 7400% ectest/ec_reader_test.e:3934
 7401% event GoUnconscious(diver)
 7402event(goUnconscious(diver)).
 7403
 7404% 
 7405% event RegainConsciousness(diver)
 7406event(regainConsciousness(diver)).
 7407
 7408% 
 7409% ectest/ec_reader_test.e:3938
 7410% [diver,time]% 
 7411% Initiates(GoUnconscious(diver),Unconscious(diver),time).
 7412initiates(goUnconscious(Diver), unconscious(Diver), Time).
 7413
 7414% 
 7415% 
 7416% ectest/ec_reader_test.e:3941
 7417% [diver,time]% 
 7418% Terminates(RegainConsciousness(diver),Unconscious(diver),time).
 7419terminates(regainConsciousness(Diver), unconscious(Diver), Time).
 7420
 7421% 
 7422% 
 7423% ectest/ec_reader_test.e:3944
 7424% [diver,time]% 
 7425% Happens(GoUnconscious(diver),time) ->
 7426% Happens(RapidAscendToSurface(diver),time).
 7427happens(goUnconscious(Diver), Time) ->
 7428	happens(rapidAscendToSurface(Diver), Time).
 7429
 7430% 
 7431% 
 7432% fluent HasEarPain(diver)
 7433fluent(hasEarPain(diver)).
 7434
 7435% 
 7436% ectest/ec_reader_test.e:3950
 7437% event StartEarPain(diver)
 7438event(startEarPain(diver)).
 7439
 7440% 
 7441% ectest/ec_reader_test.e:3952
 7442% [diver,time] % Initiates(StartEarPain(diver),HasEarPain(diver),time).
 7443initiates(startEarPain(Diver), hasEarPain(Diver), Time).
 7444
 7445% 
 7446% 
 7447% fluent HasRupturedEardrum(diver)
 7448fluent(hasRupturedEardrum(diver)).
 7449
 7450% 
 7451% event RuptureEardrum(diver)
 7452event(ruptureEardrum(diver)).
 7453
 7454% 
 7455% ectest/ec_reader_test.e:3958
 7456% [diver,time]% 
 7457% Initiates(RuptureEardrum(diver),HasRupturedEardrum(diver),time).
 7458initiates(ruptureEardrum(Diver), hasRupturedEardrum(Diver), Time).
 7459
 7460% 
 7461% fluent ConditionOK(diver)
 7462fluent(conditionOK(diver)).
 7463
 7464% 
 7465% fluent HasDecompressionIllness(diver)
 7466fluent(hasDecompressionIllness(diver)).
 7467
 7468% 
 7469% ectest/ec_reader_test.e:3964
 7470% event StartDecompressionIllness(diver)
 7471event(startDecompressionIllness(diver)).
 7472
 7473% 
 7474% ectest/ec_reader_test.e:3966
 7475% [diver,time]% 
 7476% Initiates(StartDecompressionIllness(diver),
 7477%           HasDecompressionIllness(diver),
 7478%           time).
 7479initiates(startDecompressionIllness(Diver), hasDecompressionIllness(Diver), Time).
 7480
 7481% 
 7482% 
 7483% fluent SignalingDecompress(computer,diver)
 7484fluent(signalingDecompress(computer, diver)).
 7485
 7486% ectest/ec_reader_test.e:3972
 7487% 
 7488% fluent SignalingLowOnAir(computer,airtank,diver)
 7489fluent(signalingLowOnAir(computer, airtank, diver)).
 7490
 7491% 
 7492% ectest/ec_reader_test.e:3975
 7493% [computer,airtank,diver,time]% 
 7494% HoldsAt(SignalingLowOnAir(computer,airtank,diver),time) ->
 7495% HoldsAt(LowOnAir(airtank),time).
 7496holds_at(signalingLowOnAir(Computer, Airtank, Diver), Time) ->
 7497	holds_at(lowOnAir(Airtank), Time).
 7498
 7499% 
 7500% 
 7501% ectest/ec_reader_test.e:3979
 7502% [computer,diver,time]% 
 7503% HoldsAt(SignalingDecompress(computer,diver),time) ->
 7504% !{time1} time1<time & Happens(Decompress(diver),time1).
 7505holds_at(signalingDecompress(Computer, Diver), Time) ->
 7506	not(exists([Time1],
 7507		   (Time1<Time, happens(decompress(Diver), Time1)))).
 7508
 7509% 
 7510% 
 7511% event Decompress(diver)
 7512event(decompress(diver)).
 7513
 7514% 
 7515% ectest/ec_reader_test.e:3985
 7516% event EqualizeEars(diver)
 7517event(equalizeEars(diver)).
 7518
 7519% 
 7520% ectest/ec_reader_test.e:3987
 7521% [diver,time]% 
 7522% (Happens(Descend1(diver),time) | Happens(Ascend1(diver),time)) &
 7523% !Happens(EqualizeEars(diver),time) ->
 7524% Happens(StartEarPain(diver),time) &
 7525% Happens(RuptureEardrum(diver),time).
 7526(happens(descend1(Diver), Time);happens(ascend1(Diver), Time)), not(happens(equalizeEars(Diver), Time)) ->
 7527	happens(startEarPain(Diver), Time),
 7528	happens(ruptureEardrum(Diver), Time).
 7529
 7530% 
 7531% 
 7532% ectest/ec_reader_test.e:3993
 7533% [diver,time]% 
 7534% Happens(Ascend1(diver),time) &
 7535% !Happens(Decompress(diver),time) ->
 7536% Happens(StartDecompressionIllness(diver),time).
 7537happens(ascend1(Diver), Time), not(happens(decompress(Diver), Time)) ->
 7538	happens(startDecompressionIllness(Diver), Time).
 7539
 7540% 
 7541% 
 7542% ectest/ec_reader_test.e:3998
 7543% [diver1,diver2,time]% 
 7544% HoldsAt(Holding(diver1,diver2),time) &
 7545% Happens(Ascend1(diver1),time) &
 7546% !Happens(Decompress(diver2),time) ->
 7547% Happens(StartDecompressionIllness(diver2),time).
 7548holds_at(holding(Diver1, Diver2), Time), happens(ascend1(Diver1), Time), not(happens(decompress(Diver2), Time)) ->
 7549	happens(startDecompressionIllness(Diver2), Time).
 7550
 7551% 
 7552% 
 7553% ectest/ec_reader_test.e:4004
 7554% [diver,time]% 
 7555% Happens(Decompress(diver),time) ->
 7556% ({depth} depth>0 & HoldsAt(AtDepth(diver,depth),time)) &
 7557% !HoldsAt(UncontrolledBuoyancy(diver),time).
 7558happens(decompress(Diver), Time) ->
 7559	exists([Depth],
 7560	       (Depth>0, holds_at(atDepth(Diver, Depth), Time))),
 7561	not(holds_at(uncontrolledBuoyancy(Diver), Time)).
 7562
 7563% 
 7564% 
 7565% fluent HasHeadache(diver)
 7566fluent(hasHeadache(diver)).
 7567
 7568% ectest/ec_reader_test.e:4010
 7569% 
 7570% ectest/ec_reader_test.e:4011
 7571% [diver,time]% 
 7572% HoldsAt(ConditionOK(diver),time) ->
 7573% !HoldsAt(Unconscious(diver),time) &
 7574% !HoldsAt(HasEarPain(diver),time) &
 7575% !HoldsAt(HasRupturedEardrum(diver),time) &
 7576% !HoldsAt(HasDecompressionIllness(diver),time) &
 7577% !HoldsAt(HasHeadache(diver),time).
 7578holds_at(conditionOK(Diver), Time) ->
 7579	not(holds_at(unconscious(Diver), Time)),
 7580	not(holds_at(hasEarPain(Diver), Time)),
 7581	not(holds_at(hasRupturedEardrum(Diver), Time)),
 7582	not(holds_at(hasDecompressionIllness(Diver), Time)),
 7583	not(holds_at(hasHeadache(Diver), Time)).
 7584
 7585% ectest/ec_reader_test.e:4017
 7586% 
 7587% 
 7588% event BeAirlifted(diver)
 7589event(beAirlifted(diver)).
 7590
 7591% 
 7592% event TakeInWater(diver)
 7593event(takeInWater(diver)).
 7594
 7595% 
 7596% ectest/ec_reader_test.e:4023
 7597% fluent LowOnAir(airtank)
 7598fluent(lowOnAir(airtank)).
 7599
 7600% 
 7601% event BecomeLowOnAir(airtank)
 7602event(becomeLowOnAir(airtank)).
 7603
 7604% 
 7605% ectest/ec_reader_test.e:4027
 7606% [airtank,time]% 
 7607% Initiates(BecomeLowOnAir(airtank),LowOnAir(airtank),time).
 7608initiates(becomeLowOnAir(Airtank), lowOnAir(Airtank), Time).
 7609
 7610% 
 7611% 
 7612% ; initial state
 7613% ectest/ec_reader_test.e:4031
 7614% [diver] % HoldsAt(ConditionOK(diver),0).
 7615holds_at(conditionOK(Diver), 0).
 7616
 7617% 
 7618% ectest/ec_reader_test.e:4032
 7619% [diver] % HoldsAt(Vertical(diver),0).
 7620holds_at(vertical(Diver), 0).
 7621
 7622% 
 7623% !HoldsAt(DisturbedSilt(),0).
 7624not(holds_at(disturbedSilt(), 0)).
 7625
 7626% 
 7627% ectest/ec_reader_test.e:4034
 7628% [diver] % !HoldsAt(UncontrolledBuoyancy(diver),0).
 7629not(holds_at(uncontrolledBuoyancy(Diver), 0)).
 7630
 7631% 
 7632% ectest/ec_reader_test.e:4035
 7633% [diver] % !HoldsAt(Disoriented(diver),0).
 7634not(holds_at(disoriented(Diver), 0)).
 7635
 7636% 
 7637% ectest/ec_reader_test.e:4036
 7638% [diver] % !HoldsAt(PositivelyBuoyant(diver),0) &
 7639%         !HoldsAt(NeutrallyBuoyant(diver),0) &
 7640%         !HoldsAt(NegativelyBuoyant(diver),0).
 7641not(holds_at(positivelyBuoyant(Diver), 0)),
 7642not(holds_at(neutrallyBuoyant(Diver), 0)),
 7643not(holds_at(negativelyBuoyant(Diver), 0)).
 7644
 7645% 
 7646% ectest/ec_reader_test.e:4039
 7647% [diver,object] % !HoldsAt(Wearing(diver,object),0).
 7648not(holds_at(wearing(Diver, Object), 0)).
 7649
 7650% 
 7651% ectest/ec_reader_test.e:4040
 7652% [diver,object] % !HoldsAt(Holding(diver,object),0).
 7653not(holds_at(holding(Diver, Object), 0)).
 7654
 7655% 
 7656% ectest/ec_reader_test.e:4041
 7657% [diver1,diver2] % !HoldsAt(Separated(diver1,diver2),0).
 7658not(holds_at(separated(Diver1, Diver2), 0)).
 7659
 7660% 
 7661% ;[agent,object] !HoldsAt(See(agent,object),0).
 7662% 
 7663% fluent Separated(diver,diver)
 7664fluent(separated(diver, diver)).
 7665
 7666% 
 7667% ectest/ec_reader_test.e:4046
 7668% [diver1,diver2,time]% 
 7669% HoldsAt(Separated(diver1,diver2),time) ->
 7670% HoldsAt(Separated(diver2,diver1),time).
 7671holds_at(separated(Diver1, Diver2), Time) ->
 7672	holds_at(separated(Diver2, Diver1), Time).
 7673
 7674% 
 7675% 
 7676% event BecomeSeparated(diver,diver)
 7677event(becomeSeparated(diver, diver)).
 7678
 7679% 
 7680% ectest/ec_reader_test.e:4052
 7681% event BeReunitedWith(diver,diver)
 7682event(beReunitedWith(diver, diver)).
 7683
 7684% 
 7685% ectest/ec_reader_test.e:4054
 7686% [diver1,diver2,time]% 
 7687% Initiates(BecomeSeparated(diver1,diver2),Separated(diver1,diver2),time).
 7688initiates(becomeSeparated(Diver1, Diver2), separated(Diver1, Diver2), Time).
 7689
 7690% 
 7691% 
 7692% ectest/ec_reader_test.e:4057
 7693% [diver1,diver2,time]% 
 7694% Initiates(BecomeSeparated(diver1,diver2),Separated(diver2,diver1),time).
 7695initiates(becomeSeparated(Diver1, Diver2), separated(Diver2, Diver1), Time).
 7696
 7697% 
 7698% 
 7699% ectest/ec_reader_test.e:4060
 7700% [diver1,diver2,time]% 
 7701% Terminates(BeReunitedWith(diver1,diver2),Separated(diver1,diver2),time).
 7702terminates(beReunitedWith(Diver1, Diver2), separated(Diver1, Diver2), Time).
 7703
 7704% 
 7705% 
 7706% ectest/ec_reader_test.e:4063
 7707% [diver1,diver2,time]% 
 7708% Terminates(BeReunitedWith(diver1,diver2),Separated(diver2,diver1),time).
 7709terminates(beReunitedWith(Diver1, Diver2), separated(Diver2, Diver1), Time).
 7710
 7711% 
 7712% 
 7713% ; End of file.
 7714% 
 7715% 
 7716% ectest/ec_reader_test.e:4069
 7717% 
 7718% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7719% ; FILE: ecnet/Dress.e
 7720% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7721% 
 7722% ;
 7723% ; Copyright (c) 2005 IBM Corporation and others.
 7724% ; All rights reserved. This program and the accompanying materials
 7725% ; are made available under the terms of the Common Public License v1.0
 7726% ; which accompanies this distribution, and is available at
 7727% ; http://www.eclipse.org/legal/cpl-v10.html
 7728% ;
 7729% ; Contributors:
 7730% ; IBM - Initial implementation
 7731% ;
 7732% ; Dress
 7733% ; (cf Sleep)
 7734% ;
 7735% ectest/ec_reader_test.e:4087
 7736% 
 7737% event PutOn(agent,clothing)
 7738event(putOn(agent, clothing)).
 7739
 7740% 
 7741% event TakeOff(agent,clothing)
 7742event(takeOff(agent, clothing)).
 7743
 7744% 
 7745% fluent Wearing(agent,clothing)
 7746fluent(wearing(agent, clothing)).
 7747
 7748% ectest/ec_reader_test.e:4093
 7749% 
 7750% ectest/ec_reader_test.e:4094
 7751% [agent,clothing,time]% 
 7752% Initiates(PutOn(agent,clothing),
 7753%           Wearing(agent,clothing),
 7754%           time).
 7755initiates(putOn(Agent, Clothing), wearing(Agent, Clothing), Time).
 7756
 7757% 
 7758% 
 7759% ectest/ec_reader_test.e:4099
 7760% [agent,clothing,time]% 
 7761% Happens(PutOn(agent,clothing),time) ->
 7762% !HoldsAt(Wearing(agent,clothing),time) &
 7763% ectest/ec_reader_test.e:4102
 7764% {location}%  HoldsAt(At(agent,location),time) &
 7765%            HoldsAt(At(clothing,location),time).
 7766exists([Location],  (happens(putOn(Agent, Clothing), Time)->not(holds_at(wearing(Agent, Clothing), Time)), holds_at(at(Agent, Location), Time), holds_at(at(Clothing, Location), Time))).
 7767
 7768% 
 7769% 
 7770% ectest/ec_reader_test.e:4105
 7771% [agent,clothing,time]% 
 7772% Terminates(TakeOff(agent,clothing),
 7773%            Wearing(agent,clothing),
 7774%            time).
 7775terminates(takeOff(Agent, Clothing), wearing(Agent, Clothing), Time).
 7776
 7777% 
 7778% 
 7779% ectest/ec_reader_test.e:4110
 7780% [agent,clothing,time]% 
 7781% Happens(TakeOff(agent,clothing),time) ->
 7782% HoldsAt(Wearing(agent,clothing),time).
 7783happens(takeOff(Agent, Clothing), Time) ->
 7784	holds_at(wearing(Agent, Clothing), Time).
 7785
 7786% 
 7787% 
 7788% ectest/ec_reader_test.e:4114
 7789% [agent,clothing,location,time]% 
 7790% Releases(PutOn(agent,clothing),At(clothing,location),time).
 7791releases(putOn(Agent, Clothing), at(Clothing, Location), Time).
 7792
 7793% 
 7794% 
 7795% ectest/ec_reader_test.e:4117
 7796% [agent,clothing,location,time]% 
 7797% HoldsAt(Wearing(agent,clothing),time) &
 7798% HoldsAt(At(agent,location),time) ->
 7799% HoldsAt(At(clothing,location),time).
 7800holds_at(wearing(Agent, Clothing), Time), holds_at(at(Agent, Location), Time) ->
 7801	holds_at(at(Clothing, Location), Time).
 7802
 7803% 
 7804% 
 7805% ;[agent,clothing,location1,location2,time]
 7806% ;HoldsAt(At(agent,location1),time) &
 7807% ;location1 != location2 ->
 7808% ;Terminates(TakeOff(agent,clothing),At(clothing,location2),time).
 7809% ectest/ec_reader_test.e:4126
 7810% 
 7811% ectest/ec_reader_test.e:4127
 7812% [agent,clothing,location,time]% 
 7813% HoldsAt(At(agent,location),time) ->
 7814% Initiates(TakeOff(agent,clothing),At(clothing,location),time).
 7815holds_at(at(Agent, Location), Time) ->
 7816	initiates(takeOff(Agent, Clothing),
 7817		  at(Clothing, Location),
 7818		  Time).
 7819
 7820% 
 7821% 
 7822% ; End of file.
 7823% 
 7824% ectest/ec_reader_test.e:4133
 7825% 
 7826% 
 7827% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7828% ; FILE: ecnet/HungerNeed.e
 7829% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7830% 
 7831% ;
 7832% ; Copyright (c) 2005 IBM Corporation and others.
 7833% ; All rights reserved. This program and the accompanying materials
 7834% ; are made available under the terms of the Common Public License v1.0
 7835% ; which accompanies this distribution, and is available at
 7836% ; http://www.eclipse.org/legal/cpl-v10.html
 7837% ;
 7838% ; Contributors:
 7839% ; IBM - Initial implementation
 7840% ;
 7841% ; hunger need
 7842% ;
 7843% ectest/ec_reader_test.e:4151
 7844% 
 7845% fluent Hungry(agent)
 7846fluent(hungry(agent)).
 7847
 7848% 
 7849% fluent Satiated(agent)
 7850fluent(satiated(agent)).
 7851
 7852% noninertial Satiated
 7853noninertial(satiated).
 7854
 7855% 
 7856% ectest/ec_reader_test.e:4157
 7857% [agent,time] % HoldsAt(Hungry(agent),time) <-> !HoldsAt(Satiated(agent),time).
 7858holds_at(hungry(Agent), Time) <->
 7859	not(holds_at(satiated(Agent), Time)).
 7860
 7861% 
 7862% 
 7863% event Eat(agent,food)
 7864event(eat(agent, food)).
 7865
 7866% 
 7867% ectest/ec_reader_test.e:4161
 7868% [agent,food,time]% 
 7869% Happens(Eat(agent,food),time) ->
 7870% ectest/ec_reader_test.e:4163
 7871% {location}% 
 7872% HoldsAt(At(agent,location),time) &
 7873% HoldsAt(At(food,location),time).
 7874exists([Location],  (happens(eat(Agent, Food), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Food, Location), Time))).
 7875
 7876% 
 7877% 
 7878% ectest/ec_reader_test.e:4167
 7879% [agent,food,time]% 
 7880% Terminates(Eat(agent,food),Hungry(agent),time).
 7881terminates(eat(Agent, Food), hungry(Agent), Time).
 7882
 7883% 
 7884% 
 7885% ; End of file.
 7886% 
 7887% 
 7888% ectest/ec_reader_test.e:4173
 7889% 
 7890% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7891% ; FILE: ecnet/Restaurant.e
 7892% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 7893% 
 7894% ;
 7895% ; Copyright (c) 2005 IBM Corporation and others.
 7896% ; All rights reserved. This program and the accompanying materials
 7897% ; are made available under the terms of the Common Public License v1.0
 7898% ; which accompanies this distribution, and is available at
 7899% ; http://www.eclipse.org/legal/cpl-v10.html
 7900% ;
 7901% ; Contributors:
 7902% ; IBM - Initial implementation
 7903% ;
 7904% ectest/ec_reader_test.e:4188
 7905% sort restaurant: script
 7906subsort(restaurant, script).
 7907
 7908% sort waiter: agent
 7909subsort(waiter, agent).
 7910
 7911% sort cook: agent
 7912subsort(cook, agent).
 7913
 7914% 
 7915% function BillOf(restaurant): bill
 7916function(billOf(restaurant), bill).
 7917
 7918% function CookOf(restaurant): cook
 7919function(cookOf(restaurant), cook).
 7920
 7921% ectest/ec_reader_test.e:4194
 7922% function TableOf(restaurant): table
 7923function(tableOf(restaurant), table).
 7924
 7925% function WaiterOf(restaurant): waiter
 7926function(waiterOf(restaurant), waiter).
 7927
 7928% function KitchenDoorOf(restaurant): door
 7929function(kitchenDoorOf(restaurant), door).
 7930
 7931% 
 7932% ; awaiting customer/waiter has set down bill on customer's table
 7933% fluent BeWaiter0(waiter)
 7934fluent(beWaiter0(waiter)).
 7935
 7936% ectest/ec_reader_test.e:4200
 7937% 
 7938% ; awaiting customer order
 7939% fluent BeWaiter1(waiter)
 7940fluent(beWaiter1(waiter)).
 7941
 7942% 
 7943% ; has customer order
 7944% fluent BeWaiter2(waiter)
 7945fluent(beWaiter2(waiter)).
 7946
 7947% ectest/ec_reader_test.e:4206
 7948% 
 7949% ; in kitchen
 7950% fluent BeWaiter3(waiter)
 7951fluent(beWaiter3(waiter)).
 7952
 7953% 
 7954% ; awaiting preparation of order
 7955% fluent BeWaiter4(waiter)
 7956fluent(beWaiter4(waiter)).
 7957
 7958% ectest/ec_reader_test.e:4212
 7959% 
 7960% ; has order
 7961% fluent BeWaiter5(waiter)
 7962fluent(beWaiter5(waiter)).
 7963
 7964% 
 7965% ; back in dining room
 7966% fluent BeWaiter6(waiter)
 7967fluent(beWaiter6(waiter)).
 7968
 7969% ectest/ec_reader_test.e:4218
 7970% 
 7971% ; order delivered to customer (can ask if all is OK)
 7972% fluent BeWaiter7(waiter)
 7973fluent(beWaiter7(waiter)).
 7974
 7975% 
 7976% ; customer has requested bill
 7977% fluent BeWaiter8(waiter)
 7978fluent(beWaiter8(waiter)).
 7979
 7980% ectest/ec_reader_test.e:4224
 7981% 
 7982% ; waiter is holding bill
 7983% fluent BeWaiter9(waiter)
 7984fluent(beWaiter9(waiter)).
 7985
 7986% 
 7987% xor BeWaiter0, BeWaiter1, BeWaiter2, BeWaiter3, BeWaiter4, BeWaiter5, BeWaiter6, BeWaiter7, BeWaiter8, BeWaiter9
 7988xor([beWaiter0, beWaiter1, beWaiter2, beWaiter3, beWaiter4, beWaiter5, beWaiter6, beWaiter7, beWaiter8, beWaiter9]).
 7989
 7990% 
 7991% ectest/ec_reader_test.e:4230
 7992% [waiter,agent,time]% 
 7993% HoldsAt(BeWaiter0(waiter),time) ->
 7994% Terminates(Greet(waiter,agent),
 7995%            BeWaiter0(waiter),
 7996%            time).
 7997holds_at(beWaiter0(Waiter), Time) ->
 7998	terminates(greet(Waiter, Agent),
 7999		   beWaiter0(Waiter),
 8000		   Time).
 8001
 8002% 
 8003% 
 8004% ectest/ec_reader_test.e:4236
 8005% [waiter,agent,time]% 
 8006% HoldsAt(BeWaiter0(waiter),time) ->
 8007% Initiates(Greet(waiter,agent),
 8008%           BeWaiter1(waiter),
 8009%           time).
 8010holds_at(beWaiter0(Waiter), Time) ->
 8011	initiates(greet(Waiter, Agent),
 8012		  beWaiter1(Waiter),
 8013		  Time).
 8014
 8015% 
 8016% 
 8017% ectest/ec_reader_test.e:4242
 8018% [waiter,agent,food,time]% 
 8019% HoldsAt(BeWaiter1(waiter),time) ->
 8020% Terminates(Order(agent,waiter,food),
 8021%            BeWaiter1(waiter),
 8022%            time).
 8023holds_at(beWaiter1(Waiter), Time) ->
 8024	terminates(order(Agent, Waiter, Food),
 8025		   beWaiter1(Waiter),
 8026		   Time).
 8027
 8028% 
 8029% 
 8030% ectest/ec_reader_test.e:4248
 8031% [waiter,agent,food,time]% 
 8032% HoldsAt(BeWaiter1(waiter),time) ->
 8033% Initiates(Order(agent,waiter,food),
 8034%           BeWaiter2(waiter),
 8035%           time).
 8036holds_at(beWaiter1(Waiter), Time) ->
 8037	initiates(order(Agent, Waiter, Food),
 8038		  beWaiter2(Waiter),
 8039		  Time).
 8040
 8041% 
 8042% 
 8043% ectest/ec_reader_test.e:4254
 8044% [restaurant,waiter,time]% 
 8045% WaiterOf(restaurant)=waiter &
 8046% HoldsAt(BeWaiter2(waiter),time) ->
 8047% Happens(WalkThroughDoor12(waiter,KitchenDoorOf(restaurant)),time).
 8048waiterOf(Restaurant)=Waiter, holds_at(beWaiter2(Waiter), Time) ->
 8049	happens(walkThroughDoor12(Waiter,
 8050				  kitchenDoorOf(Restaurant)),
 8051		Time).
 8052
 8053% 
 8054% 
 8055% ectest/ec_reader_test.e:4259
 8056% [restaurant,waiter,door,time]% 
 8057% HoldsAt(BeWaiter2(waiter),time) &
 8058% WaiterOf(restaurant)=waiter &
 8059% KitchenDoorOf(restaurant)=door ->
 8060% Terminates(WalkThroughDoor12(waiter,door),
 8061%            BeWaiter2(waiter),
 8062%            time).
 8063holds_at(beWaiter2(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 8064	terminates(walkThroughDoor12(Waiter, Door),
 8065		   beWaiter2(Waiter),
 8066		   Time).
 8067
 8068% ectest/ec_reader_test.e:4265
 8069% 
 8070% 
 8071% ectest/ec_reader_test.e:4267
 8072% [restaurant,waiter,door,time]% 
 8073% HoldsAt(BeWaiter2(waiter),time) &
 8074% WaiterOf(restaurant)=waiter &
 8075% KitchenDoorOf(restaurant)=door ->
 8076% Initiates(WalkThroughDoor12(waiter,door),
 8077%           BeWaiter3(waiter),
 8078%           time).
 8079holds_at(beWaiter2(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 8080	initiates(walkThroughDoor12(Waiter, Door),
 8081		  beWaiter3(Waiter),
 8082		  Time).
 8083
 8084% ectest/ec_reader_test.e:4273
 8085% 
 8086% 
 8087% ectest/ec_reader_test.e:4275
 8088% [restaurant,food,time]% 
 8089% HoldsAt(BeWaiter3(WaiterOf(restaurant)),time) &
 8090% ({agent} HoldsAt(KnowOrder(WaiterOf(restaurant),agent,food),time)) ->
 8091% Happens(Order(WaiterOf(restaurant),CookOf(restaurant),food),time).
 8092holds_at(beWaiter3(waiterOf(Restaurant)), Time), exists([Agent], holds_at(knowOrder(waiterOf(Restaurant), Agent, Food), Time)) ->
 8093	happens(order(waiterOf(Restaurant),
 8094		      cookOf(Restaurant),
 8095		      Food),
 8096		Time).
 8097
 8098% 
 8099% 
 8100% ectest/ec_reader_test.e:4280
 8101% [restaurant,waiter,cook,food,time]% 
 8102% WaiterOf(restaurant)=waiter &
 8103% CookOf(restaurant)=cook &
 8104% HoldsAt(BeWaiter3(waiter),time) ->
 8105% Terminates(Order(waiter,cook,food),
 8106%            BeWaiter3(waiter),
 8107%            time).
 8108waiterOf(Restaurant)=Waiter, cookOf(Restaurant)=Cook, holds_at(beWaiter3(Waiter), Time) ->
 8109	terminates(order(Waiter, Cook, Food),
 8110		   beWaiter3(Waiter),
 8111		   Time).
 8112
 8113% ectest/ec_reader_test.e:4286
 8114% 
 8115% 
 8116% ectest/ec_reader_test.e:4288
 8117% [restaurant,waiter,cook,food,time]% 
 8118% WaiterOf(restaurant)=waiter &
 8119% CookOf(restaurant)=cook &
 8120% HoldsAt(BeWaiter3(waiter),time) ->
 8121% Initiates(Order(waiter,cook,food),
 8122%           BeWaiter4(waiter),
 8123%           time).
 8124waiterOf(Restaurant)=Waiter, cookOf(Restaurant)=Cook, holds_at(beWaiter3(Waiter), Time) ->
 8125	initiates(order(Waiter, Cook, Food),
 8126		  beWaiter4(Waiter),
 8127		  Time).
 8128
 8129% ectest/ec_reader_test.e:4294
 8130% 
 8131% 
 8132% ectest/ec_reader_test.e:4296
 8133% [waiter,food,time]% 
 8134% HoldsAt(BeWaiter4(waiter),time) &
 8135% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) &
 8136% HoldsAt(FoodPrepared(food),time) ->
 8137% Happens(PickUp(waiter,food),time).
 8138holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)), holds_at(foodPrepared(Food), Time) ->
 8139	happens(pickUp(Waiter, Food), Time).
 8140
 8141% 
 8142% 
 8143% ectest/ec_reader_test.e:4302
 8144% [waiter,food,time]% 
 8145% HoldsAt(BeWaiter4(waiter),time) &
 8146% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) ->
 8147% Terminates(PickUp(waiter,food),
 8148%            BeWaiter4(waiter),
 8149%            time).
 8150holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)) ->
 8151	terminates(pickUp(Waiter, Food),
 8152		   beWaiter4(Waiter),
 8153		   Time).
 8154
 8155% 
 8156% ectest/ec_reader_test.e:4308
 8157% 
 8158% ectest/ec_reader_test.e:4309
 8159% [waiter,food,time]% 
 8160% HoldsAt(BeWaiter4(waiter),time) &
 8161% ({agent} HoldsAt(KnowOrder(waiter,agent,food),time)) ->
 8162% Initiates(PickUp(waiter,food),
 8163%           BeWaiter5(waiter),
 8164%           time).
 8165holds_at(beWaiter4(Waiter), Time), exists([Agent], holds_at(knowOrder(Waiter, Agent, Food), Time)) ->
 8166	initiates(pickUp(Waiter, Food),
 8167		  beWaiter5(Waiter),
 8168		  Time).
 8169
 8170% 
 8171% ectest/ec_reader_test.e:4315
 8172% 
 8173% ectest/ec_reader_test.e:4316
 8174% [restaurant,waiter,time]% 
 8175% WaiterOf(restaurant)=waiter &
 8176% HoldsAt(BeWaiter5(waiter),time) ->
 8177% Happens(WalkThroughDoor21(waiter,KitchenDoorOf(restaurant)),time).
 8178waiterOf(Restaurant)=Waiter, holds_at(beWaiter5(Waiter), Time) ->
 8179	happens(walkThroughDoor21(Waiter,
 8180				  kitchenDoorOf(Restaurant)),
 8181		Time).
 8182
 8183% 
 8184% 
 8185% ectest/ec_reader_test.e:4321
 8186% [restaurant,waiter,door,time]% 
 8187% HoldsAt(BeWaiter5(waiter),time) &
 8188% WaiterOf(restaurant)=waiter &
 8189% KitchenDoorOf(restaurant)=door ->
 8190% Terminates(WalkThroughDoor21(waiter,door),
 8191%            BeWaiter5(waiter),
 8192%            time).
 8193holds_at(beWaiter5(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 8194	terminates(walkThroughDoor21(Waiter, Door),
 8195		   beWaiter5(Waiter),
 8196		   Time).
 8197
 8198% ectest/ec_reader_test.e:4327
 8199% 
 8200% 
 8201% ectest/ec_reader_test.e:4329
 8202% [restaurant,waiter,door,time]% 
 8203% HoldsAt(BeWaiter5(waiter),time) &
 8204% WaiterOf(restaurant)=waiter &
 8205% KitchenDoorOf(restaurant)=door ->
 8206% Initiates(WalkThroughDoor21(waiter,door),
 8207%           BeWaiter6(waiter),
 8208%           time).
 8209holds_at(beWaiter5(Waiter), Time), waiterOf(Restaurant)=Waiter, kitchenDoorOf(Restaurant)=Door ->
 8210	initiates(walkThroughDoor21(Waiter, Door),
 8211		  beWaiter6(Waiter),
 8212		  Time).
 8213
 8214% ectest/ec_reader_test.e:4335
 8215% 
 8216% 
 8217% ectest/ec_reader_test.e:4337
 8218% [restaurant,waiter,table,food,time]% 
 8219% WaiterOf(restaurant)=waiter &
 8220% TableOf(restaurant)=table &
 8221% HoldsAt(BeWaiter6(waiter),time) &
 8222% HoldsAt(Holding(waiter,food),time) ->
 8223% Happens(PlaceOn(waiter,food,table),time).
 8224waiterOf(Restaurant)=Waiter, tableOf(Restaurant)=Table, holds_at(beWaiter6(Waiter), Time), holds_at(holding(Waiter, Food), Time) ->
 8225	happens(placeOn(Waiter, Food, Table), Time).
 8226
 8227% 
 8228% ectest/ec_reader_test.e:4343
 8229% 
 8230% ectest/ec_reader_test.e:4344
 8231% [waiter,food,table,time]% 
 8232% HoldsAt(BeWaiter6(waiter),time) ->
 8233% Terminates(PlaceOn(waiter,food,table),
 8234%            BeWaiter6(waiter),
 8235%            time).
 8236holds_at(beWaiter6(Waiter), Time) ->
 8237	terminates(placeOn(Waiter, Food, Table),
 8238		   beWaiter6(Waiter),
 8239		   Time).
 8240
 8241% 
 8242% 
 8243% ectest/ec_reader_test.e:4350
 8244% [waiter,food,table,time]% 
 8245% HoldsAt(BeWaiter6(waiter),time) ->
 8246% Initiates(PlaceOn(waiter,food,table),
 8247%           BeWaiter7(waiter),
 8248%           time).
 8249holds_at(beWaiter6(Waiter), Time) ->
 8250	initiates(placeOn(Waiter, Food, Table),
 8251		  beWaiter7(Waiter),
 8252		  Time).
 8253
 8254% 
 8255% 
 8256% ectest/ec_reader_test.e:4356
 8257% [waiter,agent,bill,time]% 
 8258% HoldsAt(BeWaiter7(waiter),time) ->
 8259% Terminates(Request(agent,waiter,bill),
 8260%            BeWaiter7(waiter),
 8261%            time).
 8262holds_at(beWaiter7(Waiter), Time) ->
 8263	terminates(request(Agent, Waiter, Bill),
 8264		   beWaiter7(Waiter),
 8265		   Time).
 8266
 8267% 
 8268% 
 8269% ectest/ec_reader_test.e:4362
 8270% [waiter,agent,bill,time]% 
 8271% HoldsAt(BeWaiter7(waiter),time) ->
 8272% Initiates(Request(agent,waiter,bill),
 8273%           BeWaiter8(waiter),
 8274%           time).
 8275holds_at(beWaiter7(Waiter), Time) ->
 8276	initiates(request(Agent, Waiter, Bill),
 8277		  beWaiter8(Waiter),
 8278		  Time).
 8279
 8280% 
 8281% 
 8282% ectest/ec_reader_test.e:4368
 8283% [restaurant,waiter,bill,time]% 
 8284% WaiterOf(restaurant)=waiter &
 8285% BillOf(restaurant)=bill &
 8286% HoldsAt(BeWaiter8(waiter),time) ->
 8287% Happens(PickUp(waiter,bill),time).
 8288waiterOf(Restaurant)=Waiter, billOf(Restaurant)=Bill, holds_at(beWaiter8(Waiter), Time) ->
 8289	happens(pickUp(Waiter, Bill), Time).
 8290
 8291% 
 8292% 
 8293% ectest/ec_reader_test.e:4374
 8294% [waiter,bill,time]% 
 8295% HoldsAt(BeWaiter8(waiter),time) ->
 8296% Terminates(PickUp(waiter,bill),
 8297%            BeWaiter8(waiter),
 8298%            time).
 8299holds_at(beWaiter8(Waiter), Time) ->
 8300	terminates(pickUp(Waiter, Bill),
 8301		   beWaiter8(Waiter),
 8302		   Time).
 8303
 8304% 
 8305% 
 8306% ectest/ec_reader_test.e:4380
 8307% [waiter,bill,time]% 
 8308% HoldsAt(BeWaiter8(waiter),time) ->
 8309% Initiates(PickUp(waiter,bill),
 8310%           BeWaiter9(waiter),
 8311%           time).
 8312holds_at(beWaiter8(Waiter), Time) ->
 8313	initiates(pickUp(Waiter, Bill),
 8314		  beWaiter9(Waiter),
 8315		  Time).
 8316
 8317% 
 8318% 
 8319% ectest/ec_reader_test.e:4386
 8320% [restaurant,waiter,bill,table,time]% 
 8321% WaiterOf(restaurant)=waiter &
 8322% BillOf(restaurant)=bill &
 8323% TableOf(restaurant)=table &
 8324% HoldsAt(BeWaiter9(waiter),time) ->
 8325% Happens(PlaceOn(waiter,bill,table),time).
 8326waiterOf(Restaurant)=Waiter, billOf(Restaurant)=Bill, tableOf(Restaurant)=Table, holds_at(beWaiter9(Waiter), Time) ->
 8327	happens(placeOn(Waiter, Bill, Table), Time).
 8328
 8329% 
 8330% ectest/ec_reader_test.e:4392
 8331% 
 8332% ectest/ec_reader_test.e:4393
 8333% [waiter,bill,table,time]% 
 8334% HoldsAt(BeWaiter9(waiter),time) ->
 8335% Terminates(PlaceOn(waiter,bill,table),
 8336%            BeWaiter9(waiter),
 8337%            time).
 8338holds_at(beWaiter9(Waiter), Time) ->
 8339	terminates(placeOn(Waiter, Bill, Table),
 8340		   beWaiter9(Waiter),
 8341		   Time).
 8342
 8343% 
 8344% 
 8345% ectest/ec_reader_test.e:4399
 8346% [waiter,bill,table,time]% 
 8347% HoldsAt(BeWaiter9(waiter),time) ->
 8348% Initiates(PlaceOn(waiter,bill,table),
 8349%           BeWaiter0(waiter),
 8350%           time).
 8351holds_at(beWaiter9(Waiter), Time) ->
 8352	initiates(placeOn(Waiter, Bill, Table),
 8353		  beWaiter0(Waiter),
 8354		  Time).
 8355
 8356% 
 8357% 
 8358% ; awaiting next waiter order
 8359% ectest/ec_reader_test.e:4406
 8360% fluent BeCook0(cook)
 8361fluent(beCook0(cook)).
 8362
 8363% 
 8364% ; waiter order received
 8365% fluent BeCook1(cook)
 8366fluent(beCook1(cook)).
 8367
 8368% 
 8369% xor BeCook0, BeCook1
 8370xor([beCook0, beCook1]).
 8371
 8372% ectest/ec_reader_test.e:4412
 8373% 
 8374% ectest/ec_reader_test.e:4413
 8375% [cook,agent,food,time]% 
 8376% HoldsAt(BeCook0(cook),time) ->
 8377% Terminates(Order(agent,cook,food),
 8378%            BeCook0(cook),
 8379%            time).
 8380holds_at(beCook0(Cook), Time) ->
 8381	terminates(order(Agent, Cook, Food),
 8382		   beCook0(Cook),
 8383		   Time).
 8384
 8385% 
 8386% 
 8387% ectest/ec_reader_test.e:4419
 8388% [cook,agent,food,time]% 
 8389% HoldsAt(BeCook0(cook),time) ->
 8390% Initiates(Order(agent,cook,food),
 8391%           BeCook1(cook),
 8392%           time).
 8393holds_at(beCook0(Cook), Time) ->
 8394	initiates(order(Agent, Cook, Food),
 8395		  beCook1(Cook),
 8396		  Time).
 8397
 8398% 
 8399% 
 8400% ectest/ec_reader_test.e:4425
 8401% event FoodPrepare(agent,food)
 8402event(foodPrepare(agent, food)).
 8403
 8404% 
 8405% fluent FoodPrepared(food)
 8406fluent(foodPrepared(food)).
 8407
 8408% 
 8409% ectest/ec_reader_test.e:4429
 8410% [agent,food,time]% 
 8411% Initiates(FoodPrepare(agent,food),
 8412%           FoodPrepared(food),
 8413%           time).
 8414initiates(foodPrepare(Agent, Food), foodPrepared(Food), Time).
 8415
 8416% 
 8417% 
 8418% ectest/ec_reader_test.e:4434
 8419% [agent,food,time]% 
 8420% Happens(FoodPrepare(agent,food),time) ->
 8421% ectest/ec_reader_test.e:4436
 8422% {location}% 
 8423% HoldsAt(At(agent,location),time) &
 8424% HoldsAt(At(food,location),time).
 8425exists([Location],  (happens(foodPrepare(Agent, Food), Time)->holds_at(at(Agent, Location), Time), holds_at(at(Food, Location), Time))).
 8426
 8427% 
 8428% 
 8429% ectest/ec_reader_test.e:4440
 8430% [cook,agent,food,time]% 
 8431% HoldsAt(BeCook1(cook),time) &
 8432% HoldsAt(KnowOrder(cook,agent,food),time) ->
 8433% Happens(FoodPrepare(cook,food),time).
 8434holds_at(beCook1(Cook), Time), holds_at(knowOrder(Cook, Agent, Food), Time) ->
 8435	happens(foodPrepare(Cook, Food), Time).
 8436
 8437% 
 8438% 
 8439% ectest/ec_reader_test.e:4445
 8440% [cook,food,time]% 
 8441% HoldsAt(BeCook1(cook),time) ->
 8442% Terminates(FoodPrepare(cook,food),
 8443%            BeCook1(cook),
 8444%            time).
 8445holds_at(beCook1(Cook), Time) ->
 8446	terminates(foodPrepare(Cook, Food),
 8447		   beCook1(Cook),
 8448		   Time).
 8449
 8450% 
 8451% 
 8452% ectest/ec_reader_test.e:4451
 8453% [cook,food,time]% 
 8454% HoldsAt(BeCook1(cook),time) ->
 8455% Initiates(FoodPrepare(cook,food),
 8456%           BeCook0(cook),
 8457%           time).
 8458holds_at(beCook1(Cook), Time) ->
 8459	initiates(foodPrepare(Cook, Food),
 8460		  beCook0(Cook),
 8461		  Time).
 8462
 8463% 
 8464% 
 8465% ; End of file.
 8466% ectest/ec_reader_test.e:4458
 8467% 
 8468% 
 8469% 
 8470% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 8471% ; FILE: ecnet/EatingInAHouse.e
 8472% ; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 8473% ectest/ec_reader_test.e:4464
 8474% 
 8475% ;
 8476% ; Copyright (c) 2005 IBM Corporation and others.
 8477% ; All rights reserved. This program and the accompanying materials
 8478% ; are made available under the terms of the Common Public License v1.0
 8479% ; which accompanies this distribution, and is available at
 8480% ; http://www.eclipse.org/legal/cpl-v10.html
 8481% ;
 8482% ; Contributors:
 8483% ; IBM - Initial implementation
 8484% ;
 8485% ; @article{Mueller:2004c,
 8486% ;   author = "Erik T. Mueller",
 8487% ;   year = "2004",
 8488% ;   title = "Understanding script-based stories using commonsense reasoning",
 8489% ;   journal = "Cognitive Systems Research",
 8490% ;   volume = "5",
 8491% ;   number = "4",
 8492% ;   pages = "307--340",
 8493% ; }
 8494% ;
 8495% ectest/ec_reader_test.e:4485
 8496% 
 8497% option modeldiff on
 8498option(modeldiff, on).
 8499
 8500% option encoding 3
 8501option(encoding, 3).
 8502
 8503% option renaming off
 8504option(renaming, off).
 8505
 8506% 
 8507% ignore Love, ThreatenedBy
 8508ignore(love).
 8509
 8510ignore(threatenedBy).
 8511
 8512% ectest/ec_reader_test.e:4491
 8513% ignore LookOutOnto, Floor, BuildingOf, SkyOf, GroundOf
 8514ignore(lookOutOnto).
 8515
 8516ignore(floor).
 8517
 8518ignore(buildingOf).
 8519
 8520ignore(skyOf).
 8521
 8522ignore(groundOf).
 8523
 8524% ignore Inside
 8525ignore(inside).
 8526
 8527% ignore Near, WalkFrom, WalkFromTo, RunFromTo
 8528ignore(near).
 8529
 8530ignore(walkFrom).
 8531
 8532ignore(walkFromTo).
 8533
 8534ignore(runFromTo).
 8535
 8536% ignore BillOf, CookOf, TableOf, WaiterOf, KitchenDoorOf
 8537ignore(billOf).
 8538
 8539ignore(cookOf).
 8540
 8541ignore(tableOf).
 8542
 8543ignore(waiterOf).
 8544
 8545ignore(kitchenDoorOf).
 8546
 8547% ignore BeWaiter0, BeWaiter1, BeWaiter2, BeWaiter3, BeWaiter4
 8548ignore(beWaiter0).
 8549
 8550ignore(beWaiter1).
 8551
 8552ignore(beWaiter2).
 8553
 8554ignore(beWaiter3).
 8555
 8556ignore(beWaiter4).
 8557
 8558% ignore BeWaiter5, BeWaiter6, BeWaiter7, BeWaiter8, BeWaiter9
 8559ignore(beWaiter5).
 8560
 8561ignore(beWaiter6).
 8562
 8563ignore(beWaiter7).
 8564
 8565ignore(beWaiter8).
 8566
 8567ignore(beWaiter9).
 8568
 8569% ectest/ec_reader_test.e:4497
 8570% ignore BeCook0, BeCook1
 8571ignore(beCook0).
 8572
 8573ignore(beCook1).
 8574
 8575% ignore InviteIn, InvitedIn, IntendToWalkIn, IntentionToWalkIn
 8576ignore(inviteIn).
 8577
 8578ignore(invitedIn).
 8579
 8580ignore(intendToWalkIn).
 8581
 8582ignore(intentionToWalkIn).
 8583
 8584% ignore ActOnIntentionToWalkIn, Greet, SayGoodbye, CryForJoy
 8585ignore(actOnIntentionToWalkIn).
 8586
 8587ignore(greet).
 8588
 8589ignore(sayGoodbye).
 8590
 8591ignore(cryForJoy).
 8592
 8593% ignore Threaten, ReleaseFromThreat, ThreatenedBy
 8594ignore(threaten).
 8595
 8596ignore(releaseFromThreat).
 8597
 8598ignore(threatenedBy).
 8599
 8600% ignore Order, KnowOrder, Request, KnowRequest
 8601ignore(order).
 8602
 8603ignore(knowOrder).
 8604
 8605ignore(request).
 8606
 8607ignore(knowRequest).
 8608
 8609% ignore PutInside, TakeOutOf
 8610ignore(putInside).
 8611
 8612ignore(takeOutOf).
 8613
 8614% ectest/ec_reader_test.e:4503
 8615% ignore SayPleaseToMeet, Move
 8616ignore(sayPleaseToMeet).
 8617
 8618ignore(move).
 8619
 8620% 
 8621% load foundations/Root.e
 8622load('foundations/Root.e').
 8623
 8624% load foundations/EC.e
 8625load('foundations/EC.e').
 8626
 8627% load answers/Mueller2003/Ontology.e
 8628load('answers/Mueller2003/Ontology.e').
 8629
 8630% load answers/Mueller2004c/RTSpaceM.e
 8631load('answers/Mueller2004c/RTSpaceM.e').
 8632
 8633% ectest/ec_reader_test.e:4509
 8634% load answers/Mueller2004c/OTSpaceM.e
 8635load('answers/Mueller2004c/OTSpaceM.e').
 8636
 8637% load answers/Mueller2004c/HungerNeed.e
 8638load('answers/Mueller2004c/HungerNeed.e').
 8639
 8640% load answers/Mueller2004c/Restaurant.e
 8641load('answers/Mueller2004c/Restaurant.e').
 8642
 8643% load answers/Mueller2003/Sleep.e
 8644load('answers/Mueller2003/Sleep.e').
 8645
 8646% load answers/Mueller2003/SpeechAct.e
 8647load('answers/Mueller2003/SpeechAct.e').
 8648
 8649% load answers/Mueller2004c/Dress.e
 8650load('answers/Mueller2004c/Dress.e').
 8651
 8652% ectest/ec_reader_test.e:4515
 8653% 
 8654% room Upstairs1
 8655t(room, upstairs1).
 8656
 8657% 
 8658% staircase Staircase1
 8659t(staircase, staircase1).
 8660
 8661% 
 8662% room Hallway1
 8663t(room, hallway1).
 8664
 8665% ectest/ec_reader_test.e:4521
 8666% 
 8667% Side1(Staircase1)=Hallway1.
 8668side1(staircase1)=hallway1.
 8669
 8670% 
 8671% Side2(Staircase1)=Upstairs1.
 8672side2(staircase1)=upstairs1.
 8673
 8674% 
 8675% 
 8676% door DiningRoomDoor1
 8677t(door, diningRoomDoor1).
 8678
 8679% 
 8680% ectest/ec_reader_test.e:4527
 8681% room DiningRoom1
 8682t(room, diningRoom1).
 8683
 8684% 
 8685% Side1(DiningRoomDoor1)=Hallway1.
 8686side1(diningRoomDoor1)=hallway1.
 8687
 8688% 
 8689% Side2(DiningRoomDoor1)=DiningRoom1.
 8690side2(diningRoomDoor1)=diningRoom1.
 8691
 8692% 
 8693% 
 8694% door KitchenDoor1
 8695t(door, kitchenDoor1).
 8696
 8697% ectest/ec_reader_test.e:4533
 8698% 
 8699% room Kitchen1
 8700t(room, kitchen1).
 8701
 8702% 
 8703% Side1(KitchenDoor1)=DiningRoom1.
 8704side1(kitchenDoor1)=diningRoom1.
 8705
 8706% 
 8707% Side2(KitchenDoor1)=Kitchen1.
 8708side2(kitchenDoor1)=kitchen1.
 8709
 8710% 
 8711% 
 8712% ectest/ec_reader_test.e:4539
 8713% agent Eater1
 8714t(agent, eater1).
 8715
 8716% 
 8717% agent Eater2
 8718t(agent, eater2).
 8719
 8720% 
 8721% clothing Clothing1
 8722t(clothing, clothing1).
 8723
 8724% 
 8725% ectest/ec_reader_test.e:4545
 8726% clothing Clothing2
 8727t(clothing, clothing2).
 8728
 8729% 
 8730% chair Chair1
 8731t(chair, chair1).
 8732
 8733% 
 8734% chair Chair2
 8735t(chair, chair2).
 8736
 8737% 
 8738% ectest/ec_reader_test.e:4551
 8739% food Food1
 8740t(food, food1).
 8741
 8742% 
 8743% agent Cook1
 8744t(agent, cook1).
 8745
 8746% 
 8747% table Table1
 8748t(table, table1).
 8749
 8750% 
 8751% ectest/ec_reader_test.e:4557
 8752% content Content1
 8753t(content, content1).
 8754
 8755% 
 8756% content Content2
 8757t(content, content2).
 8758
 8759% 
 8760% outside DummyOutside1
 8761t(outside, dummyOutside1).
 8762
 8763% 
 8764% ; prune
 8765% ectest/ec_reader_test.e:4564
 8766% sort ona, onb
 8767sort(ona).
 8768
 8769sort(onb).
 8770
 8771% fluent! On(ona,onb)
 8772fluent(on(ona, onb)).
 8773
 8774% event! PlaceOn(agent,ona,onb)
 8775event(placeOn(agent, ona, onb)).
 8776
 8777% event! TakeOffOf(agent,ona,onb)
 8778event(takeOffOf(agent, ona, onb)).
 8779
 8780% 
 8781% sort ordera, orderb, orderc
 8782sort(ordera).
 8783
 8784sort(orderb).
 8785
 8786sort(orderc).
 8787
 8788% ectest/ec_reader_test.e:4570
 8789% event! Order(ordera,orderb,orderc)
 8790event(order(ordera, orderb, orderc)).
 8791
 8792% fluent! KnowOrder(orderb,ordera,orderc)
 8793fluent(knowOrder(orderb, ordera, orderc)).
 8794
 8795% 
 8796% sort requesta, requestb, requestc
 8797sort(requesta).
 8798
 8799sort(requestb).
 8800
 8801sort(requestc).
 8802
 8803% event! Request(requesta,requestb,requestc)
 8804event(request(requesta, requestb, requestc)).
 8805
 8806% fluent! KnowRequest(requestb,requesta,requestc)
 8807fluent(knowRequest(requestb, requesta, requestc)).
 8808
 8809% ectest/ec_reader_test.e:4576
 8810% 
 8811% sort holda, holdb, holdc
 8812sort(holda).
 8813
 8814sort(holdb).
 8815
 8816sort(holdc).
 8817
 8818% event! TakeOffOf(holda,holdb,holdc)
 8819event(takeOffOf(holda, holdb, holdc)).
 8820
 8821% event! PickUp(holda,holdb)
 8822event(pickUp(holda, holdb)).
 8823
 8824% event! LetGoOf(holda,holdb)
 8825event(letGoOf(holda, holdb)).
 8826
 8827% event! Hold(holda,holdb)
 8828event(hold(holda, holdb)).
 8829
 8830% ectest/ec_reader_test.e:4582
 8831% fluent! Holding(holda,holdb)
 8832fluent(holding(holda, holdb)).
 8833
 8834% 
 8835% sort sita, sitb
 8836sort(sita).
 8837
 8838sort(sitb).
 8839
 8840% event! LieOn(sita,sitb)
 8841event(lieOn(sita, sitb)).
 8842
 8843% event! SitOn(sita,sitb)
 8844event(sitOn(sita, sitb)).
 8845
 8846% event! RiseFrom(sita,sitb)
 8847event(riseFrom(sita, sitb)).
 8848
 8849% ectest/ec_reader_test.e:4588
 8850% fluent! LyingOn(sita,sitb)
 8851fluent(lyingOn(sita, sitb)).
 8852
 8853% fluent! SittingOn(sita,sitb)
 8854fluent(sittingOn(sita, sitb)).
 8855
 8856% 
 8857% ona! Food1
 8858t(ona, food1).
 8859
 8860% onb! Table1
 8861t(onb, table1).
 8862
 8863% holda! Cook1
 8864t(holda, cook1).
 8865
 8866% ectest/ec_reader_test.e:4594
 8867% holdb! Food1
 8868t(holdb, food1).
 8869
 8870% holdc! Table1
 8871t(holdc, table1).
 8872
 8873% sita! Eater1
 8874t(sita, eater1).
 8875
 8876% sitb! Chair1
 8877t(sitb, chair1).
 8878
 8879% 
 8880% ; initial situation
 8881% ectest/ec_reader_test.e:4600
 8882% [agent] % HoldsAt(Dressed(agent),0).
 8883holds_at(dressed(Agent), 0).
 8884
 8885% 
 8886% ectest/ec_reader_test.e:4601
 8887% [agent] % HoldsAt(Awake(agent),0).
 8888holds_at(awake(Agent), 0).
 8889
 8890% 
 8891% ectest/ec_reader_test.e:4602
 8892% [agent] % HoldsAt(Sleep3(agent),0).
 8893holds_at(sleep3(Agent), 0).
 8894
 8895% 
 8896% ectest/ec_reader_test.e:4603
 8897% [agent] % HoldsAt(Standing(agent),0).
 8898holds_at(standing(Agent), 0).
 8899
 8900% 
 8901% ectest/ec_reader_test.e:4604
 8902% [agent] % HoldsAt(Standing(agent),0).
 8903holds_at(standing(Agent), 0).
 8904
 8905% 
 8906% ectest/ec_reader_test.e:4605
 8907% [agent,object] % !HoldsAt(Holding(agent,object),0).
 8908not(holds_at(holding(Agent, Object), 0)).
 8909
 8910% 
 8911% ectest/ec_reader_test.e:4606
 8912% [food] % HoldsAt(At(food,Kitchen1),0).
 8913holds_at(at(Food, kitchen1), 0).
 8914
 8915% 
 8916% ectest/ec_reader_test.e:4607
 8917% [food] % !HoldsAt(FoodPrepared(food),0).
 8918not(holds_at(foodPrepared(Food), 0)).
 8919
 8920% 
 8921% ectest/ec_reader_test.e:4608
 8922% [agent] % HoldsAt(Hungry(agent),0).
 8923holds_at(hungry(Agent), 0).
 8924
 8925% 
 8926% ectest/ec_reader_test.e:4609
 8927% [door] % HoldsAt(DoorIsOpen(door),0).
 8928holds_at(doorIsOpen(Door), 0).
 8929
 8930% 
 8931% ectest/ec_reader_test.e:4610
 8932% [clothing] % HoldsAt(At(clothing,Upstairs1),0).
 8933holds_at(at(Clothing, upstairs1), 0).
 8934
 8935% 
 8936% ectest/ec_reader_test.e:4611
 8937% [chair] % HoldsAt(At(chair,DiningRoom1),0).
 8938holds_at(at(Chair, diningRoom1), 0).
 8939
 8940% 
 8941% HoldsAt(At(Cook1,Kitchen1),0).
 8942holds_at(at(cook1, kitchen1), 0).
 8943
 8944% 
 8945% HoldsAt(At(Table1,DiningRoom1),0).
 8946holds_at(at(table1, diningRoom1), 0).
 8947
 8948% 
 8949% ectest/ec_reader_test.e:4614
 8950% [agent,clothing] % !HoldsAt(Wearing(agent,clothing),0).
 8951not(holds_at(wearing(Agent, Clothing), 0)).
 8952
 8953% 
 8954% 
 8955% ; narrative
 8956% HoldsAt(At(Cook1,Kitchen1),0).
 8957holds_at(at(cook1, kitchen1), 0).
 8958
 8959% 
 8960% HoldsAt(At(Eater1,Upstairs1),0).
 8961holds_at(at(eater1, upstairs1), 0).
 8962
 8963% 
 8964% HoldsAt(At(Eater2,Upstairs1),0).
 8965holds_at(at(eater2, upstairs1), 0).
 8966
 8967% 
 8968% ectest/ec_reader_test.e:4620
 8969% Happens(FoodPrepare(Cook1,Food1),0).
 8970happens(foodPrepare(cook1, food1), 0).
 8971
 8972% 
 8973% Happens(PutOn(Eater1,Clothing1),1).
 8974happens(putOn(eater1, clothing1), 1).
 8975
 8976% 
 8977% Happens(PutOn(Eater2,Clothing2),2).
 8978happens(putOn(eater2, clothing2), 2).
 8979
 8980% 
 8981% Happens(WalkDownStaircase(Eater1,Staircase1),3).
 8982happens(walkDownStaircase(eater1, staircase1), 3).
 8983
 8984% 
 8985% Happens(WalkDownStaircase(Eater2,Staircase1),4).
 8986happens(walkDownStaircase(eater2, staircase1), 4).
 8987
 8988% 
 8989% Happens(WalkThroughDoor12(Eater1,DiningRoomDoor1),5).
 8990happens(walkThroughDoor12(eater1, diningRoomDoor1), 5).
 8991
 8992% 
 8993% ectest/ec_reader_test.e:4626
 8994% Happens(WalkThroughDoor12(Eater2,DiningRoomDoor1),6).
 8995happens(walkThroughDoor12(eater2, diningRoomDoor1), 6).
 8996
 8997% 
 8998% Happens(SitOn(Eater1,Chair1),7).
 8999happens(sitOn(eater1, chair1), 7).
 9000
 9001% 
 9002% Happens(SitOn(Eater2,Chair2),8).
 9003happens(sitOn(eater2, chair2), 8).
 9004
 9005% 
 9006% Happens(PickUp(Cook1, Food1),9).
 9007happens(pickUp(cook1, food1), 9).
 9008
 9009% 
 9010% Happens(WalkThroughDoor21(Cook1, KitchenDoor1),10).
 9011happens(walkThroughDoor21(cook1, kitchenDoor1), 10).
 9012
 9013% 
 9014% Happens(PlaceOn(Cook1, Food1, Table1),11).
 9015happens(placeOn(cook1, food1, table1), 11).
 9016
 9017% 
 9018% ectest/ec_reader_test.e:4632
 9019% Happens(WalkThroughDoor12(Cook1, KitchenDoor1),12).
 9020happens(walkThroughDoor12(cook1, kitchenDoor1), 12).
 9021
 9022% 
 9023% Happens(Eat(Eater1,Food1),13).
 9024happens(eat(eater1, food1), 13).
 9025
 9026% 
 9027% Happens(Eat(Eater2,Food1),14).
 9028happens(eat(eater2, food1), 14).
 9029
 9030% 
 9031% Happens(Converse(Eater1,Eater2),15).
 9032happens(converse(eater1, eater2), 15).
 9033
 9034% 
 9035% Happens(TalkAbout(Eater1,Content1),16).
 9036happens(talkAbout(eater1, content1), 16).
 9037
 9038% 
 9039% Happens(TalkAbout(Eater2,Content2),17).
 9040happens(talkAbout(eater2, content2), 17).
 9041
 9042% 
 9043% ectest/ec_reader_test.e:4638
 9044% Happens(RiseFrom(Eater1,Chair1),18).
 9045happens(riseFrom(eater1, chair1), 18).
 9046
 9047% 
 9048% Happens(RiseFrom(Eater2,Chair2),19).
 9049happens(riseFrom(eater2, chair2), 19).
 9050
 9051% 
 9052% 
 9053% range time 0 20
 9054range(time, 0, 20).
 9055
 9056% range offset 0 0
 9057range(offset, 0, 0).
 9058
 9059% range diameter 0 0
 9060range(diameter, 0, 0).
 9061
 9062% ectest/ec_reader_test.e:4644
 9063% 
 9064% completion Happens
 9065completion(happens).
 9066
 9067% 
 9068% ; End of file.
 9069% ectest/ec_reader_test.e:4648
 9070% translate: ending  File: ectest/ec_reader_test.e.pro