Re: [eclipse-users] Predicate declarations in Eclipse

From: Kish Shen <kisshen_at_...5...>
Date: Mon, 30 Apr 2007 17:28:48 +0100

I believe you are trying to not use the compatibility libraries to do 
this now, but it may still be useful to look at how the compatibility 
module does things, and to look at the manual chapters on modules for 
both SICStus and ECLiPSe, and understand how the two are different, and 
so how you can change things from one to the other...

Siddharth Angrish wrote:
> Hi
>         I am trying to port a big prolog code (FSA6) to ECLiPse. The
> code is compatible
> with swi/sicstus/yap(SSY) prologs. I have a few queries regarding
> predicate delarations:
> 1) SSY support the keyword, multifile. Does EClipSe use "dynamic" for
> the purpose?
dynamic does give you what multifile does, i.e. you can define clauses 
for the same predicate in different files...
> 2) Does "dynamic" also serve the purpose of the keyword
> "discontiguous" which is there
> in all SSY
> 3)  SSY support the following declaration:
>       multifile user:help_info/4.
>    which I think says that-> To the predicate help_info/4,  "defined"
> in module "user",
>   new clauses can be added in the current file.
> I modified it to: (only in the first file)
>     dynamic user:help_info/4
>             However, this module does not exist anywhere in the code I
> am porting.
> I suppose it is created on the fly in SSY, a feature which ECLIPSE
> does NOT support.
This is not quite correct -- you can create modules `on the fly' (i.e. 
during execution of code at runtime) with ECLiPSe, but you must do it 
explicitly. The difference is that on Prologs such as SWI Prolog, when 
you refer to an a new module, it is created implicitly.
> To circumvent the "non-availability" of this feature I created the user module
> myself as  following:
> -----------user.ecl------------------
> :- module(user).
> help_info(A,B,C,D).
> ----------------------------
>       Then in the module I am working on, I included the delcaration
> :- lib(user).
> Upon compilation I am getting the error: ( I am using->
> lib(myLibraryName). to compile)
> [[type error in dynamic user : help_info / 4 in module fsa_array]]
> what can be the problem?
> 4) How can one see all the "loaded modules " in the current instance of eclipse
> 5) Is there any way/need of getting a "public declaration" for a
> predicate in ECLIPSE
> Many thanks in advance ;)
> Siddharth
> _______________________________________________
> ECLiPSe-Users mailing list
> ECLiPSe-Users_at_...2...


Received on Mon Apr 30 2007 - 17:28:56 CEST

This archive was generated by hypermail 2.3.0 : Tue Aug 20 2019 - 00:14:49 CEST