docs
This commit is contained in:
parent
a9f02dddca
commit
faf3c930c8
11
C/attvar.c
11
C/attvar.c
@ -1,4 +1,4 @@
|
||||
/*************************************************************************
|
||||
0/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
@ -28,11 +28,10 @@ static char SccsId[] = "%W% %G%";
|
||||
#define NULL (void *)0
|
||||
#endif
|
||||
|
||||
/** @file attvars.c
|
||||
@{ */
|
||||
|
||||
/**
|
||||
* @defgroup AttributeVariables_Builtins Implementation of Attribute Declarations
|
||||
/**
|
||||
@file attvar.c
|
||||
@{
|
||||
@defgroup AttributeVariables_Builtins Implementation of Attribute Declarations
|
||||
@ingroup AttributeVariables
|
||||
*/
|
||||
|
||||
|
3
C/exec.c
3
C/exec.c
@ -950,8 +950,7 @@ static Int protect_stack_from_cut(USES_REGS1) {
|
||||
* external backtrack to current stack frame: call method
|
||||
* and control backtracking.
|
||||
*
|
||||
* @`
|
||||
* method protect_stack_from_restore
|
||||
* @method protect_stack_from_restore
|
||||
* @param USES_REGS1 [env for threaded execution]
|
||||
* @return c
|
||||
[next answer]
|
||||
|
@ -17,8 +17,9 @@
|
||||
|
||||
/** @file C/flags.c
|
||||
|
||||
@ingroup Flags
|
||||
@{
|
||||
@addtogroup Flags
|
||||
@ingroup core
|
||||
@{
|
||||
*/
|
||||
|
||||
// this is where we define flags
|
||||
|
4
C/init.c
4
C/init.c
@ -106,11 +106,9 @@ void *YAP_save;
|
||||
@ingroup Syntax
|
||||
@{
|
||||
|
||||
|
||||
|
||||
The Prolog syntax caters for operators of three main kinds:
|
||||
|
||||
+ prefix;
|
||||
+ prefix;
|
||||
+ infix;
|
||||
+ postfix.
|
||||
|
||||
|
177
C/inlines.c
177
C/inlines.c
@ -16,9 +16,15 @@
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
/** @defgroup YAP_Terms Predicates on terms
|
||||
@ingroup builtins
|
||||
@{
|
||||
/**
|
||||
|
||||
|
||||
@file inlines.c
|
||||
|
||||
@defgroup YAP_Inlines Inlined Tests nad Ter Manipulation
|
||||
|
||||
@ingroup builtins
|
||||
@{
|
||||
|
||||
|
||||
*/
|
||||
@ -998,41 +1004,65 @@ p_erroneous_call( USES_REGS1 )
|
||||
return(FALSE);
|
||||
}
|
||||
|
||||
/**
|
||||
* @genarg( ?_Index_, +_Term_ , -_Arg_ )
|
||||
*
|
||||
* Similar to arg/3, but it can also backtrack through _T_'s arguments, that is:
|
||||
static Int
|
||||
p_save_cp( USES_REGS1 )
|
||||
{
|
||||
Term t = Deref(ARG1);
|
||||
Term td;
|
||||
#if SHADOW_HB
|
||||
register CELL *HBREG = HB;
|
||||
#endif
|
||||
if (!IsVarTerm(t)) return(FALSE);
|
||||
td = cp_as_integer(B PASS_REGS);
|
||||
YapBind((CELL *)t,td);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
~~~~~~~~~
|
||||
?- arg:genarg(I, f(a,b), A).
|
||||
A = a,
|
||||
I = 1.
|
||||
;
|
||||
A = b,
|
||||
I = 2.
|
||||
~~~~~~~~~
|
||||
*
|
||||
* Note: SWI-Prolog defines arg/3 as genarg/3.
|
||||
*/
|
||||
static Int
|
||||
genarg( USES_REGS1 )
|
||||
{ /* getarg(?Atom) */
|
||||
Term t0 = Deref(ARG1);
|
||||
Term t1 = Deref(ARG2);
|
||||
CELL *pt, *end;
|
||||
int res;
|
||||
UInt arity;
|
||||
/// @}
|
||||
|
||||
if (!IsVarTerm(t0)) {
|
||||
res = p_arg( PASS_REGS1 );
|
||||
if (res) {
|
||||
cut_succeed();
|
||||
} else {
|
||||
cut_fail();
|
||||
}
|
||||
}
|
||||
if (IsVarTerm(t1)) {
|
||||
Yap_Error(INSTANTIATION_ERROR,t1,"genarg/3");
|
||||
/**
|
||||
*
|
||||
* @addtogroup args
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @namespace args
|
||||
*
|
||||
* @pred genarg( ?Index, +Term , -Arg )
|
||||
*
|
||||
*
|
||||
* Similar to arg/3, but it can also backtrack through _T_'s arguments, that is:
|
||||
|
||||
~~~~~~~~~
|
||||
?- arg:genarg(I, f(a,b), A).
|
||||
A = a,
|
||||
I = 1.
|
||||
;
|
||||
A = b,
|
||||
I = 2.
|
||||
~~~~~~~~~
|
||||
*
|
||||
* Note: SWI-Prolog defines arg/3 as genarg/3.
|
||||
*/
|
||||
static Int
|
||||
genarg( USES_REGS1 )
|
||||
{ /* getarg(?Atom) */
|
||||
Term t0 = Deref(ARG1);
|
||||
Term t1 = Deref(ARG2);
|
||||
CELL *pt, *end;
|
||||
int res;
|
||||
UInt arity;
|
||||
|
||||
if (!IsVarTerm(t0)) {
|
||||
res = p_arg( PASS_REGS1 );
|
||||
if (res) {
|
||||
cut_succeed();
|
||||
} else {
|
||||
cut_fail();
|
||||
}
|
||||
}
|
||||
if (IsVarTerm(t1)) {
|
||||
Yap_Error(INSTANTIATION_ERROR,t1,"genarg/3");
|
||||
return FALSE;
|
||||
}
|
||||
if (IsPrimitiveTerm(t1)) {
|
||||
@ -1088,55 +1118,38 @@ cont_genarg( USES_REGS1 )
|
||||
Yap_unify(ARG3,pt[0]);
|
||||
}
|
||||
|
||||
static Int
|
||||
p_save_cp( USES_REGS1 )
|
||||
{
|
||||
Term t = Deref(ARG1);
|
||||
Term td;
|
||||
#if SHADOW_HB
|
||||
register CELL *HBREG = HB;
|
||||
#endif
|
||||
if (!IsVarTerm(t)) return(FALSE);
|
||||
td = cp_as_integer(B PASS_REGS);
|
||||
YapBind((CELL *)t,td);
|
||||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
Yap_InitInlines(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
Term cm = CurrentModule;
|
||||
Yap_InitAsmPred("$$cut_by", 1, _cut_by, p_cut_by, SafePredFlag);
|
||||
Yap_InitAsmPred("$$save_by", 1, _save_by, p_save_cp, SafePredFlag);
|
||||
Yap_InitAsmPred("atom", 1, _atom, p_atom, SafePredFlag);
|
||||
Yap_InitAsmPred("atomic", 1, _atomic, p_atomic, SafePredFlag);
|
||||
Yap_InitAsmPred("integer", 1, _integer, p_integer, SafePredFlag);
|
||||
Yap_InitAsmPred("nonvar", 1, _nonvar, p_nonvar, SafePredFlag);
|
||||
Yap_InitAsmPred("number", 1, _number, p_number, SafePredFlag);
|
||||
Yap_InitAsmPred("var", 1, _var, p_var, SafePredFlag);
|
||||
Yap_InitAsmPred("db_reference", 1, _db_ref, p_db_ref, SafePredFlag);
|
||||
Yap_InitAsmPred("primitive", 1, _primitive, p_primitive, SafePredFlag);
|
||||
Yap_InitAsmPred("compound", 1, _compound, p_compound, SafePredFlag);
|
||||
Yap_InitAsmPred("float", 1, _float, p_float, SafePredFlag);
|
||||
Yap_InitAsmPred("=", 2, _equal, p_equal, SafePredFlag);
|
||||
void
|
||||
Yap_InitInlines(void)
|
||||
{
|
||||
CACHE_REGS
|
||||
Term cm = CurrentModule;
|
||||
Yap_InitAsmPred("$$cut_by", 1, _cut_by, p_cut_by, SafePredFlag);
|
||||
Yap_InitAsmPred("$$save_by", 1, _save_by, p_save_cp, SafePredFlag);
|
||||
Yap_InitAsmPred("atom", 1, _atom, p_atom, SafePredFlag);
|
||||
Yap_InitAsmPred("atomic", 1, _atomic, p_atomic, SafePredFlag);
|
||||
Yap_InitAsmPred("integer", 1, _integer, p_integer, SafePredFlag);
|
||||
Yap_InitAsmPred("nonvar", 1, _nonvar, p_nonvar, SafePredFlag);
|
||||
Yap_InitAsmPred("number", 1, _number, p_number, SafePredFlag);
|
||||
Yap_InitAsmPred("var", 1, _var, p_var, SafePredFlag);
|
||||
Yap_InitAsmPred("db_reference", 1, _db_ref, p_db_ref, SafePredFlag);
|
||||
Yap_InitAsmPred("primitive", 1, _primitive, p_primitive, SafePredFlag);
|
||||
Yap_InitAsmPred("compound", 1, _compound, p_compound, SafePredFlag);
|
||||
Yap_InitAsmPred("float", 1, _float, p_float, SafePredFlag);
|
||||
Yap_InitAsmPred("=", 2, _equal, p_equal, SafePredFlag);
|
||||
#if INLINE_BIG_COMPARISONS
|
||||
Yap_InitAsmPred("\\=", 2, _dif, p_dif, SafePredFlag|TestPredFlag);
|
||||
Yap_InitAsmPred("==", 2, _eq, p_eq, SafePredFlag|TestPredFlag);
|
||||
Yap_InitAsmPred("\\=", 2, _dif, p_dif, SafePredFlag|TestPredFlag);
|
||||
Yap_InitAsmPred("==", 2, _eq, p_eq, SafePredFlag|TestPredFlag);
|
||||
#else
|
||||
Yap_InitCPred("\\=", 2, p_dif, SafePredFlag);
|
||||
Yap_InitCPred("==", 2, p_eq, SafePredFlag);
|
||||
Yap_InitCPred("\\=", 2, p_dif, SafePredFlag);
|
||||
Yap_InitCPred("==", 2, p_eq, SafePredFlag);
|
||||
#endif
|
||||
Yap_InitAsmPred("arg", 3, _arg, p_arg, SafePredFlag);
|
||||
Yap_InitAsmPred("functor", 3, _functor, p_functor, 0);
|
||||
Yap_InitAsmPred("$label_ctl", 2, _p_label_ctl, p_erroneous_call, SafePredFlag);
|
||||
CurrentModule = ARG_MODULE;
|
||||
Yap_InitCPredBack("genarg", 3, 3, genarg, cont_genarg,SafePredFlag);
|
||||
CurrentModule = cm;
|
||||
}
|
||||
Yap_InitAsmPred("arg", 3, _arg, p_arg, SafePredFlag);
|
||||
Yap_InitAsmPred("functor", 3, _functor, p_functor, 0);
|
||||
Yap_InitAsmPred("$label_ctl", 2, _p_label_ctl, p_erroneous_call, SafePredFlag);
|
||||
CurrentModule = ARG_MODULE;
|
||||
Yap_InitCPredBack("genarg", 3, 3, genarg, cont_genarg,SafePredFlag);
|
||||
CurrentModule = cm;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
@}
|
||||
*/
|
||||
|
10
C/qlyr.c
10
C/qlyr.c
@ -15,6 +15,14 @@
|
||||
* $Log: not supported by cvs2svn $ *
|
||||
* *
|
||||
*************************************************************************/
|
||||
/**
|
||||
*
|
||||
* @file qlyr.c
|
||||
*
|
||||
* @addtogroup SaveRestoreSupport
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
#include "absmi.h"
|
||||
#include "alloc.h"
|
||||
@ -1084,3 +1092,5 @@ void Yap_InitQLYR(void) {
|
||||
restore_codes();
|
||||
}
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
13
C/qlyw.c
13
C/qlyw.c
@ -16,6 +16,15 @@
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/**
|
||||
*
|
||||
* @file qlyr.c
|
||||
*
|
||||
* @addtogroup SaveRestoreSupport
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
#include "absmi.h"
|
||||
#include "Foreign.h"
|
||||
#include "alloc.h"
|
||||
@ -971,3 +980,7 @@ void Yap_InitQLY(void)
|
||||
restore_codes();
|
||||
}
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
||||
|
||||
|
@ -204,11 +204,11 @@ Int show_time(USES_REGS1) /* MORE PRECISION */
|
||||
}
|
||||
|
||||
#endif /* BEAM */
|
||||
// @{
|
||||
|
||||
/**
|
||||
@defgroup YAPSetVal
|
||||
@defgroup YAPSetVal Atom to Atomic Family of Built-ins.
|
||||
@ingroup Internal_Database
|
||||
@{
|
||||
|
||||
Maintain a light-weight map where the key is an atom, and the value can be
|
||||
any constant.
|
||||
@ -284,7 +284,7 @@ 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 */
|
||||
|
30
CXX/yapa.hh
30
CXX/yapa.hh
@ -1,25 +1,34 @@
|
||||
/// @{
|
||||
/// @file yapa.hh
|
||||
///
|
||||
/// @brief C++ Interface to atoms and their properties.
|
||||
|
||||
#ifndef YAPA_HH
|
||||
#define YAPA_HH 1
|
||||
|
||||
/**
|
||||
*
|
||||
* @defgroup yap-cplus-interface An object oriented interface for YAP.
|
||||
* @defgroup yap-cplus-interface-atoms Prolog Atoms
|
||||
*
|
||||
* @ingroup ChYInterface
|
||||
* @brief Symbols and associated propeeties.
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @tableofcontents
|
||||
* @{
|
||||
*
|
||||
*
|
||||
* Prolog operates over constants, called atoms. YAP's stores most data as a list
|
||||
* of properties for atoms. Properties include functors, data-base tecords, predicates. operators,
|
||||
* and more.
|
||||
* Prolog interns symbols, called *atoms* in a Hash table, usually
|
||||
called the atom table_. Each entry in this table stores the atom's
|
||||
name, but also may have a linked list of _properties_ We use
|
||||
properties to represent all kinds of data including. data-base
|
||||
tecords, predicates. operators, and more.
|
||||
*
|
||||
* In a nutshell:
|
||||
* - YAPAtom serves as the gateway to the data-base;
|
||||
*
|
||||
* - YAProp abstracts most data-base objects.
|
||||
*
|
||||
* - PropTag allows distinguishing the different classes of YAPProp.
|
||||
*/
|
||||
/**
|
||||
Tne different tgaas area represented through PropTag.
|
||||
*/
|
||||
enum PropTag {
|
||||
/// predicate
|
||||
PRED_TAG = PEProp, // 0x0000,
|
||||
@ -110,7 +119,6 @@ public:
|
||||
};
|
||||
|
||||
|
||||
#endif /* YAPA_HH */
|
||||
|
||||
#endif /* YAPA_HH */
|
||||
/// @}
|
||||
|
||||
|
17
CXX/yapdb.hh
17
CXX/yapdb.hh
@ -1,21 +1,32 @@
|
||||
/// @file yapdb.hh
|
||||
///
|
||||
/// @brief C++ Interface to generated code.
|
||||
|
||||
|
||||
#ifndef _YAPDB_H
|
||||
#define _YAPDB_H
|
||||
|
||||
#define YAP_CPP_DB_INTERFACE 1
|
||||
|
||||
//! @{
|
||||
|
||||
/**
|
||||
*
|
||||
* @defgroup yap-cplus-db-interface Data-Base Component of YAP interface.
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @{
|
||||
* @tableofcontents
|
||||
*
|
||||
*
|
||||
* These classes define the main data-structures stored in the Data-base component: atoms, functors
|
||||
* and predicates.
|
||||
* These classes define the main data-structures stored to represent compiled
|
||||
* programs:
|
||||
*
|
||||
* + YAPFunctor represents a name/arity combination.
|
||||
*
|
||||
* + YAPModule wraps the YAP module implementation.
|
||||
*
|
||||
* + YAPPredicate and subclasses store the actual program, Preliminary
|
||||
* support covers Prolog and C-defined predicates.
|
||||
*/
|
||||
|
||||
class YAPTerm;
|
||||
|
@ -935,7 +935,7 @@ YAPPredicate::YAPPredicate(YAPAtom at)
|
||||
ap = RepPredProp(PredPropByAtom(at.a, Yap_CurrentModule()));
|
||||
}
|
||||
|
||||
YAPPredicate::YAPPredicate(YAPAtom at, arity_t arity)
|
||||
YAPPredicate::YAPPredicate(YAPAtom at, uintptr_t arity)
|
||||
{
|
||||
CACHE_REGS
|
||||
if (arity)
|
||||
|
39
CXX/yapi.hh
39
CXX/yapi.hh
@ -1,4 +1,9 @@
|
||||
/**
|
||||
@file yapi,hh
|
||||
|
||||
@brief entry file for the YAP C++ interface
|
||||
|
||||
*/
|
||||
|
||||
|
||||
#define YAP_CPP_INTERFACE 1
|
||||
@ -8,18 +13,22 @@
|
||||
#include <string>
|
||||
#include <iostream>
|
||||
|
||||
//! @{
|
||||
/**
|
||||
/*!
|
||||
*
|
||||
* @{
|
||||
* @ingroup fli_c_cx
|
||||
* @defgroup yap-cplus-interface An object oriented interface for YAP.
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @tableofcontents
|
||||
*
|
||||
*
|
||||
* C++ interface to YAP. Designed to be object oriented and to fit naturally
|
||||
* with the swig interface language generator. It uses ideas from the old YAP
|
||||
* interface and from the SWI foreign language interface.
|
||||
* @short C++ wrapper to terms, predicates and queries
|
||||
*
|
||||
*
|
||||
* This new interface is designed to be object oriented and to fit
|
||||
* naturally with the swig interface language generator. It uses ideas
|
||||
* from the old YAP interface and from the SWI foreign language
|
||||
* interface.
|
||||
*
|
||||
*/
|
||||
#include <stdlib.h>
|
||||
@ -63,21 +72,21 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
#if _MSC_VER || defined(__MINGW32__)
|
||||
//#include <windows.h>
|
||||
//#include <windows.h>
|
||||
#endif
|
||||
|
||||
// taken from yap_structs.h
|
||||
// taken from yap_structs.h
|
||||
#include "iopreds.h"
|
||||
|
||||
X_API void YAP_UserCPredicate(const char *, YAP_UserCPred, YAP_Arity arity);
|
||||
X_API void YAP_UserCPredicate(const char *, YAP_UserCPred, YAP_Arity arity);
|
||||
|
||||
/* void UserCPredicateWithArgs(const char *name, int *fn(), unsigned int arity)
|
||||
*/
|
||||
X_API void YAP_UserCPredicateWithArgs(const char *, YAP_UserCPred, YAP_Arity,
|
||||
YAP_Term);
|
||||
/* void UserCPredicateWithArgs(const char *name, int *fn(), unsigned int arity)
|
||||
*/
|
||||
X_API void YAP_UserCPredicateWithArgs(const char *, YAP_UserCPred, YAP_Arity,
|
||||
YAP_Term);
|
||||
|
||||
X_API void UserBackCPredicate(const char *name, int *init(), int *cont(), int
|
||||
arity, int extra);
|
||||
X_API void UserBackCPredicate(const char *name, int *init(), int *cont(), int
|
||||
arity, int extra);
|
||||
|
||||
}
|
||||
|
||||
|
11
CXX/yapie.hh
11
CXX/yapie.hh
@ -1,15 +1,22 @@
|
||||
/**
|
||||
* @{
|
||||
* @file yapie.hh
|
||||
*
|
||||
* @defgroup yap-cplus-error-hanadlinge Errir Handling in the YAP interface.
|
||||
*
|
||||
* @brief this is an attempt at supporting error
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @tableofcontents
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* These classes define an object that we can then throw when an error
|
||||
* or unexoected event interrupts YAP. Often, the object is built by
|
||||
* YAP itself, but we may generate our own errors.
|
||||
* YAP itself. One can also define one's own error objects.
|
||||
*
|
||||
* Errors will be thrown from the `C++` code, and may be processed in
|
||||
* very different ways. The error object should provide as much data asa
|
||||
* possible.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -1,14 +1,17 @@
|
||||
/**
|
||||
* @{
|
||||
* @file yapq.hh
|
||||
^
|
||||
* @defgroup yap-cplus-query-hanadlinge Query Handling in the YAP interface.
|
||||
* @brief Engine and Query Management
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @tableofcontents
|
||||
*
|
||||
*
|
||||
* These classes define the concepts of engine ana of query.Ann engine is an environment where we can rum
|
||||
* @{
|
||||
*
|
||||
* These classes wrap engine ana of query.Ann engine is an environment where we can rum
|
||||
* Prolog, that is, where we can run queries.
|
||||
*
|
||||
*/
|
||||
|
||||
#ifndef YAPQ_HH
|
||||
|
16
CXX/yapt.hh
16
CXX/yapt.hh
@ -1,15 +1,23 @@
|
||||
/**
|
||||
* @{
|
||||
* @file yapt.hh
|
||||
*/
|
||||
|
||||
/**
|
||||
* @defgroup yap-cplus-term-handling Term Handling in the YAP interface.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @ingroup yap-cplus-interface
|
||||
* @tableofcontents
|
||||
* @tableofcontents
|
||||
*
|
||||
*
|
||||
* These classes define a term objectthat can be refined, Currently, all exported terms have an
|
||||
* handle, in the SWI-Prolog style.
|
||||
* These classes offer term construction and access. Terms are seens
|
||||
* as objects that inherit from a virtual class, Currently, all
|
||||
* terms must reside in the stack and may be moved around during
|
||||
* garbage collection. Term objects use an handle, in the SWI-Prolog style.
|
||||
*
|
||||
* Nottce that terms are forcefully destroyed during backtracking.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
|
27
H/Foreign.h
27
H/Foreign.h
@ -17,15 +17,28 @@
|
||||
#ifndef FOREIGN_H
|
||||
#define FOREIGN_H
|
||||
|
||||
/* Currently load_foreign_files works for the following machines:
|
||||
/**
|
||||
|
||||
AIX: should work for 3.2 and 4.1 at least, using ECOFF;
|
||||
linux: should work both for a.out (untested by me) and ELF;
|
||||
osf: should work, but isn't working yet.
|
||||
sunos4: should work, using A.OUT format;
|
||||
svr4, eg solaris: should work, using ELF format;
|
||||
@:
|
||||
@file Foreign.h
|
||||
|
||||
YAP should be able to load on most BSD Unixes, but you will need to
|
||||
load_foreign_files/3 has works for the following configurations:
|
||||
|
||||
- linux: should work both for a.out (untested by me) and ELF;
|
||||
|
||||
- WIN32: works (notice that symbols are not exported by default)
|
||||
|
||||
- OSX: works using Mach dynamic libs.
|
||||
|
||||
- osf: should work, but isn't working yet.
|
||||
|
||||
- sunos4: should work, using A.OUT format;
|
||||
|
||||
- svr4, eg solaris: should work, using ELF format;
|
||||
|
||||
- AIX: should work for 3.2 and 4.1 at least, using ECOFF;
|
||||
|
||||
YAP should be able to load on most BSD Unixes, but you will need to
|
||||
say that here.
|
||||
|
||||
YAP also supports COFF loading (pretty much the same technique as
|
||||
|
19
H/qly.h
19
H/qly.h
@ -17,6 +17,15 @@
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/**
|
||||
*
|
||||
* @file qly.h
|
||||
*
|
||||
* @defgroup SaveRestoreSupport C-support for saved states.
|
||||
* @ingroup YAPSaving
|
||||
*
|
||||
*/
|
||||
|
||||
#define EXPORT_ATOM_TABLE_SIZE (16 * 4096)
|
||||
#define EXPORT_FUNCTOR_TABLE_SIZE (16 * 4096)
|
||||
#define EXPORT_OPCODE_TABLE_SIZE (4096)
|
||||
@ -101,11 +110,11 @@ typedef enum {
|
||||
QLY_ATOM_BLOB = 14
|
||||
} qlf_tag_t;
|
||||
|
||||
#define STATIC_PRED_FLAGS \
|
||||
(SourcePredFlag | DynamicPredFlag | LogUpdatePredFlag | CompiledPredFlag | \
|
||||
MultiFileFlag | TabledPredFlag | MegaClausePredFlag | CountPredFlag | \
|
||||
ProfiledPredFlag | ThreadLocalPredFlag | AtomDBPredFlag | \
|
||||
ModuleTransparentPredFlag | NumberDBPredFlag | MetaPredFlag | \
|
||||
#define STATIC_PRED_FLAGS \
|
||||
(SourcePredFlag | DynamicPredFlag | LogUpdatePredFlag | CompiledPredFlag | \
|
||||
MultiFileFlag | TabledPredFlag | MegaClausePredFlag | CountPredFlag | \
|
||||
ProfiledPredFlag | ThreadLocalPredFlag | AtomDBPredFlag | \
|
||||
ModuleTransparentPredFlag | NumberDBPredFlag | MetaPredFlag | \
|
||||
SyncPredFlag | BackCPredFlag)
|
||||
#define EXTRA_PRED_FLAGS \
|
||||
(QuasiQuotationPredFlag | NoTracePredFlag | NoSpyPredFlag)
|
||||
|
@ -197,3 +197,6 @@ typedef struct table_subgoal_answer_frame{
|
||||
#define TgAnsFr_answer(X,N) ((X)->answer[N])
|
||||
#define TgAnsFr_next(X) ((X)->next)
|
||||
#endif /* TABLING_INNER_CUTS */
|
||||
|
||||
///@}
|
||||
|
||||
|
@ -1356,42 +1356,42 @@
|
||||
|
||||
|
||||
answer_resolution:
|
||||
INIT_PREFETCH()
|
||||
dep_fr_ptr dep_fr;
|
||||
ans_node_ptr ans_node;
|
||||
dep_fr_ptr dep_fr;
|
||||
ans_node_ptr ans_node;
|
||||
INIT_PREFETCH();
|
||||
|
||||
OPTYAP_ERROR_CHECKING(answer_resolution, SCH_top_shared_cp(B) && B->cp_or_fr->alternative != ANSWER_RESOLUTION);
|
||||
OPTYAP_ERROR_CHECKING(answer_resolution, !SCH_top_shared_cp(B) && B->cp_ap != ANSWER_RESOLUTION);
|
||||
dep_fr = CONS_CP(B)->cp_dep_fr;
|
||||
LOCK_DEP_FR(dep_fr);
|
||||
ans_node = DepFr_last_answer(dep_fr);
|
||||
if (TrNode_child(ans_node)) {
|
||||
/* unconsumed answers */
|
||||
OPTYAP_ERROR_CHECKING(answer_resolution, SCH_top_shared_cp(B) && B->cp_or_fr->alternative != ANSWER_RESOLUTION);
|
||||
OPTYAP_ERROR_CHECKING(answer_resolution, !SCH_top_shared_cp(B) && B->cp_ap != ANSWER_RESOLUTION);
|
||||
dep_fr = CONS_CP(B)->cp_dep_fr;
|
||||
LOCK_DEP_FR(dep_fr);
|
||||
ans_node = DepFr_last_answer(dep_fr);
|
||||
if (TrNode_child(ans_node)) {
|
||||
/* unconsumed answers */
|
||||
#ifdef MODE_DIRECTED_TABLING
|
||||
if (IS_ANSWER_INVALID_NODE(TrNode_child(ans_node))) {
|
||||
ans_node_ptr old_ans_node;
|
||||
old_ans_node = ans_node;
|
||||
if (IS_ANSWER_INVALID_NODE(TrNode_child(ans_node))) {
|
||||
ans_node_ptr old_ans_node;
|
||||
old_ans_node = ans_node;
|
||||
ans_node = TrNode_child(ans_node);
|
||||
do {
|
||||
ans_node = TrNode_child(ans_node);
|
||||
do {
|
||||
ans_node = TrNode_child(ans_node);
|
||||
} while (IS_ANSWER_INVALID_NODE(ans_node));
|
||||
TrNode_child(old_ans_node) = ans_node;
|
||||
} else
|
||||
} while (IS_ANSWER_INVALID_NODE(ans_node));
|
||||
TrNode_child(old_ans_node) = ans_node;
|
||||
} else
|
||||
#endif /* MODE_DIRECTED_TABLING */
|
||||
ans_node = TrNode_child(ans_node);
|
||||
DepFr_last_answer(dep_fr) = ans_node;
|
||||
UNLOCK_DEP_FR(dep_fr);
|
||||
consume_answer_and_procceed(dep_fr, ans_node);
|
||||
}
|
||||
ans_node = TrNode_child(ans_node);
|
||||
DepFr_last_answer(dep_fr) = ans_node;
|
||||
UNLOCK_DEP_FR(dep_fr);
|
||||
consume_answer_and_procceed(dep_fr, ans_node);
|
||||
}
|
||||
UNLOCK_DEP_FR(dep_fr);
|
||||
|
||||
#ifdef YAPOR
|
||||
if (B == DepFr_leader_cp(LOCAL_top_dep_fr)) {
|
||||
/* B is a generator-consumer node **
|
||||
** never here if batched scheduling */
|
||||
TABLING_ERROR_CHECKING(answer_resolution, IS_BATCHED_GEN_CP(B));
|
||||
goto completion;
|
||||
}
|
||||
if (B == DepFr_leader_cp(LOCAL_top_dep_fr)) {
|
||||
/* B is a generator-consumer node **
|
||||
** never here if batched scheduling */
|
||||
TABLING_ERROR_CHECKING(answer_resolution, IS_BATCHED_GEN_CP(B));
|
||||
goto completion;
|
||||
}
|
||||
#endif /* YAPOR */
|
||||
|
||||
/* no unconsumed answers */
|
||||
@ -1664,14 +1664,14 @@
|
||||
#ifdef THREADS_CONSUMER_SHARING
|
||||
goto answer_resolution_completion;
|
||||
#endif /* THREADS_CONSUMER_SHARING */
|
||||
INIT_PREFETCH()
|
||||
dep_fr_ptr dep_fr;
|
||||
ans_node_ptr ans_node;
|
||||
dep_fr_ptr dep_fr;
|
||||
ans_node_ptr ans_node;
|
||||
#ifdef YAPOR
|
||||
#ifdef TIMESTAMP_CHECK
|
||||
long timestamp = 0;
|
||||
#endif /* TIMESTAMP_CHECK */
|
||||
int entry_owners = 0;
|
||||
INIT_PREFETCH();
|
||||
|
||||
if (SCH_top_shared_cp(B)) {
|
||||
#ifdef TIMESTAMP_CHECK
|
||||
|
@ -1,11 +1,11 @@
|
||||
SET (CODES
|
||||
solarized-light.css
|
||||
theme.css
|
||||
yap.css
|
||||
icons/yap_64x64x32.png
|
||||
icons/yap_256x256x32.png
|
||||
icons/yap_128x128x32.png
|
||||
icons/yap_48x48x32.png
|
||||
solarized-light.css
|
||||
theme.css
|
||||
yap.css
|
||||
icons/yap_64x64x32.png
|
||||
icons/yap_256x256x32.png
|
||||
icons/yap_128x128x32.png
|
||||
icons/yap_48x48x32.png
|
||||
)
|
||||
|
||||
SET (DOCS
|
||||
@ -42,14 +42,16 @@ if (WITH_DOCS)
|
||||
|
||||
configure_file(${doxyfile_in} ${doxyfile} @ONLY)
|
||||
|
||||
add_custom_target(doc
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM)
|
||||
configure_file(source/conf.py.in source/conf.py)
|
||||
configure_file(source/index.rst source/index.rst)
|
||||
add_custom_target(doc
|
||||
COMMAND ${DOXYGEN_EXECUTABLE} ${doxyfile}
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating API documentation with Doxygen"
|
||||
VERBATIM)
|
||||
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${docdir})
|
||||
install(FILES ${CODES} DESTINATION ${docdir})
|
||||
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/html DESTINATION ${docdir})
|
||||
install(FILES ${CODES} DESTINATION ${docdir})
|
||||
|
||||
endif()
|
||||
|
||||
|
@ -58,7 +58,7 @@ PROJECT_LOGO = @CMAKE_SOURCE_DIR@/docs/icons/yap_96x96x32.png
|
||||
# entered, it will be relative to the location where doxygen was started. If
|
||||
# left blank the current directory will be used.
|
||||
|
||||
OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/Docs
|
||||
OUTPUT_DIRECTORY = @PROJECT_BINARY_DIR@/docs
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
|
||||
# directories (in 2 levels) under the output directory of each output format and
|
||||
@ -775,7 +775,7 @@ WARN_LOGFILE =
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = @PROJECT_SOURCE_DIR@/pl \
|
||||
INPUT = @PROJECT_SOURCE_DIR@/pl \
|
||||
@PROJECT_SOURCE_DIR@/CXX \
|
||||
@PROJECT_SOURCE_DIR@/OPTYap \
|
||||
@PROJECT_SOURCE_DIR@/C \
|
||||
@ -784,9 +784,10 @@ INPUT = @PROJECT_SOURCE_DIR@/pl \
|
||||
@PROJECT_SOURCE_DIR@/os \
|
||||
@PROJECT_SOURCE_DIR@/library \
|
||||
@PROJECT_SOURCE_DIR@/packages \
|
||||
@PROJECT_SOURCE_DIR@/swi/library \
|
||||
@PROJECT_SOURCE_DIR@/docs/md \
|
||||
@PROJECT_SOURCE_DIR@/INSTALL.md
|
||||
@PROJECT_SOURCE_DIR@/swi/library
|
||||
# \
|
||||
# @PROJECT_SOURCE_DIR@/docs/md \
|
||||
# @PROJECT_SOURCE_DIR@/INSTALL.md
|
||||
|
||||
|
||||
# This tag can be used to specify the character encoding of the source files
|
||||
@ -829,9 +830,22 @@ RECURSIVE = YES
|
||||
|
||||
EXCLUDE = *pltotex.pl \
|
||||
@PROJECT_SOURCE_DIR@/packages/myddas/sqlite3/src \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/4.0.* \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3,* \
|
||||
@PROJECT_SOURCE_DIR@/C/traced_absmi_insts.h
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/4.4.0 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/4.2.1 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/4.2.0 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/4.0.0 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3.7.3 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3.7.2 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3.7.1 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3.7.0 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/3.6.0 \
|
||||
@PROJECT_SOURCE_DIR@/packages/gecode/dev \
|
||||
@PROJECT_SOURCE_DIR@/C/traced_absmi_insts.h \
|
||||
@PROJECT_SOURCE_DIR@/packages/cplint \
|
||||
@PROJECT_SOURCE_DIR@/packages/CLPBN/examples \
|
||||
@PROJECT_SOURCE_DIR@/packages/prosqlite \
|
||||
@PROJECT_SOURCE_DIR@/packages/pyswip \
|
||||
|
||||
|
||||
# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or
|
||||
# directories that are symbolic links (a Unix file system feature) are excluded
|
||||
@ -1316,7 +1330,7 @@ BINARY_TOC = NO
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
TOC_EXPAND = NO
|
||||
TOC_EXPAND = YES
|
||||
|
||||
# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and
|
||||
# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that
|
||||
@ -2030,7 +2044,8 @@ SEARCH_INCLUDES = YES
|
||||
# preprocessor.
|
||||
# This tag requires that the tag SEARCH_INCLUDES is set to YES.
|
||||
|
||||
INCLUDE_PATH =
|
||||
INCLUDE_PATH = @CMAKE_BINARY_DIR@ \
|
||||
@CMAKE_BINARY_DIR@/packages/gecode
|
||||
|
||||
# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard
|
||||
# patterns (like *.h and *.hpp) to filter out the header-files in the
|
||||
@ -2261,7 +2276,7 @@ TEMPLATE_RELATIONS = NO
|
||||
|
||||
INCLUDE_GRAPH = YES
|
||||
|
||||
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
|
||||
# If the INCLUDED_BY_GRAPH, ENABLE_PREPROCESSING and SEARCH_INCLUDES tags are
|
||||
# set to YES then doxygen will generate a graph for each documented file showing
|
||||
# the direct and indirect include dependencies of the file with other documented
|
||||
# files.
|
||||
|
@ -1,7 +1,8 @@
|
||||
#!/Usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# yap documentation build configuration file, created by
|
||||
# sphinx-quickstart on Tue Jan 5 11:01:36 2016.
|
||||
# YAP documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Mar 26 10:27:55 2017.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
@ -12,25 +13,26 @@
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
import sys
|
||||
import os
|
||||
import shlex
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#sys.path.insert(0, os.path.abspath('.'))
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
from recommonmark.parser import CommonMarkParser
|
||||
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#needs_sphinx = '1.0'
|
||||
#
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = [
|
||||
'sphinx.ext.autodoc',
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.todo',
|
||||
@ -38,37 +40,38 @@ extensions = [
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.ifconfig',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.pngmath',
|
||||
'breathe'
|
||||
'sphinx.ext.githubpages',
|
||||
'breathe'
|
||||
]
|
||||
|
||||
breathe_projects = { "yap": "${CMAKE_CURRENT_BINARY_DIR" }
|
||||
breathe_default_project = "yap"
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
# source_suffix = ['.rst', '.md']
|
||||
source_suffix = '.rst'
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
#
|
||||
source_suffix = ['.rst', '.md']
|
||||
# source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = u'yap'
|
||||
copyright = u'2016, Vitor Santos Costa'
|
||||
author = u'Vitor Santos Costa'
|
||||
project = 'YAP'
|
||||
copyright = '2017, Vitor Santos Costa'
|
||||
author = 'Vitor Santos Costa'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = u'4.6.3'
|
||||
version = '6.3'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = u'4.6.3'
|
||||
release = '6.3.5'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
@ -77,199 +80,83 @@ release = u'4.6.3'
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# There are two options for replacing |today|: either, you set today to some
|
||||
# non-false value, then it is used:
|
||||
#today = ''
|
||||
# Else, today_fmt is used as the format for a strftime call.
|
||||
#today_fmt = '%B %d, %Y'
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = []
|
||||
|
||||
# The reST default role (used for this markup: `text`) to use for all
|
||||
# documents.
|
||||
#default_role = None
|
||||
|
||||
# If true, '()' will be appended to :func: etc. cross-reference text.
|
||||
#add_function_parentheses = True
|
||||
|
||||
# If true, the current module name will be prepended to all description
|
||||
# unit titles (such as .. function::).
|
||||
#add_module_names = True
|
||||
|
||||
# If true, sectionauthor and moduleauthor directives will be shown in the
|
||||
# output. They are ignored by default.
|
||||
#show_authors = False
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# A list of ignored prefixes for module index sorting.
|
||||
#modindex_common_prefix = []
|
||||
|
||||
# If true, keep warnings as "system message" paragraphs in the built documents.
|
||||
#keep_warnings = False
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = True
|
||||
|
||||
|
||||
source_parsers = {
|
||||
'.md': 'recommonmark.parser.CommonMarkParser',
|
||||
}
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom themes here, relative to this directory.
|
||||
#html_theme_path = []
|
||||
|
||||
# The name for this set of Sphinx documents. If None, it defaults to
|
||||
# "<project> v<release> documentation".
|
||||
#html_title = None
|
||||
|
||||
# A shorter title for the navigation bar. Default is the same as html_title.
|
||||
#html_short_title = None
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top
|
||||
# of the sidebar.
|
||||
#html_logo = None
|
||||
|
||||
# The name of an image file (within the static path) to use as favicon of the
|
||||
# docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
|
||||
# pixels large.
|
||||
#html_favicon = None
|
||||
#
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
# Add any extra paths that contain custom files (such as robots.txt or
|
||||
# .htaccess) here, relative to this directory. These files are copied
|
||||
# directly to the root of the documentation.
|
||||
#html_extra_path = []
|
||||
|
||||
# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
|
||||
# using the given strftime format.
|
||||
#html_last_updated_fmt = '%b %d, %Y'
|
||||
|
||||
# If true, SmartyPants will be used to convert quotes and dashes to
|
||||
# typographically correct entities.
|
||||
#html_use_smartypants = True
|
||||
|
||||
# Custom sidebar templates, maps document names to template names.
|
||||
#html_sidebars = {}
|
||||
|
||||
# Additional templates that should be rendered to pages, maps page names to
|
||||
# template names.
|
||||
#html_additional_pages = {}
|
||||
|
||||
# If false, no module index is generated.
|
||||
#html_domain_indices = True
|
||||
|
||||
# If false, no index is generated.
|
||||
#html_use_index = True
|
||||
|
||||
# If true, the index is split into individual pages for each letter.
|
||||
#html_split_index = False
|
||||
|
||||
# If true, links to the reST sources are added to the pages.
|
||||
#html_show_sourcelink = True
|
||||
|
||||
# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
|
||||
#html_show_sphinx = True
|
||||
|
||||
# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
|
||||
#html_show_copyright = True
|
||||
|
||||
# If true, an OpenSearch description file will be output, and all pages will
|
||||
# contain a <link> tag referring to it. The value of this option must be the
|
||||
# base URL from which the finished HTML is served.
|
||||
#html_use_opensearch = ''
|
||||
|
||||
# This is the file name suffix for HTML files (e.g. ".xhtml").
|
||||
#html_file_suffix = None
|
||||
|
||||
# Language to be used for generating the HTML full-text search index.
|
||||
# Sphinx supports the following languages:
|
||||
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
|
||||
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
|
||||
#html_search_language = 'en'
|
||||
|
||||
# A dictionary with options for the search language support, empty by default.
|
||||
# Now only 'ja' uses this config value
|
||||
#html_search_options = {'type': 'default'}
|
||||
|
||||
# The name of a javascript file (relative to the configuration directory) that
|
||||
# implements a search results scorer. If empty, the default will be used.
|
||||
#html_search_scorer = 'scorer.js'
|
||||
# -- Options for HTMLHelp output ------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'yapdoc'
|
||||
htmlhelp_basename = 'YAPdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#'papersize': 'letterpaper',
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#'pointsize': '10pt',
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#'preamble': '',
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#'figure_align': 'htbp',
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'yap.tex', u'yap Documentation',
|
||||
u'Vitor Santos Costa', 'manual'),
|
||||
(master_doc, 'YAP.tex', 'YAP Documentation',
|
||||
'Vitor Santos Costa', 'manual'),
|
||||
]
|
||||
|
||||
# The name of an image file (relative to this directory) to place at the top of
|
||||
# the title page.
|
||||
#latex_logo = None
|
||||
|
||||
# For "manual" documents, if this is true, then toplevel headings are parts,
|
||||
# not chapters.
|
||||
#latex_use_parts = False
|
||||
|
||||
# If true, show page references after internal links.
|
||||
#latex_show_pagerefs = False
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#latex_show_urls = False
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#latex_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#latex_domain_indices = True
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'yap', u'yap Documentation',
|
||||
(master_doc, 'yap', 'YAP Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
# If true, show URL addresses after external links.
|
||||
#man_show_urls = False
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
@ -277,27 +164,34 @@ man_pages = [
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'yap', u'yap Documentation',
|
||||
author, 'yap', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
(master_doc, 'YAP', 'YAP Documentation',
|
||||
author, 'YAP', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
# Documents to append as an appendix to all manuals.
|
||||
#texinfo_appendices = []
|
||||
|
||||
# If false, no module index is generated.
|
||||
#texinfo_domain_indices = True
|
||||
|
||||
# How to display URL addresses: 'footnote', 'no', or 'inline'.
|
||||
#texinfo_show_urls = 'footnote'
|
||||
# -- Options for Epub output ----------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = project
|
||||
epub_author = author
|
||||
epub_publisher = author
|
||||
epub_copyright = copyright
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#
|
||||
# epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#
|
||||
# epub_uid = ''
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
|
||||
# If true, do not generate a @detailmenu in the "Top" node's menu.
|
||||
#texinfo_no_detailmenu = False
|
||||
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
|
||||
breathe_projects = { "yap": "/Users/vsc/git/yap-6.3/Release/docs/xml/" }
|
||||
breathe_default_project = "yap"
|
||||
|
||||
|
@ -1,10 +1,197 @@
|
||||
extensions = [
|
||||
breathe_projects = { "yap": "/Users/vsc/git/yap-6.3/Release/doc/xml/" }i
|
||||
breathe_default_project = "yap"
|
||||
.. doxygenindex::
|
||||
.. doxygenfunction::
|
||||
.. doxygenstruct::
|
||||
.. doxygenenum::
|
||||
.. doxygentypedef::
|
||||
.. doxygenclass::
|
||||
#!/Usr/bin/env python3
|
||||
# -*- coding: utf-8 -*-
|
||||
#
|
||||
# YAP documentation build configuration file, created by
|
||||
# sphinx-quickstart on Sun Mar 26 10:27:55 2017.
|
||||
#
|
||||
# This file is execfile()d with the current directory set to its
|
||||
# containing dir.
|
||||
#
|
||||
# Note that not all possible configuration values are present in this
|
||||
# autogenerated file.
|
||||
#
|
||||
# All configuration values have a default; values that are commented out
|
||||
# serve to show the default.
|
||||
|
||||
# If extensions (or modules to document with autodoc) are in another directory,
|
||||
# add these directories to sys.path here. If the directory is relative to the
|
||||
# documentation root, use os.path.abspath to make it absolute, like shown here.
|
||||
#
|
||||
# import os
|
||||
# import sys
|
||||
# sys.path.insert(0, os.path.abspath('.'))
|
||||
from recommonmark.parser import CommonMarkParser
|
||||
|
||||
|
||||
# -- General configuration ------------------------------------------------
|
||||
|
||||
# If your documentation needs a minimal Sphinx version, state it here.
|
||||
#
|
||||
# needs_sphinx = '1.0'
|
||||
|
||||
# Add any Sphinx extension module names here, as strings. They can be
|
||||
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
|
||||
# ones.
|
||||
extensions = ['sphinx.ext.autodoc',
|
||||
'sphinx.ext.doctest',
|
||||
'sphinx.ext.intersphinx',
|
||||
'sphinx.ext.todo',
|
||||
'sphinx.ext.coverage',
|
||||
'sphinx.ext.mathjax',
|
||||
'sphinx.ext.ifconfig',
|
||||
'sphinx.ext.viewcode',
|
||||
'sphinx.ext.githubpages',
|
||||
'breathe'
|
||||
]
|
||||
|
||||
breathe_projects = { "yap": "@CMAKE_CURRENT_BINARY_DIR@/xml" }
|
||||
breathe_default_project = "yap"
|
||||
|
||||
# Add any paths that contain templates here, relative to this directory.
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix(es) of source filenames.
|
||||
# You can specify multiple suffix as a list of string:
|
||||
#
|
||||
source_suffix = ['.rst', '.md']
|
||||
# source_suffix = '.rst'
|
||||
|
||||
# The master toctree document.
|
||||
master_doc = 'index'
|
||||
|
||||
# General information about the project.
|
||||
project = 'YAP'
|
||||
copyright = '2017, Vitor Santos Costa'
|
||||
author = 'Vitor Santos Costa'
|
||||
|
||||
# The version info for the project you're documenting, acts as replacement for
|
||||
# |version| and |release|, also used in various other places throughout the
|
||||
# built documents.
|
||||
#
|
||||
# The short X.Y version.
|
||||
version = '6.3'
|
||||
# The full version, including alpha/beta/rc tags.
|
||||
release = '6.3.5'
|
||||
|
||||
# The language for content autogenerated by Sphinx. Refer to documentation
|
||||
# for a list of supported languages.
|
||||
#
|
||||
# This is also used if you do content translation via gettext catalogs.
|
||||
# Usually you set "language" from the command line for these cases.
|
||||
language = None
|
||||
|
||||
# List of patterns, relative to source directory, that match files and
|
||||
# directories to ignore when looking for source files.
|
||||
# This patterns also effect to html_static_path and html_extra_path
|
||||
exclude_patterns = []
|
||||
|
||||
# The name of the Pygments (syntax highlighting) style to use.
|
||||
pygments_style = 'sphinx'
|
||||
|
||||
# If true, `todo` and `todoList` produce output, else they produce nothing.
|
||||
todo_include_todos = True
|
||||
|
||||
source_parsers = {
|
||||
'.md': 'recommonmark.parser.CommonMarkParser',
|
||||
}
|
||||
# -- Options for HTML output ----------------------------------------------
|
||||
|
||||
# The theme to use for HTML and HTML Help pages. See the documentation for
|
||||
# a list of builtin themes.
|
||||
#
|
||||
html_theme = 'alabaster'
|
||||
|
||||
# Theme options are theme-specific and customize the look and feel of a theme
|
||||
# further. For a list of options available for each theme, see the
|
||||
# documentation.
|
||||
#
|
||||
# html_theme_options = {}
|
||||
|
||||
# Add any paths that contain custom static files (such as style sheets) here,
|
||||
# relative to this directory. They are copied after the builtin static files,
|
||||
# so a file named "default.css" will overwrite the builtin "default.css".
|
||||
html_static_path = ['_static']
|
||||
|
||||
|
||||
# -- Options for HTMLHelp output ------------------------------------------
|
||||
|
||||
# Output file base name for HTML help builder.
|
||||
htmlhelp_basename = 'YAPdoc'
|
||||
|
||||
|
||||
# -- Options for LaTeX output ---------------------------------------------
|
||||
|
||||
latex_elements = {
|
||||
# The paper size ('letterpaper' or 'a4paper').
|
||||
#
|
||||
# 'papersize': 'letterpaper',
|
||||
|
||||
# The font size ('10pt', '11pt' or '12pt').
|
||||
#
|
||||
# 'pointsize': '10pt',
|
||||
|
||||
# Additional stuff for the LaTeX preamble.
|
||||
#
|
||||
# 'preamble': '',
|
||||
|
||||
# Latex figure (float) alignment
|
||||
#
|
||||
# 'figure_align': 'htbp',
|
||||
}
|
||||
|
||||
# Grouping the document tree into LaTeX files. List of tuples
|
||||
# (source start file, target name, title,
|
||||
# author, documentclass [howto, manual, or own class]).
|
||||
latex_documents = [
|
||||
(master_doc, 'YAP.tex', 'YAP Documentation',
|
||||
'Vitor Santos Costa', 'manual'),
|
||||
]
|
||||
|
||||
|
||||
# -- Options for manual page output ---------------------------------------
|
||||
|
||||
# One entry per manual page. List of tuples
|
||||
# (source start file, name, description, authors, manual section).
|
||||
man_pages = [
|
||||
(master_doc, 'yap', 'YAP Documentation',
|
||||
[author], 1)
|
||||
]
|
||||
|
||||
|
||||
# -- Options for Texinfo output -------------------------------------------
|
||||
|
||||
# Grouping the document tree into Texinfo files. List of tuples
|
||||
# (source start file, target name, title, author,
|
||||
# dir menu entry, description, category)
|
||||
texinfo_documents = [
|
||||
(master_doc, 'YAP', 'YAP Documentation',
|
||||
author, 'YAP', 'One line description of project.',
|
||||
'Miscellaneous'),
|
||||
]
|
||||
|
||||
|
||||
|
||||
# -- Options for Epub output ----------------------------------------------
|
||||
|
||||
# Bibliographic Dublin Core info.
|
||||
epub_title = project
|
||||
epub_author = author
|
||||
epub_publisher = author
|
||||
epub_copyright = copyright
|
||||
|
||||
# The unique identifier of the text. This can be a ISBN number
|
||||
# or the project homepage.
|
||||
#
|
||||
# epub_identifier = ''
|
||||
|
||||
# A unique identification for the text.
|
||||
#
|
||||
# epub_uid = ''
|
||||
|
||||
# A list of files that should not be packed into the epub file.
|
||||
epub_exclude_files = ['search.html']
|
||||
|
||||
|
||||
|
||||
# Example configuration for intersphinx: refer to the Python standard library.
|
||||
intersphinx_mapping = {'https://docs.python.org/': None}
|
||||
|
@ -1,16 +1,11 @@
|
||||
.. yap documentation master file, created by
|
||||
sphinx-quickstart on Tue Jan 5 11:01:36 2016.
|
||||
.. YAP documentation master file, created by
|
||||
sphinx-quickstart on Sun Mar 26 10:27:55 2017.
|
||||
You can adapt this file completely to your liking, but it should at least
|
||||
contain the root `toctree` directive.
|
||||
|
||||
Welcome to yap's documentation!
|
||||
Welcome to YAP's documentation!
|
||||
===============================
|
||||
|
||||
Contents:
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
|
||||
.. doxygenindex::
|
||||
.. doxygenfunction::
|
||||
.. doxygenstruct::
|
||||
@ -18,12 +13,33 @@ Contents:
|
||||
.. doxygentypedef::
|
||||
.. doxygenclass::
|
||||
|
||||
.. toctree::
|
||||
:maxdepth: 2
|
||||
:caption: Contents:
|
||||
|
||||
'../../md/attributes.md'
|
||||
'../../md'/builtins.md'
|
||||
'../../md'/download.md'
|
||||
'../../md'/extensions.md'
|
||||
'../../md'/fli.md'
|
||||
'../../md'/library.md'
|
||||
'../../md'/load_files.md'
|
||||
'../../md'/modules.md'
|
||||
'../../md'/packages.md'
|
||||
'../../md'/run.md'
|
||||
'../../md'/swi.md'
|
||||
'../../md'/syntax.md'
|
||||
'../../md'/yap.md'
|
||||
'classlist.rst'
|
||||
'file.rst'
|
||||
'group.rst'
|
||||
'section.rst'
|
||||
'union.rst'
|
||||
'namespace.rst'
|
||||
|
||||
|
||||
|
||||
Indices and tables
|
||||
==================
|
||||
|
||||
* :ref:`genindex`
|
||||
* :ref:`modindex`
|
||||
* :ref:`search`
|
||||
|
||||
|
@ -1,27 +1,38 @@
|
||||
/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog @(#)c_interface.h 2.2 *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: YapInterface.h *
|
||||
* Last rev: 19/2/88 *
|
||||
* mods: *
|
||||
* comments: c_interface header file for YAP *
|
||||
* *
|
||||
*************************************************************************/
|
||||
* *
|
||||
* YAP Prolog @(#)c_interface.h 2.2 *
|
||||
* Yap Prolog was developed at NCCUP - Universidade do Porto *
|
||||
* *
|
||||
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
|
||||
* *
|
||||
**************************************************************************
|
||||
* *
|
||||
* File: YapInterface.h *
|
||||
* Last rev: 19/2/88 *
|
||||
* mods: *
|
||||
* comments: c_interface header file for YAP *
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
/**
|
||||
|
||||
@file YapInterface.h
|
||||
@file YapInterface.h
|
||||
|
||||
@defgroup ChYInterface Foreign Language interface to YAP
|
||||
@{
|
||||
|
||||
@defgroup fli_c_cx Foreign Language interface to YAP
|
||||
|
||||
@toc
|
||||
|
||||
@defgroup ChYInterface C interface to YAP
|
||||
@{
|
||||
|
||||
@ingroup fli_c_cx
|
||||
|
||||
@brief Core interface to YAP.
|
||||
|
||||
@toc
|
||||
|
||||
@brief Core interface to YAP.
|
||||
q
|
||||
*/
|
||||
|
||||
#ifndef _yap_c_interface_h
|
||||
|
@ -1,13 +1,15 @@
|
||||
|
||||
% File : apply_macros.yap
|
||||
% Author : E. Alphonse from code by Joachim Schimpf
|
||||
% Updated: 15 June 2002
|
||||
% Purpose: Macros to apply a predicate to all elements
|
||||
%% @file apply_macros.yap
|
||||
%% @author E. Alphonse from code by Joachim Schimpf
|
||||
%% @date 15 June 2002
|
||||
%% @nrief Purpose: Macros to apply a predicate to all elements
|
||||
% of a list or to all sub-terms of a term.
|
||||
|
||||
:- module(apply_macros, []).
|
||||
|
||||
/** @defgroup apply_macros Apply Interface to maplist
|
||||
/**
|
||||
|
||||
@defgroup apply_macros Apply Interface to maplist
|
||||
@ingroup library
|
||||
@{
|
||||
|
||||
|
@ -7,21 +7,10 @@
|
||||
*/
|
||||
|
||||
|
||||
|
||||
:- module(arg,
|
||||
[
|
||||
genarg/3,
|
||||
arg0/3,
|
||||
genarg0/3,
|
||||
args/3,
|
||||
args0/3,
|
||||
% project/3
|
||||
path_arg/3
|
||||
]).
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup arg Term Argument Manipulation.
|
||||
*
|
||||
|
||||
@defgroup arg Term Argument Manipulation.
|
||||
|
||||
@ingroup @library
|
||||
|
||||
@ -45,6 +34,19 @@ This file has been included in the YAP library by Vitor Santos Costa, 2008. No e
|
||||
genarg/3.
|
||||
*/
|
||||
|
||||
:- module(arg,
|
||||
[
|
||||
genarg/3,
|
||||
arg0/3,
|
||||
genarg0/3,
|
||||
args/3,
|
||||
args0/3,
|
||||
% project/3
|
||||
path_arg/3
|
||||
]).
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @pred arg0( +_Index_, +_Term_ , -_Arg_ )
|
||||
*
|
||||
@ -161,5 +163,7 @@ path_arg([Index|Indices], Term, SubTerm) :-
|
||||
genarg(Index, Term, Arg),
|
||||
path_arg(Indices, Arg, SubTerm).
|
||||
|
||||
%%@}
|
||||
%%% @}
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -474,4 +474,4 @@ write_explicit.
|
||||
write(NodeConnection), nl.
|
||||
*/
|
||||
|
||||
%% @}
|
||||
%% @} @}
|
||||
|
@ -703,3 +703,6 @@ vertices_without_children((V-[]).Pairs, V.Vertices) :-
|
||||
vertices_without_children(Pairs, Vertices).
|
||||
vertices_without_children(_V-[_|_].Pairs, Vertices) :-
|
||||
vertices_without_children(Pairs, Vertices).
|
||||
|
||||
%% @}/** @} */
|
||||
|
||||
|
@ -15,7 +15,7 @@
|
||||
@file swi.h
|
||||
|
||||
@defgroup swi-c-interface SWI-Prolog Foreign Language Interface
|
||||
@ingroup ChYInterface
|
||||
@ingroup fli_c_cx
|
||||
|
||||
*
|
||||
* @tableofcontents
|
||||
|
@ -9,7 +9,7 @@
|
||||
* It assumes simple queries and a contiguous interval,
|
||||
* and does not really expect to do non-trivial
|
||||
* constraint propagation and solving.
|
||||
*
|
||||
*
|
||||
*
|
||||
*/
|
||||
:- module(exo_interval,
|
||||
@ -33,7 +33,9 @@
|
||||
op(700, xfx, (#=))]).
|
||||
|
||||
|
||||
/** @defgroup exo_interval Exo Intervals
|
||||
/**
|
||||
|
||||
@defgroup exo_interval Exo Intervals
|
||||
@ingroup library
|
||||
@{
|
||||
|
||||
@ -236,3 +238,5 @@ expand_op(A1, A2, A3) :-
|
||||
A1 == max -> A3 = max; A2 == max -> A3 = max;
|
||||
A3 = any
|
||||
).
|
||||
%% @}
|
||||
|
||||
|
@ -586,4 +586,4 @@ defined_flag(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, H
|
||||
nonvar(FlagName), nonvar(FlagGroup),
|
||||
'$defined_flag$'(FlagName, FlagGroup, FlagType, DefaultValue, Description, Access, Handler).
|
||||
|
||||
%%@}
|
||||
%% @}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file hacks.yap
|
||||
* @file library/hacks.yap
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date Tue Nov 17 19:00:25 2015
|
||||
*
|
||||
|
@ -279,3 +279,5 @@ Succeeds if _Heap_ is an empty heap.
|
||||
empty_heap(t(0,[],t)).
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -217,3 +217,5 @@ message and _Data_ with the message itself.
|
||||
mpi_msg_size(Term, Size) :-
|
||||
terms:export_term(Term, Buf, Size),
|
||||
terms:kill_exported_term(Buf).
|
||||
/** @} */
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
||||
*************************************************************************/
|
||||
|
||||
/**
|
||||
* @file listing.yap
|
||||
* @file library/listing.yap
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date Tue Nov 17 22:03:59 2015
|
||||
*
|
||||
|
@ -3,6 +3,10 @@
|
||||
* @author Bob Welham, Lawrence Byrd, and R. A. O'Keefe. Contributions from Vitor Santos Costa, Jan Wielemaker and others.
|
||||
* @date 1999
|
||||
*
|
||||
* @addtogroup library The Prolog Library
|
||||
*
|
||||
* @{
|
||||
*
|
||||
* @brief List Manipulation Predicates
|
||||
*
|
||||
*
|
||||
@ -621,3 +625,5 @@ close_list([_|T]) :-
|
||||
|
||||
|
||||
%% @}
|
||||
/** @} */
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file mapargs.yap
|
||||
* @file library/mapargs.yap
|
||||
* @author Lawrence Byrd + Richard A. O'Keefe, VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @author : E. Alphonse from code by Joachim Schimpf, Jan Wielemaker, Vitor Santos Costa
|
||||
* @date 4 August 1984 and Ken Johnson 11-8-87
|
||||
|
@ -331,7 +331,7 @@ maplist(Pred, [A1|L1], [A2|L2], [A3|L3], [A4|L4]) :-
|
||||
maplist(Pred, L1, L2, L3, L4).
|
||||
|
||||
/**
|
||||
convlist(: _Pred_, + _ListIn_, ? _ListOut_) @anchor convlist
|
||||
convlist(: _Pred_, + _ListIn_, ? _ListOut_) @anchor convlist3
|
||||
|
||||
A combination of maplist/3 and selectlist/3: creates _ListOut_ by
|
||||
applying the predicate _Pred_ to all list elements on which
|
||||
@ -355,7 +355,7 @@ convlist(Pred, [_|Olds], News) :-
|
||||
convlist(Pred, Olds, News).
|
||||
|
||||
/**
|
||||
convlist(: Pred, ? ListIn, ?ExtraList, ? ListOut) @anchor convlist
|
||||
convlist(: Pred, ? ListIn, ?ExtraList, ? ListOut) @anchor convlist5
|
||||
|
||||
A combination of maplist/4 and selectlist/3: _ListIn_, _ListExtra_,
|
||||
and _ListOut_ are the sublists so that the predicate _Pred_ succeeds.
|
||||
|
@ -324,3 +324,5 @@ build_string([S0|S],[C|Lf],L0) :-
|
||||
|
||||
process_arg_entry([],[]) :- !.
|
||||
process_arg_entry(L,['('|L]).
|
||||
/** @} */
|
||||
|
||||
|
@ -1399,3 +1399,5 @@ ints(A,B,O) :-
|
||||
( A > B -> O = [] ; O = [A|L], A1 is A+1, ints(A1,B,L) ).
|
||||
|
||||
zero(_, 0).
|
||||
/** @} */
|
||||
|
||||
|
@ -228,3 +228,5 @@ Unify _Size_ with the number of elements in the queue _Queue_.
|
||||
|
||||
|
||||
*/
|
||||
/** @} */
|
||||
|
||||
|
@ -497,3 +497,5 @@ ord_memberchk(Element, [E|_]) :- E == Element, !.
|
||||
ord_memberchk(Element, [_|Set]) :-
|
||||
ord_memberchk(Element, Set).
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -283,3 +283,5 @@ queue_to_list(Front, Back, Ans) :-
|
||||
queue_to_list([Head|Front], Back, [Head|Tail]) :-
|
||||
queue_to_list(Front, Back, Tail).
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -218,3 +218,5 @@ setrand(rand(X,Y,Z)) :-
|
||||
|
||||
getrand(rand(X,Y,Z)) :-
|
||||
getrand(X,Y,Z).
|
||||
/** @} */
|
||||
|
||||
|
@ -49,12 +49,11 @@
|
||||
rb_in/3
|
||||
]).
|
||||
|
||||
%%! @{
|
||||
|
||||
/**
|
||||
* @defgroup rbtrees Red-Black Trees
|
||||
* @ingroup library
|
||||
|
||||
|
||||
@{
|
||||
Red-Black trees are balanced search binary trees. They are named because
|
||||
nodes can be classified as either red or black. The code we include is
|
||||
based on "Introduction to Algorithms", second edition, by Cormen,
|
||||
@ -96,8 +95,8 @@ form colour(Left, Key, Value, Right), where _colour_ is one of =red= or
|
||||
:- pred next(tree(K,V),K,pair(K,V),V,tree(K,V)).
|
||||
*/
|
||||
|
||||
%% @pred rb_new(-T) is det.
|
||||
% create an empty tree.
|
||||
%% rb_new(-T) is det.
|
||||
%
|
||||
% Create a new Red-Black tree.
|
||||
%
|
||||
@ -107,12 +106,12 @@ rb_new(t(Nil,Nil)) :- Nil = black('',_,_,'').
|
||||
|
||||
rb_new(K,V,t(Nil,black(Nil,K,V,Nil))) :- Nil = black('',_,_,'').
|
||||
|
||||
%% rb_empty(?T) is semidet.
|
||||
%% @pred rb_empty(?T) is semidet.
|
||||
%
|
||||
% Succeeds if T is an empty Red-Black tree.
|
||||
rb_empty(t(Nil,Nil)) :- Nil = black('',_,_,'').
|
||||
|
||||
%% rb_lookup(+Key, -Value, +T) is semidet.
|
||||
%% @pred rb_lookup(+Key, -Value, +T) is semidet.
|
||||
%
|
||||
% Backtrack through all elements with key Key in the Red-Black
|
||||
% tree T, returning for each the value Value.
|
||||
@ -135,7 +134,7 @@ lookup(<, K, V, Tree) :-
|
||||
lookup(=, _, V, Tree) :-
|
||||
arg(3,Tree,V).
|
||||
|
||||
%% rb_min(+T, -Key, -Value) is semidet.
|
||||
%% @pred rb_min(+T, -Key, -Value) is semidet.
|
||||
%
|
||||
% Key is the minimum key in T, and is associated with Val.
|
||||
|
||||
@ -149,7 +148,7 @@ min(red(Right,_,_,_), Key, Val) :-
|
||||
min(black(Right,_,_,_), Key, Val) :-
|
||||
min(Right,Key,Val).
|
||||
|
||||
%% rb_max(+T, -Key, -Value) is semidet.
|
||||
%% @pred rb_max(+T, -Key, -Value) is semidet.
|
||||
%
|
||||
% Key is the maximal key in T, and is associated with Val.
|
||||
|
||||
@ -163,7 +162,7 @@ max(red(_,_,_,Left), Key, Val) :-
|
||||
max(black(_,_,_,Left), Key, Val) :-
|
||||
max(Left,Key,Val).
|
||||
|
||||
%% rb_next(+T, +Key, -Next,-Value) is semidet.
|
||||
%% @pred rb_next(+T, +Key, -Next,-Value) is semidet.
|
||||
%
|
||||
% Next is the next element after Key in T, and is associated with
|
||||
% Val.
|
||||
@ -193,7 +192,7 @@ next(=, _, _, _, NK, Val, Tree, Candidate) :-
|
||||
Candidate = (NK-Val)
|
||||
).
|
||||
|
||||
%% rb_previous(+T, +Key, -Previous, -Value) is semidet.
|
||||
%% @pred rb_previous(+T, +Key, -Previous, -Value) is semidet.
|
||||
%
|
||||
% Previous is the previous element after Key in T, and is
|
||||
% associated with Val.
|
||||
@ -223,8 +222,8 @@ previous(=, _, _, _, K, Val, Tree, Candidate) :-
|
||||
Candidate = (K-Val)
|
||||
).
|
||||
|
||||
%% rb_update(+T, +Key, +NewVal, -TN) is semidet.
|
||||
%% rb_update(+T, +Key, ?OldVal, +NewVal, -TN) is semidet.
|
||||
%% @pred rb_update(+T, +Key, +NewVal, -TN) is semidet.
|
||||
%% @pred rb_update(+T, +Key, ?OldVal, +NewVal, -TN) is semidet.
|
||||
%
|
||||
% Tree TN is tree T, but with value for Key associated with
|
||||
% NewVal. Fails if it cannot find Key in T.
|
||||
@ -263,8 +262,8 @@ update(red(Left,Key0,Val0,Right), Key, OldVal, Val, NewTree) :-
|
||||
update(Right, Key, OldVal, Val, NewRight)
|
||||
).
|
||||
|
||||
%% rb_rewrite(+T, +Key, +NewVal) is semidet.
|
||||
%% rb_rewrite(+T, +Key, ?OldVal, +NewVal) is semidet.
|
||||
%% @pred rb_rewrite(+T, +Key, +NewVal) is semidet.
|
||||
%% @pred rb_rewrite(+T, +Key, ?OldVal, +NewVal) is semidet.
|
||||
%
|
||||
% Tree T has value for Key associated with
|
||||
% NewVal. Fails if it cannot find Key in T.
|
||||
@ -288,7 +287,7 @@ rewrite(Node, Key, OldVal, Val) :-
|
||||
;
|
||||
rewrite(Right, Key, OldVal, Val)
|
||||
).
|
||||
rewrite(Node, Key, OldVal, Val) :-
|
||||
rewrite(Node, Key, OldVal, Val) :-
|
||||
Node = red(Left,Key0,Val0,Right),
|
||||
Left \= [],
|
||||
compare(Cmp,Key0,Key),
|
||||
@ -305,7 +304,7 @@ rewrite(Node, Key, OldVal, Val) :-
|
||||
rewrite(Right, Key, OldVal, Val)
|
||||
).
|
||||
|
||||
%% rb_apply(+T, +Key, :G, -TN) is semidet.
|
||||
%% @pred rb_apply(+T, +Key, :G, -TN) is semidet.
|
||||
%
|
||||
% If the value associated with key Key is Val0 in T, and if
|
||||
% call(G,Val0,ValF) holds, then TN differs from T only in that Key
|
||||
|
@ -213,3 +213,5 @@ process_opt(I,_,G) :-
|
||||
throw(error(domain_error(flag_value,regexp_options+I),G)).
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -3,8 +3,6 @@
|
||||
* @author Nuno A. Fonseca
|
||||
* @date 2008-03-26 23:05:22
|
||||
*
|
||||
* @brief Range-List (RL) tree data structure implementation for YAP
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@ -23,10 +21,10 @@
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup rltrees
|
||||
* @defgroup rltrees Range-List (RL) trees
|
||||
* @ingroup library
|
||||
*
|
||||
* Range-List (RL) tree data structure implementation for YAP
|
||||
* @brief Range-List (RL) tree data structure implementation for YAP
|
||||
*/
|
||||
|
||||
|
||||
|
@ -274,3 +274,5 @@ join(Left-n(Y, VY, n(X, VX, C, B), NL), n(X, VX, C, n(Y, VY, B, n(Z, VZ, A1, A2)
|
||||
|
||||
splay_init(_).
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -811,3 +811,5 @@ read_link(P,D,F) :-
|
||||
read_link(P, D),
|
||||
absolute_file_name(D, [], F).
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -154,3 +154,5 @@ subsumes_chk(X,Y) :-
|
||||
|
||||
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -102,3 +102,6 @@ time_out(Goal, Time, Result) :-
|
||||
time_out,
|
||||
Result0 = time_out ),
|
||||
Result = Result0.
|
||||
|
||||
%% @}
|
||||
|
||||
|
@ -243,6 +243,5 @@ tree_to_list(Tree, List) :-
|
||||
list(0, []).
|
||||
list(N, [N|L]) :- M is N-1, list(M, L).
|
||||
|
||||
|
||||
|
||||
%% @}/** @} */
|
||||
|
||||
|
@ -222,3 +222,6 @@ trie_to_depth_breadth_trie(Trie, DepthBreadthTrie, FinalLabel, OptimizationLevel
|
||||
|
||||
trie_to_depth_breadth_trie(Trie, DepthBreadthTrie, FinalLabel, OptimizationLevel, StartCounter, EndCounter) :-
|
||||
trie_depth_breadth(Trie, DepthBreadthTrie, FinalLabel, OptimizationLevel, StartCounter, EndCounter).
|
||||
|
||||
%% @}
|
||||
|
||||
|
@ -861,3 +861,5 @@ ugraph_union(<, Head1, Tail1, Head2, Tail2, [Head1|Union]) :-
|
||||
ugraph_union(>, Head1, Tail1, Head2, Tail2, [Head2|Union]) :-
|
||||
ugraph_union([Head1|Tail1], Tail2, Union).
|
||||
|
||||
%% @}
|
||||
|
||||
|
@ -276,3 +276,5 @@ expand_component([_|Children], Map1, Map, Graph1, NGraph) :-
|
||||
pick_node(Graph,Node,Children,Graph1) :-
|
||||
rb_in(Node,Children,Graph), !,
|
||||
rb_delete(Graph, Node, Graph1).
|
||||
|
||||
%% @}
|
||||
|
@ -3,102 +3,45 @@
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date 2006
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
:- module( wdgraphs,
|
||||
[
|
||||
wdgraph_new/1,
|
||||
wdgraph_add_edge/5,
|
||||
wdgraph_add_edges/3,
|
||||
wdgraph_add_vertices_and_edges/4,
|
||||
wdgraph_del_edge/5,
|
||||
wdgraph_del_edges/3,
|
||||
wdgraph_del_vertex/3,
|
||||
wdgraph_del_vertices/3,
|
||||
wdgraph_edge/4,
|
||||
wdgraph_to_dgraph/2,
|
||||
dgraph_to_wdgraph/2,
|
||||
wdgraph_neighbors/3,
|
||||
wdgraph_neighbours/3,
|
||||
wdgraph_wneighbors/3,
|
||||
wdgraph_wneighbours/3,
|
||||
wdgraph_transpose/2,
|
||||
wdgraph_transitive_closure/2,
|
||||
wdgraph_symmetric_closure/2,
|
||||
wdgraph_top_sort/2,
|
||||
wdgraph_min_path/5,
|
||||
wdgraph_min_paths/3,
|
||||
wdgraph_max_path/5,
|
||||
wdgraph_path/3,
|
||||
wdgraph_reachable/3]).
|
||||
|
||||
/**
|
||||
* @defgroup wdgraphs Weighted Directed Graphs
|
||||
* @ingroup library
|
||||
*
|
||||
* @brief Weighted Directed Graph Processing Utilities.
|
||||
*
|
||||
* @{
|
||||
*
|
||||
*/
|
||||
|
||||
:- module( wdgraphs,
|
||||
[
|
||||
wdgraph_new/1,
|
||||
wdgraph_add_edge/5,
|
||||
wdgraph_add_edges/3,
|
||||
wdgraph_add_vertices_and_edges/4,
|
||||
wdgraph_del_edge/5,
|
||||
wdgraph_del_edges/3,
|
||||
wdgraph_del_vertex/3,
|
||||
wdgraph_del_vertices/3,
|
||||
wdgraph_edge/4,
|
||||
wdgraph_to_dgraph/2,
|
||||
dgraph_to_wdgraph/2,
|
||||
wdgraph_neighbors/3,
|
||||
wdgraph_neighbours/3,
|
||||
wdgraph_wneighbors/3,
|
||||
wdgraph_wneighbours/3,
|
||||
wdgraph_transpose/2,
|
||||
wdgraph_transitive_closure/2,
|
||||
wdgraph_symmetric_closure/2,
|
||||
wdgraph_top_sort/2,
|
||||
wdgraph_min_path/5,
|
||||
wdgraph_min_paths/3,
|
||||
wdgraph_max_path/5,
|
||||
wdgraph_path/3,
|
||||
wdgraph_reachable/3]).
|
||||
|
||||
:- module( wdgraphs,
|
||||
[
|
||||
wdgraph_new/1,
|
||||
wdgraph_add_edge/5,
|
||||
wdgraph_add_edges/3,
|
||||
wdgraph_add_vertices_and_edges/4,
|
||||
wdgraph_del_edge/5,
|
||||
wdgraph_del_edges/3,
|
||||
wdgraph_del_vertex/3,
|
||||
wdgraph_del_vertices/3,
|
||||
wdgraph_edge/4,
|
||||
wdgraph_to_dgraph/2,
|
||||
dgraph_to_wdgraph/2,
|
||||
wdgraph_neighbors/3,
|
||||
wdgraph_neighbours/3,
|
||||
wdgraph_wneighbors/3,
|
||||
wdgraph_wneighbours/3,
|
||||
wdgraph_transpose/2,
|
||||
wdgraph_transitive_closure/2,
|
||||
wdgraph_symmetric_closure/2,
|
||||
wdgraph_top_sort/2,
|
||||
wdgraph_min_path/5,
|
||||
wdgraph_min_paths/3,
|
||||
wdgraph_max_path/5,
|
||||
wdgraph_path/3,
|
||||
wdgraph_reachable/3]).
|
||||
|
||||
/**
|
||||
* @defgroup wdgraphs Weighted Directed Graph Processing Utilities.
|
||||
|
||||
:- module( wdgraphs,
|
||||
[
|
||||
wdgraph_new/1,
|
||||
wdgraph_add_edge/5,
|
||||
wdgraph_add_edges/3,
|
||||
wdgraph_add_vertices_and_edges/4,
|
||||
wdgraph_del_edge/5,
|
||||
wdgraph_del_edges/3,
|
||||
wdgraph_del_vertex/3,
|
||||
wdgraph_del_vertices/3,
|
||||
wdgraph_edge/4,
|
||||
wdgraph_to_dgraph/2,
|
||||
dgraph_to_wdgraph/2,
|
||||
wdgraph_neighbors/3,
|
||||
wdgraph_neighbours/3,
|
||||
wdgraph_wneighbors/3,
|
||||
wdgraph_wneighbours/3,
|
||||
wdgraph_transpose/2,
|
||||
wdgraph_transitive_closure/2,
|
||||
wdgraph_symmetric_closure/2,
|
||||
wdgraph_top_sort/2,
|
||||
wdgraph_min_path/5,
|
||||
wdgraph_min_paths/3,
|
||||
wdgraph_max_path/5,
|
||||
wdgraph_path/3,
|
||||
wdgraph_reachable/3]).
|
||||
|
||||
/**
|
||||
* @defgroup wdgraphs
|
||||
/**
|
||||
* @defgroup wdgraphs Weighted Directed Graph Processing Utilities.
|
||||
* @ingroup library
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
:- reexport(library(dgraphs),
|
||||
@ -527,3 +470,5 @@ reachable([V-_|Vertices], Done0, DoneF, G, [V|EdgesF], Edges0) :-
|
||||
rb_insert(Done0, V, [], Done1),
|
||||
reachable(Kids, Done1, DoneI, G, EdgesF, EdgesI),
|
||||
reachable(Vertices, DoneI, DoneF, G, EdgesI, Edges0).
|
||||
|
||||
%% @}
|
||||
|
@ -3,8 +3,6 @@
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date 2006
|
||||
*
|
||||
* @brief Weighted Graph Processing Utilities.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
@ -19,8 +17,11 @@ SICStus compatible wgraphs.yap
|
||||
).
|
||||
|
||||
/**
|
||||
* @defgroup wgraphs
|
||||
* @ingroup library
|
||||
* @defgroup wgraphs Weighted Graphs
|
||||
* @ingroup library
|
||||
* @brief Weighted Graph Processing Utilities.
|
||||
*
|
||||
* @{
|
||||
*/
|
||||
|
||||
|
||||
@ -56,3 +57,5 @@ vertices_edges_to_wgraph(Vertices, Edges, Graph) :-
|
||||
wdgraph_add_vertices_and_edges(G0, Vertices, Edges, Graph).
|
||||
|
||||
|
||||
%% @}
|
||||
|
||||
|
@ -2,10 +2,11 @@
|
||||
* @file wundgraphs.yap
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date 2006
|
||||
*
|
||||
* @brief Directed Graph Processing Utilities.
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
:- module( wundgraphs,
|
||||
[
|
||||
wundgraph_add_edge/5,
|
||||
@ -16,14 +17,16 @@
|
||||
wundgraph_edges/2,
|
||||
wundgraph_neighbours/3,
|
||||
wundgraph_neighbors/3,
|
||||
wundgraph_wneighbours/3,
|
||||
wundgraph_wneighbours/3,
|
||||
wundgraph_wneighbors/3,
|
||||
wundgraph_min_tree/3,
|
||||
wundgraph_max_tree/3]).
|
||||
|
||||
/**
|
||||
* @defgroup wundgraphs
|
||||
* @defgroup wundgraphs Weighted Undirected Graphs
|
||||
* @ingroup library
|
||||
*
|
||||
* @brief Weighted Undirected Graph Processing Utilities.
|
||||
*/
|
||||
|
||||
|
||||
|
@ -30,7 +30,7 @@ static char SccsId[] = "%W% %G%";
|
||||
|
||||
|
||||
/**
|
||||
* @defgroup Aliases
|
||||
* @defgroup Aliases Aliases to Stream Names
|
||||
* @ingroup InputOutput
|
||||
*
|
||||
* Aliases:
|
||||
|
@ -28,9 +28,9 @@ static char SccsId[] = "%W% %G%";
|
||||
*
|
||||
*/
|
||||
|
||||
/* @defgroup CharIO Character-Based Input/Output
|
||||
/** @defgroup CharIO Character-Based Input/Output
|
||||
* @ingroup InputOutput
|
||||
*
|
||||
* @{
|
||||
* YAP implements most of the ISO-Prolog built-ins. Input/Output may be
|
||||
*performed on
|
||||
* the current stream or on a specified stream, and it may involve a:
|
||||
@ -1220,3 +1220,5 @@ void Yap_InitCharsio(void) {
|
||||
Yap_InitCPred("tab", 2, tab, SafePredFlag | SyncPredFlag);
|
||||
Yap_InitCPred("tab", 1, tab_1, SafePredFlag | SyncPredFlag);
|
||||
}
|
||||
|
||||
/// @}
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
/**
|
||||
@defgroup CharacterCodes Character Encoding and Manipulation.
|
||||
@ingroup TextProcessing
|
||||
@ingroup InputOutput
|
||||
@{
|
||||
|
||||
The Prolog library includes a set of built-in predicates designed to
|
||||
@ -1909,3 +1909,6 @@ paren_paren( 0xFF5F, 0xFF60).
|
||||
paren_paren( 0xFF60, 0xFF5F).
|
||||
paren_paren( 0xFF62, 0xFF63).
|
||||
paren_paren( 0xFF63, 0xFF62).
|
||||
|
||||
/** @} */
|
||||
|
||||
|
@ -17,11 +17,11 @@
|
||||
//
|
||||
|
||||
/**
|
||||
* @file memopen.c
|
||||
* @defgroup Memory Streams.
|
||||
* @in.
|
||||
* @return Description of returned value.
|
||||
*/
|
||||
* @file fmemopen.c
|
||||
* @defgroup Memory Streams.
|
||||
* @in.
|
||||
* @return Description of returned value.
|
||||
*/
|
||||
#ifdef __APPLE__
|
||||
|
||||
#include <stdio.h>
|
||||
|
@ -19,8 +19,10 @@ static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @file format.c
|
||||
*
|
||||
* @defgroup FormattedIO Formatted Output
|
||||
* @ingroup YAPIO
|
||||
* @ingroup InputOutput
|
||||
* This file includes the definition of the formatted output predicates.
|
||||
*
|
||||
* @{
|
||||
|
@ -18,7 +18,9 @@
|
||||
static char SccsId[] = "%W% %G%";
|
||||
#endif
|
||||
|
||||
/*
|
||||
/**
|
||||
*
|
||||
|
||||
* This file includes the definition of a miscellania of standard predicates
|
||||
* for yap refering to: Files and GLOBAL_Streams, Simple Input/Output,
|
||||
*
|
||||
|
@ -1,5 +1,7 @@
|
||||
%%% -*- Mode: Prolog; -*-
|
||||
|
||||
%% @file lbfgs.pl
|
||||
|
||||
% This file is part of YAP-LBFGS.
|
||||
% Copyright (C) 2009 Bernd Gutmann
|
||||
%
|
||||
@ -39,18 +41,20 @@
|
||||
|
||||
/**
|
||||
|
||||
@defgroup YAP-LBFGS
|
||||
@defgroup YAP-LBFGS Interface to LibLBFGS
|
||||
@ingroup packages
|
||||
|
||||
@short What is YAP-LBFGS? YAP-LBFGS is an interface to call libLBFGS, http://www.chokkan.org/software/liblbfgs/, from within
|
||||
@short What is YAP-LBFGS? YAP-LBFGS is an interface to call [libLBFG](http://www.chokkan.org/software/liblbfgs/), from within
|
||||
YAP. libLBFGS is a C library for Limited-memory
|
||||
Broyden-Fletcher-Goldfarb-Shanno (L-BFGS) solving the under-constrained
|
||||
minimization problem:
|
||||
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
+ minimize `F(X), X=(x1,x2,..., xN)`
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
||||
### Contact</h2>
|
||||
### Contact
|
||||
YAP-LBFGS has been developed by Bernd Gutmann. In case you publish something using YAP-LBFGS, please give credit to me and to libLBFGS. And if you find YAP-LBFGS useful, or if you find a bug, or if you
|
||||
port it to another system, ... please send me an email.
|
||||
|
||||
|
28
pl/absf.yap
28
pl/absf.yap
@ -13,18 +13,8 @@
|
||||
@file absf.yap
|
||||
@author L.Damas, V.S.Costa
|
||||
|
||||
*/
|
||||
:- system_module( absf, [absolute_file_name/2,
|
||||
absolute_file_name/3,
|
||||
add_to_path/1,
|
||||
add_to_path/2,
|
||||
path/1,
|
||||
remove_from_path/1], ['$full_filename'/3,
|
||||
'$system_library_directories'/2]).
|
||||
|
||||
/**
|
||||
* @defgroup AbsoluteFileName File Name Resolution
|
||||
* @ingroup builtins
|
||||
@defgroup AbsoluteFileName File Name Resolution
|
||||
@ingroup builtins
|
||||
|
||||
Support for file name resolution through absolute_file_name/3 and
|
||||
friends. These utility built-ins describe a list of directories that
|
||||
@ -34,7 +24,15 @@
|
||||
|
||||
@{
|
||||
|
||||
*/
|
||||
*/
|
||||
:- system_module( absf, [absolute_file_name/2,
|
||||
absolute_file_name/3,
|
||||
add_to_path/1,
|
||||
add_to_path/2,
|
||||
path/1,
|
||||
remove_from_path/1], ['$full_filename'/3,
|
||||
'$system_library_directories'/2]).
|
||||
|
||||
|
||||
:- use_system_module( '$_boot', ['$system_catch'/4]).
|
||||
|
||||
@ -299,8 +297,8 @@ absolute_file_name(File0,File) :-
|
||||
'$var'(S) -->
|
||||
'$id'(S).
|
||||
|
||||
'$drive' -->
|
||||
'$id'(_),
|
||||
'$drive'(C) -->
|
||||
'$id'(C),
|
||||
":\\\\".
|
||||
|
||||
'$id'([C|S]) --> [C],
|
||||
|
11
pl/atoms.yap
11
pl/atoms.yap
@ -8,7 +8,10 @@
|
||||
* *
|
||||
*************************************************************************/
|
||||
|
||||
%% @{
|
||||
/**
|
||||
*@file atoms.yap
|
||||
*
|
||||
*/
|
||||
|
||||
:- system_module( '$_atoms', [
|
||||
atom_concat/2,
|
||||
@ -19,15 +22,13 @@
|
||||
|
||||
:- use_system_module( '$_errors', ['$do_error'/2]).
|
||||
|
||||
%% @{
|
||||
|
||||
/**
|
||||
/?**
|
||||
* @addtogroup Predicates_on_Atoms
|
||||
* @ingroup YAPChars
|
||||
*
|
||||
*/
|
||||
|
||||
/** @pred atom_concat(+ _As_,? _A_)
|
||||
/** @pred atom_concat(+ As, ? A)
|
||||
|
||||
|
||||
The predicate holds when the first argument is a list of atoms, and the
|
||||
|
11
pl/boot.yap
11
pl/boot.yap
@ -18,14 +18,17 @@
|
||||
|
||||
/**
|
||||
@file boot.yap
|
||||
|
||||
@addtogroup builtins Core YAP Builtins
|
||||
|
||||
@defgroup YAPControl Control Predicates
|
||||
@ingroup builtins
|
||||
|
||||
@{
|
||||
|
||||
|
||||
*/
|
||||
|
||||
%% @{
|
||||
|
||||
|
||||
|
||||
/** @pred :_P_ ; :_Q_ is iso
|
||||
Disjunction of goals (or).
|
||||
@ -1651,5 +1654,5 @@ log_event( String, Args ) :-
|
||||
'$ensure_prompting'.
|
||||
|
||||
/**
|
||||
@}
|
||||
@} @}
|
||||
*/
|
||||
|
@ -1,5 +1,5 @@
|
||||
/**
|
||||
* @file pl/lists.yap
|
||||
* @file bootlists.yap
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date Thu Nov 19 09:54:00 2015
|
||||
*
|
||||
|
@ -20,7 +20,12 @@
|
||||
* @file corout.yap
|
||||
* @author VITOR SANTOS COSTA <vsc@VITORs-MBP.lan>
|
||||
* @date Mon Nov 16 22:47:27 2015
|
||||
*
|
||||
*
|
||||
* @addtogroup extensions Extensions to Core Prolog
|
||||
*
|
||||
* @{
|
||||
* @ addtogroup AttributeVariables Attributed Variables and Co-Routining
|
||||
* @{
|
||||
* @brief Support for co-routining
|
||||
*
|
||||
*
|
||||
|
@ -1,4 +1,7 @@
|
||||
/*************************************************************************
|
||||
//!@{
|
||||
|
||||
//!@ingroup YAPModules
|
||||
}/*************************************************************************
|
||||
* *
|
||||
* YAP Prolog *
|
||||
* *
|
||||
@ -170,4 +173,7 @@ clean_up :-
|
||||
retractall(dbloading(_,_,_,_,_,_)),
|
||||
retractall(dbprocess(_,_)),
|
||||
fail.
|
||||
|
||||
clean_up.
|
||||
|
||||
//!@}
|
||||
|
@ -26,9 +26,9 @@
|
||||
*/
|
||||
|
||||
/**
|
||||
@{
|
||||
@defgroup Grammars Grammar Rules
|
||||
@ingroup builtins
|
||||
@{
|
||||
|
||||
Grammar rules in Prolog are both a convenient way to express definite
|
||||
clause grammars and an extension of the well known context-free grammars.
|
||||
@ -66,8 +66,6 @@ right hand side of a grammar rule
|
||||
|
||||
Grammar related built-in predicates:
|
||||
|
||||
@{
|
||||
|
||||
*/
|
||||
|
||||
:- system_module( '$_grammar', [!/2,
|
||||
|
10
pl/init.yap
10
pl/init.yap
@ -14,9 +14,15 @@
|
||||
* comments: initializing the full prolog system *
|
||||
* *
|
||||
*************************************************************************/
|
||||
%% @defgroup builtins YAP Built-Ins
|
||||
|
||||
/*
|
||||
/**
|
||||
|
||||
@file init.yap
|
||||
|
||||
@{
|
||||
@defgroup library The Prolog library
|
||||
|
||||
@}
|
||||
|
||||
@addtogroup YAPControl
|
||||
|
||||
|
@ -27,7 +27,7 @@
|
||||
/**
|
||||
|
||||
@defgroup LoadForeign Access to Foreign Language Programs
|
||||
@ingroup fli
|
||||
@ingroup fli_c_cx
|
||||
|
||||
@{
|
||||
|
||||
|
@ -78,7 +78,7 @@
|
||||
|
||||
/**
|
||||
\pred use_module( +Files ) is directive
|
||||
loads a module file
|
||||
@load a module file
|
||||
|
||||
This predicate loads the file specified by _Files_, importing all
|
||||
their public predicates into the current type-in module. It is
|
||||
|
35
pl/qly.yap
35
pl/qly.yap
@ -17,6 +17,24 @@
|
||||
|
||||
%% @file qly.yap
|
||||
|
||||
/**
|
||||
|
||||
@defgroup YAPSaving Saving and Loading Prolog States
|
||||
@ingroup consult
|
||||
|
||||
YAP can save and read images of its current state to files, known as
|
||||
saved states. It is possible to save the entire state or just a module
|
||||
or a file. Notice that saved states in YAP depend on the architecture
|
||||
where they were made, and may also depend on the version of YAP being
|
||||
saved.
|
||||
|
||||
YAP always tries to find saved states from the current directory
|
||||
first. If it cannot it will use the environment variable [YAPLIBDIR](@ref YAPLIBDIR), if
|
||||
defined, or search the default library directory.
|
||||
|
||||
@{
|
||||
*/
|
||||
|
||||
:- system_module( '$_qly', [qload_module/1,
|
||||
qsave_file/1,
|
||||
qsave_module/1,
|
||||
@ -44,23 +62,6 @@
|
||||
|
||||
:- use_system_module( '$_yio', ['$extend_file_search_path'/1]).
|
||||
|
||||
/**
|
||||
|
||||
@defgroup YAPSaving Saving and Loading Prolog States
|
||||
@ingroup consult
|
||||
|
||||
YAP can save and read images of its current state to files, known as
|
||||
saved states. It is possible to save the entire state or just a module
|
||||
or a file. Notice that saved states in YAP depend on the architecture
|
||||
where they were made, and may also depend on the version of YAP being
|
||||
saved.
|
||||
|
||||
YAP always tries to find saved states from the current directory
|
||||
first. If it cannot it will use the environment variable [YAPLIBDIR](@ref YAPLIBDIR), if
|
||||
defined, or search the default library directory.
|
||||
|
||||
@{
|
||||
*/
|
||||
|
||||
/** @pred save_program(+ _F_)
|
||||
Saves the current state of the data-base in file _F_ .
|
||||
|
@ -69,8 +69,7 @@ setting and clearing this flag are given under 7.7.
|
||||
/* stream predicates */
|
||||
|
||||
/** @defgroup IO_Sockets YAP Old Style Socket and Pipe Interface
|
||||
@ingroup InputOutput
|
||||
@{
|
||||
@{
|
||||
|
||||
Autoload the socket/pipe library
|
||||
|
||||
|
Reference in New Issue
Block a user