[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Iteratively calling Prolog from C
From: |
Manuel Carro |
Subject: |
Re: Iteratively calling Prolog from C |
Date: |
Thu, 17 Jul 2003 10:45:18 +0200 |
>> Well, I call them "accumulator" variables, although there
>> may be a better way to describe them. Factorial_nd is the
>> simplest example, I believe. Notice how the last
>> two variables in factorial_nd/5 are used to store values
>> over backtracking. Otherwise, the same principle is used in
>> fib_qmat_nd.pl, fib_range_nd.pl, and magic_sq.pl.
These are accumulator variables, that name has been around for
tenths of years. But you are not storing values over backtracking.
When you backtrack to a choicepoint in the computation you have the
same variable values as when that choicepoint was first created.
MCL
________________________________________________
Nula aestetica sine etica. Ergo apaga y vĂ¡monos.
- Re: Iteratively calling Prolog from C, (continued)
- Re: Iteratively calling Prolog from C, Lindsey Spratt, 2003/07/17
- Re: Iteratively calling Prolog from C, Alexandre Tessier, 2003/07/17
- Re: Iteratively calling Prolog from C, Daniele Peri, 2003/07/17
- Re: Iteratively calling Prolog from C, Daniel Dudley, 2003/07/17
- Re: Iteratively calling Prolog from C, Daniele Peri, 2003/07/17
- Re: Iteratively calling Prolog from C, Bartek Wilczynski, 2003/07/17
- Re: Iteratively calling Prolog from C, Daniel Dudley, 2003/07/17
- Re: Iteratively calling Prolog from C, Daniele Peri, 2003/07/18
- Re: Iteratively calling Prolog from C, Daniele Peri, 2003/07/18
- Re: Iteratively calling Prolog from C, Fergus Henderson, 2003/07/18
- Re: Iteratively calling Prolog from C,
Manuel Carro <=
- Re: Iteratively calling Prolog from C, Daniel Dudley, 2003/07/17