next up previous contents
Next: Dinamica Up: Program Previous: Program   Cuprins

Statica


\begin{lstlisting}[language=plint]
Example
\par // file a
procedure a () { ech...
...ar // file prg.plt
plot 'prg' {
insert './a'
insert './b'
}
\end{lstlisting}

Arborele arata astfel:

+-----------+-----+
| procedure | prg |
+-----------+-----+
	|
	|
	v
	+-----------+---+
	| procedure | a |
	+-----------+---+
	|
	|
	v
	+----------------+
	| block | noname |
	+----------------+
		|
		|
		v
		+-----------+---+
		| procedure | a |
		+-----------+---+
dar de fapt e implementat cu reutilizare:
+-----------+-----+
| procedure | prg |
+-----------+-----+
	|
	|
	v
	+-----------+---+
	| procedure | a |
	+-----------+---+<-+
	|                  |
	|                  |
	v                  |
	+----------------+ |
	| block | noname | |
	+----------------+ |
		|          |
		|          |
		+----------+
Cazul inserarilor recursive de genul
\begin{lstlisting}[language=plint]
// file a
insert './b'
\par // file b
insert './c'
\par // file c
insert './a'
\end{lstlisting}
este detectat cu succes ca si o eroare.

Arborele are urmatoarea structura si/sau urmatorul comportament:


next up previous contents
Next: Dinamica Up: Program Previous: Program   Cuprins
Sebastian Glita 2002-06-19