Monday, May 11, 2009

Representing failure

I'm working on an algorithm that uses backtracking implemented with exceptions and handlers (rather than, say, explicit continuations). I just noticed that, for debugging, it's nice to represent the failure exceptions as records that contain not just the data about the operation that failed but also an optional list of other failure exceptions. In the disjunction cases, I can save the intermediate failures and, if they all fail, include them in the resulting failure record. This provides me with a nice data structure representing the control flow of the failed search tree. It only required modifying about 3 lines of code and the resulting data structure is easier to analyze than a manual debugging sequence. (I hate working with debuggers, even good ones.)

3 comments:

meldaresearch said...

Do you have an insight where to acquire Nursing Assignment Writing Services? Hire our Nursing Research Paper Writers for all your Nursing Coursework Help Writing Services.

Ankit singh said...

Find Latest Job Vacancies and verified Jobs for different categories including drivers, cooks, beauticians, delivery boys, security guards nearby. Apply Now, It's Free!

Lucas Smith said...

There are numerous explanations for ordinance printer not printing blunders, without knowing the reasons you can't be resolve group Canon Printer Not Printing Color issue.