7.2.8 loop

Syntax

(loop traversal condition)

Description

Repeat a traversal until a condition is met. If the traversal fails without the condition being met, the traversal is considered to have failed and no move is made.

The condition can be any predicate — either a built-in predicate form, or an arbitrary traversal, including a lambda. See Predicates for details.

This is fairly similar to circuit, but is more natural in some cases where using conditions via precautions may be awkward.

Examples

"Move down until we reach the root."

(symex-eval
  (symex-traversal
    (loop (move down) (at root))))