Test coverage analysis for pure functional languages? 
Author Message
 Test coverage analysis for pure functional languages?

Some ideas occured to me in my software engineering class.

Test coverage analysis tools, which measures how completely
a program is tested using a given input set, is available for
conventional languages. Typical example includes ATAC for C
programs, a data-flow driven analysis tool which highlights
program blocks or conditional branches that are never executed
and finds out assignment/use pairs of variable, etc.

I expect such tools more helpful for purely functional languages
because programs written in purely functional language are more
a function of input than those in C. However, I don't know whether
properties such as lazyness or infinite data structure would harm
the usefulness of such analysis. I wonder if there is already a tool
for functional languages, or is there such a project going on?

If one is going to design such a tool for FLs, what testable attributes
would be important? Highlighting unexecuted blocks and branches are
still essential. The so-called "c-use" or "p-use" attribute which
finds out all <assignment, use> pair of a variable is no longer
useful since all variable are assigned only once in a FL. Should
some attribute be particularilly invented for FLs, for example
something involving data constructors?

--
To iterate is human; to recurse, divine.
       ,--------------------- ------------- -------- ----- --- -- - -
       | Shin-Cheng Mu   Computer Information Science, NCTU, Taiwan

       `----------



Sat, 30 May 1998 03:00:00 GMT  
 Test coverage analysis for pure functional languages?

Quote:

> Some ideas occured to me in my software engineering class.

> Test coverage analysis tools, which measures how completely
> a program is tested using a given input set, is available for
> conventional languages. Typical example includes ATAC for C
> programs, a data-flow driven analysis tool which highlights
> program blocks or conditional branches that are never executed
> and finds out assignment/use pairs of variable, etc.

> I expect such tools more helpful for purely functional languages
> because programs written in purely functional language are more
> a function of input than those in C. However, I don't know whether
> properties such as lazyness or infinite data structure would harm
> the usefulness of such analysis. I wonder if there is already a tool
> for functional languages, or is there such a project going on?

Yes - coverage analysis   is *very* useful. We  use  it a lot  to test
Erlang code. Once enough  test cases have  been written to force total
coverage of  the code  the resultant  programs  have few few  residual
errors (I'd like to say zero but you never know!).

IMHO no one method catches all errors. The  combination of static type
checking + coverage + run-time testing  of invarients yields very high
quality code.

        Joe



Sun, 31 May 1998 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Looking for a test coverage analysis tool

2. FORTRAN Test Coverage Analysis Tools wanted

3. Test Coverage Analysis for Python scripts

4. Test coverage analysis tool

5. Is there a test coverage analysis tool for tcl-code

6. diffrence between pure functional and pure declarativ

7. Side effects in pure functional languages

8. Small Pure Functional Language

9. Pure Functional Language On PC????

10. Hope+, A Practical Pure Functional Language Available

11. Software Testing - Test Coverage

12. Benchmark tests for functional languages

 

 
Powered by phpBB® Forum Software