Re: [eclipse-clp-users] search tree node count

From: Kish Shen <kisshen_at_...5...>
Date: Tue, 13 Jan 2009 15:08:09 +0000
Joachim Schimpf wrote:
> Lars Kotthoff wrote:
>> Dear list,
>>
>>  is there a general, preferably easy, way of getting the number of search tree
>> nodes explored when searching for the solution to a problem?
> 
> A "node" is a place where a nondeterministic choice is made, e.g. in indomain/1
> when you are using finite domains.  You need to add a nonlogical counter to
> your code, e.g.

Another definition of a node is where a unification is performed, 
regardless of if it was deterministic or not. This can give you some 
idea of the amount of computation your program may be performing. The 
basic assumption is that the computation performed in a unification is 
on average similar for all unifications in your program. This does not 
work well if some of your reasoning/computation is not performed in 
Prolog (e.g. if it is done in C, as in eplex or part of the ic solver).

ECLiPSe does not provide a direct measurement of this definition of 
`node'. However, it does provide tools that may be useful to you, e.g. 
the number of times that various points in a program are reached. See 
chapter 6 of the tutorial 
(http://eclipse-clp.org/doc/tutorial/tutorial042.html) for more 
information on these tools.

Cheers,

Kish
Received on Tue Jan 13 2009 - 15:08:20 CET

This archive was generated by hypermail 2.2.0 : Mon Jul 09 2018 - 02:05:29 CEST