# For your enjoyment: A more complete diagram of the Byrd Box Model

**URL:** <https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481>\
**Category:** Nice to know\
**Created:** [June 7, 2020, 1:04pm UTC](https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481 "2020-06-07T13:04:33Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![dtonhofer](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/dtonhofer/32/902_2.png) [@dtonhofer](https://swi-prolog.discourse.group/u/dtonhofer)\
**Post date:** [June 7, 2020, 1:04pm UTC](https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481/1 "2020-06-07T13:04:34Z")

</div>

Here it is:

[https://raw.githubusercontent.com/dtonhofer/prolog\_notes/master/pics/byrd\_box\_model/Byrd%20Box%20Model.svg](https://raw.githubusercontent.com/dtonhofer/prolog_notes/master/pics/byrd_box_model/Byrd%20Box%20Model.svg)

I have added the “Rollback” action and the “Decision Lozenge” on redo. The latter seems really necessary to account for the ability to have deterministic and semi-deterministic predicates. Or is done differently?

---

<div class="post-metadata">

**Author:** ![jan](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/jan/32/4_2.png) [@jan](https://swi-prolog.discourse.group/u/jan)\
**Post date:** [June 7, 2020, 2:13pm UTC](https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481/4 "2020-06-07T14:13:41Z")

</div>

> [@anon95304481](#):
>
> But you might be right, the debugger might insert extra choice points

SWI-Prolog always creates a choice point for a call when in debug mode. That allows for _retry_. It also kills LCO. Often that is what you want during debugging. These _debug_ choicepoints are not shown by the `A` command (and also not by the graphical debugger).

---

<div class="post-metadata">

**Author:** ![peter.ludemann](https://yyz2.discourse-cdn.com/free1/user_avatar/swi-prolog.discourse.group/peter.ludemann/32/48_2.png) [@peter.ludemann](https://swi-prolog.discourse.group/u/peter.ludemann)\
**Post date:** [June 7, 2020, 6:02pm UTC](https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481/5 "2020-06-07T18:02:56Z")

</div>

Don’t forget that unification of an attributed variable can “insert” a new goal at various points in the diagram.  
😉

Also that there are non-backtracking predicates (nb\_setval/2 et al) that are unaffected by “rollback” …

---

<div class="post-metadata">

**Author:** ![EricGT](https://avatars.discourse-cdn.com/v4/letter/e/f1d935/32.png) [@EricGT](https://swi-prolog.discourse.group/u/EricGT)\
**Post date:** [November 3, 2021, 12:52pm UTC](https://swi-prolog.discourse.group/t/for-your-enjoyment-a-more-complete-diagram-of-the-byrd-box-model/2481/7 "2021-11-03T12:52:17Z")

</div>

The following link is dead.

> [@dtonhofer](#):
>
> [https://raw.githubusercontent.com/dtonhofer/prolog\_notes/master/pics/byrd\_box\_model/Byrd%20Box%20Model.svg](https://raw.githubusercontent.com/dtonhofer/prolog_notes/master/pics/byrd_box_model/Byrd%20Box%20Model.svg)

I found this one instead.

> <https://github.com/dtonhofer/prolog_notes/tree/master/other_notes/about_byrd_box_model>
>
> //github.com/dtonhofer/prolog\_notes/tree/master/other\_notes/about\_byrd\_box\_model
