1% ectest/Example4.e:1
    2% translate: begining  File: ectest/Example4.e.pro 
    3% ;
    4% ; Copyright (c) 2005 IBM Corporation and others.
    5% ; All rights reserved. This program and the accompanying materials
    6% ; are made available under the terms of the Common Public License v1.0
    7% ; which accompanies this distribution, and is available at
    8% ; http://www.eclipse.org/legal/cpl-v10.html
    9% ;
   10% ; Contributors:
   11% ; IBM - Initial implementation
   12% ;
   13% ectest/Example4.e:11
   14% load foundations/Root.e
   15load('foundations/Root.e').
   16
   17% load foundations/EC.e
   18load('foundations/EC.e').
   19
   20% 
   21% sort agent
   22sort(agent).
   23
   24% 
   25% fluent Awake(agent)
   26fluent(awake(agent)).
   27
   28% ectest/Example4.e:17
   29% event WakeUp(agent)
   30event(wakeUp(agent)).
   31
   32% 
   33% ectest/Example4.e:19
   34% [agent,time] % Initiates(WakeUp(agent),Awake(agent),time).
   35initiates(wakeUp(Agent), awake(Agent), Time).
   36
   37% 
   38% ectest/Example4.e:20
   39% [agent,time] % Happens(WakeUp(agent),time) -> !HoldsAt(Awake(agent),time).
   40happens(wakeUp(Agent), Time) ->
   41	not(holds_at(awake(Agent), Time)).
   42
   43% 
   44% 
   45% agent James, Jessie
   46t(agent, james).
   47
   48t(agent, jessie).
   49
   50% !HoldsAt(Awake(James),0).
   51not(holds_at(awake(james), 0)).
   52
   53% 
   54% !HoldsAt(Awake(Jessie),0).
   55not(holds_at(awake(jessie), 0)).
   56
   57% 
   58% HoldsAt(Awake(James),1).
   59holds_at(awake(james), 1).
   60
   61% 
   62% ectest/Example4.e:26
   63% 
   64% range time 0 1
   65range(time, 0, 1).
   66
   67% range offset 1 1
   68range(offset, 1, 1).
   69
   70% ectest/Example4.e:29
   71% translate: ending  File: ectest/Example4.e.pro