Go to the first, previous, next, last section, table of contents.
Author(s): Jose Morales, Manuel Carro.
Version: 1.10#7 (2006/4/26, 19:22:13 CEST)
Version of last change: 1.9#252 (2003/12/30, 22:15:50 CET)
Low-level utilities for building foreign interfaces. End-users should not need to use them, as the Ciao Prolog Compiler reads the user assertions and calls appropriately the predicates in this module.
- Library usage:
:- use_module(library(build_foreign_interface)).
- Exports:
- Predicates:
build_foreign_interface/1
,
rebuild_foreign_interface/1
,
build_foreign_interface_explicit_decls/2
,
rebuild_foreign_interface_explicit_decls/2
,
build_foreign_interface_object/1
,
rebuild_foreign_interface_object/1
,
do_interface/1
.
- Other modules used:
- System library modules:
write_c/write_c
,
streams
,
terms
,
lists
,
llists
,
aggregates
,
system
,
format
,
messages
,
assertions/assrt_lib
,
foreign_compilation
,
compiler/c_itf
,
ctrlcclean
,
errhandle
.
- PREDICATE: build_foreign_interface/1:
-
Usage: build_foreign_interface(in(File))
- Description: Reads assertions from
File
, generates the gluecode for the Ciao Prolog interface, compiles the foreign files and the gluecode file, and links everything in a shared object. Checks modification times to determine automatically which files must be generated/compiled/linked.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
- PREDICATE: rebuild_foreign_interface/1:
-
Usage: rebuild_foreign_interface(in(File))
- Description: Like
build_foreign_interface/1
, but it does not check the modification time of any file.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
- PREDICATE: build_foreign_interface_explicit_decls/2:
-
Usage: build_foreign_interface_explicit_decls(in(File), in(Decls))
- Description: Like
build_foreign_interface/1
, but use declarations in Decls
instead of reading the declarations from File
.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
in(Decls)
is a list of term
s.
(basic_props:list/2
)
- PREDICATE: rebuild_foreign_interface_explicit_decls/2:
-
Usage: rebuild_foreign_interface_explicit_decls(in(File), in(Decls))
- Description: Like
build_foreign_interface_explicit_decls/1
, but it does not check the modification time of any file.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
in(Decls)
is a list of term
s.
(basic_props:list/2
)
- PREDICATE: build_foreign_interface_object/1:
-
Usage: build_foreign_interface_object(in(File))
- Description: Compiles the gluecode file with the foreign source files producing an unique object file.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
- PREDICATE: rebuild_foreign_interface_object/1:
-
Usage: rebuild_foreign_interface_object(in(File))
- Description: Compiles (again) the gluecode file with the foreign source files producing an unique object file.
- Call and exit should be compatible with:
in(File)
is a source name.
(streams_basic:sourcename/1
)
- PREDICATE: do_interface/1:
-
Usage: do_interface(in(Decls))
- Description: Given the declarations in
Decls
, this predicate succeeds if these declarations involve the creation of the foreign interface
- Call and exit should be compatible with:
in(Decls)
is a list of term
s.
(basic_props:list/2
)
Go to the first, previous, next, last section, table of contents.