24.6 Program Collection

The chunk `Browse Modules':

declare  
PSLab = 'http://www.ps.uni-sb.de' 
Dir='~niehren/oz-course.html/Functors' 
PickleVersion = 'Version.3.2' 
fun{Conc URLs}
   case URLs  
   of [U] then U
   [] U|Us then U#'/'#{Conc Us}  
   end      
end 
URL= {Conc [PSLab Dir PickleVersion]}
[Mod1 Mod2] = {Module.link [{Conc [URL 'NewChart.ozf']}
                            {Conc [URL 'ChartToWindow.ozf']}]}
{Browse [Mod1 Mod2]}        % the modules Mod1, Mod2 are not yet loaded
                            % even though their future value is defined
/*
{ForAll [Mod1 Mod2] Wait}   % {Wait X} waits until a future value  
                            % for X gets defined (as for instance
                            % by {Module.link [X]}) and then loads  
                            % this value.
*/
 

The chunk `Graphical Output of a Chart':

declare 
PSLab = 'http://www.ps.uni-sb.de' 
Dir='~niehren/oz-course.html/Functors' 
PickleVersion = 'Version.3.2' 
fun{Conc URLs}
   case URLs  
   of [U] then U
   [] U|Us then U#'/'#{Conc Us}  
   end      
end 
URL= {Conc [PSLab Dir PickleVersion]}
[Mod1 Mod2] = {Module.link [{Conc [URL 'NewChart.ozf']}
                            {Conc [URL 'ChartToWindow.ozf']}]}
NewChart = Mod1.newChart
ChartToWindow = Mod2.chartToWindow
 
Phons = [john sees the man 'with' the telescope]
Edges = [edge(begin:1 cat:s 'end':3 id:17 ids:[16 12])
        edge(begin:1 cat:s 'end':8 id:18 ids:[16 13])
        edge(begin:1 cat:s 'end':8 id:19 ids:[16 15])
        edge(begin:1 cat:s 'end':5 id:20 ids:[16 14])
        edge(begin:1 cat:np 'end':2 id:16 ids:[1])
        edge(begin:1 cat:pn 'end':2 id:1 ids:nil)
        edge(begin:2 cat:vp 'end':3 id:12 ids:[2])
        edge(begin:2 cat:vp 'end':8 id:13 ids:[2 11])
        edge(begin:2 cat:vp 'end':8 id:15 ids:[14 9])
        edge(begin:2 cat:vp 'end':5 id:14 ids:[2 10])
        edge(begin:2 cat:v 'end':3 id:2 ids:nil)
        edge(begin:3 cat:np 'end':8 id:11 ids:[10 9])
        edge(begin:3 cat:np 'end':5 id:10 ids:[3 4])
        edge(begin:3 cat:det 'end':4 id:3 ids:nil)
        edge(begin:4 cat:n 'end':5 id:4 ids:nil)
        edge(begin:5 cat:pp 'end':8 id:9 ids:[5 8])
        edge(begin:5 cat:prep 'end':6 id:5 ids:nil)
        edge(begin:6 cat:np 'end':8 id:8 ids:[6 7])
        edge(begin:6 cat:det 'end':7 id:6 ids:nil)
        edge(begin:7 cat:n 'end':8 id:7 ids:nil)]
Chart={NewChart Phons}
{ForAll Edges Chart.add}
 
Window = {ChartToWindow Chart}


Denys Duchier, Claire Gardent and Joachim Niehren
Version 1.3.99 (20050412)