Changes between Version 4 and Version 5 of compiler/newdesign


Ignore:
Timestamp:
Mar 15, 2010, 5:09:49 PM (10 years ago)
Author:
eamiri
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • compiler/newdesign

    v4 v5  
    33
    44The solution to this problem is visitor pattern. A good explanation of visitor pattern is available [http://www.butunclebob.com/ArticleS.UncleBob.IuseVisitor here]. To implement it a python ideas suggested [http://chris-lamb.co.uk/2006/12/08/visitor-pattern-in-python/ here] and [http://nice.sourceforge.net/visitor.html here] are useful. Also python AST module has a visitor method that might have similar functionality.
    5 
    6 
    7 
    85
    96== Symbol Table ==
     
    1815Implementation of line numbers will use tuples. [[BR]]
    1916
     17== Common Subexpression Elimination ==
     18This should be written as an independent pass that can be called whenever needed.
     19
     20== Boolean Simplification ==
     21In a couple of places in the code we need to use Boolean logic to simplify the code. This happens in Normalization and in Code Simplification. In both cases we need simplify one formula. In code simplification this pretty straightforward, as the formula has only one operator. In Normalization it might be of arbitrary width. It's important to apply proper Boolean algebra rules in situation.
     22