Skip to content

Commit

Permalink
DOC: spellchecked documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
likelion authored and JanWielemaker committed Jan 2, 2025
1 parent e7aaaf6 commit 4b28737
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 77 deletions.
2 changes: 1 addition & 1 deletion man/attvar.doc
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ by fresh variables.
\arg{AttVars} is a list of all attributed variables in \arg{Term} and
its attributes. That is, term_attvars/2 works recursively through
attributes. This predicate is cycle-safe. The goal
\term{term_attvars}{Term, []} in an efficient test that \arg{Term} has
\term{term_attvars}{Term, []} is an efficient test that \arg{Term} has
\emph{no} attributes; scanning the term is aborted after the first
attributed variable is found.
\end{description}
Expand Down
2 changes: 1 addition & 1 deletion man/bk9.clo
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
%% A Class option for fourteen point fonts. Written by James Kilfiger
%% This file may be distributed under the terms of the Latex project
%% public licence.
%% public license.

%% Please ensure that a class such as extarticle or extreport is
%% available when distributing this file.
Expand Down
52 changes: 26 additions & 26 deletions man/builtin.doc
Original file line number Diff line number Diff line change
Expand Up @@ -1308,7 +1308,7 @@ suffix(Suffix, List) :-
\end{code}

Note that these directives can only appear as separate terms in the
input. SWI-Prolog accomodates syntax extensions under conditional
input. SWI-Prolog accommodates syntax extensions under conditional
compilation by silently ignoring syntax errors when in the
\jargon{false} branch. This allow, for example, for the code below. With
rational number support \exam{1r3} denotes the rational number 1/3 while
Expand Down Expand Up @@ -1526,7 +1526,7 @@ messages from (initialization) directives.

This allows the user to fine tune the behaviour on errors and, for
example, halt the process on a non-zero error count right after
loading the file wth errors using the code below.
loading the file with errors using the code below.

\begin{code}
:- multifile user:message_hook/3.
Expand Down Expand Up @@ -1641,7 +1641,7 @@ value: the atom \const{user}. When specified, files loaded indirectly
from \arg{File} that to not come from the Prolog library are included
into the \fileext{qlf} file. This may be used to generate a single file
from an application. The result is comparable to a \jargon{save state}
(see qsave_program/2) with the folowing differences:
(see qsave_program/2) with the following differences:

\begin{itemize}
\item Only your application code is included. The Prolog
Expand Down Expand Up @@ -2017,11 +2017,11 @@ Clearly, \arg{A} and \arg{B} are not identical, so either

\item
Assume \exam{A @< B}. But then, \exam{s(A,1) @> s(B,0)} i.e.,
\exam{B @< A}. Contradicton.
\exam{B @< A}. Contradiction.

\item
Assume \exam{A @> B}. But then, \exam{s(A,1) @< s(B,0)} i.e.,
\exam{B @< A}. Contradicton.
\exam{B @< A}. Contradiction.
\end{itemize}
\end{quote}

Expand Down Expand Up @@ -2419,7 +2419,7 @@ ignore(_).

Note that a plain variable as a body term acts as call/1 and the above
is equivalent to the code below. SWI-Prolog produces the same code for
these two progams and listing/1 prints the program above.
these two programs and listing/1 prints the program above.

\begin{code}
ignore(Goal) :- Goal, !.
Expand Down Expand Up @@ -6502,7 +6502,7 @@ Default is taken from the reference module (see below).

\termitem{character_escapes_unicode}{Bool}
If \const{true} and \term{character_escapes}{true} and
\term{quoted}{true} are active escapted characters are written using
\term{quoted}{true} are active escaped characters are written using
\verb$\uXXXX$ or \verb$\UXXXXXXXX$ syntax. The default depends on the
Prolog flag \prologflag{character_escapes_unicode}

Expand Down Expand Up @@ -6554,7 +6554,7 @@ Print integers using format/2 as \term{format}{Atom, [Int]}. The
default is \verb$~d$. This allows to print integers using an
alternative \jargon{radix}, using e.g.\, \verb$~16r$ or \verb$0x~16r$
or to use digit grouping using e.g.\ \verb$~D$. Note that the user
is reponsible to provide a format that produces valid Prolog syntax if
is responsible to provide a format that produces valid Prolog syntax if
the term must be readable by Prolog. The format must accept exactly
one argument. If that is not satisfied, printing an integer results
in an exception. See format/2 for for valid format specifiers.
Expand Down Expand Up @@ -6622,7 +6622,7 @@ write_value(Value) :-
\end{code}

In addition, if the priority is not 1200 or 999 this assumes we are
printing an operant of an operator. If \arg{Term} is an atom that is
printing an operand of an operator. If \arg{Term} is an atom that is
also an operator it will always be embraced.\footnote{If the priority
is 1200 it is assumed to be a toplevel term and if the priority is
999 it is assumed to be a list element or argument of a compound term.}
Expand Down Expand Up @@ -7144,7 +7144,7 @@ As functor/3, but designed to work with zero-arity terms (e.g.,
\const{compound}, \const{callable} or \const{atomic}. \arg{Type}
\emph{must} be instantiated if \arg{Name} is an atom and \arg{Arity} is
0 (zero). In other cases \arg{Type} may be a variable. This predicate
is true if \arg{Term} (either initially or after haveing been created
is true if \arg{Term} (either initially or after having been created
from \arg{Name} and \arg{Type}) and \arg{Type} are related as below

\begin{itemize}
Expand Down Expand Up @@ -7850,7 +7850,7 @@ in terms of code_type/2.
\predicate{char_type}{2}{?Char, ?Type}
Tests or generates alternative \arg{Type}s or \arg{Char}s. The character
types are inspired by the standard C \file{<ctype.h>} primitives. The
types are sensititve to the active \jargon{locale}, see setlocale/3.
types are sensitive to the active \jargon{locale}, see setlocale/3.
Most of the \arg{Type}s are mapped to the Unicode classification
functions from \file{<wctype.h>}, e.g., \const{alnum} uses iswalnum().
The types \const{prolog_var_start}, \const{prolog_atom_start},
Expand Down Expand Up @@ -8423,7 +8423,7 @@ A = 17/6

SWI-Prolog uses rational number arithmetic if the Prolog flag
\prologflag{prefer_rationals} is \const{true} and if this is defined for
a function on the given operants. This results in perfectly precise
a function on the given operands. This results in perfectly precise
answers. Unfortunately rational numbers can get really large and, if a
precise answer is not needed, a big waste of memory and CPU time. In
such cases one should use floating point arithmetic. The Prolog flag
Expand All @@ -8437,7 +8437,7 @@ truncating functions such as \funcref{round}{1}, \funcref{rational}{1}
or \funcref{float_integer_part}{1}.

Float arithmetic is typically forced by using a floating point constant
as initial value or operant. Alternatively, the \funcref{float}{1}
as initial value or operand. Alternatively, the \funcref{float}{1}
function forces conversion of the argument.

\subsubsection{IEEE 754 floating point arithmetic}
Expand Down Expand Up @@ -8614,7 +8614,7 @@ precise results when possible. The pitfall is that in general rational
arithmetic is slower and can become very slow and produce huge numbers
that require a lot of (global stack) memory. Code for which the exact
results provided by rational numbers is not needed should force float
results by making one of the operants float, for example by dividing by
results by making one of the operands float, for example by dividing by
\exam{10.0} rather than \exam{10} or by using \funcref{float}{1}. Note
that when one of the arguments is forced to a float the division is a
float operation while if the result is forced to the float the division
Expand Down Expand Up @@ -8686,7 +8686,7 @@ if \arg{Expr1} < \arg{Expr2}, 0 if they are equal, and 1 if
\arg{Expr1} > \arg{Expr2}. Evaluates to NaN if either or both
\arg{Expr1} and \arg{Expr2} are NaN and the Prolog flag
\prologflag{float_undefined} is set to \const{nan}. See also
\funcref{minr}{2} amd \funcref{maxr}{2}.
\funcref{minr}{2} and \funcref{maxr}{2}.

This function relates to the Prolog numerical comparison predicates
\predref{>}{2}, \predref{=:=}{2}, etc. The Prolog numerical
Expand Down Expand Up @@ -8754,7 +8754,7 @@ flag \prologflag{float_undefined} is set to \const{nan} and one of the
arguments evaluates to NaN, the result is NaN.

The function \funcref{maxr}{2} is similar, but uses exact (rational)
comparision if \arg{Expr1} and \arg{Expr2} have a different type,
comparison if \arg{Expr1} and \arg{Expr2} have a different type,
propagate the rational (integer) rather and the float if the two
compare equal and propagate the non-NaN value in case one is NaN.

Expand Down Expand Up @@ -10385,15 +10385,15 @@ the category \const{messages}.
\subsection{Apple specific Operating System Interaction}
\label{sec:apple}

Non-portable Apple MacOS specific predicates are prefixed woth
Non-portable Apple MacOS specific predicates are prefixed with
\const{apple_}.

\begin{description}
\predicate{apple_current_locale_identifier}{1}{-Identifier}
Unify \arg{Identifier} with the value for CFLocaleGetIdentifier() of the
Apple current locale. The \arg{Identifier} is an atom that consists of
the primary language identifier, e.g., \const{en} for english followed
by an undercore and an identifier for the \jargon{Region} in the MacOS
the primary language identifier, e.g., \const{en} for English followed
by an underscore and an identifier for the \jargon{Region} in the MacOS
\jargon{Language \& Region} preferences. For example, with the primary
language set to ``English (UK)'' and the \textit{Region} to ``United
Kingdom'' we get \const{en_GB}. This relates to the locale identifier
Expand Down Expand Up @@ -10873,7 +10873,7 @@ mapped to Prolog exceptions using a generic function that receives the
\const{directory}), the term that describes the object (name) of the
file system and the \const{errno} value. Unfortunately, the resulting
exceptions are often misleading. For example, calling make_directory/1
such that it must create mutiple directories (e.g., \const{d1/d2/d3})
such that it must create multiple directories (e.g., \const{d1/d2/d3})
returns an existence error on the directory \const{d1/d2/d3} rather than
the missing component. On Windows the situation is even worse because
many of its runtime functions distinguish only a few error codes. For
Expand Down Expand Up @@ -11317,7 +11317,7 @@ If the \argoption{-t}{toplevel} command line option is given, this goal
is started instead of entering the default interactive top level
(prolog/0).

Notably the gui based versions (\program{swipl-win} on Windows and
Notably the GUI based versions (\program{swipl-win} on Windows and
MacOS) provide the menu \textsf{Run/New thread} that opens a new
toplevel that runs concurrently with the initial toplevel. The
concurrent toplevel can be used to examine the program, in particular
Expand Down Expand Up @@ -11351,13 +11351,13 @@ flags \prologflag{on_error} or \prologflag{on_warning} is set to

\predicate[ISO]{halt}{1}{+Status}
Terminate Prolog execution with \arg{Status}. When possible, raise
the exeption \term{unwind}{\term{halt}{Status}}. Currently, this is
the exception \term{unwind}{\term{halt}{Status}}. Currently, this is
used when halt/1 is called in the \const{main} thread and there is no
intermediate C function on the stack that called PL_next_solution()
without the \const{PL_Q_PASS_EXCEPTION} flag. Future versions may
also use signal based exit from threads.

After the exception bubbled up to the top or if the halt exeption could
After the exception bubbled up to the top or if the halt exception could
not be raised, system termination starts. System termination (see also
PL_halt()) preforms the following steps:

Expand Down Expand Up @@ -11753,7 +11753,7 @@ calling thread \emph{and} has been \jargon{joined} by the calling
thread. The new keys \const{self_cputime} and \const{self_inferences}
may be used to get statistics for the calling thread only. Both keys
also exist in the single threaded version, where the ``self'' key
always returns the same value as the onle without ``self''.
always returns the same value as the one without ``self''.

\begin{table}
\begin{center}
Expand All @@ -11776,7 +11776,7 @@ cputime & (User) {\sc cpu} time since thread was started in seconds.
Includes {\sc cpu} time in completed \jargon{child threads}.
See also \const{self_cputime} and \const{process_cputime}. \\
epoch & Time stamp when thread was started \\
errors & Number of error mesages printed \\
errors & Number of error messages printed \\
functors & Total number of defined name/arity pairs \\
functor_space & Bytes used to represent functors \\
global & Allocated size of the global stack in bytes \\
Expand Down Expand Up @@ -11816,7 +11816,7 @@ engines_created & MT-version: number of created engines \\
threads_peak & MT-version: highest id handed out. This is a fair but
possibly not 100\% accurate value for the highest
number of threads since the process was created. \\
warnings & Number of warning mesages printed \\
warnings & Number of warning messages printed \\
\hline
\end{tabular}
\end{center}
Expand Down
2 changes: 1 addition & 1 deletion man/chr.doc
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ No runtime overhead is incurred in static type checking.

\item Dynamic type checking checks at runtime, during program execution,
whether the arguments of CHR constraints respect their declared types.
The \predref{when}{2} co-routining library is used to delay dynamic type
The \predref{when}{2} coroutining library is used to delay dynamic type
checks until variables are instantiated.

The kind of error detected by dynamic type checking is where a functor
Expand Down
22 changes: 11 additions & 11 deletions man/foreign.doc
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ interface. It was added after discussion with with Mattijs van Otterdijk
aiming for using SWI-Prolog together with Rust's
\href{https://rust-lang.github.io/async-book/01_getting_started/01_chapter.html}{asynchronous
programming} support. Note that this feature is related to the engine
API as described in \secref{engines}. It uis different though. Where
API as described in \secref{engines}. It is different though. Where
the Prolog engine API allows for communicating with a Prolog engine,
the facilities of this section merely allow an engine to suspend, to
be resumed later.
Expand Down Expand Up @@ -1545,7 +1545,7 @@ return a pointer into Prolog's `buffer stack' (see \secref{foreign-strings}).
const pl_wchar_t *s}
\textit{Put} text from a wide character array in \arg{t}.
Arguments are the same as PL_unify_wchars().\footnote{The current
implemention uses PL_put_variable() followed by PL_unify_wchars().}
implementation uses PL_put_variable() followed by PL_unify_wchars().}

\cfunction{bool}{PL_unify_wchars}{term_t +t, int type,
size_t len,
Expand Down Expand Up @@ -1596,7 +1596,7 @@ atoms, each on a line. Please note the following:
ones without the \const{_ex} suffix, but they raise type,
domain, or instantiation errors when the input is invalid;
whereas the plain version may only raise resource exceptions
if the request cannot be fullfilled due to resource
if the request cannot be fulfilled due to resource
exhaustion.
\item PL_get_nil_ex() is designed to propagate an already
raised exception.
Expand Down Expand Up @@ -1759,7 +1759,7 @@ PL_record().
\end{description}

The ISO standard demands that if an option is repeated the \emph{last}
occurance holds. This implies that PL_scan_options() must scan the
occurrence holds. This implies that PL_scan_options() must scan the
option list to the end.
\end{description}

Expand Down Expand Up @@ -2183,7 +2183,7 @@ copy of the Prolog term. The only thing that is allowed to be done
with an argument to a foreign predicate (such as \arg{env}) is
unification; for anything that might over-write the term, you must use
a copy created by PL_copy_term_ref(). The name PL_unify_list() is
slightly misleading - it unifies the first argumment (\arg{l} but
slightly misleading - it unifies the first argument (\arg{l} but
\emph{overwrites} the second (\arg{h}) and third (\arg{t}) arguments.

\begin{code}
Expand Down Expand Up @@ -3015,7 +3015,7 @@ with the given type. This performs the following steps:
is bound to something else, this fails.
\end{enumerate}

It is possible that a blob referencing critial resources is created
It is possible that a blob referencing critical resources is created
after which the unification fails. Typically these resources are
eventually reclaimed because the new blob is not referenced and
reclaimed by the atom garbage collector. As described with the
Expand Down Expand Up @@ -3410,7 +3410,7 @@ test_setup_call_cleanup(X) :-
where PL_next_solution() returns \const{TRUE} on the first result and
the \exam{throw(error)} will only run when PL_cut_query() or
PL_close_query() is run. On the other hand, if the goal in
setup_call_cleanup/3 has completed (failure, exception, determinitic
setup_call_cleanup/3 has completed (failure, exception, deterministic
success), the cleanup handler will have done its work before control
gets back to Prolog and therefore PL_next_solution() will have
generated the exception. The return value \const{PL_S_NOT_INNER} is
Expand Down Expand Up @@ -3668,7 +3668,7 @@ Both for C functions implementing a predicate and when Prolog is called
while the main control of the process is in C, user code should always
check for exceptions. As explained above, C functions implementing a
predicate should normally cleanup and return with \const{FALSE}. If the
C function whishes to continue it may call PL_clear_exception(). Note
C function wishes to continue it may call PL_clear_exception(). Note
that this may cause any exception to be ignored, including \emph{time
outs} and \emph{abort}. Typically the user should check the exception
details before ignoring an exception (using \exam{PL_exception(0)} or
Expand All @@ -3686,7 +3686,7 @@ of exceptions is described in secref{urgentexceptions}.


This function is rarely used directly. Instead, errors are typically
raised using the functions in \secref{cerror} or the C api functions
raised using the functions in \secref{cerror} or the C API functions
that end in \exam{_ex} such as PL_get_atom_ex(). Below we give an
example returning an exception from a foreign predicate the verbose way.
Note that the exception is raised in a sequence of actions connected
Expand Down Expand Up @@ -4335,7 +4335,7 @@ mp_set_memory_functions() in the GMP documentation. The action returns
Query version information. This function may be called before
PL_initialise(). If the key is unknown the function returns 0.
See \secref{abi-versions} for a more in-depth discussion on
binary compatibility. Versions upto SWI-Prolog 8.5.2 defined
binary compatibility. Versions up to SWI-Prolog 8.5.2 defined
this function as PL_version(). It was renamed to avoid a conflict
with Perl affecting
\href{https://github.com/salva/p5-Language-Prolog-Yaswi}{Yaswi}.
Expand Down Expand Up @@ -5088,7 +5088,7 @@ meaningful application.
\termitem{PL_CLEANUP_NO_CANCEL}{}
Do not allow hooks to cancel halting the system.
\end{description}

Unless \const{PL_HALT_WITH_EXCEPTION} was specified and effective,
Clean up the Prolog environment using PL_cleanup() and if successful
call exit() with the status argument. Returns \const{true} if exit
Expand Down
6 changes: 3 additions & 3 deletions man/hack.doc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ Prolog thread that disables the debugger on all recursion levels deeper
than the level of the variable. See also prolog_skip_frame/1.
\end{description}

\section{Simmulating a debugger interrupt}
\section{Simulating a debugger interrupt}
\label{sec:interrupt}

\begin{description}
Expand Down Expand Up @@ -558,7 +558,7 @@ Called by abort/0.
\termitem{erase}{DbRef}
Called on an erased recorded database reference or clause. Note that a
retracted clauses is not immediately removed. Clauses are reclaimed by
garbage_collect_clauses/0, which is normally executed automatially in
garbage_collect_clauses/0, which is normally executed automatically in
the \const{gc} thread. This specific channel is used by clause_info/5 to
reclaim source layout of reclaimed clauses. User applications should
typically use the \arg{PredicateIndicator} channel.
Expand Down Expand Up @@ -624,7 +624,7 @@ Updated p/1: retractall end(user:p(_12294))
The hook is called before the clause is removed. If the hook
fails, the clause is not removed.
\termitem{retractall}{}
The begining and end of retractall/1 is indicated with
The beginning and end of retractall/1 is indicated with
the \arg{Action} \const{retractall}. The context argument
is \term{start}{Head} or \term{end}{Head}.
\termitem{rollback}{Action}
Expand Down
Loading

0 comments on commit 4b28737

Please sign in to comment.