[cvs-nhc98] Modified tracing transformation to create different progra

User olaf olaf@sparud.net
Thu, 5 Apr 2001 21:13:29 +0200 (CEST)


olaf: Thu Apr  5 21:13:29 CEST 2001

Update of /usr/src/master/nhc/src/prelude/PreludeDebug
In directory hinken:/tmp/cvs-serv10193/src/prelude/PreludeDebug

Modified Files:
	HatArchive.hs PreludeDebug.hs 
Log Message:
Modified tracing transformation to create different programs for trusted and suspected modules.

In trusted modules no trace nodes for if, case, guards and lambdas are created.
In trusted modules all trace nodes that are still created have the trace passed to the function or the hidden version of it as parent (hidden trace node is only created once in a trusted function).
In trusted modules no trace nodes for the used functions are created. These have to be trusted functions (for the construction of the trace nodes for functions that are passed as arguments the module where the function is passed is responsible anyway).
Some transformed trusted code is slightly simpler than suspected code (case, if, guards).

Now have suspected and trusted versions of combinators fun and prim (tfun and tprim). The suspected ones always create a name for a function, the trusted ones only if the parent is not trusted.

The trace node Root is now always trusted. This is needed to avoid names for trusted CAFs.

This transformation profits from
- enter and primEnter no longer requiring a table name:
  so with this transformation trusted table names are no longer constructed
- Interact.hs being transformed as suspected:
  otherwise the output of a program using interact would directly point to
  Root.

The new transformation leads to 10-20% smaller trace files and 10% faster runtime of traced programs.

The main remaining unreachable parts of a trace seem to be:
- data structures internal to trusted code
- SAT's (all C?) for all trusted applications in non-project contexts
- indirections in trusted code