doc support

This commit is contained in:
Vítor Santos Costa
2015-01-04 23:58:23 +00:00
parent a87f1040ac
commit 3164ed2d61
124 changed files with 625 additions and 645 deletions

View File

@@ -21,6 +21,11 @@ static char SccsId[] = "%W% %G%";
/**
@file arith0.c
*/
//! @{
/**
@defgroup arithmetic_operators Arithmetic Functions
@ingroup arithmetic

View File

@@ -17,7 +17,7 @@
/** @defgroup YAPArrays Named Arrays
@ingroup YAPExtensions
@ingroup extensions
@{
The YAP system includes experimental support for arrays. The
@@ -1050,7 +1050,6 @@ must be an atom (named array). The _Size_ must evaluate to an
integer. The _Type_ must be bound to one of types mentioned
previously.
*/
/// @memberof static_array/3
p_create_static_array( USES_REGS1 )
{
Term ti = Deref(ARG2);
@@ -1267,7 +1266,6 @@ Reset static array with name _Name_ to its initial value.
*/
/// @memberof reset_static_array/1
static Int
p_clear_static_array( USES_REGS1 )
{
@@ -1307,7 +1305,6 @@ further accesses to the array will return an error.
*/
/// @memberof close_static_array/1
static Int
p_close_static_array( USES_REGS1 )
{
@@ -1370,7 +1367,6 @@ terms (type `term`).
*/
/// @memberof mmapped_array/4
static Int
p_create_mmapped_array( USES_REGS1 )
{
@@ -1684,7 +1680,6 @@ to use the operations on mutable terms.
*/
/// @memberof update_array/3
static Int
p_assign_static( USES_REGS1 )
{
@@ -2179,7 +2174,6 @@ terms.
*/
/// @memberof add_to_array_element/4
static Int
p_add_to_array_element( USES_REGS1 )
@@ -2413,7 +2407,6 @@ that name.
*/
/// @memberof static_array_to_term/2
static Int
p_static_array_to_term( USES_REGS1 )
{
@@ -2583,7 +2576,6 @@ p_static_array_to_term( USES_REGS1 )
Give the location or memory address for a static array with name
_Name_. The result is observed as an integer.
*/
/// @memberof static_array_location/2
static Int
p_static_array_location( USES_REGS1 )
{

View File

@@ -18,8 +18,8 @@
static char SccsId[] = "%W% %G%";
#endif
/** @defgroup Predicates_on_Atoms Predicates on Atoms
@ingroup YAPBuiltins
/** @addgroup Predicates_on_Atoms Predicates on Atoms
@ingroup YAPChars
@{
The following predicates are used to manipulate atoms:

View File

@@ -28,6 +28,12 @@ static char SccsId[]="%W% %G%";
#define NULL (void *)0
#endif
/** @{ */
/** @defgroup Attribute_Variables_Builtins Implementation of Attribute Declarations
@ingroup Attributed_Variables
*/
#ifdef COROUTINING
#define TermVoidAtt TermFoundVar
@@ -995,6 +1001,14 @@ p_all_attvars( USES_REGS1 )
} while (TRUE);
}
/** @pred attvar( _-Var_)
Succeed if _Var_ is an attributed variable.
*/
static Int
p_is_attvar( USES_REGS1 )
{
@@ -1104,16 +1118,10 @@ void Yap_InitAttVarPreds(void)
Yap_InitCPred("all_attvars", 1, p_all_attvars, 0);
CurrentModule = OldCurrentModule;
Yap_InitCPred("attvar", 1, p_is_attvar, SafePredFlag|TestPredFlag);
/** @pred attvar( _-Var_)
Succeed if _Var_ is an attributed variable.
*/
Yap_InitCPred("$att_bound", 1, p_attvar_bound, SafePredFlag|TestPredFlag);
}
/** @} */

2
C/bb.c
View File

@@ -20,7 +20,7 @@ static char SccsId[] = "%W% %G%";
/** @defgroup BlackBoard The Blackboard
@ingroup YAPBuiltins
@ingroup builtins
@{
YAP implements a blackboard in the style of the SICStus Prolog

View File

@@ -19,7 +19,7 @@
/** @defgroup Comparing_Terms Comparing Terms
@ingroup YAPBuiltins
@ingroup builtins
The following predicates are used to compare and order terms, using the
standard ordering:

View File

@@ -20,7 +20,7 @@ static char SccsId[] = "%W% %G%";
/** @defgroup Internal_Database Internal Data Base
@ingroup YAPBuiltins
@ingroup builtins
@{
Some programs need global information for, e.g. counting or collecting

View File

@@ -18,13 +18,14 @@
static char SccsId[] = "%W% %G%";
#endif
/**
@file eval.c
//! @file eval.c
//! @{
/**
@defgroup arithmetic_preds Arithmetic Predicates
@ingroup arithmetic
@{
*/
@@ -200,7 +201,6 @@ BEAM_is(void)
#endif
/**
@{
@pred is( X:number, + Y:ground) is det
This predicate succeeds iff the result of evaluating the expression
@@ -246,8 +246,6 @@ p_is( USES_REGS1 )
return Yap_unify_constant(ARG1,out);
}
//@}
/**
@pred isnan(? X:float) is det
@@ -319,7 +317,7 @@ p_isinf( USES_REGS1 )
}
/**
@{ @pred logsum(+ Log1:float, + Log2:float, - Out:float ) is det
@pred logsum(+ Log1:float, + Log2:float, - Out:float ) is det
True if _Log1_ is the logarithm of the positive number _A1_,
_Log2_ is the logarithm of the positive number _A2_, and
@@ -400,7 +398,6 @@ p_logsum( USES_REGS1 )
}
}
// @}
Int
Yap_ArithError(yap_error_number type, Term where, char *format,...)
@@ -458,9 +455,7 @@ Yap_EvalError(yap_error_number type, Term where, char *format,...)
/**
@{
@pred between(+ Low:int, + High:int, ? Value:int) is nondet
@pred between(+ Low:int, + High:int, ? Value:int) is nondet
_Low_ and _High_ are integers, _High_ \>= _Low_. If
_Value_ is an integer, _Low_ =\< _Value_
@@ -603,11 +598,6 @@ init_between( USES_REGS1 )
return cont_between( PASS_REGS1 );
}
/**
*
* @}
*/
void
Yap_InitEval(void)
{

View File

@@ -24,7 +24,7 @@ static char SccsId[] = "%W% %G%";
@file globals.c
@defgroup Global_Variables Global Variables
@ingroup YAPBuiltins
@ingroup builtins
@{
Global variables are associations between names (atoms) and

View File

@@ -17,7 +17,7 @@
/** @defgroup YAP_Terms Predicates on terms
@ingroup YAPBuiltins
@ingroup builtins
@{

View File

@@ -17,7 +17,7 @@
/** @defgroup Term_Modification Term Modification
@ingroup YAPBuiltins
@ingroup builtins
@{
It is sometimes useful to change the value of instantiated

View File

@@ -425,7 +425,32 @@ Int show_time(USES_REGS1) /* MORE PRECISION */
}
#endif /* BEAM */
// @{
/**
@defgroup YAPSetVal
@ingroup Internal_Database
Maintain a light-weight map where the key is an atom, and the value can be any constant.
*/
/** @pred set_value(+ _A_,+ _C_)
Associate atom _A_ with constant _C_.
The `set_value` and `get_value` built-ins give a fast alternative to
the internal data-base. This is a simple form of implementing a global
counter.
~~~~~
read_and_increment_counter(Value) :-
get_value(counter, Value),
Value1 is Value+1,
set_value(counter, Value1).
~~~~~
This predicate is YAP specific.
*/
static Int p_setval(USES_REGS1) { /* '$set_value'(+Atom,+Atomic) */
Term t1 = Deref(ARG1), t2 = Deref(ARG2);
if (!IsVarTerm(t1) && IsAtomTerm(t1) &&
@@ -436,6 +461,13 @@ static Int p_setval(USES_REGS1) { /* '$set_value'(+Atom,+Atomic) */
return (FALSE);
}
/** @pred get_value(+ _A_,- _V_)
In YAP, atoms can be associated with constants. If one such
association exists for atom _A_, unify the second argument with the
constant. Otherwise, unify _V_ with `[]`.
This predicate is YAP specific.
*/
static Int p_value(USES_REGS1) { /* '$get_value'(+Atom,?Val) */
Term t1 = Deref(ARG1);
if (IsVarTerm(t1)) {
@@ -453,7 +485,7 @@ static Int p_values(USES_REGS1) { /* '$values'(Atom,Old,New) */
Term t1 = Deref(ARG1), t3 = Deref(ARG3);
if (IsVarTerm(t1)) {
Yap_Error(INSTANTIATION_ERROR, t1, "set_value/2");
Yap_Error(INSTANTIATION_ERROR, t1, "set_value/2");
return (FALSE);
}
if (!IsAtomTerm(t1)) {
@@ -472,6 +504,9 @@ static Int p_values(USES_REGS1) { /* '$values'(Atom,Old,New) */
return (TRUE);
}
//@}
static Int p_opdec(USES_REGS1) { /* '$opdec'(p,type,atom) */
/* we know the arguments are integer, atom, atom */
Term p = Deref(ARG1), t = Deref(ARG2), at = Deref(ARG3);
@@ -1914,42 +1949,9 @@ static Int p_yapor_workers(USES_REGS1) { return FALSE; }
void Yap_InitCPreds(void) {
/* numerical comparison */
Yap_InitCPred("set_value", 2, p_setval, SafePredFlag | SyncPredFlag);
/** @pred set_value(+ _A_,+ _C_)
Associate atom _A_ with constant _C_.
The `set_value` and `get_value` built-ins give a fast alternative to
the internal data-base. This is a simple form of implementing a global
counter.
~~~~~
read_and_increment_counter(Value) :-
get_value(counter, Value),
Value1 is Value+1,
set_value(counter, Value1).
~~~~~
This predicate is YAP specific.
*/
Yap_InitCPred("get_value", 2, p_value,
Yap_InitCPred("get_value", 2, p_value,
TestPredFlag | SafePredFlag | SyncPredFlag);
/** @pred get_value(+ _A_,- _V_)
In YAP, atoms can be associated with constants. If one such
association exists for atom _A_, unify the second argument with the
constant. Otherwise, unify _V_ with `[]`.
This predicate is YAP specific.
*/
Yap_InitCPred("$values", 3, p_values, SafePredFlag | SyncPredFlag);
Yap_InitCPred("$values", 3, p_values, SafePredFlag | SyncPredFlag);
/* general purpose */
Yap_InitCPred("$opdec", 4, p_opdec, SafePredFlag | SyncPredFlag);
Yap_InitCPred("=..", 2, p_univ, 0);

View File

@@ -18,6 +18,8 @@
static char SccsId[] = "%W% %G%";
#endif
// @{
/**
@addtogroup YAPOS
*/
@@ -3258,3 +3260,5 @@ rw_lock_voodoo(void) {
#endif /* YAPOR || THREADS */
//@

View File

@@ -15,7 +15,7 @@
* *
*************************************************************************/
/** @defgroup Rational_Trees Rational Trees
@ingroup YAPExtensions
@ingroup extensions
@{
Prolog unification is not a complete implementation. For efficiency
@@ -998,7 +998,7 @@ Yap_InitUnify(void)
CACHE_REGS
Term cm = CurrentModule;
Yap_InitCPred("unify_with_occurs_check", 2, p_ocunify, SafePredFlag);
/** @pred unify_with_occurs_check(?T1,?T2) is iso
/** @pred unify_with_occurs_check(?T1,?T2) is iso
Obtain the most general unifier of terms _T1_ and _T2_, if there
@@ -1064,3 +1064,5 @@ Yap_TrimTrail(void)
#include "trim_trail.h"
}
//! @}