Hi. I have a homework-assignment where one of the tasks is to make a static Analyzer for BIPL-E, BIPL-E being the BIPL Language with input- and output-parameters.

The Analyzer is supposed to

  1. check that all variables has been defined before use. If not, give an error message.

You can do this by traversing each statement in the program to check if it uses values that

haven’t been defined before. You can keep track of which variables that has been defined so far in a list, and put new ones to the list when you encounter Assign-statements

  1. check that all output parameters have been given a value when the program has ended
  2. You don’t care about what the different statements really evaluates to .

 

As a start:

 

static_analyzer :: BIPLE -> ..

..

 

Best regards,

Eirik

 

Sendt fra E-post for Windows 10