0

For Prolog plugins, such as SICStus spider, proDT and PDT, "find declaration" in eclipse editor can not find predicate definition in the modules which lie in different directories.

For example,

$HOME/dirA/A.pl:
    :- module(database,[]).
    ...
    set_dbaccess(Options) :-
      (db_done ->
           true
           ; 
    ...

$HOME/dirB/B.pl:
    ...
    fd(From,To,OrigOptions) :-
       database:set_dbaccess(OrigOptions),
    ...

There is no import statement for module database in the top of B.pl. so all the above plugins cannot find the definition for module database and predicate set_dbaccess. Of course, the F3 operations on symbols database, set_dbaccess also fail.

any methods for the problem?

false
  • 10,264
  • 13
  • 101
  • 209

1 Answers1

0

I am not very sure what exactly you want but I guess you can make a file say pred_files containing :-dynamic pred1/2, pred2/3, ... and every time you need use the predicate in another .pl file you can use :-ensure_loaded(pred_files)

Ramin
  • 891
  • 2
  • 10
  • 16