next up previous
Next: Analysis Up: Gasta architecture Previous: The builder
Gasta Homepage: Home page

The analyzer

The analyzer can use informations collected by the builder and/or visitor to make its analysis. In fact you are free to use what you need and it's why arrows between analyzer and CFG are dotted just like arrows between analyzer and builder.

For our analysis, we used in the same time information given by the visitor (CFG) and informations given by our builder annotBuilder.c. Those informations are tables inside which we will find some data like association between a type and its node number inside the ASG or, between variables and it's node number. It's relevant because inside the ASG given by gcc you found many nodes like :
@32   var_decl   name: @34   type: @6

So, it is interesting to have a hash table that immediatly told us that @34 is associated to with the variable k (for example). That avoids you traversing the tree each time you need this kind of information. As you can imagine, @34 is the key which will access to the string k.



Guillaume Thouvenin 2001-10-01