Software Quality 2002: Assignment, due 9.12.2002

Index
In the paper Törn, Andersson and Enholm: A Complexity Metrics Model of Software, (see the copy in the folder) three complexity measures (l,c,e) for programs are defined. The measure l measures length, c the average structural complexity and e total complexity. The measure e=lc and the measures l and c are independent.

Test the measures by computing the values (l,c,e) obtained for some basic constructs p and for some modifications p' of these obtained by making incremental changes to the basic constructs, and by assessing the outcome based on your empirical evaluation. Because of the small change made it is easy to tell whether pXp' or p'Xp should be valid, where X = "is more complex than".

Also select a number of programs (about 10) of your own or from the literature and assess the result (l,c,e) with your empirical evaluation. Discuss the outcome.

Try to reason in accordance with the theory covered in the course book. Write your assignment in the form of a scientific paper and cover enough of the source paper so that the writing can be understood as such.

The assignment may be worked out by a group of no more that two persons.

Software for running Scheme can be found on zeus. On zeus enter /softa/zeus/bin/drscheme and click on the drscheme symbol appearing in order to open the application.

The SC Scheme program can be copied from:
/home/aton2/atorn/Scheme/complex

The program "complex" should be copied to the upper window of drscheme (copy and paste) and executed. Then enter (CS '(program in node notation)) in the same window and execute. The result will appear in the lower window. You may also name your program by using (define prog '(program in node notation)) and then use (CS prog) to execute. It is also possible to use variables instead of constants for l,c in the nodes and then define them prior to execution. Note that all definitions must be executed in order to be effective. In order to execute place the bar behind the expression to be executed (it will be highligted) an then click on execute.