Dynamically creating objects and sequencing operations. Cliff Jones University of Newcastle 2005-06-06. On the expectation of a WG2.3 topic. in the tradition of 2.3, this is something I’m trying to sort out for myself but …
Related searches for dynamically creating objects and sequencing operations
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
Cliff Jones
University of Newcastle
2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
class stack
var …
method push(i: item) …
method pop() : item …
body
%% initialize
do %% forever
if … then answer(push)
else answer(pop, push)
fi
od
POOL exampleWG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
Sortclass
vars v: nat nil; l: unique ref(Sort) nil
insert(x: nat) method
return;
if is-nil(v) then (v x; l new Sort)
elif v x then l.insert(x)
else (l.insert(v); v x)
fi
test(x: nat) method: Bool
if is-nil(l) x v then return false
elif x = v then return true
else delegate l.test(x)
fi
.
.
.
endSort
WG2.3 Niagara 2005-06-06
IQ =
\New{\widetilde{s}\widetilde{a}}
(v\sb{nil} | l\sb{nil} |
\outp{q}{u}. B\sb{Q})
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06
WG2.3 Niagara 2005-06-06