Customizing library paths and path aliases

Author(s): Daniel Cabeza.

This library provides means for customizing, from environment variables, the libraries and path aliases known by an executable. Many applications of Ciao, including ciaoc, ciaosh, and ciao-shell make use of this library. Note that if an executable is created dynamic, it will try to load its components at startup, before the procedures of this module can be invoked, so in this case all the components should be in standard locations.

Usage and interface

Documentation on exports

PREDICATE
get_alias_path

Consult the environment variable CIAOALIASPATH and add facts to predicates library_directory/1 and file_search_path/2 to define new library paths and path aliases. The format of CIAOALIASPATH is a sequence of paths or alias assignments separated by a path list separator character (see extract_paths/2), an alias assignment is the name of the alias, an = and the path represented by that alias (no blanks allowed). For example, given

   CIAOALIASPATH=/home/bardo/ciao:contrib=/usr/local/lib/ciao
the predicate will define /home/bardo/ciao as a library path and /usr/local/lib/ciao as the path represented by contrib.

Documentation on multifiles

PREDICATE
See Basic file/stream handling. The predicate is multifile.
The predicate is of type dynamic.

Trust:file_search_path(X,Y)

  • The following properties hold upon exit:
    (basic_props:gnd/1)X is ground.
    (basic_props:gnd/1)Y is ground.

PREDICATE
See Basic file/stream handling. The predicate is multifile.
The predicate is of type dynamic.

Trust:library_directory(X)

  • The following properties hold upon exit:
    (basic_props:gnd/1)X is ground.