users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bool fd performance bug???


From: Vitaly Lagoon
Subject: bool fd performance bug???
Date: Tue, 2 Jan 2001 21:54:44 +1100 (EST)

Hello and Happy New Millenium to everybody!

Tell me if I'm wrong but I hit something that looks to me like a
performance bug in GNU Prolog 1.2.1. I thought that:

?- fd_domain_bool(Vars_Of_F), F, fd_labeling(Vars_Of_F,[backtracks(0)]).

would be the right way to test satisfiability of a boolean formula F. 
Here I want to prevent fd_labeling from backtracking through the
different solutions of F. It is important since the containing
predicate in my code is by itself backtrackable, but it only matters
if F is (or isn't) satisfiable. Well, this satisfiability test works
but with a huge performance waste. It looks like 'backtracks(0)'
option is taken into account only AFTER the search on the
backtrack. So, fd_labeling attempts to find another solution on the
backtrack and then fails, regardless of the result of this search.

Please tell me if I'm right or if you can suggest better ways of
satisfiability testing. For now I'm using 
'\+ \+ fd_labeling(Vars_Of_F)' which is a kind of nasty Prolog hack... 


Cheers

Vit



reply via email to

[Prev in Thread] Current Thread [Next in Thread]