diff --git a/man/attvar.doc b/man/attvar.doc index 5919244e03..81fad63292 100644 --- a/man/attvar.doc +++ b/man/attvar.doc @@ -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} diff --git a/man/bk9.clo b/man/bk9.clo index 2b842b5c25..b9307561ed 100644 --- a/man/bk9.clo +++ b/man/bk9.clo @@ -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. diff --git a/man/builtin.doc b/man/builtin.doc index ba1ee930cb..58e48927a1 100644 --- a/man/builtin.doc +++ b/man/builtin.doc @@ -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 @@ -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. @@ -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 @@ -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} @@ -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, !. @@ -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} @@ -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. @@ -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.} @@ -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} @@ -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{} 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{}, e.g., \const{alnum} uses iswalnum(). The types \const{prolog_var_start}, \const{prolog_atom_start}, @@ -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 @@ -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} @@ -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 @@ -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 @@ -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. @@ -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 @@ -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 @@ -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 @@ -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: @@ -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} @@ -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 \\ @@ -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} diff --git a/man/chr.doc b/man/chr.doc index 1faca4722f..63802e6906 100644 --- a/man/chr.doc +++ b/man/chr.doc @@ -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 diff --git a/man/foreign.doc b/man/foreign.doc index b49a785ca6..40c8ff0050 100644 --- a/man/foreign.doc +++ b/man/foreign.doc @@ -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. @@ -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, @@ -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. @@ -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} @@ -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} @@ -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 @@ -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 @@ -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 @@ -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 @@ -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}. @@ -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 diff --git a/man/hack.doc b/man/hack.doc index a2b19ad129..22bd6046da 100644 --- a/man/hack.doc +++ b/man/hack.doc @@ -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} @@ -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. @@ -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} diff --git a/man/license.doc b/man/license.doc index 97eb9647ca..5b4a5cedb4 100644 --- a/man/license.doc +++ b/man/license.doc @@ -90,7 +90,7 @@ requirements. \begin{description} \predicate{license}{0}{} Evaluate the license conditions of all loaded components. If the system -contains one or more components that are licenced under GPL-like +contains one or more components that are licensed under GPL-like restrictions the system indicates this program may only be distributed under the \const{GPL} license as well as which components prohibit the use of other license conditions. Likewise for for LGPL components. diff --git a/man/overview.doc b/man/overview.doc index 761649e547..75b0a4fa2e 100644 --- a/man/overview.doc +++ b/man/overview.doc @@ -591,7 +591,7 @@ The suffix specifies the value as \textit{bytes}, \textit{Kbytes}, \cmdlineoptionitem*{--table-space}{=size[bkmg]} Limit for the \arg{table space}. This is where tries holding memoized\footnote{The letter M is used because the T was already in -use. It is a memnonic for \textbf{M}emoizing.} answers for +use. It is a mnemonic for \textbf{M}emoizing.} answers for \jargon{tabling} are stored. The default is 1Gb on 64~bit machines and 512Mb on 32~bit machines. See the Prolog flag \prologflag{table_space}. @@ -1870,7 +1870,7 @@ ISO Prolog flag describing there is no maximum arity to compound terms. \prologflagitem{max_char_code}{integer}{r} Highest (Unicode) code point that is supported. SWI-Prolog supports -all Unicode code points from 0 (zero) upto and including the value of +all Unicode code points from 0 (zero) up to and including the value of this flag. Currently \const{0xffff} on Windows (UCS-2) and \const{0x10ffff} on most other platforms. @@ -2079,7 +2079,7 @@ prefer arithmetic to produce rational numbers over floats. This implies: \item Division (\funcref{/}{2}) of two integers produces a rational number. \item Power (\funcref{^}{2}) of two integers produces a - rational number, \emph{also} if the second operant is a + rational number, \emph{also} if the second operand is a negative number. For example, \verb$2^(-2)$ evaluates to \verb$1/4$. \end{itemize} @@ -2226,7 +2226,7 @@ If set to \const{true}, loading a relative file name from source code searches relative to the location of the source file as well as relative to the working directory. Searching relative to the working directory is deprecated and a warning is printed if the file is found this way. -Furture versions are likely to change the default to +Future versions are likely to change the default to \const{false}.\footnote{Searching the working directory was supported up to version 9.3.8. Version 9.3.9 disabled this and version 9.3.10 re-enables it with a warning.} @@ -3193,7 +3193,7 @@ of the Unicode block in which they appear. Currently this is supported for integers, rational numbers (see \secref{syntax-rational-numbers}) and floating point numbers. In any number, \emph{all} digits must come from the same block, i.e., if the nominator of a rational is uses -Indian script, so must the demoninator. All special characters such +Indian script, so must the denominator. All special characters such as the sign, rational separator, floating point \chr{.}, and floating point exponent must use their usual ASCII character. @@ -3536,7 +3536,7 @@ term unified too is moved into the head (providing indexing) and places where this term is used simply use the corresponding argument. The explicit unification is removed. Decompilation (clause/2) reverses this process, but may not produce exactly the same term. The re-inserted -unfications are ordered according to the argument position and the +unifications are ordered according to the argument position and the variable is always on the left hand of the \predref{=}{2}. Thus, \begin{code} @@ -3562,7 +3562,7 @@ Additional notes: still moved into the head. The decompiler does not inverse the process in that case. Thus, \exam{p(X) :- X = a.} is fully equivalent to \exam{p(a).} - \item Currently this optimziation is enabled regardless of the + \item Currently this optimisation is enabled regardless of the Prolog flag \prologflag{optimise}. As this optimization harms source-level debugging, this may not be desirable. On the other hand we do not want determinism to depend on optimization while diff --git a/man/packs.doc b/man/packs.doc index aacbbbdae7..290be0b430 100644 --- a/man/packs.doc +++ b/man/packs.doc @@ -498,7 +498,7 @@ Contains the directory holding the SWI-Prolog home. \definition{\const{SWIPL_ARCH} (\const{SWIARCH})} contains the machine architecture identifier. \definition{\const{SWIPL_MODULE_DIR} (\const{PACKSODIR})} -constains the destination directory for shared objects/DLLs +contains the destination directory for shared objects/DLLs relative to a Prolog pack, i.e., \file{lib/\$SWIARCH}. \definition{\const{SWIPL_MODULE_LIB} (\const{SWISOLIB})} The SWI-Prolog library or an empty string when it is not required @@ -661,7 +661,7 @@ add_library(environ MODULE c/environ.c) # from the target on systems that define a common library file prefix target_link_swipl(environ) -# Install the foreign taget. `${swipl_module_dir}` contains the +# Install the foreign target. `${swipl_module_dir}` contains the # directory for installing modules for this architecture. install(TARGETS environ diff --git a/man/pl.sty b/man/pl.sty index b1f0aed47a..a7caa053b6 100644 --- a/man/pl.sty +++ b/man/pl.sty @@ -83,7 +83,7 @@ % Descriptions (definitions) of various things % Note: I do not know where the 1ex comes from. This should fit -% exactly, but appearently some dimension is missing. I suspect +% exactly, but apparently some dimension is missing. I suspect % a space creaping in somewhere. \def\@nodescription{false} diff --git a/man/runtime.doc b/man/runtime.doc index 2cfdac6dd5..980b447414 100644 --- a/man/runtime.doc +++ b/man/runtime.doc @@ -152,7 +152,7 @@ File to use for the emulator or executable used by the startup script. Default is the running Prolog image \emph{after} following symbolic links, e.g., \file{/usr/lib/swipl/lib/x86_64-linux/swipl}. To create a saved state based on the public executable such that it can run on -multiple archirectures one can use e.g. +multiple architectures one can use e.g. \begin{code} $ swipl -o myexe --emulator=$(which swipl) -c myload.pl @@ -331,7 +331,7 @@ The volatile/1 directive may be used to prevent saving the clauses of predicates that hold such references. The saved program must reinitialise such references using the normal program initialization techniques: use initialization/1,2 directives, explicitly create them -by the entry point or make the various components recreate the contextx +by the entry point or make the various components recreate the context lazily when required. \item diff --git a/man/ssu.doc b/man/ssu.doc index 404ba16d54..09d3b7736e 100644 --- a/man/ssu.doc +++ b/man/ssu.doc @@ -258,7 +258,7 @@ unification may be moved into the head. \end{quote} -\subsection{Consequenses of {=>} single sided unification rules} +\subsection{Consequences of {=>} single sided unification rules} \label{sec:ssu-consequences} The \funcref{=>}{2} construct is handled by the low-level compiler if no diff --git a/man/streams.doc b/man/streams.doc index 8139cc7cdd..df736c6212 100644 --- a/man/streams.doc +++ b/man/streams.doc @@ -291,7 +291,7 @@ freed by the caller when done. Example: ... Sclose(fd); ... - if ( s != buf ) // appearently moved + if ( s != buf ) // apparently moved Sfree(s); } \end{code} @@ -787,7 +787,7 @@ the encoding are: Set the encoding for \arg{s} to \arg{new_enc} and, if \arg{old_enc} is not \const{NULL}, return the old encoding. This function may fail, returning -1 if the Scontrol_function() of the stream returns -1 on -the \const{SIO_SETENCODING} request. On succcess it returns 0. If +the \const{SIO_SETENCODING} request. On success it returns 0. If \arg{new_enc} is \const{ENC_OCTET} the stream is switched to binary mode. Otherwise text mode is enabled. diff --git a/man/summary.doc b/man/summary.doc index 2f325fabff..e269a9c269 100644 --- a/man/summary.doc +++ b/man/summary.doc @@ -55,8 +55,8 @@ suggest predicates from a keyword. \predicatesummary{abolish_all_tables}{0}{Abolish computed tables} \predicatesummary{abolish_module_tables}{1}{Abolish all tables in a module} \predicatesummary{abolish_monotonic_tables}{0}{Abolish all monotonic tables} -\predicatesummary{abolish_nonincremental_tables}{0}{Abolish non-auttomatic tables} -\predicatesummary{abolish_nonincremental_tables}{1}{Abolish non-auttomatic tables} +\predicatesummary{abolish_nonincremental_tables}{0}{Abolish non-automatic tables} +\predicatesummary{abolish_nonincremental_tables}{1}{Abolish non-automatic tables} \predicatesummary{abolish_private_tables}{0}{Abolish tables of this thread} \predicatesummary{abolish_shared_tables}{0}{Abolish tables shared between threads} \predicatesummary{abolish_table_subgoals}{1}{Abolish tables for a goal} @@ -96,7 +96,7 @@ suggest predicates from a keyword. \predicatesummary{atom}{1}{Type check for an atom} \predicatesummary{atom_chars}{2}{Convert between atom and list of characters} \predicatesummary{atom_codes}{2}{Convert between atom and list of characters codes} -\predicatesummary{atom_concat}{3}{Contatenate two atoms} +\predicatesummary{atom_concat}{3}{Concatenate two atoms} \predicatesummary{atom_length}{2}{Determine length of an atom} \predicatesummary{atom_number}{2}{Convert between atom and number} \predicatesummary{atom_prefix}{2}{Test for start of atom} @@ -125,7 +125,7 @@ suggest predicates from a keyword. \predicatesummary{byte_count}{2}{Byte-position in a stream} \predicatesummary{call}{1}{Call a goal} \predicatesummary{call}{[2..]}{Call with additional arguments} -\predicatesummary{call_cleanup}{2}{Guard a goal with a cleaup-handler} +\predicatesummary{call_cleanup}{2}{Guard a goal with a cleanup-handler} \predicatesummary{call_dcg}{3}{As phrase/3 without type checking} \predicatesummary{call_delays}{2}{Get the condition associated with an answer} \predicatesummary{call_residue_vars}{2}{Find residual attributed variables} @@ -228,7 +228,7 @@ suggest predicates from a keyword. \predicatesummary{delete_file}{1}{Remove a file from the file system} \predicatesummary{delete_import_module}{2}{Remove module from import list} \predicatesummary{det}{1}{Declare predicates as deterministic} -\predicatesummary{deterministic}{1}{Test deterministicy of current clause} +\predicatesummary{deterministic}{1}{Test determinicity of current clause} \predicatesummary{dif}{2}{Constrain two terms to be different} \predicatesummary{directory_files}{2}{Get entries of a directory/folder} \oppredsummary{discontiguous}{1}{fx}{1150}{Indicate distributed definition of a predicate} @@ -577,7 +577,7 @@ suggest predicates from a keyword. \predicatesummary{qsave_program}{2}{Create runtime application} \predicatesummary{quasi_quotation_syntax}{1}{Declare quasi quotation syntax} \predicatesummary{quasi_quotation_syntax_error}{1}{Raise syntax error} -\predicatesummary{radial_restraint}{0}{Tabbling radial restraint was violated} +\predicatesummary{radial_restraint}{0}{Tabling radial restraint was violated} \predicatesummary{random_property}{1}{Query properties of random generation} \predicatesummary{rational}{1}{Type check for a rational number} \predicatesummary{rational}{3}{Decompose a rational} @@ -588,7 +588,7 @@ suggest predicates from a keyword. \predicatesummary{read_pending_codes}{3}{Fetch buffered input from a stream} \predicatesummary{read_pending_chars}{3}{Fetch buffered input from a stream} \predicatesummary{read_string}{3}{Read a number of characters into a string} -\predicatesummary{read_string}{5}{Read string upto a delimiter} +\predicatesummary{read_string}{5}{Read string up to a delimiter} \predicatesummary{read_term}{2}{Read term with options} \predicatesummary{read_term}{3}{Read term with options from stream} \predicatesummary{read_term_from_atom}{3}{Read term with options from atom} @@ -833,7 +833,7 @@ suggest predicates from a keyword. \predicatesummary{writeln}{2}{Write term, followed by a newline to a stream} \predicatesummary{write_canonical}{1}{Write a term with quotes, ignore operators} \predicatesummary{write_canonical}{2}{Write a term with quotes, ignore operators on a stream} -\predicatesummary{write_length}{3}{Dermine \#characters to output a term} +\predicatesummary{write_length}{3}{Determine \#characters to output a term} \predicatesummary{write_term}{2}{Write term with options} \predicatesummary{write_term}{3}{Write term with options to stream} \predicatesummary{writef}{1}{Formatted write} diff --git a/man/tabling.doc b/man/tabling.doc index e0714d9247..964116044a 100644 --- a/man/tabling.doc +++ b/man/tabling.doc @@ -816,7 +816,7 @@ Any monotonic table that depends on \nopredref{my_data}{2} will be populated correctly and build a dependency. Next, if a new answer is added to the external data the user must call incr_propagate_calls/1 from the Prolog library \pllib{increval}. Similarly, when an answer is -removed from the extenal data we use incr_invalidate_calls/1. Both +removed from the external data we use incr_invalidate_calls/1. Both notification calls must be made \emph{after} the external data has been updated, i.e., \nopredref{my_data}{2} must reflect the new situation before calling incr_propagate_calls/1 or incr_invalidate_calls/1. @@ -1242,7 +1242,7 @@ predicates. \arg{Specification} is compatible with table/1, although tabling with \jargon{answer subsumption} may be removed using a name/arity specification. The untable/1 predicate is first of all intended for examining the effect of various tabling scenarios on a -particuar program interactively from the toplevel. +particular program interactively from the toplevel. Note that although using untable/1 followed by table/1 may be used to flush all tables associated with the given predicate(s), flushing tables diff --git a/man/threads.doc b/man/threads.doc index 184d500fd3..13ae570d64 100644 --- a/man/threads.doc +++ b/man/threads.doc @@ -840,7 +840,7 @@ goal at the first safe opportunity. The mechanism was introduced with two goals in mind: (1) running a goal inside a thread for debugging purposes such as enabling the status or get access thread-specific data and (2) force a thread to abort its current goal by inserting an -exeption into its control flow. +exception into its control flow. Over time, more complicated use cases have been identified that may result in multiple signals that occur (nearly) simultaneous. As of @@ -906,14 +906,14 @@ thread signalling in more detail. The following notes apply for to backtrackable global variables remain. \item If \arg{Goal} \emph{fails}, no action is taken, i.e., failure is not considered a special condition. - \item If \arg{Goal} \emph{raises an exception} the exeception is + \item If \arg{Goal} \emph{raises an exception} the exception is propagated into the environment. This allows for forcefully stopping the target thread. The system uses this to implement abort/0 and call_with_time_limit/2. \item Code into which signals may be injected must make sure to use setup_call_cleanup/3 and friends to ensure proper cleanup in the case of an exception. This is good practice anyway to - guard against unpredicatable exceptions such as resource + guard against unpredictable exceptions such as resource exhaustion. \item \arg{Goal} may use stack inspection such as prolog_frame_attribute/3 to determine what the thread is doing. diff --git a/man/wasm.doc b/man/wasm.doc index a6b09baf38..cb10429fd9 100644 --- a/man/wasm.doc +++ b/man/wasm.doc @@ -162,7 +162,7 @@ file \arg{Id}. The \arg{Id} is optional. When omitted it generates \verb$/string/1$, \verb$/string/2$, \ldots. \cfunction{Promise}{Prolog.load_scripts}{} -Load all scripts from the current docement that have their \const{type} +Load all scripts from the current document that have their \const{type} set to \const{text/prolog}. The file reference for the loaded script is \exam{/script/Id}, where \arg{Id} is derived from (1) the \const{id} of the script, (2) the \const{name} of the script or (3) @@ -411,7 +411,7 @@ where the identifier is a unique number of each unique variable. \definition{Integer} Translate to a JavaScript \ctype{Number} when possible or \ctype{BigInt} otherwise. Currently JavaScript \ctype{Number} -can represent integers upto $2^{53}$ precisely. +can represent integers up to $2^{53}$ precisely. \definition{Rational} Translate to a JavaScript \ctype{Prolog.Rational} instance. \definition{Float} @@ -486,7 +486,7 @@ following ``functions'' are handled directly by the implementation. Returns a \ctype{Boolean} indicating whether the object is an instance of \arg{ClassName}. Note that the class name must be an atom and as JavaScript class names normally start with a - capital, the names dypically need to be quoted using \emph{single} + capital, the names typically need to be quoted using \emph{single} quotes. For example: \begin{code} ?- W := window, T := W.instanceof('Window'). diff --git a/man/windows.doc b/man/windows.doc index 81402ee7b9..17bc8ed93d 100644 --- a/man/windows.doc +++ b/man/windows.doc @@ -71,7 +71,7 @@ with \mbox{\tt X = } if it can prove the goal for a certain \arg{X}. The user can type the semi-colon (;) or spacebar. If you want another solution. Use the \textsc{return} key if you do not want to see the more answers. Prolog completes the output a full stop (.) if the -user uses the \textsc{return} key or Prolog \emph{knowns} there are no +user uses the \textsc{return} key or Prolog \emph{knows} there are no more answers. If Prolog cannot find (more) answers, it writes \textbf{false.} Finally, Prolog can answer using an error message to indicate the query or program contains an error. diff --git a/src/os/README b/src/os/README index 42b677ddff..c0a04a0821 100644 --- a/src/os/README +++ b/src/os/README @@ -92,7 +92,7 @@ possible, this is not a trivial process. You need to do the following: ---++ License -This code is licenced under the BSD-2 +This code is licensed under the BSD-2 @tbd Move all Windows hacks to os/windows. At the moment, there are definitions in pl-nt.c pl-main.c pl-ntconsole.c, pl-init.c