patch applied (ghc): Haskell Program Coverage

Andy Gill andy at galois.com
Wed Oct 25 10:46:23 EDT 2006


On Oct 25, 2006, at 2:01 AM, Simon Marlow wrote:

> Andy Gill wrote:
>> Tue Oct 24 14:29:07 PDT 2006  andy at galois.com
>>   * Haskell Program Coverage
>>     This large checkin is the new ghc version of Haskell
>>   Program Coverage, an expression-level coverage tool for Haskell.
>
> Congratulations!
>
> Would you like to add an 'hpc' way to the testsuite so that all the  
> should_run tests get tried with -fhpc?  You must have some other  
> test cases for the testsuite too.
>

Yes. I agree. The order of attack is:
  - checkin a version that does not break anything else :-) (DONE, I  
hope)
  - Add some explicit tests cases, that run some hpc code, and check  
the .tix for specific values.
  - Adding a way is a great idea. But it is expensive to do so re.  
test time. Are you sure?
> The use of Notes in Core is a slight concern - the simplifier will  
> almost certainly rearrange code without paying attention to the  
> Notes, indeed it looks like you have some hacks already to avoid  
> this (the extra cases in exprArity look quite strange).  Weren't  
> you using explicit expressions before?  Why the change of design?

Compile time and less hacks. We use Note for SCC right now, so this  
seemed like the right place to put it. The exprArity
hack is there because of the code

	\ x -> _tick \ y -> expr 	really does have aritty 1; it will  
translate into
	\x -> case tickme 0 of
	          _-> \ y -> expr

The new design has less backend hacks in CorePrep and CoreToStg. It  
also does not need to be a a stage2 compiler,
because we have a small Hpc.c. We could revert back to the explicit  
expressions at Core level, though without too many
problems if we have to. I'd leave the HsSyn and StgSyn parts just as  
they are, though.


> What's the status of the tools?
>

The tools are in darcs/hpc, and will be released 0.3 in the next few  
days. Feel free to try them as a hackers
release. (warning: out of date docs!).

And have a look at http://www.galois.com/~andy/ray/hpc.html for an  
example of hpc-markup in use.

Cheers!

AndyG



More information about the Cvs-ghc mailing list