- Reference manual
- The SWI-Prolog library
- library(aggregate): Aggregation operators on backtrackable predicates
- library(ansi_term): Print decorated text to ANSI consoles
- library(apply): Apply predicates on a list
- library(assoc): Association lists
- library(broadcast): Broadcast and receive event notifications
- library(charsio): I/O on Lists of Character Codes
- library(check): Consistency checking
- library(clpb): CLP(B): Constraint Logic Programming over Boolean Variables
- library(clpfd): CLP(FD): Constraint Logic Programming over Finite Domains
- library(clpqr): Constraint Logic Programming over Rationals and Reals
- library(csv): Process CSV (Comma-Separated Values) data
- library(dcg/basics): Various general DCG utilities
- library(dcg/high_order): High order grammar operations
- library(debug): Print debug messages and test assertions
- library(dicts): Dict utilities
- library(error): Error generating support
- library(gensym): Generate unique identifiers
- library(intercept): Intercept and signal interface
- library(iostream): Utilities to deal with streams
- library(lists): List Manipulation
- library(main): Provide entry point for scripts
- library(nb_set): Non-backtrackable set
- library(www_browser): Activating your Web-browser
- library(occurs): Finding and counting sub-terms
- library(option): Option list processing
- library(optparse): command line parsing
- library(ordsets): Ordered set manipulation
- library(pairs): Operations on key-value lists
- library(persistency): Provide persistent dynamic predicates
- library(pio): Pure I/O
- library(predicate_options): Declare option-processing of predicates
- library(prolog_jiti): Just In Time Indexing (JITI) utilities
- library(prolog_pack): A package manager for Prolog
- library(prolog_xref): Prolog cross-referencer data collection
- library(quasi_quotations): Define Quasi Quotation syntax
- library(random): Random numbers
- library(readutil): Read utilities
- library(record): Access named fields in a term
- library(registry): Manipulating the Windows registry
- library(settings): Setting management
- library(simplex): Solve linear programming problems
- library(solution_sequences): Modify solution sequences
- library(tables): XSB interface to tables
- library(thread): High level thread primitives
- library(thread_pool): Resource bounded thread management
- library(ugraphs): Unweighted Graphs
- library(url): Analysing and constructing URL
- library(varnumbers): Utilities for numbered terms
- library(yall): Lambda expressions
- The SWI-Prolog library
- Reference manual
library(registry) is only available on the
MS-Windows version of SWI-Prolog. It loads the foreign extension
providing the predicates described below. This library only makes the
most common operations on the registry available through the Prolog
user. The underlying DLL provides a more complete coverage of the
Windows registry API. Please consult the sources in
pl/src/win32/foreign/plregtry.c for further details.
In all these predicates, Path refers to a‘/'
separated path into the registry. This is not an atom
containing‘/'-characters as used for filenames, but a term using
. Windows defines the following
roots for the registry:
- registry_get_key(+Path, -Value)
- Get the principal (default) value associated to this key. Fails silently if the key does not exist.
- registry_get_key(+Path, +Name, -Value)
- Get a named value associated to this key.
- registry_set_key(+Path, +Value)
- Set the principal (default) value of this key. Creates (a path to) the key if it does not already exist.
- registry_set_key(+Path, +Name, +Value)
- Associate a named value to this key. Creates (a path to) the key if it does not already exist.
- Delete the indicated key.
- shell_register_file_type(+Ext, +Type, +Name, +OpenAction)
- Register a file-type. Ext is the extension to associate.
Type is the type name, often something like
prolog.type. Name is the name visible in the Windows file-type browser. Finally, OpenAction defines the action to execute when a file with this extension is opened in the Windows explorer.
- shell_register_dde(+Type, +Action, +Service, +Topic, +Command, +IfNotRunning)
- Associate DDE actions to a type. Type is the same type as used for the 2nd argument of shell_register_file_type/4, Action is the action to perform, Service and Topic specify the DDE topic to address, and Command is the command to execute on this topic. Finally, IfNotRunning defines the command to execute if the required DDE server is not present.
- Default registration of SWI-Prolog, which is invoked as part of the
initialisation process on Windows systems. As the source also includes
the above predicates, it is given as an example:
shell_register_prolog(Ext) :- current_prolog_flag(argv, [Me|_]), atomic_list_concat(['"', Me, '" "%1"'], OpenCommand), shell_register_file_type( Ext, 'prolog.type', 'Prolog Source', OpenCommand), shell_register_dde( 'prolog.type', consult, prolog, control, 'consult(''%1'')', Me), shell_register_dde( 'prolog.type', edit, prolog, control, 'edit(''%1'')', Me).