@code{(log-code-macro x)}, marks x as a log-code macro e.g. it will inline it's code into the continuation in an and sequence hence reduce the number of needed closures.

@code{(log-code-macro? x)}, check to see if @code{x} is a macro.

@node postpone

@chapter postpone, a framework for postponing evaluations.

This code is available from @code{(logic guile-log postpone)} You may have noticed that guile log is a framework to do tree searches to meet a certain criteria and during the path in the tree create datastructures that are able to undo and also redo it's state. Most people when approaching this will sooner or later be bitten by the NP hardness of many interesting problems. The solution might then be to try intelligent guesses in which branch the gold is hiding. What one would like to do is try a set of branches, freeze the different states and at that point create some sort of index that represent the liklihood of the gold lying buried beneath. Then an overall global decition can be taken and only the most promissing paths will be further examined. It is for this use case the following system is constructed.

@chapter Api.

@findex postpone

@findex postpone-frame

@verbatim

G.L. (postpone val power)

G.L. (postpone-frame limit fact maxsize)

@end verbatim

To be able to postpone we must have a baseline from which we will base our restarts e.g. @code{postpone-frame}. The @code{postpone} command will basically evaluate @code{val} and see if it's larger then a certain limit that is governed by an intial value @code{limit} and @code{fact}- a factor that adds to the limit each postpone turn. The @code{power} is used to manage a list of possible restarts for and this list is sorted so that we at restarts will try to use @code{maxsize} first elements of the list. The list is never larger then @code{10* maxsize}.