some fixes in info

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@507 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-06-01 04:29:01 +00:00
parent c80ac669de
commit c5e66af5d1
12 changed files with 2287 additions and 2452 deletions

View File

@ -1,116 +1,112 @@
/*************************************************************************
* *
* YAP Prolog %W% %G%
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
**************************************************************************
* *
* File: Atoms.h.m4 *
* Last rev: 19/2/88 *
* mods: *
* comments: atom properties header file for YAP *
* *
*************************************************************************/
#undef EXTERN
#ifndef ADTDEFS_C
#define EXTERN static
#else
#define EXTERN
#endif
/********* operations for atoms ****************************************/
/* Atoms are assumed to be uniquely represented by an OFFSET and to have
associated with them a struct of type AtomEntry
The two functions
RepAtom : Atom -> *AtomEntry
AbsAtom : *AtomEntry -> Atom
are used to encapsulate the implementation of atoms
*/
typedef struct AtomEntryStruct *Atom;
typedef struct PropEntryStruct *Prop;
/* I can only define the structure after I define the actual atoms */
/* atom structure */
typedef struct AtomEntryStruct
{
Atom NextOfAE; /* used to build hash chains */
Prop PropsOfAE; /* property list for this atom */
#if defined(YAPOR) || defined(THREADS)
rwlock_t ARWLock;
#endif
char StrOfAE[MIN_ARRAY]; /* representation of atom as a string */
}
AtomEntry;
/* Props and Atoms are stored in chains, ending with a NIL */
#if USE_OFFSETS
# define EndOfPAEntr(P) ( Addr(P) == AtomBase)
#else
# define EndOfPAEntr(P) ( Addr(P) == NIL )
#endif
#define AtomName(at) RepAtom(at)->StrOfAE
/* ********************** Properties **********************************/
#if USE_OFFSETS
#define USE_OFFSETS_IN_PROPS 1
#else
#define USE_OFFSETS_IN_PROPS 0
#endif
typedef SFLAGS PropFlags;
/* basic property entry structure */
typedef struct PropEntryStruct
{
Prop NextOfPE; /* used to chain properties */
PropFlags KindOfPE; /* kind of property */
}
PropEntry;
/* ************************* Functors **********************************/
/* Functor data type
abstype Functor = atom # int
with MkFunctor(a,n) = ...
and NameOfFunctor(f) = ...
and ArityOfFunctor(f) = ... */
#define MaxArity 255
#define FunctorProperty ((PropFlags)(0xbb00))
/* functor property */
typedef struct FunctorEntryStruct
{
Prop NextOfPE; /* used to chain properties */
PropFlags KindOfPE; /* kind of property */
unsigned int ArityOfFE; /* arity of functor */
Atom NameOfFE; /* back pointer to owner atom */
Prop PropsOfFE; /* pointer to list of properties for this functor */
#if defined(YAPOR) || defined(THREADS)
rwlock_t FRWLock;
#endif
}
FunctorEntry;
typedef FunctorEntry *Functor;
/*************************************************************************
* *
* YAP Prolog %W% %G%
* *
* Yap Prolog was developed at NCCUP - Universidade do Porto *
* *
* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 *
* *
**************************************************************************
* *
* File: Atoms.h.m4 *
* Last rev: 19/2/88 *
* mods: *
* comments: atom properties header file for YAP *
* *
*************************************************************************/
#undef EXTERN
#ifndef ADTDEFS_C
#define EXTERN static
#else
#define EXTERN
#endif
/********* operations for atoms ****************************************/
/* Atoms are assumed to be uniquely represented by an OFFSET and to have
associated with them a struct of type AtomEntry
The two functions
RepAtom : Atom -> *AtomEntry
AbsAtom : *AtomEntry -> Atom
are used to encapsulate the implementation of atoms
*/
typedef struct AtomEntryStruct *Atom;
typedef struct PropEntryStruct *Prop;
/* I can only define the structure after I define the actual atoms */
/* atom structure */
typedef struct AtomEntryStruct {
Atom NextOfAE; /* used to build hash chains */
Prop PropsOfAE; /* property list for this atom */
#if defined(YAPOR) || defined(THREADS)
rwlock_t ARWLock;
#endif
char StrOfAE[MIN_ARRAY]; /* representation of atom as a string */
}
AtomEntry;
/* Props and Atoms are stored in chains, ending with a NIL */
#if USE_OFFSETS
# define EndOfPAEntr(P) ( Addr(P) == AtomBase)
#else
# define EndOfPAEntr(P) ( Addr(P) == NIL )
#endif
#define AtomName(at) RepAtom(at)->StrOfAE
/* ********************** Properties **********************************/
#if USE_OFFSETS
#define USE_OFFSETS_IN_PROPS 1
#else
#define USE_OFFSETS_IN_PROPS 0
#endif
typedef SFLAGS PropFlags;
/* basic property entry structure */
typedef struct PropEntryStruct {
Prop NextOfPE; /* used to chain properties */
PropFlags KindOfPE; /* kind of property */
} PropEntry;
/* ************************* Functors **********************************/
/* Functor data type
abstype Functor = atom # int
with MkFunctor(a,n) = ...
and NameOfFunctor(f) = ...
and ArityOfFunctor(f) = ... */
#define MaxArity 255
#define FunctorProperty ((PropFlags)(0xbb00))
/* functor property */
typedef struct FunctorEntryStruct {
Prop NextOfPE; /* used to chain properties */
PropFlags KindOfPE; /* kind of property */
unsigned int ArityOfFE; /* arity of functor */
Atom NameOfFE; /* back pointer to owner atom */
Prop PropsOfFE; /* pointer to list of properties for this functor */
#if defined(YAPOR) || defined(THREADS)
rwlock_t FRWLock;
#endif
} FunctorEntry;
typedef FunctorEntry *Functor;

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Tag Scheme for machines with 24 bits adresses (m68000) *
* version: $Id: Tags_24bits.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: Tags_24bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
/* Version for 24 bit addresses (68000)

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32LowTag.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: Tags_32LowTag.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
#define TAG_LOW_BITS_32 1
@ -72,10 +72,10 @@ property list
#define NumberBits /* 0x0000000aL */ MKTAG(0x2,2)
#define NumberMask /* 0x0000000bL */ MKTAG(0x2,3)
#define NonTagPart(V) (Unsigned(V)>>(SHIFT_LOW_TAG+SHIFT_HIGH_TAG))
#define NonTagPart(V) ((Unsigned(V)>>1) & ~LowTagBits)
#define TAGGED(TAG,V) (((Unsigned(V)<<(SHIFT_HIGH_TAG+SHIFT_LOW_TAG+1))>>1)|(TAG))
#define NONTAGGED(TAG,V) ((Unsigned(V)<<(SHIFT_HIGH_TAG+SHIFT_LOW_TAG+1))>>1)
#define TAGGEDA(TAG,V) ((Unsigned(V) << (SHIFT_HIGH_TAG+SHIFT_LOW_TAG))|(TAG))
#define TAGGEDA(TAG,V) ((Unsigned(V) << 1)|(TAG))
#define CHKTAG(t,Tag) ((Unsigned(t)&TagBits)==Tag)
/* bits that should not be used by anyone but us */

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32Ops.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: Tags_32Ops.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
/*

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32bits.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: Tags_32bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
/* Original version for 32 bit addresses machines,

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_64bits.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: Tags_64bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
#define TAG_64BITS 1

View File

@ -17,7 +17,7 @@
* File: TermExt.h *
* mods: *
* comments: Extensions to standard terms for YAP *
* version: $Id: TermExt.h,v 1.8 2002-02-04 16:12:54 vsc Exp $ *
* version: $Id: TermExt.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ *
*************************************************************************/
#if USE_OFFSETS

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -228,15 +228,6 @@ inline EXTERN Atom AtomAdjust(Atom at)
inline EXTERN Term AtomTermAdjust(Term);
inline EXTERN Term AtomTermAdjust(Term at)
{
return (Term) ((at) );
}
inline EXTERN Prop PropAdjust(Prop);
inline EXTERN Prop PropAdjust(Prop p)
@ -251,11 +242,20 @@ inline EXTERN Atom AtomAdjust(Atom);
inline EXTERN Atom AtomAdjust(Atom at)
{
return (Atom) ((Atom)(CharP(at)+HDiff) );
return (Atom) ((at == NULL ? (at) : (Atom)(CharP(at)+HDiff) ));
}
#if MMAP_ADDR >= 0x40000000
inline EXTERN Prop PropAdjust(Prop);
inline EXTERN Prop PropAdjust(Prop p)
{
return (Prop) ((p == NULL ? (p) : (Prop)(CharP(p)+HDiff)) );
}
#endif
inline EXTERN Term AtomTermAdjust(Term);
@ -265,27 +265,6 @@ inline EXTERN Term AtomTermAdjust(Term at)
}
#else
inline EXTERN Term AtomTermAdjust(Term);
inline EXTERN Term AtomTermAdjust(Term at)
{
return (Term) (MkAtomTerm((Atom)(CharP(AtomOfTerm(at)+HDiff))) );
}
#endif
inline EXTERN Prop PropAdjust(Prop);
inline EXTERN Prop PropAdjust(Prop p)
{
return (Prop) ((Prop)(CharP(p)+HDiff) );
}
#endif
#if TAGS_FAST_OPS
inline EXTERN Term BlobTermAdjust(Term);
@ -393,7 +372,16 @@ inline EXTERN PredEntry * PtoPredAdjust(PredEntry *);
inline EXTERN PredEntry * PtoPredAdjust(PredEntry * ptr)
{
return (PredEntry *) (((CELL *)(CharP(ptr) + HDiff)) );
return (PredEntry *) (((PredEntry *)(CharP(ptr) + HDiff)) );
}
inline EXTERN ArrayEntry * PtoArrayEAdjust(ArrayEntry *);
inline EXTERN ArrayEntry * PtoArrayEAdjust(ArrayEntry * ptr)
{
return (ArrayEntry *) (((ArrayEntry *)(CharP(ptr) + HDiff)) );
}

View File

@ -12,7 +12,13 @@ cd ../OPTYap
splat
cd ../VC
splat
cd include
cd ../LGPL
splat
cd pillow
splat
cd examples
splat
cd ../../../include
splat
/bin/cp config.h config.h.mine
/bin/cp ../../../bins/cyg/*.h .

View File

@ -847,7 +847,7 @@ CC="cc -64" $YAP_SRC_PATH/configure --...
@cindex booting
We next describe how to invoke Yap in Unix systems.
@node Running Yap Interactively,Running Prolog Files, ,Run
@node Running Yap Interactively, ,Running Prolog Files,Run
@section Running Yap Interactively
Most often you will want to use Yap in interactive mode. Assuming that
@ -924,7 +924,7 @@ YAP will try to find library files from the YAPSHAREDIR/library
directory.
@end itemize
@node Running Prolog Files, ,Interactive Mode, Run
@node Running Prolog Files, Running Yap Interactively, , Run
@section Running Prolog Files
YAP can also be used to run Prolog files as scripts, at least in
@ -2473,9 +2473,9 @@ be @code{unknown}, and the second argument should be either
@code{error}, @code{warning}, @code{fail}, or a goal.
@item user:unknown_predicate_handler(+G,+M,?NG)
@findex user:unknown_predicate_handler/3
@syindex user:unknown_predicate_handler/3
@cnindex user:unknown_predicate_handler/3
@findex unknown_predicate_handler/3
@syindex unknown_predicate_handler/3
@cnindex unknown_predicate_handler/3
The user may also define clauses for
@code{user:unknown_predicate_handler/3} hook predicate. This
user-defined procedure is called before any system processing for the
@ -5312,9 +5312,9 @@ for DCG rules is applied, together with the arithmetic optimizer
whenever the compilation of arithmetic expressions is in progress.
@item user:goal_expansion(+@var{G},+@var{M},-@var{NG})
@findex user:goal_expansion/3
@snindex user:goal_expansion/3
@cnindex user:goal_expansion/3
@findex goal_expansion/3
@snindex goal_expansion/3
@cnindex goal_expansion/3
Yap now supports @code{goal_expansion/3}. This is an user-defined
procedure that is called after term expansion when compiling or
asserting goals for each sub-goal in a clause. The first argument is