moved from H

This commit is contained in:
Vítor Santos Costa 2015-11-06 18:22:31 +00:00
parent d66db4cf70
commit 50c04116c8
9 changed files with 399 additions and 822 deletions

31
.ctags
View File

@ -1,10 +1,21 @@
--exclude=*ggtags* --langdef=Prolog
--exclude=*TAGS* --langmap=Prolog:.pl.yap.ypp.prolog.pro
--exclude=HPP --regex-Prolog=/^([a-z][A-Za-z0-9_]*:)?([a-z][A-Za-z0-9_]*)\(.*\)[ \t]*(:-|-->)[ \t]*.*/\2/p,predicate,predicate definition/
--exclude=tags --regex-Prolog=/^([a-z][A-Za-z0-9_]*:)?\'(.*)\'\(.*\)[ \t]*(:-|-->)[ \t]*.*/\2/p,predicate,predicate definition/
--exclude=osx* --regex-Prolog=/^([a-z][A-Za-z0-9_]*:)?([a-z][A-Za-z0-9_]*)\(.*\)\.[ \t]*.*/\2/p,predicate,predicate definition/
--exclude=build --regex-Prolog=/^([a-z][A-Za-z0-9_]*:)?\'(.*)\'\(.*\)\.[ \t]*.*/\2/p,predicate,predicate definition/
--exclude=cscope* --regex-Prolog=/^:-[ \t]+(discontiguous|dynamic|multifile|table|thread_local)[ \t]+([a-z][_a-zA-Z0-9]*:)?([a-z0-9_][_a-zA-Z0-9]*)/\1/p,predicate,predicate metadata/
--exclude=bin --regex-Prolog=/^[ \t]*Yap_InitCPred[ \t]*\"(\$?[A-Za-z0-9_]*)\"([ \t]*).*/\1/p,predicate,predicate definition/
--exclude=lib --exclude=\._*
--exclude=share --exclude=*\.bak
--exclude=\.svn
--exclude=\.git
--exclude=CVS
--exclude=.*tags.*
--exclude=.*TAGS.*
--exclude=\.\#.*
--exclude=_darcs
--exclude=*~
--exclude=\#.*
--exclude=(.)\#*
--exclude=*.dylib

36
.gitignore vendored
View File

@ -83,3 +83,39 @@ FindPackageLog.txt
GitSHA1.c GitSHA1.c
GitSHA1.c GitSHA1.c
os/YapIOConfig.h
os/YapIOConfig.h
os/YapIOConfig.h
os/readterm.c.cpp
os/readterm.c.cpp
packages/ProbLog/problog_examples/output/,_query_1_cluster_1.dot
packages/ProbLog/#problog_lbdd.yap#
packages/ProbLog/problog_examples/output/,_query_1_cluster_1.dot
packages/ProbLog/problog_examples/output/out.dat
packages/ProbLog/problog_examples/outputvalues.pl
packages/ProbLog/problogbdd
packages/raptor/raptor_config.h
packages/real/rconfig.h
packages/ProbLog/problog/#completion.yap#
packages/ProbLog/problog_examples/output/out.dat
packages/ProbLog/problog_examples/output/,_query_1_cluster_1.dot
packages/ProbLog/problog_examples/output/out.dat
packages/ProbLog/problog_examples/output/,_query_1_cluster_1

View File

@ -30,7 +30,8 @@ static char SccsId[]="%W% %G%";
/** @{ */ /** @{ */
/** @defgroup Attribute_Variables_Builtins Implementation of Attribute Declarations /** @defgroup Attribute_Variables_Builtins Implementation of Attribute
Declarations
@ingroup Attributed_Variables @ingroup Attributed_Variables
*/ */
@ -38,9 +39,7 @@ static char SccsId[]="%W% %G%";
#define TermVoidAtt TermFoundVar #define TermVoidAtt TermFoundVar
static CELL * static CELL *AddToQueue(attvar_record *attv USES_REGS) {
AddToQueue(attvar_record *attv USES_REGS)
{
Term t[2]; Term t[2];
Term WGs, ng; Term WGs, ng;
@ -58,9 +57,7 @@ AddToQueue(attvar_record *attv USES_REGS)
return (RepAppl(ng) + 2); return (RepAppl(ng) + 2);
} }
static void static void AddFailToQueue(USES_REGS1) {
AddFailToQueue( USES_REGS1 )
{
Term WGs; Term WGs;
/* follow the chain */ /* follow the chain */
@ -73,9 +70,7 @@ AddFailToQueue( USES_REGS1 )
} }
} }
static attvar_record * static attvar_record *BuildNewAttVar(USES_REGS1) {
BuildNewAttVar( USES_REGS1 )
{
attvar_record *newv; attvar_record *newv;
/* add a new attributed variable */ /* add a new attributed variable */
@ -88,15 +83,13 @@ BuildNewAttVar( USES_REGS1 )
return newv; return newv;
} }
static int static int CopyAttVar(CELL *orig, struct cp_frame **to_visit_ptr,
CopyAttVar(CELL *orig, struct cp_frame **to_visit_ptr, CELL *res USES_REGS) CELL *res USES_REGS) {
{
register attvar_record *attv = RepAttVar(orig); register attvar_record *attv = RepAttVar(orig);
register attvar_record *newv; register attvar_record *newv;
struct cp_frame *to_visit = *to_visit_ptr; struct cp_frame *to_visit = *to_visit_ptr;
CELL *vt; CELL *vt;
if (!(newv = BuildNewAttVar(PASS_REGS1))) if (!(newv = BuildNewAttVar(PASS_REGS1)))
return FALSE; return FALSE;
vt = &(attv->Atts); vt = &(attv->Atts);
@ -116,38 +109,31 @@ CopyAttVar(CELL *orig, struct cp_frame **to_visit_ptr, CELL *res USES_REGS)
return TRUE; return TRUE;
} }
static Term static Term AttVarToTerm(CELL *orig) {
AttVarToTerm(CELL *orig)
{
attvar_record *attv = RepAttVar(orig); attvar_record *attv = RepAttVar(orig);
return attv->Atts; return attv->Atts;
} }
static int static int IsEmptyWakeUp(Term atts) {
IsEmptyWakeUp(Term atts)
{
Atom name = NameOfFunctor(FunctorOfTerm(atts)); Atom name = NameOfFunctor(FunctorOfTerm(atts));
Atom *pt = EmptyWakeups; Atom *pt = EmptyWakeups;
int i = 0; int i = 0;
while (i < MaxEmptyWakeups) { while (i < MaxEmptyWakeups) {
if (pt[i++] == name) return TRUE; if (pt[i++] == name)
return TRUE;
} }
return FALSE; return FALSE;
} }
void void Yap_MkEmptyWakeUp(Atom mod) {
Yap_MkEmptyWakeUp(Atom mod)
{
if (MaxEmptyWakeups == MAX_EMPTY_WAKEUPS) if (MaxEmptyWakeups == MAX_EMPTY_WAKEUPS)
Yap_Error(SYSTEM_ERROR_INTERNAL, TermNil, "too many modules that do not wake up"); Yap_Error(SYSTEM_ERROR_INTERNAL, TermNil,
"too many modules that do not wake up");
EmptyWakeups[MaxEmptyWakeups++] = mod; EmptyWakeups[MaxEmptyWakeups++] = mod;
} }
static int TermToAttVar(Term attvar, Term to USES_REGS) {
static int
TermToAttVar(Term attvar, Term to USES_REGS)
{
attvar_record *attv = BuildNewAttVar(PASS_REGS1); attvar_record *attv = BuildNewAttVar(PASS_REGS1);
if (!attv) if (!attv)
return FALSE; return FALSE;
@ -156,9 +142,7 @@ TermToAttVar(Term attvar, Term to USES_REGS)
return TRUE; return TRUE;
} }
static void static void WakeAttVar(CELL *pt1, CELL reg2 USES_REGS) {
WakeAttVar(CELL* pt1, CELL reg2 USES_REGS)
{
/* if bound to someone else, follow until we find the last one */ /* if bound to someone else, follow until we find the last one */
attvar_record *attv = RepAttVar(pt1); attvar_record *attv = RepAttVar(pt1);
@ -215,24 +199,16 @@ WakeAttVar(CELL* pt1, CELL reg2 USES_REGS)
Bind_Global_NonAtt(&(attv->Value), reg2); Bind_Global_NonAtt(&(attv->Value), reg2);
} }
void void Yap_WakeUp(CELL *pt0) {
Yap_WakeUp(CELL *pt0) {
CACHE_REGS CACHE_REGS
CELL d0 = *pt0; CELL d0 = *pt0;
RESET_VARIABLE(pt0); RESET_VARIABLE(pt0);
WakeAttVar(pt0, d0 PASS_REGS); WakeAttVar(pt0, d0 PASS_REGS);
} }
static void mark_attvar(CELL *orig) { return; }
static void static Term BuildAttTerm(Functor mfun, UInt ar USES_REGS) {
mark_attvar(CELL *orig)
{
return;
}
static Term
BuildAttTerm(Functor mfun, UInt ar USES_REGS)
{
CELL *h0 = HR; CELL *h0 = HR;
UInt i; UInt i;
@ -250,31 +226,24 @@ BuildAttTerm(Functor mfun, UInt ar USES_REGS)
return AbsAppl(h0); return AbsAppl(h0);
} }
static Term static Term SearchAttsForModule(Term start, Functor mfun) {
SearchAttsForModule(Term start, Functor mfun)
{
do { do {
if (IsVarTerm(start) || if (IsVarTerm(start) || FunctorOfTerm(start) == mfun)
FunctorOfTerm(start) == mfun)
return start; return start;
start = ArgOfTerm(1, start); start = ArgOfTerm(1, start);
} while (TRUE); } while (TRUE);
} }
static Term static Term SearchAttsForModuleName(Term start, Atom mname) {
SearchAttsForModuleName(Term start, Atom mname)
{
do { do {
if (IsVarTerm(start) || if (IsVarTerm(start) || NameOfFunctor(FunctorOfTerm(start)) == mname)
NameOfFunctor(FunctorOfTerm(start)) == mname)
return start; return start;
start = ArgOfTerm(1, start); start = ArgOfTerm(1, start);
} while (TRUE); } while (TRUE);
} }
static void static void AddNewModule(attvar_record *attv, Term t, int new,
AddNewModule(attvar_record *attv, Term t, int new, int do_it USES_REGS) int do_it USES_REGS) {
{
CELL *newp = RepAppl(t) + 2; CELL *newp = RepAppl(t) + 2;
UInt i, ar = ArityOfFunctor((Functor)newp[-2]); UInt i, ar = ArityOfFunctor((Functor)newp[-2]);
@ -308,9 +277,7 @@ AddNewModule(attvar_record *attv, Term t, int new, int do_it USES_REGS)
} }
} }
static void static void ReplaceAtts(attvar_record *attv, Term oatt, Term att USES_REGS) {
ReplaceAtts(attvar_record *attv, Term oatt, Term att USES_REGS)
{
UInt ar = ArityOfFunctor(FunctorOfTerm(oatt)), i; UInt ar = ArityOfFunctor(FunctorOfTerm(oatt)), i;
CELL *oldp = RepAppl(oatt) + 1; CELL *oldp = RepAppl(oatt) + 1;
CELL *newp; CELL *newp;
@ -360,15 +327,11 @@ ReplaceAtts(attvar_record *attv, Term oatt, Term att USES_REGS)
} }
} }
static void static void DelAllAtts(attvar_record *attv USES_REGS) {
DelAllAtts(attvar_record *attv USES_REGS)
{
MaBind(&(attv->Done), attv->Value); MaBind(&(attv->Done), attv->Value);
} }
static void static void DelAtts(attvar_record *attv, Term oatt USES_REGS) {
DelAtts(attvar_record *attv, Term oatt USES_REGS)
{
Term t = ArgOfTerm(1, oatt); Term t = ArgOfTerm(1, oatt);
if (attv->Atts == oatt) { if (attv->Atts == oatt) {
if (IsVarTerm(t)) { if (IsVarTerm(t)) {
@ -393,9 +356,7 @@ DelAtts(attvar_record *attv, Term oatt USES_REGS)
} }
} }
static void static void PutAtt(Int pos, Term atts, Term att USES_REGS) {
PutAtt(Int pos, Term atts, Term att USES_REGS)
{
if (IsVarTerm(att) && VarOfTerm(att) > HR && VarOfTerm(att) < LCL0) { if (IsVarTerm(att) && VarOfTerm(att) > HR && VarOfTerm(att) < LCL0) {
/* globalise locals */ /* globalise locals */
Term tnew = MkVarTerm(); Term tnew = MkVarTerm();
@ -405,8 +366,7 @@ PutAtt(Int pos, Term atts, Term att USES_REGS)
MaBind(RepAppl(atts) + pos, att); MaBind(RepAppl(atts) + pos, att);
} }
static Int static Int BindAttVar(attvar_record *attv USES_REGS) {
BindAttVar(attvar_record *attv USES_REGS) {
if (IsVarTerm(attv->Done) && IsUnboundVar(&attv->Done)) { if (IsVarTerm(attv->Done) && IsUnboundVar(&attv->Done)) {
/* make sure we are not trying to bind a variable against itself */ /* make sure we are not trying to bind a variable against itself */
if (!IsVarTerm(attv->Value)) { if (!IsVarTerm(attv->Value)) {
@ -422,7 +382,8 @@ BindAttVar(attvar_record *attv USES_REGS) {
Bind_Global_NonAtt(&(attv2->Done), AbsAttVar(attv)); Bind_Global_NonAtt(&(attv2->Done), AbsAttVar(attv));
} }
} else { } else {
Yap_Error(SYSTEM_ERROR_INTERNAL,(CELL)&(attv->Done),"attvar was bound when unset"); Yap_Error(SYSTEM_ERROR_INTERNAL, (CELL) & (attv->Done),
"attvar was bound when unset");
return (FALSE); return (FALSE);
} }
} else { } else {
@ -431,25 +392,23 @@ BindAttVar(attvar_record *attv USES_REGS) {
} }
return (TRUE); return (TRUE);
} else { } else {
Yap_Error(SYSTEM_ERROR_INTERNAL,(CELL)&(attv->Done),"attvar was bound when set"); Yap_Error(SYSTEM_ERROR_INTERNAL, (CELL) & (attv->Done),
"attvar was bound when set");
return (FALSE); return (FALSE);
} }
} }
static Int static Int UnBindAttVar(attvar_record *attv) {
UnBindAttVar(attvar_record *attv) {
RESET_VARIABLE(&(attv->Value)); RESET_VARIABLE(&(attv->Value));
return (TRUE); return (TRUE);
} }
static Term static Term GetAllAtts(attvar_record *attv) {
GetAllAtts(attvar_record *attv) {
/* check if we are already there */ /* check if we are already there */
return attv->Atts; return attv->Atts;
} }
static Int static Int p_put_att(USES_REGS1) {
p_put_att( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -491,13 +450,13 @@ p_put_att( USES_REGS1 ) {
PutAtt(IntegerOfTerm(Deref(ARG4)), tatts, Deref(ARG5) PASS_REGS); PutAtt(IntegerOfTerm(Deref(ARG4)), tatts, Deref(ARG5) PASS_REGS);
return TRUE; return TRUE;
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of put_attributes/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of put_attributes/2");
return FALSE; return FALSE;
} }
} }
static Int static Int p_put_att_term(USES_REGS1) {
p_put_att_term( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -521,13 +480,13 @@ p_put_att_term( USES_REGS1 ) {
} }
return TRUE; return TRUE;
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of put_att_term/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of put_att_term/2");
return (FALSE); return (FALSE);
} }
} }
static Int static Int p_rm_att(USES_REGS1) {
p_rm_att( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -571,8 +530,7 @@ p_rm_att( USES_REGS1 ) {
} }
} }
static Int static Int p_put_atts(USES_REGS1) {
p_put_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
@ -613,13 +571,13 @@ p_put_atts( USES_REGS1 ) {
} }
return TRUE; return TRUE;
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of put_att/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of put_att/2");
return FALSE; return FALSE;
} }
} }
static Int static Int p_del_atts(USES_REGS1) {
p_del_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
Term otatts; Term otatts;
@ -646,8 +604,7 @@ p_del_atts( USES_REGS1 ) {
} }
} }
static Int static Int p_del_all_atts(USES_REGS1) {
p_del_all_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
@ -661,8 +618,7 @@ p_del_all_atts( USES_REGS1 ) {
return TRUE; return TRUE;
} }
static Int static Int p_get_att(USES_REGS1) {
p_get_att( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -677,20 +633,21 @@ p_get_att( USES_REGS1 ) {
if (IsVarTerm(tatts = SearchAttsForModuleName(attv->Atts, modname))) if (IsVarTerm(tatts = SearchAttsForModuleName(attv->Atts, modname)))
return FALSE; return FALSE;
tout = ArgOfTerm(IntegerOfTerm(Deref(ARG3)), tatts); tout = ArgOfTerm(IntegerOfTerm(Deref(ARG3)), tatts);
if (tout == TermVoidAtt) return FALSE; if (tout == TermVoidAtt)
return FALSE;
return Yap_unify(tout, ARG4); return Yap_unify(tout, ARG4);
} else { } else {
/* Yap_Error(INSTANTIATION_ERROR,inp,"get_att/2"); */ /* Yap_Error(INSTANTIATION_ERROR,inp,"get_att/2"); */
return FALSE; return FALSE;
} }
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of get_att/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of get_att/2");
return (FALSE); return (FALSE);
} }
} }
static Int static Int p_free_att(USES_REGS1) {
p_free_att( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -711,13 +668,13 @@ p_free_att( USES_REGS1 ) {
return TRUE; return TRUE;
} }
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of free_att/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of free_att/2");
return (FALSE); return (FALSE);
} }
} }
static Int static Int p_get_atts(USES_REGS1) {
p_get_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -743,7 +700,8 @@ p_get_atts( USES_REGS1 ) {
return FALSE; return FALSE;
if (*new == TermVoidAtt &&*old != TermVoidAtt) if (*new == TermVoidAtt &&*old != TermVoidAtt)
return FALSE; return FALSE;
if (!Yap_unify(*new,*old)) return FALSE; if (!Yap_unify(*new, *old))
return FALSE;
} }
} }
return TRUE; return TRUE;
@ -756,8 +714,7 @@ p_get_atts( USES_REGS1 ) {
} }
} }
static Int static Int p_has_atts(USES_REGS1) {
p_has_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -775,13 +732,13 @@ p_has_atts( USES_REGS1 ) {
return FALSE; return FALSE;
} }
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of has_atts/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of has_atts/2");
return (FALSE); return (FALSE);
} }
} }
static Int static Int p_bind_attvar(USES_REGS1) {
p_bind_attvar( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -790,15 +747,15 @@ p_bind_attvar( USES_REGS1 ) {
attvar_record *attv = RepAttVar(VarOfTerm(inp)); attvar_record *attv = RepAttVar(VarOfTerm(inp));
return (BindAttVar(attv PASS_REGS)); return (BindAttVar(attv PASS_REGS));
} }
return(TRUE); return (true);
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of bind_attvar/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
return(FALSE); "first argument of bind_attvar/2");
return (false);
} }
} }
static Int static Int p_unbind_attvar(USES_REGS1) {
p_unbind_attvar( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -809,13 +766,13 @@ p_unbind_attvar( USES_REGS1 ) {
} }
return (TRUE); return (TRUE);
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of bind_attvar/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of bind_attvar/2");
return (FALSE); return (FALSE);
} }
} }
static Int static Int p_get_all_atts(USES_REGS1) {
p_get_all_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -826,14 +783,13 @@ p_get_all_atts( USES_REGS1 ) {
} }
return TRUE; return TRUE;
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of get_all_atts/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of get_all_atts/2");
return FALSE; return FALSE;
} }
} }
static int static int ActiveAtt(Term tatt, UInt ar) {
ActiveAtt(Term tatt, UInt ar)
{
CELL *cp = RepAppl(tatt) + 1; CELL *cp = RepAppl(tatt) + 1;
UInt i; UInt i;
@ -844,8 +800,7 @@ ActiveAtt(Term tatt, UInt ar)
return FALSE; return FALSE;
} }
static Int static Int p_modules_with_atts(USES_REGS1) {
p_modules_with_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
/* if this is unbound, ok */ /* if this is unbound, ok */
@ -874,13 +829,13 @@ p_modules_with_atts( USES_REGS1 ) {
} }
return Yap_unify(ARG2, TermNil); return Yap_unify(ARG2, TermNil);
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of modules_with_attributes/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of modules_with_attributes/2");
return FALSE; return FALSE;
} }
} }
static Int static Int p_swi_all_atts(USES_REGS1) {
p_swi_all_atts( USES_REGS1 ) {
/* receive a variable in ARG1 */ /* receive a variable in ARG1 */
Term inp = Deref(ARG1); Term inp = Deref(ARG1);
Functor attf = FunctorAtt1; Functor attf = FunctorAtt1;
@ -918,14 +873,13 @@ p_swi_all_atts( USES_REGS1 ) {
} }
return Yap_unify(ARG2, TermNil); return Yap_unify(ARG2, TermNil);
} else { } else {
Yap_Error(REPRESENTATION_ERROR_VARIABLE,inp,"first argument of get_all_swi_atts/2"); Yap_Error(REPRESENTATION_ERROR_VARIABLE, inp,
"first argument of get_all_swi_atts/2");
return FALSE; return FALSE;
} }
} }
static Term AllAttVars(USES_REGS1) {
static Term
AllAttVars( USES_REGS1 ) {
CELL *pt = H0; CELL *pt = H0;
CELL *myH = HR; CELL *myH = HR;
@ -955,14 +909,13 @@ AllAttVars( USES_REGS1 ) {
case (CELL) FunctorString: case (CELL) FunctorString:
pt += 3 + pt[1]; pt += 3 + pt[1];
break; break;
case (CELL)FunctorBigInt: case (CELL) FunctorBigInt: {
{
Int sz = 3 + Int sz = 3 +
(sizeof(MP_INT) + (sizeof(MP_INT) +
(((MP_INT *)(pt+2))->_mp_alloc*sizeof(mp_limb_t)))/sizeof(CELL); (((MP_INT *)(pt + 2))->_mp_alloc * sizeof(mp_limb_t))) /
sizeof(CELL);
pt += sz; pt += sz;
} } break;
break;
case (CELL) FunctorLongInt: case (CELL) FunctorLongInt:
pt += 3; pt += 3;
break; break;
@ -980,9 +933,7 @@ AllAttVars( USES_REGS1 ) {
} }
} }
static Int static Int p_all_attvars(USES_REGS1) {
p_all_attvars( USES_REGS1 )
{
do { do {
Term out; Term out;
@ -1005,40 +956,23 @@ p_all_attvars( USES_REGS1 )
*/ */
static Int static Int p_is_attvar(USES_REGS1) {
p_is_attvar( USES_REGS1 )
{
Term t = Deref(ARG1); Term t = Deref(ARG1);
return(IsVarTerm(t) && return (IsVarTerm(t) && IsAttVar(VarOfTerm(t)));
IsAttVar(VarOfTerm(t)));
} }
/* check if we are not redoing effort */ /* check if we are not redoing effort */
static Int static Int p_attvar_bound(USES_REGS1) {
p_attvar_bound( USES_REGS1 )
{
Term t = Deref(ARG1); Term t = Deref(ARG1);
return return IsVarTerm(t) && IsAttachedTerm(t) &&
IsVarTerm(t) &&
IsAttachedTerm(t) &&
!IsUnboundVar(&(RepAttVar(VarOfTerm(t))->Done)); !IsUnboundVar(&(RepAttVar(VarOfTerm(t))->Done));
} }
static Int static Int p_void_term(USES_REGS1) { return Yap_unify(ARG1, TermVoidAtt); }
p_void_term( USES_REGS1 )
{
return Yap_unify(ARG1,TermVoidAtt);
}
static Int static Int p_free_term(USES_REGS1) { return Yap_unify(ARG1, TermFreeTerm); }
p_free_term( USES_REGS1 )
{
return Yap_unify(ARG1,TermFreeTerm);
}
static Int static Int p_fast_unify(USES_REGS1) {
p_fast_unify( USES_REGS1 )
{
/* /*
Case we want to unify two variables, but we do not Case we want to unify two variables, but we do not
think there is a point in waking them up think there is a point in waking them up
@ -1061,28 +995,15 @@ p_fast_unify( USES_REGS1 )
#else #else
static Int static Int p_all_attvars(USES_REGS1) { return FALSE; }
p_all_attvars( USES_REGS1 )
{
return FALSE;
}
static Int static Int p_is_attvar(USES_REGS1) { return FALSE; }
p_is_attvar( USES_REGS1 )
{
return FALSE;
}
static Int static Int p_attvar_bound(USES_REGS1) { return FALSE; }
p_attvar_bound( USES_REGS1 )
{
return FALSE;
}
#endif /* COROUTINING */ #endif /* COROUTINING */
void Yap_InitAttVarPreds(void) void Yap_InitAttVarPreds(void) {
{
CACHE_REGS CACHE_REGS
Term OldCurrentModule = CurrentModule; Term OldCurrentModule = CurrentModule;
CurrentModule = ATTRIBUTES_MODULE; CurrentModule = ATTRIBUTES_MODULE;
@ -1106,7 +1027,8 @@ void Yap_InitAttVarPreds(void)
Yap_InitCPred("rm_att", 4, p_rm_att, 0); Yap_InitCPred("rm_att", 4, p_rm_att, 0);
Yap_InitCPred("bind_attvar", 1, p_bind_attvar, SafePredFlag); Yap_InitCPred("bind_attvar", 1, p_bind_attvar, SafePredFlag);
Yap_InitCPred("unbind_attvar", 1, p_unbind_attvar, SafePredFlag); Yap_InitCPred("unbind_attvar", 1, p_unbind_attvar, SafePredFlag);
Yap_InitCPred("modules_with_attributes", 2, p_modules_with_atts, SafePredFlag); Yap_InitCPred("modules_with_attributes", 2, p_modules_with_atts,
SafePredFlag);
Yap_InitCPred("void_term", 1, p_void_term, SafePredFlag); Yap_InitCPred("void_term", 1, p_void_term, SafePredFlag);
Yap_InitCPred("free_term", 1, p_free_term, SafePredFlag); Yap_InitCPred("free_term", 1, p_free_term, SafePredFlag);
Yap_InitCPred("fast_unify_attributed", 2, p_fast_unify, 0); Yap_InitCPred("fast_unify_attributed", 2, p_fast_unify, 0);
@ -1117,7 +1039,4 @@ void Yap_InitAttVarPreds(void)
Yap_InitCPred("$att_bound", 1, p_attvar_bound, SafePredFlag | TestPredFlag); Yap_InitCPred("$att_bound", 1, p_attvar_bound, SafePredFlag | TestPredFlag);
} }
/** @} */ /** @} */

View File

@ -1,2 +1,2 @@
#define GIT_SHA1 "fa586f8769671bdf084b01dfe51728a5420a793a" #define GIT_SHA1 "036876299f12a4761f8d1de2dfba9709d5c91739"
const char g_GIT_SHA1[] = GIT_SHA1; const char g_GIT_SHA1[] = GIT_SHA1;

View File

@ -213,7 +213,7 @@ system_mod("ARG_MODULE", _, arg, sys ).
system_mod("PROLOG_MODULE", _ , prolog, sys ). system_mod("PROLOG_MODULE", _ , prolog, sys ).
system_mod("RANGE_MODULE", _, range, user ). system_mod("RANGE_MODULE", _, range, user ).
system_mod("SWI_MODULE", _, swi, sys ). system_mod("SWI_MODULE", _, swi, sys ).
system_mod("OPERATING_SYSTEM_MODULE", _, operating_system_support , sys ). system_mod("OPERATING_SYSTEM_MODULE", _, system , sys ).
system_mod("TERMS_MODULE", _, terms , sys). system_mod("TERMS_MODULE", _, terms , sys).
system_mod("SYSTEM_MODULE", _, system, sys ). system_mod("SYSTEM_MODULE", _, system, sys ).
system_mod("IDB_MODULE", _, idb, user ). system_mod("IDB_MODULE", _, idb, user ).

View File

@ -1,108 +0,0 @@
/* Define if you have libreadline */
#ifndef HAVE_LIBREADLINE
#define HAVE_LIBREADLINE 1
#endif
/* Define to 1 if you have the <readline/history.h> header file. */
#ifndef HAVE_READLINE_HISTORY_H
#define HAVE_READLINE_HISTORY_H 1
#endif
/* Define to 1 if you have the <readline/readline.h> header file. */
#ifndef HAVE_READLINE_READLINE_H
#define HAVE_READLINE_READLINE_H 1
#endif
/* Define to 1 if you have the declaration of `rl_catch_signals ', and to 0 if
you don't. */
#ifndef HAVE_DECL_RL_CATCH_SIGNALS_
/* #undef HAVE_DECL_RL_CATCH_SIGNALS */
#endif
/* Define to 1 if you have the declaration of `rl_done ', and to 0 if you
don't. */
#ifndef HAVE_DECL_RL_DONE_
/* #undef HAVE_DECL_RL_DONE_ */
#endif
/* Define to 1 if you have the declaration of `rl_event_hook', and to 0 if you
don't. */
#ifndef HAVE_DECL_RL_EVENT_HOOK
/* #undef HAVE_DECL_RL_EVENT_HOOK */
#endif
/* Define to 1 if you have the declaration of `rl_readline_state', and to 0 if
you don't. */
#ifndef HAVE_DECL_RL_READLINE_STATE
/* #undef HAVE_DECL_RL_READLINE_STATE */
#endif
/* Define to 1 if you have the `rl_begin_undo_group' function. */
#ifndef HAVE_RL_BEGIN_UNDO_GROUP
#define HAVE_RL_BEGIN_UNDO_GROUP 1
#endif
/* Define to 1 if you have the `rl_clear_pending_input' function. */
#ifndef HAVE_RL_CLEAR_PENDING_INPUT
#define HAVE_RL_CLEAR_PENDING_INPUT 1
#endif
/* Define to 1 if the system has the type `rl_completion_func_t'). */
#ifndef HAVE_RL_COMPLETION_FUNC_T
/* #undef HAVE_RL_COMPLETION_FUNC_T */
#endif
/* Define to 1 if the system has the type `rl_completion_func_t'. */
#ifndef HAVE_RL_COMPLETION_FUNC_T
/* #undef HAVE_RL_COMPLETION_FUNC_T */
#endif
/* Define to 1 if you have the `rl_completion_matches' function. */
#ifndef HAVE_RL_COMPLETION_MATCHES
/* #undef HAVE_RL_COMPLETION_MATCHES */
#endif
/* Define to 1 if you have the `rl_discard_argument' function. */
#ifndef HAVE_RL_DISCARD_ARGUMENT
#define HAVE_RL_DISCARD_ARGUMENT 1
#endif
/* Define to 1 if you have the `rl_done' variable. */
#ifndef HAVE_RL_DONE
#define HAVE_RL_DONE
#endif
/* Define to 1 if you have the `rl_filename_completion_function' function. */
#ifndef HAVE_RL_FILENAME_COMPLETION_FUNCTION
#define HAVE_RL_FILENAME_COMPLETION_FUNCTION 1
#endif
/* Define to 1 if you have the `rl_free_line_state' function. */
#ifndef HAVE_RL_FREE_LINE_STATE
#define HAVE_RL_FREE_LINE_STATE 1
#endif
/* Define to 1 if the system has the type `rl_hook_func_t'. */
#ifndef HAVE_RL_HOOK_FUNC_T
/* #undef HAVE_RL_HOOK_FUNC_T */
#endif
/* Define to 1 if you have the `rl_insert_close' function. */
#ifndef HAVE_RL_INSERT_CLOSE
#define HAVE_RL_INSERT_CLOSE 1
#endif
/* Define to 1 if you have the `rl_reset_after_signal' function. */
#ifndef HAVE_RL_RESET_AFTER_SIGNAL
#define HAVE_RL_RESET_AFTER_SIGNAL 1
#endif
/* Define to 1 if you have the `rl_set_keyboard_input_timeout' function. */
#ifndef HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT
#define HAVE_RL_SET_KEYBOARD_INPUT_TIMEOUT 1
#endif
/* Define to 1 if you have the `rl_set_prompt' function. */
#ifndef HAVE_RL_SET_PROMPT
#define HAVE_RL_SET_PROMPT 1
#endif

View File

@ -1,264 +0,0 @@
alias.c:271: LOCAL_NOfFileAliases--;
alias.c:373: LOCAL_NOfFileAliases--;
charsio.c:760: ocharcount = s->charcount;
charsio.c:761: olinecount = s->linecount;
charsio.c:762: olinepos = s->linepos;
charsio.c:764: s->charcount = ocharcount;
charsio.c:765: s->linecount = olinecount;
charsio.c:766: s->linepos = olinepos;
charsio.c:768: s->och = ch;
charsio.c:770: s->stream_getc = PlUnGetc;
charsio.c:771: s->stream_wgetc = get_wchar;
charsio.c:772: s->stream_gets = DefaultGets;
charsio.c:774: s->stream_wgetc_for_read = ISOWGetc;
charsio.c:776: s->stream_wgetc_for_read = s->stream_wgetc;
charsio.c:777: if (s->encoding == ENC_ISO_UTF8)
charsio.c:778: s->stream_getc_for_utf8 = s->stream_getc;
charsio.c:780: s->stream_getc_for_utf8 = GetUTF8;
chartypes.c:113: { "Windows-1252", ENC_ISO_LATIN1 }, // almost, but not quite
console.c:66: ++s->linecount;
console.c:67: ++s->charcount;
console.c:68: s->linepos = 0;
console.c:72: ++s->charcount;
console.c:73: ++s->linepos;
console.c:107: s->stream_putc = ConsolePutc;
console.c:111: s->stream_getc = ConsoleGetc;
console.c:123: putc ('\n', s->file);
console.c:127: putc (ch, s->file);
console.c:160: ch = fgetc(s->file);
format.c:106: while (fg->padders--) {
format.c:601: repeats--;
format.c:605: repeats--;
format.c:782: while (repeats--) {
iopreds.c:175: if (s->status & InMemory_Stream_f) {
iopreds.c:176: s->status |= Seekable_Stream_f;
iopreds.c:183: _isatty(_fileno(s->u.file.file))
iopreds.c:185: s->status |= Tty_Stream_f|Reset_Eof_Stream_f|Promptable_Stream_f;
iopreds.c:187: setvbuf(s->u.file.file, NULL, _IONBF, 0);
iopreds.c:192: else if (StdErrStream == s-Stream) {
iopreds.c:193: setvbuf(s->u.file.file, NULL, _IONBF, 0);
iopreds.c:196: s->status |= Seekable_Stream_f;
iopreds.c:204: if (s-Stream < 3) {
iopreds.c:205: s->name = AtomTty;
iopreds.c:206: s->status |= Tty_Stream_f|Reset_Eof_Stream_f|Promptable_Stream_f;
iopreds.c:211: if (!s->file) {
iopreds.c:212: s->name = AtomNil;
iopreds.c:215: filedes = fileno (s->file);
iopreds.c:220: s->name = AtomTty;
iopreds.c:222: s->name = AtomTtys;
iopreds.c:224: s->name = AtomTty;
iopreds.c:226: s->status |= Tty_Stream_f|Reset_Eof_Stream_f|Promptable_Stream_f;
iopreds.c:233: s->status |= Seekable_Stream_f;
iopreds.c:248: s->stream_gets = PlGetsFunc();
iopreds.c:249: if (s->status & Socket_Stream_f) {
iopreds.c:252: s->stream_wputc = put_wchar;
iopreds.c:253: } else if (s->status & Pipe_Stream_f) {
iopreds.c:256: s->stream_wputc = put_wchar;
iopreds.c:257: } else if (s->status & InMemory_Stream_f) {
iopreds.c:259: s->stream_wputc = put_wchar;
iopreds.c:262: if (s->status & (Promptable_Stream_f)) {
iopreds.c:266: s->stream_putc = FilePutc;
iopreds.c:267: s->stream_wputc = put_wchar;
iopreds.c:268: s->stream_getc = PlGetc;
iopreds.c:269: s->stream_gets = PlGetsFunc();
iopreds.c:272: s->stream_wputc = put_wchar;
iopreds.c:273: s->stream_wgetc = get_wchar;
iopreds.c:282: s->file = file;
iopreds.c:283: s->status = flags;
iopreds.c:284: s->linepos = 0;
iopreds.c:285: s->linecount = 1;
iopreds.c:286: s->charcount = 0.;
iopreds.c:287: s->encoding = ENC_ISO_UTF8;
iopreds.c:288: INIT_LOCK(s->streamlock);
iopreds.c:296: s->name=AtomUserIn;
iopreds.c:299: s->name=AtomUserOut;
iopreds.c:302: s->name=AtomUserErr;
iopreds.c:305: s->user_name = MkAtomTerm (s->name);
iopreds.c:307: s->stream_wgetc_for_read = ISOWGetc;
iopreds.c:309: s->stream_wgetc_for_read = s->stream_wgetc;
iopreds.c:310: if (s->encoding == ENC_ISO_UTF8)
iopreds.c:311: s->stream_getc_for_utf8 = s->stream_getc;
iopreds.c:313: s->stream_getc_for_utf8 = GetUTF8;
iopreds.c:315: s->status |= Tty_Stream_f|Promptable_Stream_f;
iopreds.c:318: if (s->status & Tty_Stream_f &&
iopreds.c:333: if (s->user_name != 0L) {
iopreds.c:334: return (s->user_name);
iopreds.c:507: putc(ch, s->file);
iopreds.c:511: fflush(s->file);
iopreds.c:534: if (s->status & Eof_Error_Stream_f) {
iopreds.c:535: Yap_Error(PERMISSION_ERROR_INPUT_PAST_END_OF_STREAM,MkAtomTerm(s->name),
iopreds.c:538: } else if (s->status & Reset_Eof_Stream_f) {
iopreds.c:540: if (feof (s->file))
iopreds.c:541: clearerr (s->file);
iopreds.c:544: if (s->status & Socket_Stream_f) {
iopreds.c:545: if (s->status & Promptable_Stream_f)
iopreds.c:549: s->stream_wputc = put_wchar;
iopreds.c:552: if (s->status & Pipe_Stream_f) {
iopreds.c:553: if (s->status & Promptable_Stream_f)
iopreds.c:557: } else if (s->status & InMemory_Stream_f) {
iopreds.c:559: } else if (s->status & Promptable_Stream_f) {
iopreds.c:562: s->stream_getc = PlGetc;
iopreds.c:563: s->stream_gets = PlGetsFunc();
iopreds.c:565: s->stream_wgetc = get_wchar;
iopreds.c:566: s->stream_wputc = put_wchar;
iopreds.c:568: s->stream_wgetc_for_read = ISOWGetc;
iopreds.c:570: s->stream_wgetc_for_read = s->stream_wgetc;
iopreds.c:571: if (s->encoding == ENC_ISO_UTF8)
iopreds.c:572: s->stream_getc_for_utf8 = s->stream_getc;
iopreds.c:574: s->stream_getc_for_utf8 = GetUTF8;
iopreds.c:576: s->status &= ~Eof_Stream_f;
iopreds.c:580: s->status |= Past_Eof_Stream_f;
iopreds.c:591: if (s->status & Push_Eof_Stream_f) {
iopreds.c:593: s->status &= ~Push_Eof_Stream_f;
iopreds.c:597: return(s->stream_getc(sno));
iopreds.c:607: s->stream_getc = EOFGetc;
iopreds.c:608: s->stream_wgetc = get_wchar;
iopreds.c:610: s->stream_wgetc_for_read = ISOWGetc;
iopreds.c:612: s->stream_wgetc_for_read = s->stream_wgetc;
iopreds.c:613: if (s->encoding == ENC_ISO_UTF8)
iopreds.c:614: s->stream_getc_for_utf8 = s->stream_getc;
iopreds.c:616: s->stream_getc_for_utf8 = GetUTF8;
iopreds.c:625: ++s->charcount;
iopreds.c:626: ++s->linepos;
iopreds.c:628: ++s->linecount;
iopreds.c:629: s->linepos = 0;
iopreds.c:631: if (!(s->status & Binary_Stream_f))
iopreds.c:641: s->status |= Eof_Stream_f;
iopreds.c:642: s->stream_getc = EOFGetc;
iopreds.c:643: s->stream_wgetc = get_wchar;
iopreds.c:645: s->stream_wgetc_for_read = ISOWGetc;
iopreds.c:647: s->stream_wgetc_for_read = s->stream_wgetc;
iopreds.c:648: if (s->encoding == ENC_ISO_UTF8)
iopreds.c:649: s->stream_getc_for_utf8 = s->stream_getc;
iopreds.c:651: s->stream_getc_for_utf8 = GetUTF8;
iopreds.c:664: ch = getc (s->file);
iopreds.c:680: if (fgets (buf, size, s->file) == NULL) {
iopreds.c:684: s->charcount += len-1;
iopreds.c:702: while((ch = *buf++ = s->stream_getc(sno)) !=
iopreds.c:712: uint64_t bufi = s->utf8_buf;
iopreds.c:735: if (s->stream_getc != PlUnGetc)
iopreds.c:736: return(s->stream_getc(sno));
iopreds.c:737: ch = s->och;
iopreds.c:738: if (s->status & InMemory_Stream_f) {
iopreds.c:740: s->stream_wputc = put_wchar;
iopreds.c:741: } else if (s->status & Socket_Stream_f) {
iopreds.c:743: s->stream_wputc = put_wchar;
iopreds.c:744: } else if (s->status & Promptable_Stream_f) {
iopreds.c:746: s->stream_wputc = put_wchar;
iopreds.c:748: s->stream_getc = PlGetc;
iopreds.c:749: s->stream_gets = PlGetsFunc();
iopreds.c:761: if (s->stream_getc != PlUnGetc376)
iopreds.c:762: return(s->stream_getc(sno));
iopreds.c:763: s->stream_getc = PlUnGetc;
iopreds.c:764: ch = s->och;
iopreds.c:765: s->och = 0xFE;
iopreds.c:776: if (s->stream_getc != PlUnGetc00)
iopreds.c:777: return(s->stream_getc(sno));
iopreds.c:778: s->stream_getc = PlUnGetc;
iopreds.c:779: ch = s->och;
iopreds.c:780: s->och = 0x00;
iopreds.c:791: if (s->stream_getc != PlUnGetc377)
iopreds.c:792: return(s->stream_getc(sno));
iopreds.c:793: s->stream_getc = PlUnGetc;
iopreds.c:794: ch = s->och;
iopreds.c:795: s->och = 0xFF;
iopreds.c:806: if (s->stream_getc != PlUnGetc357)
iopreds.c:807: return(s->stream_getc(sno));
iopreds.c:808: s->stream_getc = PlUnGetc;
iopreds.c:809: ch = s->och;
iopreds.c:810: s->och = 0xEF;
iopreds.c:821: if (s->stream_getc != PlUnGetc357273)
iopreds.c:822: return(s->stream_getc(sno));
iopreds.c:823: s->stream_getc = PlUnGetc357;
iopreds.c:824: ch = s->och;
iopreds.c:825: s->och = 0xBB;
iopreds.c:836: if (s->stream_getc != PlUnGetc0000)
iopreds.c:837: return(s->stream_getc(sno));
iopreds.c:838: s->stream_getc = PlUnGetc00;
iopreds.c:839: ch = s->och;
iopreds.c:840: s->och = 0x00;
iopreds.c:851: if (s->stream_getc != PlUnGetc0000fe)
iopreds.c:852: return(s->stream_getc(sno));
iopreds.c:853: s->stream_getc = PlUnGetc0000;
iopreds.c:854: ch = s->och;
iopreds.c:855: s->och = 0xfe;
iopreds.c:866: if (s->stream_getc != PlUnGetc377376)
iopreds.c:867: return(s->stream_getc(sno));
iopreds.c:868: s->stream_getc = PlUnGetc377;
iopreds.c:869: ch = s->och;
iopreds.c:870: s->och = 0xFE;
iopreds.c:881: if (s->stream_getc != PlUnGetc37737600)
iopreds.c:882: return(s->stream_getc(sno));
iopreds.c:883: s->stream_getc = PlUnGetc377376;
iopreds.c:884: ch = s->och;
iopreds.c:885: s->och = 0x00;
iopreds.c:1830: s->status |= Promptable_Stream_f;
iopreds.c:1832: if (s->status & Socket_Stream_f) {
iopreds.c:1836: if (s->status & Pipe_Stream_f) {
mem.c:78: spos = s->u.mem_string.pos;
mem.c:79: if (spos == s->u.mem_string.max_size) {
mem.c:82: ch = s->u.mem_string.buf[spos];
mem.c:83: s->u.mem_string.pos = ++spos;
mem.c:103: s->u.mem_string.buf[s->u.mem_string.pos++] = ch;
mem.c:104: if (s->u.mem_string.pos >= s->u.mem_string.max_size -8) {
mem.c:105: int old_src = s->u.mem_string.src, new_src;
mem.c:108: Int new_max_size = s->u.mem_string.max_size + Yap_page_size;
mem.c:115: memmove((void *)newbuf, (void *)s->u.mem_string.buf, (size_t)((s->u.mem_string.pos)*sizeof(char)));
mem.c:118: Int n = s->u.mem_string.pos;
mem.c:120: char *from = s->u.mem_string.buf;
mem.c:126: Yap_FreeAtomSpace(s->u.mem_string.buf);
mem.c:128: } else if ((newbuf = (ADDR)realloc(s->u.mem_string.buf, new_max_size*sizeof(char))) != NULL) {
mem.c:144: s->u.mem_string.buf = newbuf;
mem.c:145: s->u.mem_string.max_size = new_max_size;
mem.c:146: s->u.mem_string.src = new_src;
pipes.c:72: if (WriteFile(s->u.pipe.hdl, &c, sizeof(c), &written, NULL) == FALSE) {
pipes.c:81: out = write(s->u.pipe.fd, &c, sizeof(c));
pipes.c:110: if (WriteFile(s->u.pipe.hdl, &c, sizeof(c), &written, NULL) == FALSE) {
pipes.c:119: out = write(s->u.pipe.fd, &c, sizeof(c));
pipes.c:163: if (ReadFile(s->u.pipe.hdl, &c, sizeof(c), &count, NULL) == FALSE) {
pipes.c:172: count = read(s->u.pipe.fd, &c, sizeof(char));
pipes.c:197: if (ReadFile(s->u.pipe.hdl, &c, sizeof(c), &count, NULL) == FALSE) {
pipes.c:203: count = read(s->u.pipe.fd, &c, sizeof(char));
readline.c:163: if (s->status & Tty_Stream_f) {
readline.c:164: s->stream_getc = ReadlineGetc;
readline.c:166: s->name == GLOBAL_Stream[0].name)
readline.c:167: s->stream_putc = ReadlinePutc;
readline.c:176: if (s->status & Tty_Stream_f) {
readline.c:178: is_same_tty(s->file,GLOBAL_Stream[0].file))
readline.c:179: s->stream_putc = ReadlinePutc;
readline.c:180: s->stream_getc = ReadlineGetc;
readline.c:247: if (!(s->status & Tty_Stream_f))
readline.c:280: s->u.irl.ptr = s->u.irl.buf = myrl_line;
readline.c:291: putc ('\n', s->file);
readline.c:295: putc (ch, s->file);
readline.c:314: bool fetch = (s->u.irl.buf == NULL);
readline.c:317: const char *ttyptr = s->u.irl.ptr++, *myrl_line = s->u.irl.buf;
readline.c:322: s->u.irl.ptr = s->u.irl.buf = NULL;
readline.c:336: const char *myrl_line = s->u.irl.buf;
sockets.c:77: s->file == NULL)
sockets.c:79: s->status |= Socket_Stream_f;
sockets.c:80: s->u.socket.domain = af_inet;
sockets.c:81: s->u.socket.flags = client_socket;
sockets.c:82: s->u.socket.fd = 0;
sockets.c:100: count = recv(s->u.socket.fd, &c, sizeof(char), 0);
sockets.c:102: count = read(s->u.socket.fd, &c, sizeof(char));
sockets.c:105: s->u.socket.flags = closed_socket;
sockets.c:148: count = recv(s->u.socket.fd, (void *)&c, sizeof(char), 0);
sockets.c:150: count = read(s->u.socket.fd, &c, sizeof(char));
sockets.c:177: send(s->u.socket.fd, &c, sizeof(c), 0);
sockets.c:179: if (write(s->u.socket.fd, &c, sizeof(c)) < 0) {
sockets.c:203: send(s->u.socket.fd, &c, sizeof(c), 0);
sockets.c:208: out = write(s->u.socket.fd, &c, sizeof(c));
streams.c:164: s->status |= User_Stream_f|Input_Stream_f;
streams.c:165: s->charcount = 0;
streams.c:166: s->linecount = 1;
streams.c:167: s->linepos = 0;
streams.c:168: s->stream_wgetc = get_wchar;
streams.c:169: s->stream_wputc = put_wchar;
streams.c:170: s->encoding = LOCAL_encoding;
streams.c:172: s->stream_wgetc_for_read = ISOWGetc;
streams.c:174: s->stream_wgetc_for_read = s->stream_wgetc;
streams.c:175: if (s->encoding == ENC_ISO_UTF8)
streams.c:176: s->stream_getc_for_utf8 = s->stream_getc;
streams.c:178: s->stream_getc_for_utf8 = GetUTF8;
streams.c:179: UNLOCK(s->streamlock);

View File

@ -1,26 +0,0 @@
#####################################################################
# Pos Type Name
#####################################################################
# 1 int iteration
# 2 time duration
# 3 float llh_training_set
# 4 float llh_test_set
# 5 time bdd_evaluation
# 6 float ground_truth_diff
# 7 float ground_truth_mindiff
# 8 float ground_truth_maxdiff
# 9 time train_bdd_script_generation
# 10 time train_bdd_script_generation_grounding
# 11 time train_bdd_script_generation_completion
# 12 time train_bdd_script_generation_propagation
# 13 time train_bdd_script_generation_splitting
# 14 int train_bdd_script_generation_active_ground_atoms
# 15 int train_bdd_script_generation_propagated_ground_atoms
# 16 time test_bdd_script_generation
# 17 time test_bdd_script_generation_grounding
# 18 time test_bdd_script_generation_completion
# 19 time test_bdd_script_generation_propagation
# 20 time test_bdd_script_generation_splitting
# 21 int test_bdd_script_generation_active_ground_atoms
# 22 int test_bdd_script_generation_propagated_ground_atoms
#####################################################################

View File

@ -32,6 +32,15 @@
:- use_system_module( '$_errors', ['$do_error'/2]). :- use_system_module( '$_errors', ['$do_error'/2]).
a :-
a,
b,
z,
za.
/** @pred succ(? _Int1_:int, ? _Int2_:int) is det /** @pred succ(? _Int1_:int, ? _Int2_:int) is det
* *