Needs correction
"which models each predicate in a Prolog program as a state machine ("box") that transitions through states ("ports") as a program is evaluated."
should be corrected to
"which models each predicate activation in a Prolog program as a state machine ("box") that transitions through states ("ports") as a program is evaluated."
The same predicate can have multiple predicate activations (which are stack frames) going, and inside a Byrd box, there are other Byrd boxes, all the way down.
This makes the Byrd box model actually a bit hard to understand. It also skips about the details concerning what happens at the head of a predicate, and at tail end of a clause.
The "choice point model" whereby proof search is modeled as a tree that is growing or shrinking is easier on the mind.
The ports are also rather "events" that the debugger can listen for rather than "states". The model just progresses through the ports.
Companion info
My notes on the Byrd Box model here
Check out the research report Une sémantique observationnelle du modèle des boîtes pour la résolution de programmes logiques (version étendue) (in french) for a ton of Byrd Box images and their link to proof trees.
As with so much of the Prolog world, historical floatsam is carried along: The "Exit" port should have been called the "Succ" port from the very beginning. Everybody should really name it that way.
DETERMINISTIC PREDICATE (well-behaved: closing off the REDO port, i.e. "leaving no choicepoint") +---------------------+ -------⊳|Call------⊳-----⊳Succ|------⊳ from | | to prev | | next pred | | pred ⊲---+ |Fail Redo| +--- | +---------------------+ | | | +---⊲----no choicepoint----⊲--+ SEMI-DETERMINISTIC PREDICATE (well-behaved: closing off the REDO port, i.e. "leaving no choicepoint") +---------------------+ -------⊳|Call---+--⊳-----⊳Succ|------⊳ from | | | to prev | ∇ | next pred | | | pred ⊲---+---|Fail⊲--+ | +--- | +---------------------+ | | | +---⊲----no choicepoint----⊲--+ NONDETERMINISTIC PREDICATE (succeeds maybe 0 times) MULTI PREDICATE (succeeds at least once) (well-behaved if it closes off the REDO port at the last solution, i.e. "leaves no choicepoint") +---------------------+ -------⊳|Call---+--⊳--+--⊳Succ|------⊳ from | | | | to prev | ∇ ∆ | next pred | | | | pred ⊲---+---|Fail⊲--+--⊲--+---Redo|⊲--+--- | +---------------------+ | | | +---⊲----no choicepoint----⊲--+