Re: [eclipse-users] Library Induction

From: Siddharth Angrish <sidangrish_at_...6...>
Date: Wed, 25 Apr 2007 22:24:21 -0400
           Thanks for the previous comments. I have the following
queris/points to make:

1) As per your suggestion I am installing sicstus on my machine and
paralelly try to
see if there some advantages.

2) During FSA6 installation, the type of Prolog available on machine is asked.
The fsa_library and other supporting libraries are generated
afterwards. It appears
that FSA6 generates all its libraries according to the Prolog
available. Hence, FSA6
might be treating all Prologs as same.

3)   I have installed ECLiPSe 5.10 on my machine. I noticed this
peculiar thing, the path
  had to be encloed in "`", that is, backticks rather than double
quotes while in previous
ECLiPSe double quotes were used. Is this some fancy change or I am
seeing strange
behaviour?
I used the following command:
  get_flag(library_path,Path),
        set_flag(library_path, [`/users/angrish/fsa/fsa6/swi` | Path]).

4)  The above added path has all the required libraries. After adding
this path I get the
following error upon executing lib(fsa_library):
--------------------------------------------
lib(fsa_library).
calling an undefined procedure use_module(charsio, [format_to_chars /
3]) in module eclipse

*** compilation aborted
        before line 24 in the file /users/angrish/fsa/fsa6/swi/fsa_library.pl
Abort
---------------------------------------------

This appears to be due to incompatibility between ECLiPSe and SWI Prolog.
What are the possible remedies for this? Shall I try changing this paticular
"use_module" to the one compatible with ECLiPSe. There a total of 35 such usages
in all the libraries.
      What I am afraid of is if after this change I run into more such
incompatibilites?
Is there some cheaper way?

Thanks
Siddharth


On 4/25/07, Kish Shen <kish.shen_at_...2...> wrote:
> On Wednesday 25 April 2007 21:34, Siddharth Angrish wrote:
> > Hi
> >       I have ECLiPSe 5.10 installed on a linux machine. I want to
> > "include" some library
> > made available by a thirdparty (FSA6 utilities toolbox) so that I can
> > use it in my eclipse
> > programs.
> >  All the thirdparty libraries are with me. The libraries are in SWI Prolog.
> > They are successfully included in SWI prolog installed on my machine.
> >
> > I modified the library_path of my eclipse to point to the directory
> > containing the libraries. But
> > still I am getting the error:
> >         library not found in use_module(library(fsa_library))
> >
> > upon execution of the command : lib(fsa_library)
> >
>
> When you  use lib(name) to load a module, there must be a corresponding name.pl file in
> <library_path>.
>
> I have just downloaded the tarball for FSA6 (6-275), and there is a fsa_library.pl in
> fsa6/src. I don't know if this gets copied somewhere when you build the system, but
> your library path should include fsa6/src (or where fsa_library.pl is copied to) in its
> path. If you think you have included this path, could you please show the full path
> for the fsa_library.pl file, and what you library_path is (you can get this with
> get_flag(library_path, X).
>
>
> > NOTE: this fsa_libary (and all of its supporting ones) are written in
> > SWI Prolog. SWI Prolog is
> > installed on my machine and I execute lib(swi) before executing lib(fsa_library)
> >
> > Thanks
> > Siddharth
> >
> From looking at their website, my guess is that FSA is designed mainly for SICStus Prolog,
> and then ported to SWI and Yap, so it may be easier to try to port it via lib(sicstus) than
> lib(swi).
>
> >Whats the realtion between ECLiPSe and SWi Prolog. I guess both are different
> >kinds of prologs.
> >Can we use ECLiPse as a SWI Prolog by setting some flag?
>
> SWI Prolog and ECLiPSe are, as you say, different variants of Prolog. The main difference
> are some of the builtins and libraries provided, and also (probably) the module system.
> In practice, this probably mean that for small programs (the ones you generally write when
> learning Prolog), there should be little or no differences between ECLiPSe and SWI Prolog
> (or any of the other Prologs that more or less adhere to the Edinburgh and/or ISO Prolog
> standard). But for big applications such as FSA, there will probably be differences.
>
> What lib(swi) does is essentially `setting some flag' (and providing some builtins) in ECLiPSe
> to make ECLiPSe more like SWI Prolog so that it is easier for you to run SWI Prolog code on
> ECLiPSe. It is not complete, and you may still need to modify your code to get it running on
> ECLiPSe. However, if you really want to use a package (such as FSA) in ECLiPSe, you should
> aim to port it to native ECLiPSe, perhaps first by getting it working with lib(sicstus) or
> lib(swi), and then gradually replacing the incompatible parts with native ECLiPSe code.
>
> Cheers,
>
> Kish
>
Received on Thu Apr 26 2007 - 03:24:31 CEST

This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST