Dresden OCL Toolkit

tudresden.ocl.normalize
Class DefaultContextInsertion

java.lang.Object
  extended bytudresden.ocl.normalize.DefaultContextInsertion
All Implemented Interfaces:
NodeNormalizer

public class DefaultContextInsertion
extends Object
implements NodeNormalizer

This node normalization inserts the default context ("self" or some iterator variable) wherever appropriate. A prerequistite for this step is that there is a default context in every part of the expression, which means that all iterators must have names and there are no double iterators.

Author:
Frank Finger
See Also:
MultipleIteratorSolving, IteratorInsertion

Constructor Summary
DefaultContextInsertion()
           
 
Method Summary
 void close(OclTree tree, NormalizerPass pass)
          This method notifies the NodeNormalizer of the end of a tree normalization.
 void normalize(Node n, OclTree tree)
          normalize a single node
 void open(OclTree tree, NormalizerPass pass)
          allows the NodeNormalizers to initialize itself.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultContextInsertion

public DefaultContextInsertion()
Method Detail

open

public void open(OclTree tree,
                 NormalizerPass pass)
Description copied from interface: NodeNormalizer
allows the NodeNormalizers to initialize itself. In this method, a NodeNormalizer typically makes sure that the AST fulfills the preconditions it requires and then registers its own postconditions.

Specified by:
open in interface NodeNormalizer

close

public void close(OclTree tree,
                  NormalizerPass pass)
Description copied from interface: NodeNormalizer
This method notifies the NodeNormalizer of the end of a tree normalization. Here new invariants on the tree can be registered that were not registered in open() already

Specified by:
close in interface NodeNormalizer

normalize

public void normalize(Node n,
                      OclTree tree)
Description copied from interface: NodeNormalizer
normalize a single node

Specified by:
normalize in interface NodeNormalizer

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.