Home
Reading
Searching
Subscribe
Sponsors
Statistics
Posting
Contact
Spam
Lists
Links
About
Hosting
Filtering
Features Download
Marketing
Archives
FAQ
Blog
 
Gmane
From: Fergus Henderson <fjh-mailbox-18-UpNH1qtbVFvQT0dZR+AlfA <at> public.gmane.org>
Subject: Re: deeqSeq proposal
Newsgroups: gmane.comp.lang.haskell.prime
Date: Thursday 6th April 2006 16:48:55 UTC (over 11 years ago)
On 05-Apr-2006, Ben Rudiak-Gould
 wrote:
> Andy Gill wrote:
> >- [various reasons for deepSeq]
> You left out the one that most interests me: ensuring that there are no 
> exceptions hiding inside a data structure.

Yes, that's important for fault isolation... see below.

On 03-Apr-2006, Andy Gill 
wrote:
>
> - Fergus Henderson used deeqSeq in our Cryptol to FPGA compiler, between
> each pass, to make sure that we could assess which pass was taking
> what time.

Actually that wasn't the only reason why we needed deepSeq.

The other reason, at least as important, was fault isolation.  Like most
compilers, the Cryptol to FPGA compiler consists of a number of of
separate compilation phases.  When a problem in our compiler such as
an exception, heap or stack exhaustion, or an infinite loop occurs,
it is very helpful to be able to know in which phase that error occurred.

With lazy evaluation, this is tricky, since the execution of
all the different phases will be interleaved.  Any debugging
messages produced by "trace" from the different stages also
get interleaved.

The Cryptol to FPGA compiler will (in verbose mode) print out a message
when it starts each compilation stage.  We use deepSeq to ensure that each
stage has been fully evaluated before proceeding on to the next stage.
This allows us to isolate faults to a particular compilation stage.

I also used hyperSeq in previous Haskell programs before I joined Galois.
I've found the need for this to be quite common...

-- 
Fergus J. Henderson                 |  "I have always known that the
pursuit
Galois Connections, Inc.            |  of excellence is a lethal habit"
Phone: +1 503 626 6616              |     -- the last words of T. S. Garp.
 
CD: 4ms