Slides can be viewed in HTML format. There was a question during the presentation that couldn't be immediatedly answered: how can one do something repeatedly as in "for (int i=1;i<=MAX;i++) ulam(i);"? Although there is a potentially useful repeat/0 functor, the following allows queries like "?- for(1,5,ulam(_))." and could be more convenient:
for_loop(Index,Stop,Functor) :- Index =< Stop, Call =.. [Functor,Index], call(Call), NewIndex is Index + 1, !, for_loop(NewIndex,Stop,Functor). for_loop(Index,Stop,_Functor) :- Index > Stop. for(Start,Stop,Call) :- Call =.. [Functor| _], for_loop(Start,Stop,Functor).
These Prolog source code files were used in the presentation: