Rusreg,

I was once a Prolog-background Oz newbie too so I can totally relate
to you. However, I guess there are some good reasons why there is no
such support as you expect standard library-wise. One of them I guess
is that plain Prolog-style logic programming is kind of discouraged in
Oz. This is so because you have (concurrent logic) constraint
programming and a set of primitives (choice, dis, or, cond, reify,
etc) that allow for usually several alternative implementations for
one single Prolog predicate - not to mention gump for building
efficient parsers/lexical analysers. The idea is that people should be
aware of all these possibilities before deciding what's best for them
in each situation, and that's usually not the Prolog way.

Having said that, here's is a suggestion: why don't you develop a
logic library of your own and publish it in the mogul archive? The Oz
community is very collaborative and open-minded so you are likely to
receive tips from the experts. And you might eventually see your
library integrated into Mozart, who knows!

Cheers,

Jorge.

2009/7/20 Rusreg <[email protected]>:
> I decide to create another  thread about nondet. functions. The Mozart
> support logic style of programming and this is very good. But it's luck of
> library support this style! Any logic or functional-logic language has
> predicate library for some that solves using logic propgramming principes.
> For example, parsing text - typycal problem for logic programming. I decide
> use 'choise' clause (in compliance with Peter Van Roy's advice). But I meet
> with some difficults.
>
> First, there are know comfortable way for unification strings by pattern.
> For example, there no such function:
>
> "1+1" = {AppendFull one sign two}
>
> that bind variable one to '1', variable sign two '+' and variable two to
> '1'.
>
> Writing this function very easy and it's difficult to understand, why it's
> not contained in Mozart libray:
>
> proc {Append L1 L2 L3}
>     choice
>    L1 = nil L2 = L3
>     [] X T1 T3 in
>    L1 = X|T1 L3 = X|T3
>    {Append T1 L2 T3}
>     end
>  end
>    proc {AppendFull Lists List}
>     choice
>    Lists = nil List = nil
>     [] Y X|T = Lists in
>    {Append X Y List}
>    {AppendFull T Y}
>     end
>  end
>
> Second, there is no nondet. functions for character analize. For example,
> the functions in module Char is deterministik, e.g. function isAlpha usable
> only in one direction:
>
> {Char.isAlpha &a Result,}
>
> but this is don't work:
>
> {Char.isAlpha Ch true}.
>
> Again, the realization of this functions is very easy and it's very strange,
> that Mozart having so powerful realization of logic paradigm luck of the
> library modules with set of nondeterministik functions.
>
> PS Sorry for poor English, if some phrases don't understandable, I will try
> to build them more correct.
> _________________________________________________________________________________
> mozart-users mailing list
> [email protected]
> http://www.mozart-oz.org/mailman/listinfo/mozart-users
>
_________________________________________________________________________________
mozart-users mailing list                               
[email protected]
http://www.mozart-oz.org/mailman/listinfo/mozart-users

Reply via email to