~burner/xsb/debianized-xsb

« back to all changes in this revision

Viewing changes to packages/altCDF/doc/configuration.tex

  • Committer: Michael R. Head
  • Date: 2006-09-06 22:11:55 UTC
  • Revision ID: burner@n23-20060906221155-7e398d23438a7ee4
Add the files from the 3.0.1 release package

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
\section{Configuring and Examining the CDF System} \label{sec:config} 
 
2
 
 
3
The file \file{cdf\_config.P} contains all facts, tables etc. that may
 
4
need to be configured for a particular user or application.  In
 
5
addition to the predicates described below, {\tt cdf\_config.P}
 
6
contains a fact for the dynamic predicate {\tt
 
7
default\_user\_error\_handler/1} which is used to handle errors.  See
 
8
the XSB manual for documentation of this predicate.
 
9
 
 
10
\subsection{The Configuration API} \label{sec:configapi}
 
11
 
 
12
\begin{description}
 
13
 
 
14
%--------------------------------------------------------------------
 
15
\mycomment{
 
16
\ourpredmoditem{cdf\_flag/2}{usermod}
 
17
{\tt cdf\_flag(?Flag,?Value} is a dynamic predicate that indicates all
 
18
aspects of a CDF state that can be set dynamically at run time.  It is
 
19
analogous to the XSB predicate {\tt xsb\_flag/2}.  The aspects that
 
20
can be dynamically changed include consistency checks to be set for
 
21
various contexts.
 
22
 
 
23
\ourpredmoditem{initial\_cdf\_flag/2}{usermod}
 
24
The main action of {\tt initial\_cdf\_flag(+Flag,+ActionList)} is used
 
25
to declare which actions (usually consistency checks) are to be
 
26
executed at specific points during ontology management.  Any {\tt
 
27
initial\_cdf\_flag/2} fact is meant for site-wide configuration.
 
28
It can be overridden by declaring a corresponding {\tt
 
29
user\_cdf\_flag/2} fact in {\tt \$HOME/.xsb/xsbrc.P}.  
 
30
}
 
31
%--------------------------------------------------------------------
 
32
 
 
33
\ourpredmoditem{cdf\_configuration/2}{usermod}
 
34
{\tt cdf\_configuration(?Flag,?Value)} allows access to configuration
 
35
parameters for CDF, and is analogous to {\tt xsb\_configuration/2}
 
36
These parameters are set during the compilation of CDF by define
 
37
statements in \file{cdf\_definitions.h}.  Currently, the only
 
38
parameters that can be set are
 
39
\begin{itemize}
 
40
\item {\tt using\_xj}.  This parameter is set {\tt on} if XJ is to be
 
41
supported by CDF, and set {\t off} otherwise.  This parameter is set on by
 
42
default in the proprietary version of CDF and off by default in the
 
43
open-source version.
 
44
 
 
45
\item {\tt tabled\_isa}.  This parameter is set on if {\tt isa/2} is
 
46
tabled, and off otherwise.  It is set on by default.
 
47
\end{itemize}
 
48
 
 
49
\ourpredmoditem{cdf\_index/3}{usermod}
 
50
{\tt cdf\_index(+Functor,+Arity,+Index)} is used to set initial
 
51
indices for the various types of extensional facts. These indices can
 
52
be changed, if necessary to give better performance, but note that the
 
53
semantics of predicates in the Type-0 API may not use all indices.
 
54
See \refsec{sec:type0api} for details.
 
55
 
 
56
\ourpredmoditem{initialize\_state/0}{usermod}
 
57
Normally, initialization is done automatically upon loading CDF at the
 
58
start of a session.  The predicate {\tt initialize\_state/0} should be
 
59
called only when a state is to be reinitialized during a session.
 
60
This predicate removes all data in extensional and intensional forat,
 
61
and reasserts the basic CDF classes and relations, and resets internal
 
62
state variables to values in the CDF configuration file.
 
63
 
 
64
\end{description}
 
65