fix docs
This commit is contained in:
parent
2c7e62ad71
commit
ec2e1c21b0
@ -38,7 +38,7 @@ PROJECT_NAME = yap-6
|
|||||||
# could be handy for archiving the generated documentation or if some version
|
# could be handy for archiving the generated documentation or if some version
|
||||||
# control system is used.
|
# control system is used.
|
||||||
|
|
||||||
PROJECT_NUMBER =
|
PROJECT_NUMBER = 6.3.4
|
||||||
|
|
||||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||||
# for a project that appears at the top of each page and should give viewer a
|
# for a project that appears at the top of each page and should give viewer a
|
||||||
@ -330,7 +330,7 @@ AUTOLINK_SUPPORT = YES
|
|||||||
# diagrams that involve STL classes more complete and accurate.
|
# diagrams that involve STL classes more complete and accurate.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
BUILTIN_STL_SUPPORT = NO
|
BUILTIN_STL_SUPPORT = YES
|
||||||
|
|
||||||
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
# If you use Microsoft's C++/CLI language, you should set this option to YES to
|
||||||
# enable parsing support.
|
# enable parsing support.
|
||||||
@ -670,7 +670,7 @@ SHOW_FILES = YES
|
|||||||
# Folder Tree View (if specified).
|
# Folder Tree View (if specified).
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
SHOW_NAMESPACES = YES
|
SHOW_NAMESPACES = NO
|
||||||
|
|
||||||
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
# The FILE_VERSION_FILTER tag can be used to specify a program or script that
|
||||||
# doxygen should invoke to get the current version for each file (typically from
|
# doxygen should invoke to get the current version for each file (typically from
|
||||||
@ -783,7 +783,8 @@ INPUT = docs/yap.md \
|
|||||||
os \
|
os \
|
||||||
packages \
|
packages \
|
||||||
library \
|
library \
|
||||||
CXX
|
CXX \
|
||||||
|
OPTYap
|
||||||
|
|
||||||
# This tag can be used to specify the character encoding of the source files
|
# This tag can be used to specify the character encoding of the source files
|
||||||
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
|
||||||
@ -862,7 +863,7 @@ RECURSIVE = YES
|
|||||||
# Note that relative paths are relative to the directory from which doxygen is
|
# Note that relative paths are relative to the directory from which doxygen is
|
||||||
# run.
|
# run.
|
||||||
|
|
||||||
EXCLUDE =
|
EXCLUDE = *pltotex.pl
|
||||||
|
|
||||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||||
@ -963,7 +964,7 @@ FILTER_SOURCE_PATTERNS =
|
|||||||
# (index.html). This can be useful if you have a project on for instance GitHub
|
# (index.html). This can be useful if you have a project on for instance GitHub
|
||||||
# and want to reuse the introduction page also for the doxygen output.
|
# and want to reuse the introduction page also for the doxygen output.
|
||||||
|
|
||||||
USE_MDFILE_AS_MAINPAGE = NO
|
USE_MDFILE_AS_MAINPAGE = docs/yap.md
|
||||||
|
|
||||||
#---------------------------------------------------------------------------
|
#---------------------------------------------------------------------------
|
||||||
# Configuration options related to source browsing
|
# Configuration options related to source browsing
|
||||||
@ -989,19 +990,19 @@ INLINE_SOURCES = YES
|
|||||||
# Fortran comments will always remain visible.
|
# Fortran comments will always remain visible.
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
STRIP_CODE_COMMENTS = YES
|
STRIP_CODE_COMMENTS = NO
|
||||||
|
|
||||||
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
# If the REFERENCED_BY_RELATION tag is set to YES then for each documented
|
||||||
# function all documented functions referencing it will be listed.
|
# function all documented functions referencing it will be listed.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
REFERENCED_BY_RELATION = NO
|
REFERENCED_BY_RELATION = YES
|
||||||
|
|
||||||
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
# If the REFERENCES_RELATION tag is set to YES then for each documented function
|
||||||
# all documented entities called/used by that function will be listed.
|
# all documented entities called/used by that function will be listed.
|
||||||
# The default value is: NO.
|
# The default value is: NO.
|
||||||
|
|
||||||
REFERENCES_RELATION = NO
|
REFERENCES_RELATION = YES
|
||||||
|
|
||||||
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
||||||
# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
|
# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
|
||||||
@ -2100,7 +2101,7 @@ PERL_PATH = /usr/bin/perl
|
|||||||
# powerful graphs.
|
# powerful graphs.
|
||||||
# The default value is: YES.
|
# The default value is: YES.
|
||||||
|
|
||||||
CLASS_DIAGRAMS = NO
|
CLASS_DIAGRAMS = YES
|
||||||
|
|
||||||
# You can define message sequence charts within doxygen comments using the \msc
|
# You can define message sequence charts within doxygen comments using the \msc
|
||||||
# command. Doxygen will then run the mscgen tool (see:
|
# command. Doxygen will then run the mscgen tool (see:
|
||||||
|
13
docs/yap.tex
13
docs/yap.tex
@ -9761,6 +9761,15 @@ this is possible, @var{Goal} will become invalid after executing
|
|||||||
YAP_RecoverSlots(1);
|
YAP_RecoverSlots(1);
|
||||||
if (out == 0) return FALSE;
|
if (out == 0) return FALSE;
|
||||||
@end example
|
@end example
|
||||||
|
|
||||||
|
@ifplaintext
|
||||||
|
|
||||||
|
@copydoc real
|
||||||
|
|
||||||
|
@end ifplaintext
|
||||||
|
|
||||||
|
@texinfo
|
||||||
|
|
||||||
Slots are safe houses in the stack, the garbage collector and the stack
|
Slots are safe houses in the stack, the garbage collector and the stack
|
||||||
shifter know about them and make sure they have correct values. In this
|
shifter know about them and make sure they have correct values. In this
|
||||||
case, we use a slot to preserve @var{t} during the execution of
|
case, we use a slot to preserve @var{t} during the execution of
|
||||||
@ -9807,6 +9816,8 @@ Set the first @var{HowMany} arguments to the @var{HowMany} slots
|
|||||||
starting at @var{slot}.
|
starting at @var{slot}.
|
||||||
@end table
|
@end table
|
||||||
|
|
||||||
|
@end texinfo
|
||||||
|
|
||||||
The following functions complement @var{YAP_RunGoal}:
|
The following functions complement @var{YAP_RunGoal}:
|
||||||
@table @code
|
@table @code
|
||||||
@item @code{int} YAP_RestartGoal(@code{void})
|
@item @code{int} YAP_RestartGoal(@code{void})
|
||||||
@ -9815,7 +9826,7 @@ Look for the next solution to the current query by forcing YAP to
|
|||||||
backtrack to the latest goal. Notice that slots allocated since the last
|
backtrack to the latest goal. Notice that slots allocated since the last
|
||||||
@code{YAP_RunGoal} will become invalid.
|
@code{YAP_RunGoal} will become invalid.
|
||||||
|
|
||||||
@item @code{int} YAP_Reset(@code{void})
|
@Item @code{int} YAP_Reset(@code{void})
|
||||||
@findex YAP_Reset (C-Interface function)
|
@findex YAP_Reset (C-Interface function)
|
||||||
Reset execution environment (similar to the @code{abort/0}
|
Reset execution environment (similar to the @code{abort/0}
|
||||||
built-in). This is useful when you want to start a new query before
|
built-in). This is useful when you want to start a new query before
|
||||||
|
97
pl/absf.yap
97
pl/absf.yap
@ -8,7 +8,7 @@
|
|||||||
* *
|
* *
|
||||||
*************************************************************************/
|
*************************************************************************/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@file absf.yap
|
@file absf.yap
|
||||||
|
|
||||||
@defgroup abs_file_name File Name Resolution
|
@defgroup abs_file_name File Name Resolution
|
||||||
@ -20,7 +20,7 @@
|
|||||||
variables and registry information to search for files.
|
variables and registry information to search for files.
|
||||||
|
|
||||||
@{
|
@{
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
@ -53,7 +53,7 @@
|
|||||||
specified both with dot, as `.ext`, or without, as plain `ext`.
|
specified both with dot, as `.ext`, or without, as plain `ext`.
|
||||||
|
|
||||||
- relative_to(+ _FileOrDir_ )
|
- relative_to(+ _FileOrDir_ )
|
||||||
|
|
||||||
Resolve the path relative to the given directory or directory the
|
Resolve the path relative to the given directory or directory the
|
||||||
holding the given file. Without this option, paths are resolved
|
holding the given file. Without this option, paths are resolved
|
||||||
relative to the working directory (see working_directory/2) or,
|
relative to the working directory (see working_directory/2) or,
|
||||||
@ -64,7 +64,7 @@
|
|||||||
|
|
||||||
Imposes the condition access_file( _File_ , _Mode_ ). _Mode_ is one of `read`, `write`, `append`, `exist` or
|
Imposes the condition access_file( _File_ , _Mode_ ). _Mode_ is one of `read`, `write`, `append`, `exist` or
|
||||||
`none` (default).
|
`none` (default).
|
||||||
|
|
||||||
See also access_file/2.
|
See also access_file/2.
|
||||||
|
|
||||||
- file_type(+ _Type_ )
|
- file_type(+ _Type_ )
|
||||||
@ -72,15 +72,15 @@
|
|||||||
Defines suffixes matching one of several pre-specified type of files. Default mapping is as follows:
|
Defines suffixes matching one of several pre-specified type of files. Default mapping is as follows:
|
||||||
|
|
||||||
1. `txt` implies `[ '' ]`,
|
1. `txt` implies `[ '' ]`,
|
||||||
|
|
||||||
2. `prolog` implies `['.yap', '.pl', '.prolog', '']`,
|
2. `prolog` implies `['.yap', '.pl', '.prolog', '']`,
|
||||||
|
|
||||||
3. `executable` implies `['.so', ',dylib', '.dll']` depending on the Operating system,
|
3. `executable` implies `['.so', ',dylib', '.dll']` depending on the Operating system,
|
||||||
|
|
||||||
4. `qlf` implies `['.qlf', '']`,
|
4. `qlf` implies `['.qlf', '']`,
|
||||||
|
|
||||||
5. `directory` implies `['']`,
|
5. `directory` implies `['']`,
|
||||||
|
|
||||||
6. The file-type `source` is an alias for `prolog` designed to support compatibility with SICStus Prolog. See also prolog_file_type/2.
|
6. The file-type `source` is an alias for `prolog` designed to support compatibility with SICStus Prolog. See also prolog_file_type/2.
|
||||||
|
|
||||||
Notice that this predicate only
|
Notice that this predicate only
|
||||||
@ -147,7 +147,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$find_in_path'(File,opts(Extensions,RelTo,Type,Access,FErrors,Expand,Debug),TrueFileName,G),
|
'$find_in_path'(File,opts(Extensions,RelTo,Type,Access,FErrors,Expand,Debug),TrueFileName,G),
|
||||||
nb:nb_queue_enqueue(Ref, TrueFileName),
|
nb:nb_queue_enqueue(Ref, TrueFileName),
|
||||||
fail
|
fail
|
||||||
;
|
;
|
||||||
nb:nb_queue_close(Ref, FileNames, [])
|
nb:nb_queue_close(Ref, FileNames, [])
|
||||||
),
|
),
|
||||||
'$absolute_file_names'(Solutions, FileNames, FErrors, TrueFileName, File, G).
|
'$absolute_file_names'(Solutions, FileNames, FErrors, TrueFileName, File, G).
|
||||||
@ -157,7 +157,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$absolute_file_names'(Solutions, FileNames, _, TrueFileName, _, _) :-
|
'$absolute_file_names'(Solutions, FileNames, _, TrueFileName, _, _) :-
|
||||||
lists:member(TrueFileName, FileNames),
|
lists:member(TrueFileName, FileNames),
|
||||||
(Solutions == first -> ! ; true).
|
(Solutions == first -> ! ; true).
|
||||||
|
|
||||||
|
|
||||||
'$process_fn_opts'(V,_,_,_,_,_,_,_,_,G) :- var(V), !,
|
'$process_fn_opts'(V,_,_,_,_,_,_,_,_,G) :- var(V), !,
|
||||||
'$do_error'(instantiation_error, G).
|
'$do_error'(instantiation_error, G).
|
||||||
@ -187,7 +187,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$process_fn_opt'(verbose_file_search(Debug),Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,_,G) :- !,
|
'$process_fn_opt'(verbose_file_search(Debug),Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,_,G) :- !,
|
||||||
'$check_true_false'(Debug,G).
|
'$check_true_false'(Debug,G).
|
||||||
'$process_fn_opt'(Opt,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,G) :- !,
|
'$process_fn_opt'(Opt,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,Extensions,RelTo,Type,Access,FErrors,Solutions,Expand,Debug,G) :- !,
|
||||||
'$do_error'(domain_error(file_name_option,Opt),G).
|
'$do_error'(domain_error(file_name_option,Opt),G).
|
||||||
|
|
||||||
'$check_fn_extensions'(V,G) :- var(V), !,
|
'$check_fn_extensions'(V,G) :- var(V), !,
|
||||||
'$do_error'(instantiation_error, G).
|
'$do_error'(instantiation_error, G).
|
||||||
@ -203,7 +203,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$check_atom'(A,_G) :- atom(A), !.
|
'$check_atom'(A,_G) :- atom(A), !.
|
||||||
'$check_atom'(T,G) :- !,
|
'$check_atom'(T,G) :- !,
|
||||||
'$do_error'(type_error(atom,T),G).
|
'$do_error'(type_error(atom,T),G).
|
||||||
|
|
||||||
'$check_fn_type'(V,G) :- var(V), !,
|
'$check_fn_type'(V,G) :- var(V), !,
|
||||||
'$do_error'(instantiation_error, G).
|
'$do_error'(instantiation_error, G).
|
||||||
'$check_fn_type'(txt,_) :- !.
|
'$check_fn_type'(txt,_) :- !.
|
||||||
@ -216,7 +216,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$do_error'(domain_error(file_type,T),G).
|
'$do_error'(domain_error(file_type,T),G).
|
||||||
'$check_fn_type'(T,G) :- !,
|
'$check_fn_type'(T,G) :- !,
|
||||||
'$do_error'(type_error(atom,T),G).
|
'$do_error'(type_error(atom,T),G).
|
||||||
|
|
||||||
'$check_fn_errors'(V,G) :- var(V), !,
|
'$check_fn_errors'(V,G) :- var(V), !,
|
||||||
'$do_error'(instantiation_error, G).
|
'$do_error'(instantiation_error, G).
|
||||||
'$check_fn_errors'(fail,_) :- !.
|
'$check_fn_errors'(fail,_) :- !.
|
||||||
@ -234,7 +234,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$do_error'(domain_error(solutions,T),G).
|
'$do_error'(domain_error(solutions,T),G).
|
||||||
'$check_fn_solutions'(T,G) :- !,
|
'$check_fn_solutions'(T,G) :- !,
|
||||||
'$do_error'(type_error(atom,T),G).
|
'$do_error'(type_error(atom,T),G).
|
||||||
|
|
||||||
'$check_true_false'(V,G) :- var(V), !,
|
'$check_true_false'(V,G) :- var(V), !,
|
||||||
'$do_error'(instantiation_error, G).
|
'$do_error'(instantiation_error, G).
|
||||||
'$check_true_false'(true,_) :- !.
|
'$check_true_false'(true,_) :- !.
|
||||||
@ -243,7 +243,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$do_error'(domain_error(boolean,T),G).
|
'$do_error'(domain_error(boolean,T),G).
|
||||||
'$check_true_false'(T,G) :- !,
|
'$check_true_false'(T,G) :- !,
|
||||||
'$do_error'(type_error(atom,T),G).
|
'$do_error'(type_error(atom,T),G).
|
||||||
|
|
||||||
% This sequence must be followed:
|
% This sequence must be followed:
|
||||||
% user and user_input are special;
|
% user and user_input are special;
|
||||||
% library(F) must check library_directories
|
% library(F) must check library_directories
|
||||||
@ -287,7 +287,7 @@ absolute_file_name(File0,File) :-
|
|||||||
'$swi_set_prolog_flag'(file_name_variables, Expand),
|
'$swi_set_prolog_flag'(file_name_variables, Expand),
|
||||||
(
|
(
|
||||||
'$absolute_file_name'(File,ExpFile)
|
'$absolute_file_name'(File,ExpFile)
|
||||||
->
|
->
|
||||||
'$swi_set_prolog_flag'(file_name_variables, OldF)
|
'$swi_set_prolog_flag'(file_name_variables, OldF)
|
||||||
;
|
;
|
||||||
'$swi_set_prolog_flag'(file_name_variables, OldF),
|
'$swi_set_prolog_flag'(file_name_variables, OldF),
|
||||||
@ -306,7 +306,7 @@ absolute_file_name(File0,File) :-
|
|||||||
;
|
;
|
||||||
AbsFile = ExpFile
|
AbsFile = ExpFile
|
||||||
).
|
).
|
||||||
|
|
||||||
|
|
||||||
'$search_in_path'(File,opts(Extensions,_,Type,Access,_,_,_),F) :-
|
'$search_in_path'(File,opts(Extensions,_,Type,Access,_,_,_),F) :-
|
||||||
'$add_extensions'(Extensions, File, F0),
|
'$add_extensions'(Extensions, File, F0),
|
||||||
@ -364,7 +364,7 @@ absolute_file_name(File0,File) :-
|
|||||||
% windows has stuff installed in the registry
|
% windows has stuff installed in the registry
|
||||||
'$system_library_directories'(Library, Dir) :-
|
'$system_library_directories'(Library, Dir) :-
|
||||||
'$swi_current_prolog_flag'(windows, true),
|
'$swi_current_prolog_flag'(windows, true),
|
||||||
( (
|
( (
|
||||||
'$swi_current_prolog_flag'(address_bits, 64) ->
|
'$swi_current_prolog_flag'(address_bits, 64) ->
|
||||||
( HKEY='HKEY_LOCAL_MACHINE/Software/YAP/Prolog64';
|
( HKEY='HKEY_LOCAL_MACHINE/Software/YAP/Prolog64';
|
||||||
HKEY='HKEY_CURRENT_USER/Software/YAP/Prolog64' )
|
HKEY='HKEY_CURRENT_USER/Software/YAP/Prolog64' )
|
||||||
@ -440,7 +440,7 @@ absolute_file_name(File0,File) :-
|
|||||||
is_absolute_file_name(File), !.
|
is_absolute_file_name(File), !.
|
||||||
'$extend_path_directory'(Name, D, File, Opts, NewFile, Call) :-
|
'$extend_path_directory'(Name, D, File, Opts, NewFile, Call) :-
|
||||||
user:file_search_path(Name, IDirs),
|
user:file_search_path(Name, IDirs),
|
||||||
( atom(IDirs) ->
|
( atom(IDirs) ->
|
||||||
'$split_by_sep'(0, 0, IDirs, Dir)
|
'$split_by_sep'(0, 0, IDirs, Dir)
|
||||||
;
|
;
|
||||||
Dir = IDirs
|
Dir = IDirs
|
||||||
@ -464,8 +464,9 @@ absolute_file_name(File0,File) :-
|
|||||||
/**
|
/**
|
||||||
path(-Directories:list) is det,deprecated
|
path(-Directories:list) is det,deprecated
|
||||||
|
|
||||||
YAP specific procedure that returns a list of user-defined directories
|
YAP specific procedure that returns a list of user-defined directories
|
||||||
in the library search-path.
|
in the library search-path.We suggest using user:file_search_path/2 for
|
||||||
|
compatibility with other Prologs.
|
||||||
*/
|
*/
|
||||||
path(Path) :- findall(X,'$in_path'(X),Path).
|
path(Path) :- findall(X,'$in_path'(X),Path).
|
||||||
|
|
||||||
@ -478,13 +479,17 @@ path(Path) :- findall(X,'$in_path'(X),Path).
|
|||||||
add_to_path(+Directory:atom) is det,deprecated
|
add_to_path(+Directory:atom) is det,deprecated
|
||||||
|
|
||||||
YAP-specific predicate to include directory in library search path.
|
YAP-specific predicate to include directory in library search path.
|
||||||
|
We suggest using user:file_search_path/2 for
|
||||||
|
compatibility with other Prologs.
|
||||||
*/
|
*/
|
||||||
add_to_path(New) :- add_to_path(New,last).
|
add_to_path(New) :- add_to_path(New,last).
|
||||||
|
|
||||||
/**
|
/**
|
||||||
add_to_path(+Directory:atom, +Position:atom) is det,deprecated
|
add_to_path(+Directory:atom, +Position:atom) is det,deprecated
|
||||||
|
|
||||||
YAP-specific predicate to include directory in front or back of library search path.
|
YAP-specific predicate to include directory in front or back of
|
||||||
|
library search path. We suggest using user:file_search_path/2 for
|
||||||
|
compatibility with other Prologs and more extensive functionality.
|
||||||
*/
|
*/
|
||||||
add_to_path(New,Pos) :-
|
add_to_path(New,Pos) :-
|
||||||
atom(New), !,
|
atom(New), !,
|
||||||
@ -496,7 +501,7 @@ add_to_path(New,Pos) :-
|
|||||||
'$add_to_path'(New,last) :- !, recordz('$path',New,_).
|
'$add_to_path'(New,last) :- !, recordz('$path',New,_).
|
||||||
'$add_to_path'(New,first) :- recorda('$path',New,_).
|
'$add_to_path'(New,first) :- recorda('$path',New,_).
|
||||||
|
|
||||||
/** remove_from_path(+Directory:atom) is det,deprecated
|
/** remove_from_path(+Directory:atom) is det,deprecated
|
||||||
|
|
||||||
*/
|
*/
|
||||||
remove_from_path(New) :- '$check_path'(New,Path),
|
remove_from_path(New) :- '$check_path'(New,Path),
|
||||||
@ -515,7 +520,7 @@ remove_from_path(New) :- '$check_path'(New,Path),
|
|||||||
current library directory name. Asserted in the user module.
|
current library directory name. Asserted in the user module.
|
||||||
|
|
||||||
Library directories are the places where files specified in the form
|
Library directories are the places where files specified in the form
|
||||||
`library( _File_)` are searched by the predicates consult/1,
|
`library( _File_ )` are searched by the predicates consult/1,
|
||||||
reconsult/1, use_module/1, ensure_loaded/1, and load_files/2.
|
reconsult/1, use_module/1, ensure_loaded/1, and load_files/2.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
@ -536,6 +541,24 @@ remove_from_path(New) :- '$check_path'(New,Path),
|
|||||||
/**
|
/**
|
||||||
user:prolog_file_type(?Suffix:atom, ?Handler:atom) is nondet, dynamic
|
user:prolog_file_type(?Suffix:atom, ?Handler:atom) is nondet, dynamic
|
||||||
|
|
||||||
|
This multifile/dynamic predicate relates a file extension _Suffix_
|
||||||
|
to a language or file type _Handler_. By
|
||||||
|
default, it supports the extensions yap, pl, and prolog for prolog files and
|
||||||
|
uses one of dll, so, or dylib for shared objects. Initial definition is:
|
||||||
|
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~prolog
|
||||||
|
prolog_file_type(yap, prolog).
|
||||||
|
prolog_file_type(pl, prolog).
|
||||||
|
prolog_file_type(prolog, prolog).
|
||||||
|
prolog_file_type(A, prolog) :-
|
||||||
|
current_prolog_flag(associate, A),
|
||||||
|
A \== prolog,
|
||||||
|
A \==pl,
|
||||||
|
A \== yap.
|
||||||
|
prolog_file_type(A, executable) :-
|
||||||
|
current_prolog_flag(shared_object_extension, A).
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:- multifile user:prolog_file_type/2.
|
:- multifile user:prolog_file_type/2.
|
||||||
@ -563,10 +586,25 @@ user:prolog_file_type(A, executable) :-
|
|||||||
solutions. The predicate is originally defined as follows:
|
solutions. The predicate is originally defined as follows:
|
||||||
|
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~prolog
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~prolog
|
||||||
file_search_path(library,A) :-
|
file_search_path(library, Dir) :-
|
||||||
library_directory(A).
|
library_directory(Dir).
|
||||||
file_search_path(system,A) :-
|
file_search_path(commons, Dir) :-
|
||||||
prolog_flag(host_type,A).
|
commons_directory(Dir).
|
||||||
|
file_search_path(swi, Home) :-
|
||||||
|
current_prolog_flag(home, Home).
|
||||||
|
file_search_path(yap, Home) :-
|
||||||
|
current_prolog_flag(home, Home).
|
||||||
|
file_search_path(system, Dir) :-
|
||||||
|
prolog_flag(host_type, Dir).
|
||||||
|
file_search_path(foreign, yap('lib/Yap')).
|
||||||
|
file_search_path(path, C) :-
|
||||||
|
( getenv('PATH', A),
|
||||||
|
( current_prolog_flag(windows, true)
|
||||||
|
-> atomic_list_concat(B, ;, A)
|
||||||
|
; atomic_list_concat(B, :, A)
|
||||||
|
),
|
||||||
|
lists:member(C, B)
|
||||||
|
).
|
||||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
|
||||||
Thus, `compile(library(A))` will search for a file using
|
Thus, `compile(library(A))` will search for a file using
|
||||||
@ -600,4 +638,3 @@ user:file_search_path(path, C) :-
|
|||||||
),
|
),
|
||||||
lists:member(C, B)
|
lists:member(C, B)
|
||||||
).
|
).
|
||||||
|
|
||||||
|
@ -84,6 +84,7 @@ cvt_to_swi_atts(att(Mod,Attribute,Atts), ModAttribute) :-
|
|||||||
% '$write'(4,vsc_woke:G+[Module1|Continuation]:'
|
% '$write'(4,vsc_woke:G+[Module1|Continuation]:'
|
||||||
%'), fail.
|
%'), fail.
|
||||||
prolog:'$wake_up_goal'([Module1|Continuation], LG) :-
|
prolog:'$wake_up_goal'([Module1|Continuation], LG) :-
|
||||||
|
writeln( [Module1|Continuation]:LG),
|
||||||
execute_woken_system_goals(LG),
|
execute_woken_system_goals(LG),
|
||||||
do_continuation(Continuation, Module1).
|
do_continuation(Continuation, Module1).
|
||||||
|
|
||||||
@ -97,6 +98,8 @@ prolog:'$wake_up_goal'([Module1|Continuation], LG) :-
|
|||||||
do_continuation('$cut_by'(X), _) :- !,
|
do_continuation('$cut_by'(X), _) :- !,
|
||||||
'$$cut_by'(X).
|
'$$cut_by'(X).
|
||||||
do_continuation('$restore_regs'(X), _) :- !,
|
do_continuation('$restore_regs'(X), _) :- !,
|
||||||
|
% yap_flag(gc_trace,verbose),
|
||||||
|
% garbage_collect,
|
||||||
'$restore_regs'(X).
|
'$restore_regs'(X).
|
||||||
do_continuation('$restore_regs'(X,Y), _) :- !,
|
do_continuation('$restore_regs'(X,Y), _) :- !,
|
||||||
% yap_flag(gc_trace,verbose),
|
% yap_flag(gc_trace,verbose),
|
||||||
|
@ -105,7 +105,7 @@ load_files(Files,Opts) :-
|
|||||||
'$lf_option'('$location', 19, _).
|
'$lf_option'('$location', 19, _).
|
||||||
'$lf_option'(dialect, 20, yap).
|
'$lf_option'(dialect, 20, yap).
|
||||||
'$lf_option'(format, 21, source).
|
'$lf_option'(format, 21, source).
|
||||||
'$lf_option'(redefine_module, 22, ask).
|
'$lf_option'(redefine_module, 22, false).
|
||||||
'$lf_option'(reexport, 23, false).
|
'$lf_option'(reexport, 23, false).
|
||||||
'$lf_option'(sandboxed, 24, false).
|
'$lf_option'(sandboxed, 24, false).
|
||||||
'$lf_option'(scope_settings, 25, false).
|
'$lf_option'(scope_settings, 25, false).
|
||||||
@ -1018,7 +1018,7 @@ source_file_property( File0, Prop) :-
|
|||||||
'$source_file_property'( File, Prop).
|
'$source_file_property'( File, Prop).
|
||||||
|
|
||||||
'$source_file_property'( OldF, includes(F, Age)) :-
|
'$source_file_property'( OldF, includes(F, Age)) :-
|
||||||
recorded('$lf_loaded','$lf_loaded'( F, _M,, _ include, _File, OldF, _Line, _), _),
|
recorded('$lf_loaded','$lf_loaded'( F, _M, _ include, _File, OldF, _Line, _), _),
|
||||||
recorded('$lf_loaded','$lf_loaded'( F, Age, _), _).
|
recorded('$lf_loaded','$lf_loaded'( F, Age, _), _).
|
||||||
'$source_file_property'( F, included_in(OldF, Line)) :-
|
'$source_file_property'( F, included_in(OldF, Line)) :-
|
||||||
recorded('$lf_loaded','$lf_loaded'( F, _M, include, _File, OldF, Line, _), _).
|
recorded('$lf_loaded','$lf_loaded'( F, _M, include, _File, OldF, Line, _), _).
|
||||||
|
@ -232,6 +232,9 @@
|
|||||||
'$process_error'(error(thread_cancel(Id), G),top) :- !.
|
'$process_error'(error(thread_cancel(Id), G),top) :- !.
|
||||||
'$process_error'(error(thread_cancel(Id), G), _) :- !,
|
'$process_error'(error(thread_cancel(Id), G), _) :- !,
|
||||||
throw(error(thread_cancel(Id), G)).
|
throw(error(thread_cancel(Id), G)).
|
||||||
|
'$process_error'(error(permission_error(module,redefined,A),B), Level) :-
|
||||||
|
Level \= top, !,
|
||||||
|
throw(error(permission_error(module,redefined,A),B)).
|
||||||
'$process_error'(error(Msg, Where), _) :- !,
|
'$process_error'(error(Msg, Where), _) :- !,
|
||||||
'$set_fpu_exceptions',
|
'$set_fpu_exceptions',
|
||||||
print_message(error,error(Msg, Where)).
|
print_message(error,error(Msg, Where)).
|
||||||
|
Reference in New Issue
Block a user