Merge branch 'master' of xato:0517

This commit is contained in:
Vitor Santos Costa 2017-05-19 10:03:49 +01:00
commit 6a2d74ac6e
200 changed files with 176828 additions and 432 deletions

View File

@ -493,8 +493,7 @@ Prop Yap_GetPredPropByAtom(Atom at, Term cur_mod)
return (p0);
}
inline static Prop GetPredPropByAtomHavingLockInThisModule(AtomEntry *ae,
Term cur_mod)
inline static Prop GetPredPropByAtomHavingLockInThisModule(AtomEntry *ae, Term cur_mod)
/* get predicate entry for ap/arity; create it if neccessary. */
{
Prop p0;
@ -528,14 +527,15 @@ Prop Yap_GetPredPropByAtomInThisModule(Atom at, Term cur_mod)
return (p0);
}
Prop Yap_GetPredPropByFunc(Functor f, Term cur_mod)
/* get predicate entry for ap/arity; */
{
Prop p0;
FUNC_READ_LOCK(f);
p0 = GetPredPropByFuncHavingLock(f, cur_mod);
FUNC_READ_UNLOCK(f);
return (p0);
}

View File

@ -3396,10 +3396,18 @@ X_API Functor YAP_IntToFunctor(Int i) { return TR_Functors[i]; }
X_API void *YAP_shared(void) { return LOCAL_shared; }
void yap_init(void) {}
X_API PredEntry *YAP_TopGoal(void)
{
YAP_Functor f = Yap_MkFunctor(Yap_LookupAtom("yap_query"),3);
Term tmod = MkAtomTerm(Yap_LookupAtom("yapi"));
PredEntry *p = RepPredProp(Yap_GetPredPropByFunc(f, tmod));
return p;
}
void yap_init(void) {}
#endif // C_INTERFACE_C
/**
@}
*/
/**
@}
*/

View File

@ -1647,6 +1647,14 @@ bool Yap_constPred(PredEntry *p) {
pred_flags_t pflags;
pflags = p->PredFlags;
if (pflags &
((UserCPredFlag | CArgsPredFlag | NumberDBPredFlag | AtomDBPredFlag |
TestPredFlag | AsmPredFlag | CPredFlag | BinaryPredFlag)))
return true;
if (p->PredFlags &
(SysExportPredFlag | MultiFileFlag | DynamicPredFlag | LogUpdatePredFlag))
return false;
if (Yap_isSystemModule(p->ModuleOfPred)) {
if (p->cs.p_code.NOfClauses == 0) {
p->src.OwnerFile = Yap_source_file_name();
@ -1656,15 +1664,7 @@ bool Yap_constPred(PredEntry *p) {
return false;
}
}
if (pflags &
((UserCPredFlag | CArgsPredFlag | NumberDBPredFlag | AtomDBPredFlag |
TestPredFlag | AsmPredFlag | CPredFlag | BinaryPredFlag)))
return true;
if (p->PredFlags &
(SysExportPredFlag | MultiFileFlag | DynamicPredFlag | LogUpdatePredFlag))
return false;
return false;
}
@ -1719,7 +1719,6 @@ bool Yap_addclause(Term t, yamop *cp, Term tmode, Term mod, Term *t4ref)
at = NameOfFunctor(f);
p = RepPredProp(PredPropByFunc(f, mod));
}
Yap_PutValue(AtomAbol, TermNil);
PELOCK(20, p);
/* we are redefining a prolog module predicate */
if (Yap_constPred(p)) {
@ -1727,6 +1726,7 @@ bool Yap_addclause(Term t, yamop *cp, Term tmode, Term mod, Term *t4ref)
UNLOCKPE(30, p);
return false;
}
Yap_PutValue(AtomAbol, TermNil);
pflags = p->PredFlags;
/* we are redefining a prolog module predicate */
if (pflags & MegaClausePredFlag) {

View File

@ -46,7 +46,7 @@ class YAPModule;
class YAPModule : protected YAPAtomTerm {
friend class YAPPredicate;
friend class YAPModuleProp;
YAPModule(Term t) : YAPAtomTerm(t){};
YAPModule(YAP_Term t) : YAPAtomTerm(t){};
Term t() { return gt(); }
Term curModule() { CACHE_REGS return Yap_CurrentModule(); }
@ -138,6 +138,11 @@ protected:
PredEntry *asPred() { return ap; };
/// Empty constructor for predicates
///
/// Just do nothing.
inline YAPPredicate() {
}
/// String constructor for predicates
///
/// It also communicates the array of arguments t[]
@ -181,6 +186,13 @@ protected:
///
inline YAPPredicate(PredEntry *pe) { ap = pe; }
/// Functor constructor for predicates, is given a specific module.
/// This version avoids manufacturing objects
inline YAPPredicate(Functor f, Term mod) {
ap = RepPredProp(PredPropByFunc(f, mod));
}
public:
/// Functor constructor for predicates

View File

@ -435,16 +435,7 @@ void YAPQuery::openQuery(Term t)
XREGS[i + 1] = ts[i];
}
}
// oq = LOCAL_execution;
// LOCAL_execution = this;
q_open = true;
q_state = 0;
q_flags = true; // PL_Q_PASS_EXCEPTION;
q_p = P;
q_cp = CP;
// make sure this is safe
q_handles = LOCAL_CurSlot;
setNext();
}
bool YAPEngine::call(YAPPredicate ap, YAPTerm ts[])
@ -833,6 +824,7 @@ void Yap_displayWithJava(int c)
#endif
void YAPEngine::doInit(YAP_file_type_t BootMode)
{
if ((BootMode = YAP_Init(&engine_args->init_args)) == YAP_FOUND_BOOT_ERROR)
@ -852,228 +844,264 @@ void YAPEngine::doInit(YAP_file_type_t BootMode)
do_init_python();
#endif
YAPQuery initq = YAPQuery(YAPAtom("$init_system"));
if (initq.next())
{
initq.cut();
}
else
{
// should throw exception
}
YAP_Functor f = YAP_MkFunctor(YAP_LookupAtom("$init_system"), 3);
YAP_PredEntryPtr p = YAP_FunctorToPred( f );
YAPQuery initq = YAPQuery(YAPPredicate(p), nullptr);
if (initq.next())
{
initq.cut();
}
else
{
// should throw exception
}
}
YAPEngine::YAPEngine(int argc, char *argv[],
YAPCallback *cb)
: _callback(0) { // a single engine can be active
YAPCallback *cb)
: _callback(0) { // a single engine can be active
YAP_file_type_t BootMode;
engine_args = new YAPEngineArgs();
BootMode = YAP_parse_yap_arguments(argc, argv, &engine_args->init_args);
// delYAPCallback()b
// if (cb)
// setYAPCallback(cb);
doInit(BootMode);
}
YAPPredicate::YAPPredicate(YAPAtom at)
{
CACHE_REGS
ap = RepPredProp(PredPropByAtom(at.a, Yap_CurrentModule()));
}
YAPPredicate::YAPPredicate(YAPAtom at, uintptr_t arity)
{
CACHE_REGS
if (arity)
{
Functor f = Yap_MkFunctor(at.a, arity);
ap = RepPredProp(PredPropByFunc(f, Yap_CurrentModule()));
}
else
{
ap = RepPredProp(PredPropByAtom(at.a, Yap_CurrentModule()));
}
}
/// auxiliary routine to find a predicate in the current module.
PredEntry *YAPPredicate::getPred(YAPTerm &tt, Term *&outp)
{
CACHE_REGS
Term m = Yap_CurrentModule(), t = tt.term();
t = Yap_StripModule(t, &m);
if (IsVarTerm(t) || IsNumTerm(t))
{
if (IsVarTerm(t))
Yap_ThrowError(INSTANTIATION_ERROR, tt.term(), 0);
else if (IsNumTerm(t))
Yap_ThrowError(TYPE_ERROR_CALLABLE, tt.term(), 0);
throw YAPError();
}
tt.put(t);
if (IsAtomTerm(t))
{
ap = RepPredProp(PredPropByAtom(AtomOfTerm(t), m));
outp = (Term *)NULL;
return ap;
}
else if (IsPairTerm(t))
{
Term ts[2];
ts[0] = t;
ts[1] = m;
t = Yap_MkApplTerm(FunctorCsult, 2, ts);
tt.put(t);
outp = RepAppl(t) + 1;
}
Functor f = FunctorOfTerm(t);
if (IsExtensionFunctor(f))
{
Yap_ThrowError(TYPE_ERROR_CALLABLE, t, 0);
}
else
{
ap = RepPredProp(PredPropByFunc(f, m));
outp = RepAppl(t) + 1;
}
return ap;
}
X_API bool YAPPrologPredicate::assertClause(YAPTerm cl, bool last,
YAPTerm source)
{
CACHE_REGS
RECOVER_MACHINE_REGS();
Term tt = cl.gt();
Term sourcet;
Term ntt = cl.gt();
if (source.initialized())
sourcet = source.gt();
else
sourcet = TermZERO;
yamop *codeaddr = Yap_cclause(tt, ap->ArityOfPE, Yap_CurrentModule(),
sourcet); /* vsc: give the number of arguments
to cclause in case there is overflow */
if (LOCAL_ErrorMessage)
{
RECOVER_MACHINE_REGS();
return false;
}
Term *tref = &ntt;
if (Yap_addclause(ntt, codeaddr, (last ? TermAssertz : TermAsserta),
Yap_CurrentModule(), tref))
{
RECOVER_MACHINE_REGS();
}
return tref;
}
bool YAPPrologPredicate::assertFact(YAPTerm *cl, bool last)
{
CACHE_REGS
arity_t i;
RECOVER_MACHINE_REGS();
Term tt = AbsAppl(HR);
*HR++ = (CELL)(ap->FunctorOfPred);
for (i = 0; i < ap->ArityOfPE; i++, cl++)
*HR++ = cl->gt();
yamop *codeaddr = Yap_cclause(tt, ap->ArityOfPE, Yap_CurrentModule(),
tt); /* vsc: give the number of arguments
to cclause in case there is overflow */
if (LOCAL_ErrorMessage)
{
RECOVER_MACHINE_REGS();
return false;
}
Term *tref = &tt;
if (Yap_addclause(tt, codeaddr, (last ? TermAssertz : TermAsserta),
Yap_CurrentModule(), tref))
{
RECOVER_MACHINE_REGS();
}
return tref;
}
void *YAPPrologPredicate::retractClause(YAPTerm skeleton, bool all)
{
return 0;
}
std::string YAPError::text()
{
char buf[256];
std::string s = "";
if (LOCAL_ActiveError->errorFunction)
{
s += LOCAL_ActiveError->errorFile;
s += ":";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->errorLine);
s += buf;
s += ":0 in C-code";
}
if (LOCAL_ActiveError->prologPredLine)
{
s += "\n";
s += LOCAL_ActiveError->prologPredFile->StrOfAE;
s += ":";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->prologPredLine);
s += buf; // std::to_string(LOCAL_ActiveError->prologPredLine) ;
// YAPIntegerTerm(LOCAL_ActiveError->prologPredLine).text();
s += ":0 ";
s += LOCAL_ActiveError->prologPredModule;
s += ":";
s += (LOCAL_ActiveError->prologPredName)->StrOfAE;
s += "/";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->prologPredArity);
s += // std::to_string(LOCAL_ActiveError->prologPredArity);
buf;
}
s += " error ";
if (LOCAL_ActiveError->classAsText != nullptr)
s += LOCAL_ActiveError->classAsText->StrOfAE;
s += ".";
s += LOCAL_ActiveError->errorAsText->StrOfAE;
s += ".\n";
if (LOCAL_ActiveError->errorTerm)
{
Term t = LOCAL_ActiveError->errorTerm->Entry;
if (t)
{
s += "error term is: ";
s += YAPTerm(t).text();
s += "\n";
YAP_file_type_t BootMode;
engine_args = new YAPEngineArgs();
BootMode = YAP_parse_yap_arguments(argc, argv, &engine_args->init_args);
// delYAPCallback()b
// if (cb)
// setYAPCallback(cb);
doInit(BootMode);
}
}
printf("%s\n", s.c_str());
return s.c_str();
}
void YAPEngine::reSet()
{
/* ignore flags for now */
BACKUP_MACHINE_REGS();
Yap_RebootHandles(worker_id);
while (B->cp_b)
B = B->cp_b;
P = FAILCODE;
Yap_exec_absmi(true, YAP_EXEC_ABSMI);
/* recover stack space */
HR = B->cp_h;
TR = B->cp_tr;
YAPPredicate::YAPPredicate(YAPAtom at)
{
CACHE_REGS
ap = RepPredProp(PredPropByAtom(at.a, Yap_CurrentModule()));
}
YAPPredicate::YAPPredicate(YAPAtom at, uintptr_t arity)
{
CACHE_REGS
if (arity)
{
Functor f = Yap_MkFunctor(at.a, arity);
ap = RepPredProp(PredPropByFunc(f, Yap_CurrentModule()));
}
else
{
ap = RepPredProp(PredPropByAtom(at.a, Yap_CurrentModule()));
}
}
/// auxiliary routine to find a predicate in the current module.
PredEntry *YAPPredicate::getPred(YAPTerm &tt, Term *&outp)
{
CACHE_REGS
Term m = Yap_CurrentModule(), t = tt.term();
t = Yap_StripModule(t, &m);
if (IsVarTerm(t) || IsNumTerm(t))
{
if (IsVarTerm(t))
Yap_ThrowError(INSTANTIATION_ERROR, tt.term(), 0);
else if (IsNumTerm(t))
Yap_ThrowError(TYPE_ERROR_CALLABLE, tt.term(), 0);
throw YAPError();
}
tt.put(t);
if (IsAtomTerm(t))
{
ap = RepPredProp(PredPropByAtom(AtomOfTerm(t), m));
outp = (Term *)NULL;
return ap;
}
else if (IsPairTerm(t))
{
Term ts[2];
ts[0] = t;
ts[1] = m;
t = Yap_MkApplTerm(FunctorCsult, 2, ts);
tt.put(t);
outp = RepAppl(t) + 1;
}
Functor f = FunctorOfTerm(t);
if (IsExtensionFunctor(f))
{
Yap_ThrowError(TYPE_ERROR_CALLABLE, t, 0);
}
else
{
ap = RepPredProp(PredPropByFunc(f, m));
outp = RepAppl(t) + 1;
}
return ap;
}
X_API bool YAPPrologPredicate::assertClause(YAPTerm cl, bool last,
YAPTerm source)
{
CACHE_REGS
RECOVER_MACHINE_REGS();
Term tt = cl.gt();
Term sourcet;
Term ntt = cl.gt();
if (source.initialized())
sourcet = source.gt();
else
sourcet = TermZERO;
yamop *codeaddr = Yap_cclause(tt, ap->ArityOfPE, Yap_CurrentModule(),
sourcet); /* vsc: give the number of arguments
to cclause in case there is overflow */
if (LOCAL_ErrorMessage)
{
RECOVER_MACHINE_REGS();
return false;
}
Term *tref = &ntt;
if (Yap_addclause(ntt, codeaddr, (last ? TermAssertz : TermAsserta),
Yap_CurrentModule(), tref))
{
RECOVER_MACHINE_REGS();
}
return tref;
}
bool YAPPrologPredicate::assertFact(YAPTerm *cl, bool last)
{
CACHE_REGS
arity_t i;
RECOVER_MACHINE_REGS();
Term tt = AbsAppl(HR);
*HR++ = (CELL)(ap->FunctorOfPred);
for (i = 0; i < ap->ArityOfPE; i++, cl++)
*HR++ = cl->gt();
yamop *codeaddr = Yap_cclause(tt, ap->ArityOfPE, Yap_CurrentModule(),
tt); /* vsc: give the number of arguments
to cclause in case there is overflow */
if (LOCAL_ErrorMessage)
{
RECOVER_MACHINE_REGS();
return false;
}
Term *tref = &tt;
if (Yap_addclause(tt, codeaddr, (last ? TermAssertz : TermAsserta),
Yap_CurrentModule(), tref))
{
RECOVER_MACHINE_REGS();
}
return tref;
}
void *YAPPrologPredicate::retractClause(YAPTerm skeleton, bool all)
{
return 0;
}
std::string YAPError::text()
{
char buf[256];
std::string s = "";
if (LOCAL_ActiveError->errorFunction)
{
s += LOCAL_ActiveError->errorFile;
s += ":";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->errorLine);
s += buf;
s += ":0 in C-code";
}
if (LOCAL_ActiveError->prologPredLine)
{
s += "\n";
s += LOCAL_ActiveError->prologPredFile->StrOfAE;
s += ":";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->prologPredLine);
s += buf; // std::to_string(LOCAL_ActiveError->prologPredLine) ;
// YAPIntegerTerm(LOCAL_ActiveError->prologPredLine).text();
s += ":0 ";
s += LOCAL_ActiveError->prologPredModule;
s += ":";
s += (LOCAL_ActiveError->prologPredName)->StrOfAE;
s += "/";
sprintf(buf, "%ld", (long int)LOCAL_ActiveError->prologPredArity);
s += // std::to_string(LOCAL_ActiveError->prologPredArity);
buf;
}
s += " error ";
if (LOCAL_ActiveError->classAsText != nullptr)
s += LOCAL_ActiveError->classAsText->StrOfAE;
s += ".";
s += LOCAL_ActiveError->errorAsText->StrOfAE;
s += ".\n";
if (LOCAL_ActiveError->errorTerm)
{
Term t = LOCAL_ActiveError->errorTerm->Entry;
if (t)
{
s += "error term is: ";
s += YAPTerm(t).text();
s += "\n";
}
}
printf("%s\n", s.c_str());
return s.c_str();
}
void YAPEngine::reSet()
{
/* ignore flags for now */
BACKUP_MACHINE_REGS();
Yap_RebootHandles(worker_id);
while (B->cp_b)
B = B->cp_b;
P = FAILCODE;
Yap_exec_absmi(true, YAP_EXEC_ABSMI);
/* recover stack space */
HR = B->cp_h;
TR = B->cp_tr;
#ifdef DEPTH_LIMIT
DEPTH = B->cp_depth;
DEPTH = B->cp_depth;
#endif /* DEPTH_LIMIT */
YENV = ENV = B->cp_env;
YENV = ENV = B->cp_env;
RECOVER_MACHINE_REGS();
}
RECOVER_MACHINE_REGS();
}
YAPError::YAPError(yap_error_number id, YAPTerm culprit, std::string txt)
{
ID = id;
goal = culprit.text();
info = txt;
}
YAPError::YAPError(yap_error_number id, YAPTerm culprit, std::string txt)
{
ID = id;
goal = culprit.text();
info = txt;
}
Term YAPEngine::top_level( std::string s)
{
/// parse string s and make term with var names
/// available.
Term tp;
ARG1 = YAP_ReadBuffer(s.data(), &tp);
ARG2 = tp;
ARG3 = MkVarTerm();
YAPPredicate p = YAPPredicate(YAP_TopGoal());
YAPQuery *Q = new YAPQuery(p,0);
if (Q->next()) {
Term ts[2];
ts[0]= MkAddressTerm(Q);
ts[1]= ARG3;
return YAP_MkApplTerm(YAP_MkFunctor(YAP_LookupAtom("t"), 2), 2, ts);
}
YAPError();
return 0;
}
Term YAPEngine::next_answer(YAPQuery * &Q) {
/// parse string s and make term with var names
/// available.
if (Q->next()) {
Term ts[2];
ts[0]= MkAddressTerm(Q);
ts[1]= ARG3;
return YAP_MkApplTerm(YAP_MkFunctor(YAP_LookupAtom("t"), 2), 2, ts);
}
return 0;
}

View File

@ -2,7 +2,7 @@
/**
* @file yapq.hh
*
* @defgroup yap-cplus-query-hanadlinge Query Handling in the YAP interface.
* @defgroup yap-cplus-query-handling Query Handling in the YAP interface.
* @brief Engine and Query Management
*
* @ingroup yap-cplus-interface
@ -46,9 +46,24 @@ class YAPQuery : public YAPPredicate
// temporaries
Term tnames, tgoal ;
inline void setNext() { // oq = LOCAL_execution;
// LOCAL_execution = this;
q_open = true;
q_state = 0;
q_flags = true; // PL_Q_PASS_EXCEPTION;
q_p = P;
q_cp = CP;
// make sure this is safe
q_handles = LOCAL_CurSlot;
}
void openQuery(Term t);
public:
YAPQuery() {
};
/// main constructor, uses a predicate and an array of terms
///
/// It is given a YAPPredicate _p_ , and an array of terms that must have at
@ -74,63 +89,68 @@ public:
/// goal.
inline YAPQuery(const char *s) : YAPPredicate(s, tgoal, tnames)
{
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %ld",
LOCAL_CurSlot);
if (!ap)
return;
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "%s", vnames.text());
goal = YAPTerm(tgoal);
names = YAPPairTerm(tnames);
openQuery(tgoal);
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %ld",
LOCAL_CurSlot);
if (!ap)
return;
__android_log_print(ANDROID_LOG_INFO, "YAPDroid", "%s", vnames.text());
goal = YAPTerm(tgoal);
names = YAPPairTerm(tnames);
openQuery(tgoal);
};
// inline YAPQuery() : YAPPredicate(s, tgoal, tnames)
// {
// __android_log_print(ANDROID_LOG_INFO, "YAPDroid", "got game %ld",
// LOCAL_CurSlot);
// if (!ap)
// return;
// __android_log_print(ANDROID_LOG_INFO, "YAPDroid", "%s", vnames.text());
// goal = YAPTerm(tgoal);
// names = YAPPairTerm(tnames);
// openQuery(tgoal);
// };
/// string constructor with just an atom
///
/// It is given an atom, and a Prolog term that should be a callable
/// goal, say `main`, `init`, `live`.
inline YAPQuery(YAPAtom g) : YAPPredicate(g)
{
goal = YAPAtomTerm(g);
names = YAPPairTerm( );
openQuery(goal.term());
};
/// It i;
///};
/// set flags for query execution, currently only for exception handling
void setFlag(int flag) { q_flags |= flag; }
/// reset flags for query execution, currently only for exception handling
void resetFlag(int flag) { q_flags &= ~flag; }
/// first query
///
/// actually implemented by calling the next();
inline bool first() { return next(); }
/// ask for the next solution of the current query
/// same call for every solution
bool next();
/// does this query have open choice-points?
/// or is it deterministic?
bool deterministic();
/// represent the top-goal
const char *text();
/// remove alternatives in the current search space, and finish the current
/// query
/// finish the current query: undo all bindings.
void close();
/// query variables.
void cut();
Term namedVars() {return names.term(); };
/// query variables, but copied out
std::vector<Term> namedVarsVector() {
return names.listToArray(); };
/// convert a ref to a binding.
YAPTerm getTerm(yhandle_t t);
/// simple YAP Query;
/// just calls YAP and reports success or failure, Useful when we just
/// want things done, eg YAPCommand("load_files(library(lists), )")
inline bool command()
{
bool rc = next();
close();
return rc;
};
void resetFlag(int flag) { q_flags &= ~flag; }
/// first query
///
/// actually implemented by calling the next();
inline bool first() { return next(); }
/// ask for the next solution of the current query
/// same call for every solution
bool next();
/// does this query have open choice-points?
/// or is it deterministic?
bool deterministic();
/// represent the top-goal
const char *text();
/// remove alternatives in the current search space, and finish the current
/// query
/// finish the current query: undo all bindings.
void close();
/// query variables.
void cut();
Term namedVars() {return names.term(); };
/// query variables, but copied out
std::vector<Term> namedVarsVector() {
return names.listToArray(); };
/// convert a ref to a binding.
YAPTerm getTerm(yhandle_t t);
/// simple YAP Query;
/// just calls YAP and reports success or failure, Useful when we just
/// want things done, eg YAPCommand("load_files(library(lists), )")
inline bool command()
{
bool rc = next();
close();
return rc;
};
};
// Java support
@ -408,8 +428,12 @@ public:
{
return setYapFlag(MkAtomTerm(Yap_LookupAtom(arg.data())), MkAtomTerm(Yap_LookupAtom(path.data())));
};
};
Term top_level( std::string s);
Term next_answer(YAPQuery * &Q);
};
#endif /* YAPQ_HH */
/// @}
/// @}

117954
TAGS Normal file

File diff suppressed because one or more lines are too long

197
cmake/docs/source/conf.py Normal file
View File

@ -0,0 +1,197 @@
#!/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": "/Users/vsc/github/yap-6.3/cmake/docs/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}

View File

@ -0,0 +1,45 @@
.. 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!
===============================
.. doxygenindex::
.. doxygenfunction::
.. doxygenstruct::
.. doxygenenum::
.. 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:`search`

View File

@ -0,0 +1,2 @@
#define HAVE_RAPTOR2_RAPTOR2_H 1
/* #undef HAVE_RAPTOR_H */

View File

@ -0,0 +1,26 @@
/*--------------------------------------------------------------------------
* This file is autogenerated from rconfig.h.cmake
* during the cmake configuration of your project. If you need to make changes
* edit the original file NOT THIS FILE.
* --------------------------------------------------------------------------*/
#ifndef RCONFIG_H
#define RCONFIG_H
/* Define to 1 if you have the <alloca.h> header file. */
#ifndef HAVE_R_H
#define HAVE_R_H 1
#endif
/* Define to 1 if you have the <alloca.h> header file. */
#ifndef HAVE_R_EMBEDDED_H
#define HAVE_R_EMBEDDED_H 1
#endif
/* Define to 1 if you have the <alloca.h> header file. */
#ifndef HAVE_R_INTERFACE_H
#define HAVE_R_INTERFACE_H 1
#endif
#endif

1012
compile_commands.json Normal file

File diff suppressed because it is too large Load Diff

43
cudd_config.h Normal file
View File

@ -0,0 +1,43 @@
// cmake template file
/* Define to 1 if you have the <cuddInt.h> header file. */
#ifndef HAVE_CUDD_H
/* #undef HAVE_CUDD_H */
#endif
/* Define to 1 if you have the <cudd/cuddInt.h> header file. */
#ifndef HAVE_CUDD_CUDD_H
#define HAVE_CUDD_CUDD_H 1
#endif
/* Define to 1 if you have the <cuddInt.h> header file. */
#ifndef HAVE_CUDDINT_H
/* #undef HAVE_CUDDINT_H */
#endif
/* Define to 1 if you have the <cudd/cuddInt.h> header file. */
#ifndef HAVE_CUDD_CUDDINT_H
#define HAVE_CUDD_CUDDINT_H 1
#endif
/* Define to 1 if you have the <cuddObj.hh> header file. */
#ifndef HAVE_CUDDOBJ_HH
/* #undef HAVE_CUDDOBJ_HH */
#endif
/* Define to 1 if you have the <cudd/cuddObj.hh> header file. */
#ifndef HAVE_CUDD_CUDDOBJ_HH
/* #undef HAVE_CUDD_CUDDOBJ_HH */
#endif
/* Define to 1 if you have the <dddmpInt.h> header file. */
#ifndef HAVE_DDDMPINT_H
/* #undef HAVE_DDDMPINT_H */
#endif
/* Define to 1 if you have the <cudd/dddmpInt.h> header file. */
#ifndef HAVE_CUDD_CUDDINT_H
/* #undef HAVE_CUDD_DDDMPINT_H */
#endif

View File

@ -0,0 +1,255 @@
h1, .h1, h2, .h2, h3, .h3{
font-weight: 200 !important;
}
#navrow1, #navrow2, #navrow3, #navrow4, #navrow5{
border-bottom: 1px solid #EEEEEE;
}
.adjust-right {
margin-left: 30px !important;
font-size: 1.15em !important;
}
.navbar{
border: 0px solid #222 !important;
}
/* Sticky footer styles
-------------------------------------------------- */
html,
body {
height: 100%;
/* The html and body elements cannot have any padding or margin. */
}
/* Wrapper for page content to push down footer */
#wrap {
min-height: 100%;
height: auto;
/* Negative indent footer by its height */
margin: 0 auto -60px;
/* Pad bottom by footer height */
padding: 0 0 60px;
}
/* Set the fixed height of the footer here */
#footer {
font-size: 0.9em;
padding: 8px 0px;
background-color: #f5f5f5;
}
.footer-row {
line-height: 44px;
}
#footer > .container {
padding-left: 15px;
padding-right: 15px;
}
.footer-follow-icon {
margin-left: 3px;
text-decoration: none !important;
}
.footer-follow-icon img {
width: 20px;
}
.footer-link {
padding-top: 5px;
display: inline-block;
color: #999999;
text-decoration: none;
}
.footer-copyright {
text-align: center;
}
@media (min-width: 992px) {
.footer-row {
text-align: left;
}
.footer-icons {
text-align: right;
}
}
@media (max-width: 991px) {
.footer-row {
text-align: center;
}
.footer-icons {
text-align: center;
}
}
/* DOXYGEN Code Styles
----------------------------------- */
a.qindex {
font-weight: bold;
}
a.qindexHL {
font-weight: bold;
background-color: #9CAFD4;
color: #ffffff;
border: 1px double #869DCA;
}
.contents a.qindexHL:visited {
color: #ffffff;
}
a.code, a.code:visited, a.line, a.line:visited {
color: #4665A2;
}
a.codeRef, a.codeRef:visited, a.lineRef, a.lineRef:visited {
color: #4665A2;
}
/* @end */
dl.el {
margin-left: -1cm;
}
pre.fragment {
border: 1px solid #C4CFE5;
background-color: #FBFCFD;
padding: 4px 6px;
margin: 4px 8px 4px 2px;
overflow: auto;
word-wrap: break-word;
font-size: 9pt;
line-height: 125%;
font-family: monospace, fixed;
font-size: 105%;
}
div.fragment {
padding: 4px 6px;
margin: 4px 8px 4px 2px;
border: 1px solid #C4CFE5;
}
div.line {
font-family: monospace, fixed;
font-size: 13px;
min-height: 13px;
line-height: 1.0;
text-wrap: unrestricted;
white-space: -moz-pre-wrap; /* Moz */
white-space: -pre-wrap; /* Opera 4-6 */
white-space: -o-pre-wrap; /* Opera 7 */
white-space: pre-wrap; /* CSS3 */
word-wrap: break-word; /* IE 5.5+ */
text-indent: -53px;
padding-left: 53px;
padding-bottom: 0px;
margin: 0px;
-webkit-transition-property: background-color, box-shadow;
-webkit-transition-duration: 0.5s;
-moz-transition-property: background-color, box-shadow;
-moz-transition-duration: 0.5s;
-ms-transition-property: background-color, box-shadow;
-ms-transition-duration: 0.5s;
-o-transition-property: background-color, box-shadow;
-o-transition-duration: 0.5s;
transition-property: background-color, box-shadow;
transition-duration: 0.5s;
}
div.line.glow {
background-color: cyan;
box-shadow: 0 0 10px cyan;
}
span.lineno {
padding-right: 4px;
text-align: right;
border-right: 2px solid #0F0;
background-color: #E8E8E8;
white-space: pre;
}
span.lineno a {
background-color: #D8D8D8;
}
span.lineno a:hover {
background-color: #C8C8C8;
}
div.groupHeader {
margin-left: 16px;
margin-top: 12px;
font-weight: bold;
}
div.groupText {
margin-left: 16px;
font-style: italic;
}
/* @group Code Colorization */
span.keyword {
color: #008000
}
span.keywordtype {
color: #604020
}
span.keywordflow {
color: #e08000
}
span.comment {
color: #800000
}
span.preprocessor {
color: #806020
}
span.stringliteral {
color: #002080
}
span.charliteral {
color: #008080
}
span.vhdldigit {
color: #ff00ff
}
span.vhdlchar {
color: #000000
}
span.vhdlkeyword {
color: #700070
}
span.vhdllogic {
color: #ff0000
}
blockquote {
background-color: #F7F8FB;
border-left: 2px solid #9CAFD4;
margin: 0 24px 0 4px;
padding: 0 12px 0 16px;
}

File diff suppressed because it is too large Load Diff

121
docs/custom/doxy-boot.js Normal file
View File

@ -0,0 +1,121 @@
$( document ).ready(function() {
$("div.headertitle").addClass("page-header");
$("div.title").addClass("h1");
$('li > a[href="index.html"] > span').before("<i class='fa fa-cog'></i> ");
$('li > a[href="index.html"] > span').text("BioGears");
$('li > a[href="modules.html"] > span').before("<i class='fa fa-square'></i> ");
$('li > a[href="namespaces.html"] > span').before("<i class='fa fa-bars'></i> ");
$('li > a[href="annotated.html"] > span').before("<i class='fa fa-list-ul'></i> ");
$('li > a[href="classes.html"] > span').before("<i class='fa fa-book'></i> ");
$('li > a[href="inherits.html"] > span').before("<i class='fa fa-sitemap'></i> ");
$('li > a[href="functions.html"] > span').before("<i class='fa fa-list'></i> ");
$('li > a[href="functions_func.html"] > span').before("<i class='fa fa-list'></i> ");
$('li > a[href="functions_vars.html"] > span').before("<i class='fa fa-list'></i> ");
$('li > a[href="functions_enum.html"] > span').before("<i class='fa fa-list'></i> ");
$('li > a[href="functions_eval.html"] > span').before("<i class='fa fa-list'></i> ");
$('img[src="ftv2ns.png"]').replaceWith('<span class="label label-danger">N</span> ');
$('img[src="ftv2cl.png"]').replaceWith('<span class="label label-danger">C</span> ');
$("ul.tablist").addClass("nav nav-pills nav-justified");
$("ul.tablist").css("margin-top", "0.5em");
$("ul.tablist").css("margin-bottom", "0.5em");
$("li.current").addClass("active");
$("iframe").attr("scrolling", "yes");
$("#nav-path > ul").addClass("breadcrumb");
$("table.params").addClass("table");
$("div.ingroups").wrapInner("<small></small>");
$("div.levels").css("margin", "0.5em");
$("div.levels > span").addClass("btn btn-default btn-xs");
$("div.levels > span").css("margin-right", "0.25em");
$("table.directory").addClass("table table-striped");
$("div.summary > a").addClass("btn btn-default btn-xs");
$("table.fieldtable").addClass("table");
$(".fragment").addClass("well");
$(".memitem").addClass("panel panel-default");
$(".memproto").addClass("panel-heading");
$(".memdoc").addClass("panel-body");
$("span.mlabel").addClass("label label-info");
$("table.memberdecls").addClass("table");
$("[class^=memitem]").addClass("active");
$("div.ah").addClass("btn btn-default");
$("span.mlabels").addClass("pull-right");
$("table.mlabels").css("width", "100%")
$("td.mlabels-right").addClass("pull-right");
$("div.ttc").addClass("panel panel-primary");
$("div.ttname").addClass("panel-heading");
$("div.ttname a").css("color", 'white');
$("div.ttdef,div.ttdoc,div.ttdeci").addClass("panel-body");
$('#MSearchBox').parent().remove();
$('div.fragment.well div.line:first').css('margin-top', '15px');
$('div.fragment.well div.line:last').css('margin-bottom', '15px');
$('table.doxtable').removeClass('doxtable').addClass('table table-striped table-bordered').each(function(){
$(this).prepend('<thead></thead>');
$(this).find('tbody > tr:first').prependTo($(this).find('thead'));
$(this).find('td > span.success').parent().addClass('success');
$(this).find('td > span.warning').parent().addClass('warning');
$(this).find('td > span.danger').parent().addClass('danger');
});
if($('div.fragment.well div.ttc').length > 0)
{
$('div.fragment.well div.line:first').parent().removeClass('fragment well');
}
$('table.memberdecls').find('.memItemRight').each(function(){
$(this).contents().appendTo($(this).siblings('.memItemLeft'));
$(this).siblings('.memItemLeft').attr('align', 'left');