>First of all, it is worth noticing that
>it looks a bit strange to have this predicate return a boolean, as
>more usual logic programming would simply fail when not all elements
>satisfied the given predicate. This usual interpretation would very
>straightforwardly be implemented as:

The problem of using this predicates in clause is that it is not 
nondeterministik. For example it is not possible to find all variants of lists 
that has Predicate=true on his elements. Yes, the number of such lists are 
infinite, but if there are some other criteria, the system choose only some 
variants from infinte number of variants that match this criteria. I think. 
that the problem is in this moment: the enumerating of variants list match the 
All predicate take many time. I had no time to check this on this week, but 
today evening I check this supposition by limit the list length that match to 
All predicate by some small number (which will be small but enouth for right 
matching).

>If (i) is not known, you might resort to the following:
> <some coide skipped...>

Thank for code. Today I don't understand this code, I must to think about it 
some time.

>Well, maybe by now you are beginning to see why Mozart does not offer
>a high-level logic library. That's because there are various ways to
>get stuff done, usually better efficieny-wise than the plain Prolog
>style.

I begin doubt in full enumeration approach of calculation such Prolog. Peter 
Van Roy say that it is preferable to use constraint programming that don't 
enumerate the all possible solutions, but first cut don't possible solutions 
and only after cutting enumerate. This look very intresting, but ist's possible 
to use this mechanisme for parsing text? I think that this work only for 
integer inequalities.
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to