08.11.2014 Views

COMPILER TECHNIQUES FOR MATLAB PROGRAMS ... - CiteSeerX

COMPILER TECHNIQUES FOR MATLAB PROGRAMS ... - CiteSeerX

COMPILER TECHNIQUES FOR MATLAB PROGRAMS ... - CiteSeerX

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

information:<br />

number of rows<br />

number of columns<br />

rank<br />

intrinsic type<br />

structure<br />

maximum estimated value<br />

minimum estimated value<br />

Our inference mechanism considers only scalars, vectors, andtwo-dimensional matrices<br />

hence, only two attributes are necessary for the representation of shape, namely<br />

number of rows and number of columns.<br />

The attribute structure is used for the structural inference, as described in Section 5.5.<br />

Finally, the elds minimum and maximum estimated value are used to store and propagate<br />

the value information used by ourvalue-propagation technique, described in Section 5.2.<br />

All attribute elds, with the exception of the estimated values, are initialized as unknown.<br />

The maximum and minimum estimated values are initialized as +1 and ;1<br />

respectively. These attribute elds are lled during the inference phases and propagated<br />

through the AST and the symbol table whenever a new attribute is synthesized.<br />

These attribute elds are used by the inference mechanism to synthesize information.<br />

In some cases, a node representing a variable in the AST and its corresponding instance in<br />

the symbol table may have the same values for their attribute elds. This, however, is not<br />

always the case. The node in the AST contains the information for the operand represented<br />

by the variable, while the attribute elds in the symbol table contain the information for<br />

the instance of the variable. Consider for example Statement S5 in Figure 3.3(b). The node<br />

19

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!