发明名称 Method and apparatus for transparent backtracking
摘要 A technique is used in embodiments of the invention such that backtracking programs can be written in a general purpose computer language (e.g., C++ or Java) without requiring the control structure of the program to reflect the structure of the decision tree. A data state and a control state are restored during backtracking. For restoring the data state, embodiments of the invention keep track of the changes made to variables and the point in execution at which the changes are made. When backtracking occurs, the data state can be restored by undoing the changes to the desired point in execution. For restoring the control state, the method of the invention provides a "failure" exception state that is invoked upon failure in the program (e.g., a failure to find a solution in a search program).. The failure exception is "caught" by catch points established in the execution stack. The failure exception is passed up the execution stack until a point is reached prior to the failure at which execution should be re-initiated. Since the control structure of the search program need not have the same form as the decision tree, part of the control state for the desired decision point may no longer exist on the execution stack, so the catch point may not be directly associated with the desired point but merely preceed it. The remaining part of the control state is restored by re-executing the program in a special re-execution mode until the desired state is achieved and another alternative may be chosen.
申请公布号 US6157922(A) 申请公布日期 2000.12.05
申请号 US19970957346 申请日期 1997.10.24
申请人 TRILOGY DEVELOPMENT GROUP, INC. 发明人 VAUGHAN, PAUL WILLIAM
分类号 G06F17/30;G06F9/44;G06N5/00;(IPC1-7):G06N5/00 主分类号 G06F17/30
代理机构 代理人
主权项
地址