<div dir="auto"><div>Hello Adam,</div><div dir="auto"><br></div><div dir="auto">Thank you for the references! May I copy your answer to my SE post, or would you like to answer there as well under your name?</div><div dir="auto"><br></div><div dir="auto">I have a binary of a game (Mankala) written in that dialect of Pascal; I might get to decompiling it to see if the branch operator was used.</div><div dir="auto"><br></div><div dir="auto">Thank you,</div><div dir="auto">Leo<br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Aug 26, 2017 15:30, "Adam Sampson" <<a href="mailto:ats@offog.org">ats@offog.org</a>> wrote:<br type="attribution"><blockquote class="quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="quoted-text">Leo Broukhis <<a href="mailto:leob@mailcom.com">leob@mailcom.com</a>> writes:<br>
<br>
> I'm specifically interested in the branch/back feature. What<br>
> theoretical paper does it come from?<br>
<br>
</div>I think it's fairly likely that the designers of your 1979 dialect of<br>
Pascal were thinking of this as a feature to support (what was then<br>
called) "backtrack programming" for AI-like applications, rather than as<br>
an exception handling mechanism...<br>
<br>
There were several programming languages experimenting with approaches<br>
to backtracking in the mid-late 70s, Prolog probably being the<br>
best-known result ("branch" is equivalent to a Prolog predicate with<br>
multiple rules, where failure inside one rule causes control flow to<br>
backtrack to the next rule). Your branch/back construct would be pretty<br>
handy if you were trying to write a tree search algorithm with pruning<br>
(e.g. a classic board game AI), or a backtracking parser.<br>
<br>
Here's a 1974 survey which sketches the backtracking idea (p157) and<br>
describes some early implementations:<br>
<a href="http://dl.acm.org/citation.cfm?id=356632" rel="noreferrer" target="_blank">http://dl.acm.org/citation.<wbr>cfm?id=356632</a><br>
<br>
This 1977 paper gives a denotational semantics for backtracking, and is<br>
fairly widely cited by later work:<br>
<a href="https://link.springer.com/article/10.1007/BF00289245" rel="noreferrer" target="_blank">https://link.springer.com/<wbr>article/10.1007/BF00289245</a><br>
<br>
(Note in particular that it calls its equivalent of "branch" the<br>
"alternative" operator -- which might explain your "exit on ALT"<br>
message?)<br>
<br>
This 1979 paper takes the idea and generalises it to work with<br>
coroutines (using Pascal for examples, although with different syntax):<br>
<a href="http://dl.acm.org/citation.cfm?id=357062.357063" rel="noreferrer" target="_blank">http://dl.acm.org/citation.<wbr>cfm?id=357062.357063</a><br>
<br>
Thanks,<br>
<font color="#888888"><br>
--<br>
Adam Sampson <<a href="mailto:ats@offog.org">ats@offog.org</a>>                         <<a href="http://offog.org/" rel="noreferrer" target="_blank">http://offog.org/</a>><br>
</font></blockquote></div><br></div></div></div>