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.)

4 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.

indoor Bars in Edmonton said...

Envious Design by Brandt and Thompson Has been in service Edmonton for many years and providing exceptional quality custom stone indoors and outdoors bars. We are expert in providing custom indoor Bars in Edmontonstone indoors; whether you need to upgrade your current, fireplace or you would like to add a new one we got you covers. With wide range of natural stones, we can give you a desired solution, which is built to last longer. Our custom stone indoor solution in Edmonton will not only provide you industrial