Abstraction of backtracking
AssigneeInternational Business Machines Corporation
InventorDouglas C. Ewing
Life of this patent
Estimating the term…
Abstract
A computer-implemented method, computer program product, and computing system is provided for providing a framework for logically representing the discretization of logic for a backtracking algorithm. In an implementation, a method may include defining a validation class representing a validation logic to be tested. A processable class may be defined representing a backtracking logic flow to be implemented. The processable class may be associated with the validation class. One or more candidate options may be evaluated based upon, at least in part, the validation logic and the backtracking logic flow.
Claims17
A computer-implemented method comprising:
- defining, by a processor, a validation class representing a validation logic to be tested;
- defining, by the processor, a processable class representing a backtracking logic flow to be implemented;
- associating, by the processor, the processable class with the validation class, wherein associating the processable class with the validation class includes executing logic referencing a processable child one of prior to executing logic against the processable child and after executing logic against the processable child, the logic defined against the validation class, wherein the logic to select, initialize, and post process the processable child is written on a single validation class;
- and
- evaluating, by the processor, one or more candidate options based upon, at least in part, the validation logic and the backtracking logic flow, wherein evaluating the one or more candidate options includes implementing the backtracking logic flow via one or more processable objects of the processable class, wherein, in the event of a failed candidate option, evaluating the one or more candidate options includes at least one of saving a number of references to the state changes occurring during execution of the validation logic, unrolling the state changes resulting from execution of the validation logic to discard the failed candidate option from the one or more candidate options, and selecting a new candidate option consistent with the validation logic.
A computer program product comprising a non-transitory computer readable storage medium having a plurality of instructions stored thereon, which, when executed by a processor, cause the processor to perform operations including:
- defining a validation class representing a validation logic to be tested;
- defining a processable class representing a backtracking logic flow to be implemented;
- associating the processable class with the validation class, wherein associating the processable class with the validation class includes executing logic referencing a processable child one of prior to executing logic against the processable child and after executing logic against the processable child, the logic defined against the validation class, wherein the logic to select, initialize, and post process the processable child is written on a single validation class;
- and
- evaluating one or more candidate options based upon, at least in part, the validation logic and the backtracking logic flow, wherein evaluating the one or more candidate options includes implementing the backtracking logic flow via one or more processable objects of the processable class, wherein, in the event of a failed candidate option, evaluating the one or more candidate options includes at least one of saving a number of references to the state changes occurring during execution of the validation logic, unrolling the state changes resulting from execution of the validation logic to discard the failed candidate option from the one or more candidate options, and selecting a new candidate option consistent with the validation logic.
A computing system comprising:
- a processor and a memory module coupled with the processor, the processor being configured for:
- defining a validation class representing a validation logic to be tested;
- defining a processable class representing a backtracking logic flow to be implemented;
- associating the processable class with the validation class, wherein associating the processable class with the validation class includes executing logic referencing a processable child one of prior to executing logic against the processable child and after executing logic against the processable child, the logic defined against the validation class, wherein the logic to select, initialize, and post process the processable child is written on a single validation class;
- and
- evaluating one or more candidate options based upon, at least in part, the validation logic and the backtracking logic flow, wherein evaluating the one or more candidate options includes implementing the backtracking logic flow via one or more processable objects of the processable class, wherein, in the event of a failed candidate option, evaluating the one or more candidate options includes at least one of saving a number of references to the state changes occurring during execution of the validation logic, unrolling the state changes resulting from execution of the validation logic to discard the failed candidate option from the one or more candidate options, and selecting a new candidate option consistent with the validation logic.
Dependencies are inferred from the claim text.