\batchmode
\documentclass[12pt]{article}
\usepackage{latexsym,fullpage,graphicx}

%

\setlength{\textwidth}{6.5in}           %
\setlength{\textheight}{9.0in}          %
\setlength{\columnsep}{0.33in}          %
\setlength{\topmargin}{0.0in}           %
                                        %
                                        %
\setlength{\headheight}{0.0in}          %
\setlength{\headsep}{0.0in}             %
\setlength{\oddsidemargin}{0.0in}       %
                                        %
\setlength{\evensidemargin}{0.0in}      %
                                        %
\setlength{\parindent}{0.0in}           %
  
%
\raggedbottom                           %

\parskip 8pt plus 1pt minus 1pt         %

%
\makeatletter





\def\section{\@startsection {section}{1}{\z@}{3pt }{0.1pt}{\Large\bf}}

\def\subsection{\@startsection{subsection}{2}{\z@}{2pt}{0.1pt}{\large\bf}}

\def\subsubsection{\@startsection{subsubsection}{3}{\z@}{1pt}{0.0pt}{\bf}}

\def\palsbergaddress{\thanks{%
Department of Computer Science, Purdue University, 
West Lafayette, IN 47907
email: {\tt palsberg@cs.purdue.edu}.}}

\def\bcaddress{\thanks{%
Computer Science Dept.,
Boston College,
Chestnut Hill, MA 02167,
email: {\tt seiter@cs.bc.edu}.}}

\def\neuaddress{\thanks{%
College of Computer Science,
Northeastern University,
360 Huntington Avenue,
Boston, MA 02155;
email: {\tt lieber@ccs.neu.edu}.}}

\makeatother
\newenvironment{tex2html_wrap}{}{}
\newwrite\lthtmlwrite
\def\lthtmltypeout#1{{\let\protect\string\immediate\write\lthtmlwrite{#1}}}%
\newbox\sizebox
\begin{document}
\pagestyle{empty}
\stepcounter{section}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{table}\centering  
\begin{tabular}{|l|l|}
\hline
Pattern & Aspect(s) that vary \\  \hline \hline
Adapter  & object interface \\   \hline
Bridge &  object implementation \\  \hline
Chain of Responsibility &  object that handles a request \\  \hline
Decorator &  object responsibilities \\  \hline
Iterator &  composite object traversal \\  \hline
Observer &  inter-object dependency \\  \hline
State &  value-dependent object behavior \\  \hline
Strategy &  algorithm implementation \\  \hline
Visitor &  class responsibilities \\  \hline
\end{tabular}

\label{tbl:patterntable}
\end{table}
}

{\newpage
\clearpage
\samepage \begin{figure}[htbp]
\centerline{\includegraphics[height=1.2in]{fsecompstrat.ps}}

\label{fig:strategy}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\centerline{\includegraphics[height=1.0in]{fsestrat.ps}}

\label{fig:strat}  
\end{figure}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{enum}\item
explicit delegation along aggregation relations,
\item
violation of class encapsulation, and
\item
creation of auxiliary structures when using inheritance.
\end{enum}
}

{\newpage
\clearpage
\samepage \begin{enum}\item
type checking,
\item
change impact, and
\item
performance.
\end{enum}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}[htb]
\centerline{\includegraphics[height=1.4in]{fsestatic.ps}}

\label{fig:staticclass} 
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{enum}\item  
dynamically altering a method implementation for a single object, and
\item
dynamically altering a method implementation of a class (affecting all class
instances) for the duration of some task.
\end{enum}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$::$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1199: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{table}\centering
\begin{tabular}{|l|l|l|}
\hline
Method Type & Class-stored & Instance-stored \\  \hline \hline
Class  & x & not-applicable \\   \hline
Instance & x & x \\  \hline
\end{tabular}

\label{tbl:method}  
\end{table}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\centerline{\includegraphics[height=1.5in]{dynclass.ps}}

\label{fig:dynclass}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\centerline{\includegraphics[height=1.2in]{fsestratdef.ps}}

\label{fig:defaultcontexts}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htbp]
\centerline{\includegraphics[height=1.5in]{fsenewstrat.ps}}

\label{fig:stratmodel2}
\end{figure}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{enum}\item
those based on dynamically altering the behavior of a single object, such as
adapter, bridge, chain of responsibility, decorator, observer, state, and
strategy; and
\item
those based on dynamically altering a class definition (affecting all
instances) for the duration of some task, such as iterator and visitor.
\end{enum}
}

{\newpage
\clearpage
\samepage \begin{table}% latex2html id marker 230
\centering
\begin{tabular}{|l|l|}
\hline 
C++ extension & Purpose \\  \hline \hline
\verb|o ::+ c|  & context c attached to object o  \\  \hline
\verb|m{c}()|  & context c attached to method call m \\ 
\hline 
\verb|{+c}| & incremental composition (vs. overriding) \\  \hline
\verb|context|   & metavariable reference current context \\   \hline
\verb|default|   & default method implementation \\   \hline
\verb|instance|   & instance-stored method (vs. class-stored) \\   \hline
\verb|Class C {|   & \\ 
\verb| ...| & \\ 
\verb| B::m(){...}|   &  Class C redefines B's m method  \\  
\verb|}| & \\  \hline
\end{tabular}

\label{tbl:langextension}
\end{table}
}

\stepcounter{section}
{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}class Composition {
public:
 Composition(Composition:: comp) {this ::+ comp;}
 instance void Compose(); //Interface only.
 ...
};
class SimpleCompositor {
 default void Composition::Compose(){ ..... //default implementation }
};
class TexCompositor {
 void Composition::Compose(){ ..... //alternative implementation }
};
class ArrayCompositor {
 void Composition::Compose(){ ..... //alternative implementation }
};
\end{verbatim} 
\vspace{-0.75cm}

\label{fig:strat_code2}
\end{figure}
}

\stepcounter{section}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure*}[htb]
\centerline{\includegraphics[height=1.6in]{equip.ps}}

\label{fig:equip}
\end{figure*}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}void Computer::traverse() {  traverse to Equipment; }
\end{verbatim}
\vspace{-0.75cm}

\label{fig:allEquip}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}void Computer::traverse() {                       
  before();
  for ( ListIterator<Equipment*> i(equip); 
        !i.IsDone(); i.Next())  
             {i.CurrentItem()->traverse();}
  after();
}

void Equipment::traverse() { before(); after();}  

void CompositeEquipment::traverse() { 
  before();
  for (  ListIterator<Equipment*> i(parts); 
         !i.IsDone(); i.Next())  
              {i.CurrentItem()->traverse();}
  after();
}
\end{verbatim}
\vspace{-0.75cm}

\label{fig:generate}
\end{figure}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}class Equipment {
public:
  virtual Currency NetPrice();
  virtual Currency DiscountPrice();
  virtual void Accept(EquipmentVisitor&);
};
class EquipmentVisitor {
public:
  virtual void VisitCard(Card*);
  virtual void VisitChassis(Chassis*);
  ....
};
void Card::Accept(EquipmentVisitor& visitor) {   visitor.VisitCard(this); }
void Chassis::Accept(EquipmentVisitor& visitor) {
  visitor.VisitChassis(this);
  for ( ListIterator<Equipment*> i(parts);  !i.IsDone();  i.Next() )  
      {  i.CurrentItem()->Accept(visitor);  }
}
....
\end{verbatim}

\label{fig:vis_code}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\centerline{\includegraphics[height=1.5in]{visitor.ps}}

\label{fig:visitormodel}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}class PricingVisitor : public EquipmentVisitor {
public:
   void VisitCard(Card* e) {  total += e->NetPrice();}
   void VisitDrive(Drive* e) {  total += e->NetPrice();}
   void VisitChassis(Chassis* e) {  total += e->DiscountPrice(); }
  .....
private:
  Currency total;
};
class InventoryVisitor : public EquipmentVisitor {
public:
   void VisitCard(Card* e) {  inventory.accumulate(e); }
   void VisitDrive(Drive* e) {  inventory.accumulate(e); }
   void VisitChassis(Chassis* e) { inventory.accumulate(e); }
  .....
private:
  Inventory inventory;
};
\end{verbatim}

\label{fig:vis_subclass}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure*}[htb]
\centerline{\includegraphics[height=1.5in]{visitor2.ps}}

\label{fig:visitor2}
\end{figure*}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}Class PricingVisitor {
private:
 Currency total;
public:
 PricingVisitor():total(0) {}
 Currency total() {return total;}
 void Equipment::before(){context->total += this->netPrice();}   
 void CompositeEquipment::before(){context->total += this->discountPrice();} 
};
Class InventoryVisitor {
private:
 Inventory inventory;   
public:
 InventoryVisitor() {}
 Inventory inventory() {return inventory;}
 void Equipment::before(){context->inventory.accumulate(this);}
};
\end{verbatim}
\vspace{-0.75cm}

\label{fig:equipcode}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{enum}\item
the context object may simulate dynamic structural extension for an object, and
\item
the context object may serve as a shared repository among collaborating
objects.
\end{enum}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}int main() {
 Computer *c=new Computer(new Equipment....);
 InventoryVisitor *inv = new InventoryVisitor();  
 PricingVisitor *price = new PricingVisitor();
 c->traverse{inv}();   //execute call within context
 c->traverse{price}(); //execute call within context
 cout<<"Inventory"<<inv->inventory()<<endl<<
        "Price"<<price->total()<<endl;
}
\end{verbatim}
\vspace{-0.75cm}

\label{fig:equipmain}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure*}[htb]
\centerline{\includegraphics[height=1.4in]{methodlayer.ps}}

\label{fig:methodlayer}
\end{figure*}
}

{\newpage
\clearpage
\samepage \begin{table}\centering
\begin{tabular}{|l|l|l|l|l|}
\hline
Technique & Traversal       & Task-Specific  & Positive & Negative \\  
\hline \hline
Traditional   &EXPLICIT,    &ALL,          & Localizes traversal &Not structure-shy,\\   
GOF           &Visit method &Visit method  & code &Extraneous inheritance,\\ 
Technique     &hard-codes   &required for  & &Explicit delegation,\\   
              &structure    &each class    & &Extraneous delegation\\ 
              \hline 
Context       &EXPLICIT,    &SELECTIVE,    &Benefits of GOF + 
                                                       &Not structure-shy,\\   
Pattern       &Visit method &Override      &No delegation,&Requires small\\ 
              &hard-codes   &before/after  &Task-based,&extension to \\ 
              &structure    &methods       &Reduced hierarchies&static OO languages\\ 
              \hline
Context       &SUCCINCT,    &SELECTIVE,    &Benefits of GOF  + &Requires small\\   
+             &simple      &Override      &Benefits of &extension to \\ 
Traversal     &navigation  &before/after  &context pattern + &static OO languages \\ 
Pattern       &language    &methods       &Structure-shy&\\ 
              \hline
\end{tabular}

\label{tbl:visitortbl}
\end{table}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small 
\begin{verbatim}int main() {
 Computer *c=new Computer(new Equipment....);
 InventoryVisitor *inv = new InventoryVisitor();
 PricingVisitor *price = new PricingVisitor();
 c->traverse{+inv,+price}();  //incremental composition
 cout<<"Inventory"<<inv->inventory()<<endl<<
        "Price"<<price->total()<<endl;
}
\end{verbatim}
\vspace{-0.75cm}

\label{fig:equipmain2}
\end{figure}
}

\stepcounter{section}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \begin{figure}[htb]
\begin{tabbing}
{\bf \LLLL}
x\=Expression ~ \= ::= ~ \=  \kill
    \> Expression \> ::=  \> $\epsilon$ ~ $\mid$ ~ Identifier ~ $\mid$ ~  
                             $\self$ ~ $\mid$ ~  $\context$ \\ 
    \>            \>~~$\mid$\> Expression .  MethodName $\{$ Expression $\}$ 
\end{tabbing}

\label{table:syntax}
\end{figure}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\evar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1237: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\id$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1239: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\mvar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1241: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\begin{tabbing}
{\bf \LLLL}  
x\=xxxxxxxxx\= ::= \=  \kill
    \> $\ovar,\ovar_b,\ovar_c,...$       \> $\in$ OID \\ 
    \> $\vvar$       \> $\in$ ClassName \\ 
    \> $\Class$       \>  $\in$ OID  $\rightarrow$ ClassName \\ 
    \> $\JStore$       \> $\in$ ObjectStore = OID $\times$ Identifier
    $\rightarrow$ OID \\ 
    \> $\SM$       \> $\in$ StaticMethodMap = ClassName $\times$ MethodName 
    $\rightarrow$ Expression  \\ 
    \> $\CM$       \> $\in$ ContextMethodMapCollection = ClassName
    $\rightarrow$ StaticMethodMap \\ 
    \> $\DM$       \> $\in$ DynamicMethodMap = ClassName $\times$ MethodName 
    $\rightarrow$ Expression $\times$ OID \\ 
    \> $\MUpdate$       \> $\in$ DynamicMethodMap $\times$ StaticMethodMap
    $\times$   OID $\rightarrow$ DynamicMethodMap
\end{tabbing}

\label{table:notation}
\end{figure}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Class$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1299: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\oepsilon$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1301: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\cepsilon$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1303: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Class(\oepsilon) = \cepsilon$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1305: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\JStore$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1307: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1309: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar'$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1311: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\id$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1313: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\JStore(\ovar,\id)=\ovar'$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1315: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\SM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1317: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}class Equipment {
public:
  virtual void netPrice(){//default net price }
  virtual void discountPrice(){...//default discount price}
};
class CompositeEquipment : public Equipment {
public:
  void discountPrice() {...//override inherited  price }
};
class InventoryVisitor {
 void Equipment::before(){...//override equipment before method ;}
};
\end{verbatim}

\label{fig:codemm}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}{ (Equipment, netPrice, {//default net price}), 
  (Equipment, discountPrice, {//default discount price}),
  (CompositeEquipment, discountPrice, {//override inherited price}) }
\end{verbatim}

\label{fig:mm}
\end{figure}
}

{\newpage
\clearpage
\samepage \begin{figure}[htb]
\small
\begin{verbatim}{ (Equipment, before, {//override equipment before method})}
\end{verbatim}

\label{fig:mm2}
\end{figure}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{{\sf c}}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1319: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\cvar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1321: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{InventoryVisitor}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1323: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{\cepsilon}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1325: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\cepsilon$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1327: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\cvar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1329: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{{\sf c}}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1331: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{InventoryVisitor}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1337: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\oepsilon$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1339: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{displaymath}\forall (\vvar,\mvar) \in \Domain(\SM): \air   \DM(\vvar,\mvar) =
(\SM(\vvar,\mvar),\oepsilon) 
\end{displaymath}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1341: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{\Class(\ovar)}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1343: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MUpdate$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1345: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1347: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MM^s_{\Class(\ovar)}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1349: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{displaymath}\MUpdate(\DM,\SM,\ovar)(\vvar,\mvar) = 
   \left\{
   \begin{array}{ll}
   (\SM(\vvar,\mvar),\ovar) \air &(\vvar,\mvar) \in \Domain(\SM) \\ 
   \DM(\vvar,\mvar) & \mbox{otherwise}
   \end{array}
   \right.
\end{displaymath}
}

\stepcounter{subsection}
{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\DM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1355: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\CM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1357: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\JStore$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1359: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$(\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \Exp \rightarrow \ovar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1361: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1363: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_b$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1365: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_c$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1367: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\DM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1369: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\CM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1371: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\JStore$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1373: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1375: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{displaymath}\begin{array}{l}
      (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \epsilon \rightarrow  \oepsilon
      \\  
      (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \id \rightarrow
      \JStore(\ovar_b,\id) \\  
      (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \self \rightarrow  \ovar_b \\ 
      (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \context \rightarrow  \ovar_c
  \end{array} 
\end{displaymath}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp_1.\mvar\{\Exp_2\}$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1377: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{displaymath}\irule{\begin{array}{l}
        (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \Exp_1 \rightarrow  \ovar_1 \\ 
        (\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \Exp_2 \rightarrow  \ovar_2 \\ 
        \DM(\Class(\ovar_1),\mvar) = (\Exp,\ovar_3) \\ 
        (\ovar_1,\ovar_3,
        \MUpdate(\DM,\CM(\Class(\ovar_2)),\ovar_2),\CM,\JStore) \vdash \Exp 
        \rightarrow  \ovar_4 \\  
        \end{array}} 
      {(\ovar_b,\ovar_c,\DM,\CM,\JStore) \vdash \Exp_1.\mvar\{\Exp_2\}
      \rightarrow  \ovar_4 } 
\end{displaymath}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp_1$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1379: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_1$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1381: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp_2$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1383: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_2$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1385: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\DM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1387: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1389: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_3$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1391: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$(\Class(\ovar_1),\mvar)$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1393: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\CM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1395: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_2$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1397: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\Exp$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1399: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_1$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1401: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_3$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1403: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\JStore$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1405: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\CM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1407: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\MUpdate(\DM,\CM(\Class(\ovar_2)),\ovar_2)$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1409: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\ovar_4$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1411: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\mvar$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1413: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\DM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1415: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\DM$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1417: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

\stepcounter{section}
\stepcounter{subsection}
\stepcounter{subsection}
{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\_total$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1419: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \begin{figure}[htbp]
\begin{verbatim}*operation* void PricingVisitor(Currency &_total)
*traverse* *from* Computer *to* Equipment;     
*before* Equipment{_total+=netPrice();}   
*before* CompositeEquipment{ _total+=discountPrice();}

*operation* void InventoryVisitor(Inventory &_inv)  
*traverse* *from* Computer *to* Equipment;     
*before* Equipment{_inv.accumulate(this);}

int main() {
 Computer *c=new Computer(new Equipment....);
 Currency price;
 Inventory inv;
 c->PricingVisitor(price);
 c->InventoryVisitor(inv);
 cout<<"Inventory"<<inv<<endl<<"Price"<<price<<endl;
}
\end{verbatim}

\label{fig:vis_pp}
\end{figure}
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\_total$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1421: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

{\newpage
\clearpage
\samepage \setbox\sizebox=\hbox{$\_inv$}\lthtmltypeout{latex2htmlSize :tex2html_wrap_inline1423: \the\ht\sizebox::\the\dp\sizebox.}\box\sizebox
}

\stepcounter{subsection}
\stepcounter{section}
\stepcounter{section}

\end{document}

