users-prolog
[Top][All Lists]
Advanced

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

Re: GNU prolog and GNU MP


From: Daniel Diaz
Subject: Re: GNU prolog and GNU MP
Date: Tue, 14 May 2002 14:16:55 +0200

Hi All,

It should be a very interesting extension to integrate an arbitrary
arithmetic precision package in GNU Prolog (e.g. GNU MP). This can be
integrated in:

  1) the Prolog part and/or
  2) the FD solver part.

The integration in 1) needs to modify a lot of code (since integers
appear rather often) but the change should not be too difficult. The
main problem I see is to adapt the memory management used by GNU MP
(malloc I suppose) with the one used in Prolog (stacks + trailing for
backtracling). we also have to decide if we replace current integers by
GNU MP integers or if we add a new data type "bigints" (to avoid to
penalize applications which do not need infinite precision)...

The integration in 2) is much more localized since the FD part only has
a limited interface with the Prolog part. But 2) without 1) implies some
problems to automatically convert an FD variable into a Prolog integer
when its domain is a singleton (as it is done now)...

If (some of) you are interested in attacking such an extension I would
be happy to help you but I'm rather busy with other tasks...



Paul Leader wrote:
> 
> I would be very interested in this as well.
> 
> I would like to be able to use gpl's constraint solver but I have to have
> arbitrary arithmetic.  At the moment I use poplog but that lacks any real
> support for constraints.
> 
> I suspect that the conversion might be rather hard, or at best very time
> consuming.  The question is, can the basic structure and algoritms in gpl
> handle a conversion like this without breaking?  I don't really know enough
> about the inner working of gpl, although this could be a very good learning
> exercise :->
> 
> I think it is time that I dug out the gpl source code and started having a
> poke around.
> 
> Paul
> 
> > -----Original Message-----
> > From: Rashkatsa [mailto:address@hidden
> > Sent: 28 April 2002 23:01
> > To: address@hidden
> > Subject: GNU prolog and GNU MP
> >
> >
> > Hi !
> >
> > does someone know how difficult it is to add arbitrary
> > arithmetic features
> > to gnu prolog (clp(fd) part included) with
> > gnu MP library for example ?
> >
> > is it an
> > easy/difficult/impossible_without_rewritting_the_whole thing ?
> >
> > thanks for your feedback.
> >
> > regards,
> >
> > rashkatsa
> >
> >
> > _______________________________________________
> > Users-prolog mailing list
> > address@hidden
> > http://mail.gnu.org/mailman/listinfo/users-prolog
> >
> 
> **********************************************************************
> This email and any files transmitted with it are confidential and
> intended solely for the use of the individual or entity to whom they
> are addressed. If you have received this email in error please notify
> the system manager.
> 
> This footnote also confirms that this email message has been swept
> for the presence of computer viruses.
> 
> www.praxis-cs.co.uk
> **********************************************************************
> 
> _______________________________________________
> Users-prolog mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/users-prolog



reply via email to

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