From 7d7a59ae28c40375bb2a8a4002d307d1ba9acf11 Mon Sep 17 00:00:00 2001 From: Vitor Santos Costa Date: Fri, 19 Oct 2012 16:24:06 +0100 Subject: [PATCH] outdated --- VC/include/Atoms.h | 112 ---- VC/include/Tags_24bits.h | 177 ------ VC/include/Tags_32LowTag.h | 194 ------- VC/include/Tags_32Ops.h | 290 ---------- VC/include/Tags_32bits.h | 182 ------ VC/include/Tags_64bits.h | 183 ------ VC/include/TermExt.h | 436 --------------- VC/include/Yap.h | 1039 ---------------------------------- VC/include/Yatom.h | 1079 ------------------------------------ VC/include/config.h | 235 -------- VC/include/corout_utils.h | 128 ----- VC/include/sshift.h | 543 ------------------ VC/wyap.mak | 153 ----- VC/yapdll.mak | 780 -------------------------- 14 files changed, 5531 deletions(-) delete mode 100644 VC/include/Atoms.h delete mode 100644 VC/include/Tags_24bits.h delete mode 100644 VC/include/Tags_32LowTag.h delete mode 100644 VC/include/Tags_32Ops.h delete mode 100644 VC/include/Tags_32bits.h delete mode 100644 VC/include/Tags_64bits.h delete mode 100644 VC/include/TermExt.h delete mode 100644 VC/include/Yap.h delete mode 100644 VC/include/Yatom.h delete mode 100644 VC/include/config.h delete mode 100644 VC/include/corout_utils.h delete mode 100644 VC/include/sshift.h delete mode 100644 VC/wyap.mak delete mode 100644 VC/yapdll.mak diff --git a/VC/include/Atoms.h b/VC/include/Atoms.h deleted file mode 100644 index ea09c52ab..000000000 --- a/VC/include/Atoms.h +++ /dev/null @@ -1,112 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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; - diff --git a/VC/include/Tags_24bits.h b/VC/include/Tags_24bits.h deleted file mode 100644 index 9d94a5f77..000000000 --- a/VC/include/Tags_24bits.h +++ /dev/null @@ -1,177 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Tags_24bits.h.m4 * -* Last rev: December 90 * -* mods: * -* comments: Tag Scheme for machines with 24 bits adresses (m68000) * -* version: $Id: Tags_24bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - - /* Version for 24 bit addresses (68000) - Each term is represented internally as an unsigned 32 bit integer as - follows: - tag value - ints 1m1000 numeric value - floats 1m1001 floating point value - pairs 1mr10. ptr to pair - aplied functor 1mr01. ptr to functor followed by args - ref 0mr000 address of cell - undefined 0mr000 pointing to itself - -*/ - -#define AllTagBits 0xfc000000L -#define TagBits 0xbc000000L -#define MaskAdr 0x03ffffffL -#define AdrHiBit 0x02000000L -#define NumberTag 0xa0000000L -#define FloatTag 0xa4000000L -#define AtomTag 0x84000000L -#define PairTag 0x90000000L -#define ApplTag 0x88000000L -#define RefTag 0x80000000L - -#define MaskBits 6 - -#define PairBit 0x10000000L -#define ApplBit 0x08000000L -#define CompBits 0x18000000L -#define NumberMask 0xb8000000L -#define MAX_ABS_INT /* 0xfe00000LL */ ((((UInt)(1<<7))-1) << SHIFT_HIGH_TAG) - -#define NonTagPart(X) (Signed(X) & MaskAdr) -#define TAGGEDA(TAG,V) (TAG | Unsigned(V)) -#define TAGGED(TAG,V) (TAG | NonTagPart(Unsigned(V))) -#define NONTAGGED(TAG,V) NonTagPart(Unsigned(V)) -#define BitOn(Bit,V) (Bit & Unsigned(V)) -#define CHKTAG(t,Tag) ((Unsigned(t)&TagBits)==Tag) - -/* bits that should not be used by anyone but us */ -#define YAP_PROTECTED_MASK 0x00000000L - - -inline EXTERN int IsVarTerm(Term); - -inline EXTERN int IsVarTerm(Term t) -{ - return (int) (Signed(t) >= 0); -} - - - -inline EXTERN int IsNonVarTerm(Term); - -inline EXTERN int IsNonVarTerm(Term t) -{ - return (int) (Signed(t) < 0); -} - - - -inline EXTERN Term * RepPair(Term); - -inline EXTERN Term * RepPair(Term t) -{ - return (Term *) (NonTagPart(t)); -} - - - -inline EXTERN Term AbsPair(Term *); - -inline EXTERN Term AbsPair(Term * p) -{ - return (Term) (TAGGEDA(PairTag, (p))); -} - - - -inline EXTERN Int IsPairTerm(Term); - -inline EXTERN Int IsPairTerm(Term t) -{ - return (Int) (BitOn(PairBit, (t))); -} - - - -inline EXTERN Term * RepAppl(Term); - -inline EXTERN Term * RepAppl(Term t) -{ - return (Term *) (NonTagPart(t)); -} - - - -inline EXTERN Term AbsAppl(Term *); - -inline EXTERN Term AbsAppl(Term * p) -{ - return (Term) (TAGGEDA(ApplTag, (p))); -} - - - -inline EXTERN Int IsApplTerm(Term); - -inline EXTERN Int IsApplTerm(Term t) -{ - return (Int) (BitOn(ApplBit, (t))); -} - - - -inline EXTERN Int IsAtomOrIntTerm(Term); - -inline EXTERN Int IsAtomOrIntTerm(Term t) -{ - return (Int) (!(Unsigned(t) & CompBits)); -} - - - - -inline EXTERN Term AdjustPtr(Term t, Term off); - -inline EXTERN Term AdjustPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - -inline EXTERN Term AdjustIDBPtr(Term t, Term off); - -inline EXTERN Term AdjustIDBPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - -static inline Int -IntOfTerm(Term t) -{ - Int n; - n = (Unsigned(t) & MaskPrim) >> 2; - - if (Unsigned(t) & AdrHiBit) - n |= 0xfc000000; - return (n); -} - diff --git a/VC/include/Tags_32LowTag.h b/VC/include/Tags_32LowTag.h deleted file mode 100644 index 1e241488c..000000000 --- a/VC/include/Tags_32LowTag.h +++ /dev/null @@ -1,194 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Tags_32LowTag.h.m4 * -* Last rev: December 90 * -* mods: * -* comments: Original Tag Scheme for machines with 32 bits adresses * -* version: $Id: Tags_32LowTag.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -#define TAG_LOW_BITS_32 1 - - /* Version for 32 bit addresses machines, - Each term is represented internally as an unsigned 32 bit integer as - follows: - tag value - ints m.....110 numeric value - atoms m.....010 offset of atom entry - pairs mr.....11 ptr to pair - aplied functor mr.....01 ptr to functor followed by args - ref mr.....00 address of cell - undefined mr.....00 address of cell pointing to itself - - functors are represented as ptrs to the functor entry in the atom -property list - -*/ - -#define SHIFT_LOW_TAG 2 -#define SHIFT_HIGH_TAG 2 - -#define MKTAG(HI,LO) ((((UInt) (HI))<>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) << 1)|(TAG)) -#define CHKTAG(t,Tag) ((Unsigned(t)&TagBits)==Tag) - -/* bits that should not be used by anyone but us */ -#define YAP_PROTECTED_MASK 0xc0000000L - - -inline EXTERN int IsVarTerm(Term); - -inline EXTERN int IsVarTerm(Term t) -{ - return (int) (!((t) & LowTagBits)); -} - - - -inline EXTERN int IsNonVarTerm(Term); - -inline EXTERN int IsNonVarTerm(Term t) -{ - return (int) (((t) & LowTagBits)); -} - - - -inline EXTERN Term * RepPair(Term); - -inline EXTERN Term * RepPair(Term t) -{ - return (Term *) ((t)-PairBits); -} - - - -inline EXTERN Term AbsPair(Term *); - -inline EXTERN Term AbsPair(Term * p) -{ - return (Term) (Unsigned(p)+PairBits); -} - - - -inline EXTERN Int IsPairTerm(Term); - -inline EXTERN Int IsPairTerm(Term t) -{ - return (Int) ((((t) & LowTagBits) == PairBits)); -} - - - -inline EXTERN Term * RepAppl(Term); - -inline EXTERN Term * RepAppl(Term t) -{ - return (Term *) (((t)-ApplBit)); -} - - - -inline EXTERN Term AbsAppl(Term *); - -inline EXTERN Term AbsAppl(Term * p) -{ - return (Term) (Unsigned(p)+ApplBit); -} - - - -inline EXTERN Int IsApplTerm(Term); - -inline EXTERN Int IsApplTerm(Term t) -{ - return (Int) ((((t) & LowTagBits) == ApplBit)); -} - - - -inline EXTERN Int IsAtomOrIntTerm(Term); - -inline EXTERN Int IsAtomOrIntTerm(Term t) -{ - return (Int) ((((t) & LowTagBits) == 2)); -} - - - - -inline EXTERN Term AdjustPtr(Term t, Term off); - -inline EXTERN Term AdjustPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - -inline EXTERN Term AdjustIDBPtr(Term t, Term off); - -inline EXTERN Term AdjustIDBPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - - -inline EXTERN Int IntOfTerm(Term); - -inline EXTERN Int IntOfTerm(Term t) -{ - return (Int) (((Int)(t << 1))>>(SHIFT_LOW_TAG+SHIFT_HIGH_TAG+1)); -} - - - diff --git a/VC/include/Tags_32Ops.h b/VC/include/Tags_32Ops.h deleted file mode 100644 index 1ca233951..000000000 --- a/VC/include/Tags_32Ops.h +++ /dev/null @@ -1,290 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Tags_32Ops.h.m4 * -* Last rev: December 90 * -* mods: * -* comments: Original Tag Scheme for machines with 32 bits adresses * -* version: $Id: Tags_32Ops.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -/* - - Version for 32 bit addresses machines, - Each term is represented internally as an unsigned 32 bit integer as - follows: - tag value - ints 1m1....01 numeric value - atoms 1m0....01 offset of atom entry - pairs 1mr....11 ptr to pair - aplied functor 1mr....00 ptr to functor followed by args - undefined 0mr....00 address of cell pointing to itself - - functors are represented as ptrs to the functor entry in the atom -property list - - This version speeds up access to lists and to compound -terms by using the XOR and NOT operations to build their tags. This -saves operations on RISC machines. - - As a further optimisation, only pairs or compound terms have -the second lowest bit set. This allows one to recognise lists or -compound terms with a single operation. - - The main problem is that the default value of the M and R bits for GC -are now 1 in compound terms and structures. - -*/ - -#define TAGS_FAST_OPS 1 - -#define SHIFT_HIGH_TAG 29 - -#define MKTAG(HI,LO) ((((UInt) (HI))<= 0); -} - - - -inline EXTERN int IsNonVarTerm(Term); - -inline EXTERN int IsNonVarTerm(Term t) -{ - return (int) (Signed(t) < 0); -} - - -#if UNIQUE_TAG_FOR_PAIRS - -inline EXTERN Term * RepPair(Term); - -inline EXTERN Term * RepPair(Term t) -{ - return (Term *) ((~(t))); -} - - - -inline EXTERN Term AbsPair(Term *); - -inline EXTERN Term AbsPair(Term * p) -{ - return (Term) ((~Unsigned(p))); -} - - - -inline EXTERN Int IsPairTerm(Term); - -inline EXTERN Int IsPairTerm(Term t) -{ - return (Int) (((t) & PairBit)); -} - - - -inline EXTERN Term * RepAppl(Term); - -inline EXTERN Term * RepAppl(Term t) -{ - return (Term *) ((-Signed(t))); -} - - - -inline EXTERN Term AbsAppl(Term *); - -inline EXTERN Term AbsAppl(Term * p) -{ - return (Term) ((-Signed(p))); -} - - - -inline EXTERN Int IsApplTerm(Term); - -inline EXTERN Int IsApplTerm(Term t) -{ - return (Int) ((!((t) & LowTagBits))); -} - - -#else - -inline EXTERN Term * RepPair(Term); - -inline EXTERN Term * RepPair(Term t) -{ - return (Term *) ((-Signed(t))); -} - - - -inline EXTERN Term AbsPair(Term *); - -inline EXTERN Term AbsPair(Term * p) -{ - return (Term) (((CELL)(-Signed(p)))); -} - - - -inline EXTERN Int IsPairTerm(Term); - -inline EXTERN Int IsPairTerm(Term t) -{ - return (Int) ((!((t) & LowTagBits))); -} - - - -inline EXTERN Term * RepAppl(Term); - -inline EXTERN Term * RepAppl(Term t) -{ - return (Term *) ((~(t))); -} - - - -inline EXTERN Term AbsAppl(Term *); - -inline EXTERN Term AbsAppl(Term * p) -{ - return (Term) ((~Unsigned(p))); -} - - - -inline EXTERN Int IsApplTerm(Term); - -inline EXTERN Int IsApplTerm(Term t) -{ - return (Int) (((t) & ApplBit)); -} - - -#endif - -inline EXTERN Int IsAtomOrIntTerm(Term); - -inline EXTERN Int IsAtomOrIntTerm(Term t) -{ - return (Int) (((Unsigned(t) & LowTagBits) == 0x2)); -} - - - - -inline EXTERN Int IntOfTerm(Term); - -inline EXTERN Int IntOfTerm(Term t) -{ - return (Int) ((Int)(Unsigned(t) << 3) >> 5); -} - - - -#if UNIQUE_TAG_FOR_PAIRS - -inline EXTERN Term AdjustPtr(Term t, Term off); - -inline EXTERN Term AdjustPtr(Term t, Term off) -{ - return (Term) (((IsVarTerm(t) || IsAtomOrIntTerm(t)) ? (t)+(off) : (IsPairTerm(t) ? (CELL)AbsPair((CELL *)((CELL)RepPair(t)+(off))) : (t)-(off)))); -} - - - -inline EXTERN Term AdjustIDBPtr(Term t, Term off); - -inline EXTERN Term AdjustIDBPtr(Term t, Term off) -{ - return (Term) (IsVarTerm(t) ? (t)+(off) : (t)-(off)); -} - - -#else - -inline EXTERN Term AdjustPtr(Term t, Term off); - -inline EXTERN Term AdjustPtr(Term t, Term off) -{ - return (Term) (((IsVarTerm(t) || IsAtomOrIntTerm(t)) ? (t)+(off) : (IsApplTerm(t) ? (CELL)AbsAppl((CELL *)((CELL)RepAppl(t)+(off))) : (t)-(off)))); -} - - - -inline EXTERN Term AdjustIDBPtr(Term t, Term off); - -inline EXTERN Term AdjustIDBPtr(Term t, Term off) -{ - return (Term) (IsVarTerm(t) ? (t)+(off) : (IsApplTerm(t) ? (CELL)AbsAppl((CELL *)((CELL)RepAppl(t)+(off))) : (t)-(off))); -} - - -#endif - - diff --git a/VC/include/Tags_32bits.h b/VC/include/Tags_32bits.h deleted file mode 100644 index dc976cc1b..000000000 --- a/VC/include/Tags_32bits.h +++ /dev/null @@ -1,182 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Tags_32bits.h.m4 * -* Last rev: December 90 * -* mods: * -* comments: Original Tag Scheme for machines with 32 bits adresses * -* version: $Id: Tags_32bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -/* Original version for 32 bit addresses machines, - Each term is represented internally as an unsigned 32 bit integer as - follows: - tag value - ints 1m1....00 numeric value - atoms 1m0....00 offset of atom entry - pairs 1mr....01 ptr to pair - aplied functor 1mr....10 ptr to functor followed by args - ref 0mr....00 address of cell - undefined 0mr....00 address of cell pointing to itself - - functors are represented as ptrs to the functor entry in the atom -property list - -*/ - -#define SHIFT_HIGH_TAG 29 - -#define MKTAG(HI,LO) ((((UInt) (HI))<= 0); -} - - - -inline EXTERN int IsNonVarTerm(Term); - -inline EXTERN int IsNonVarTerm(Term t) -{ - return (int) (Signed(t) < 0); -} - - - -inline EXTERN Term * RepPair(Term); - -inline EXTERN Term * RepPair(Term t) -{ - return (Term *) (NonTagPart(t)); -} - - - -inline EXTERN Term AbsPair(Term *); - -inline EXTERN Term AbsPair(Term * p) -{ - return (Term) (TAGGEDA(PairTag, (p))); -} - - - -inline EXTERN Int IsPairTerm(Term); - -inline EXTERN Int IsPairTerm(Term t) -{ - return (Int) (BitOn(PairBit, (t))); -} - - - -inline EXTERN Term * RepAppl(Term); - -inline EXTERN Term * RepAppl(Term t) -{ - return (Term *) (NonTagPart(t)); -} - - - -inline EXTERN Term AbsAppl(Term *); - -inline EXTERN Term AbsAppl(Term * p) -{ - return (Term) (TAGGEDA(ApplTag, (p))); -} - - - -inline EXTERN Int IsApplTerm(Term); - -inline EXTERN Int IsApplTerm(Term t) -{ - return (Int) (BitOn(ApplBit, (t))); -} - - - -inline EXTERN int IsAtomOrIntTerm(Term); - -inline EXTERN int IsAtomOrIntTerm(Term t) -{ - return (int) (((Unsigned(t) & LowTagBits) == 0)); -} - - - - -inline EXTERN Term AdjustPtr(Term t, Term off); - -inline EXTERN Term AdjustPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - -inline EXTERN Term AdjustIDBPtr(Term t, Term off); - -inline EXTERN Term AdjustIDBPtr(Term t, Term off) -{ - return (Term) ((t)+off); -} - - - - -inline EXTERN Int IntOfTerm(Term); - -inline EXTERN Int IntOfTerm(Term t) -{ - return (Int) (((Int)(t << 3))>>(3+2)); -} - - - - diff --git a/VC/include/Tags_64bits.h b/VC/include/Tags_64bits.h deleted file mode 100644 index 19a9e4979..000000000 --- a/VC/include/Tags_64bits.h +++ /dev/null @@ -1,183 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Tags_32Ops.h.m4 * -* Last rev: December 90 * -* mods: * -* comments: Original Tag Scheme for machines with 32 bits adresses * -* version: $Id: Tags_64bits.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -#define TAG_64BITS 1 - -/* Version for 64 bit addresses machines, - Each term is represented internally as an unsigned 64 bit integer as - follows: - tag value - ints 0m1....001 numeric value - atoms 0m0....001 offset of atom entry - pairs 0mr....011 ptr to pair - aplied functor 0mr....101 ptr to functor followed by args - undefined 0mr....000 address of cell pointing to itself - - functors are represented as ptrs to the functor entry in the atom -property list - - We rely on the fact that addresses are always multiple of 8. - -*/ - -#define SHIFT_HIGH_TAG 61 - -#define MKTAG(HI,LO) ((((UInt) (HI))<> 6); -} - - - diff --git a/VC/include/TermExt.h b/VC/include/TermExt.h deleted file mode 100644 index 5c3d2f61f..000000000 --- a/VC/include/TermExt.h +++ /dev/null @@ -1,436 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: TermExt.h * -* mods: * -* comments: Extensions to standard terms for YAP * -* version: $Id: TermExt.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -#if USE_OFFSETS -#define AtomFoundVar ((Atom)(&(((special_functors *)(NULL))->AtFoundVar))) -#define AtomNil ((Atom)(&(((special_functors *)(NULL))->AtNil))) -#define AtomDot ((Atom)(&(((special_functors *)(NULL))->AtDot))) -#else -#define AtomFoundVar AbsAtom(&(SF_STORE->AtFoundVar)) -#define AtomNil AbsAtom(&(SF_STORE->AtNil)) -#define AtomDot AbsAtom(&(SF_STORE->AtDot)) -#endif - -#define TermFoundVar MkAtomTerm(AtomFoundVar) -#define TermNil MkAtomTerm(AtomNil) -#define TermDot MkAtomTerm(AtomDot) - -#ifdef IN_SECOND_QUADRANT -typedef enum { - db_ref_e = sizeof(Functor *)|RBIT, - long_int_e = 2*sizeof(Functor *)|RBIT, -#ifdef USE_GMP - big_int_e = 3*sizeof(Functor *)|RBIT, - double_e = 4*sizeof(Functor *)|RBIT -#else - double_e = 3*sizeof(Functor *)|RBIT -#endif -} blob_type; -#else -typedef enum { - db_ref_e = sizeof(Functor *), - long_int_e = 2*sizeof(Functor *), -#ifdef USE_GMP - big_int_e = 3*sizeof(Functor *), - double_e = 4*sizeof(Functor *) -#else - double_e = 3*sizeof(Functor *) -#endif -} blob_type; -#endif - -#define FunctorDBRef ((Functor)(db_ref_e)) -#define FunctorLongInt ((Functor)(long_int_e)) -#ifdef USE_GMP -#define FunctorBigInt ((Functor)(big_int_e)) -#endif -#define FunctorDouble ((Functor)(double_e)) -#define EndSpecials (double_e) - - -inline EXTERN blob_type BlobOfFunctor(Functor f); - -inline EXTERN blob_type BlobOfFunctor(Functor f) -{ - return (blob_type) ((CELL)f); -} - - - -#define SF_STORE ((special_functors *)HEAP_INIT_BASE) - -#ifdef COROUTINING - -typedef struct { - /* what to do when someone tries to bind our term to someone else - in some predefined context */ - void (*bind_op)(Term *, Term); - /* what to do if someone wants to copy our constraint */ - int (*copy_term_op)(CELL *, CELL ***, CELL *); - /* copy the constraint into a term and back */ - Term (*to_term_op)(CELL *); - int (*term_to_op)(Term, Term); - /* op called to do marking in GC */ - void (*mark_op)(CELL *); -} ext_op; - -/* known delays */ -typedef enum { - empty_ext = 0*sizeof(ext_op), /* default op, this should never be called */ - susp_ext = 1*sizeof(ext_op), /* support for delayable goals */ - attvars_ext = 2*sizeof(ext_op), /* support for attributed variables */ - /* add your own extensions here */ - /* keep this one */ -} exts; - - -/* array with the ops for your favourite extensions */ -extern ext_op attas[attvars_ext+1]; - -#endif - -/* make sure that these data structures are the first thing to be allocated - in the heap when we start the system */ -typedef struct special_functors_struct -{ - AtomEntry AtFoundVar; - char AtFoundVarChars[8]; - AtomEntry AtNil; - char AtNilChars[8]; - AtomEntry AtDot; - char AtDotChars[8]; -} -special_functors; - -#if SIZEOF_DOUBLE == SIZEOF_LONG_INT - -inline EXTERN Term MkFloatTerm(Float); - -inline EXTERN Term MkFloatTerm(Float dbl) -{ - return (Term) ((H[0] = (CELL)FunctorDouble, *(Float *)(H+1) = dbl, H[2]=((2*sizeof(CELL)+EndSpecials)|MBIT),H+=3,AbsAppl(H-3))); -} - - - - -inline EXTERN Float FloatOfTerm(Term t); - -inline EXTERN Float FloatOfTerm(Term t) -{ - return (Float) (*(Float *)(RepAppl(t)+1)); -} - - - -#define InitUnalignedFloat() - -#else - -#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT - -#ifdef i386X -#define DOUBLE_ALIGNED(ADDR) TRUE -#else -/* first, need to address the alignment problem */ -#define DOUBLE_ALIGNED(ADDR) ((CELL)(ADDR) & 0x4) -#endif - -inline EXTERN Float STD_PROTO(CpFloatUnaligned,(CELL *)); - - -inline EXTERN void STD_PROTO(AlignGlobalForDouble,(void)); - -inline EXTERN Float -CpFloatUnaligned(CELL *ptr) -{ - union { Float f; CELL d[2]; } u; - u.d[0] = ptr[1]; - u.d[1] = ptr[2]; - return(u.f); -} - - -inline EXTERN Term MkFloatTerm(Float); - -inline EXTERN Term MkFloatTerm(Float dbl) -{ - return (Term) ((AlignGlobalForDouble(), H[0] = (CELL)FunctorDouble, *(Float *)(H+1) = dbl, H[3]=((3*sizeof(CELL)+EndSpecials)|MBIT), H+=4, AbsAppl(H-4))); -} - - - - -inline EXTERN Float FloatOfTerm(Term t); - -inline EXTERN Float FloatOfTerm(Term t) -{ - return (Float) ((DOUBLE_ALIGNED(RepAppl(t)) ? *(Float *)(RepAppl(t)+1) : CpFloatUnaligned(RepAppl(t)))); -} - - -/* no alignment problems for 64 bit machines */ -#else - /* OOPS, YAP only understands Floats that are as large as cells or that - take two cells!!! */ -#endif -#endif - - -inline EXTERN int IsFloatTerm(Term); - -inline EXTERN int IsFloatTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorDouble); -} - - - - -/* extern Functor FunctorLongInt; */ - -inline EXTERN Term MkLongIntTerm(Int); - -inline EXTERN Term MkLongIntTerm(Int i) -{ - return (Term) ((H[0] = (CELL)FunctorLongInt,H[1] = (CELL)(i),H[2]=((2*sizeof(CELL)+EndSpecials)|MBIT),H+=3,AbsAppl(H-3))); -} - - - -inline EXTERN Int LongIntOfTerm(Term t); - -inline EXTERN Int LongIntOfTerm(Term t) -{ - return (Int) (RepAppl(t)[1]); -} - - - -inline EXTERN int IsLongIntTerm(Term); - -inline EXTERN int IsLongIntTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorLongInt); -} - - - - -#ifdef USE_GMP -#include -#include - - -MP_INT *STD_PROTO(PreAllocBigNum,(void)); -MP_INT *STD_PROTO(InitBigNum,(Int)); -Term STD_PROTO(MkBigIntTerm, (MP_INT *)); -MP_INT *STD_PROTO(BigIntOfTerm, (Term)); -void STD_PROTO(CleanBigNum,(void)); - - -inline EXTERN int IsBigIntTerm(Term); - -inline EXTERN int IsBigIntTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorBigInt); -} - - - - -inline EXTERN int IsLargeIntTerm(Term); - -inline EXTERN int IsLargeIntTerm(Term t) -{ - return (int) (IsApplTerm(t) && ((FunctorOfTerm(t) <= FunctorBigInt) && (FunctorOfTerm(t) >= FunctorLongInt))); -} - - - -#else - - -inline EXTERN int IsBigIntTerm(Term); - -inline EXTERN int IsBigIntTerm(Term t) -{ - return (int) (FALSE); -} - - - - -inline EXTERN int IsLargeIntTerm(Term); - -inline EXTERN int IsLargeIntTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorLongInt); -} - - - -#endif - -/* extern Functor FunctorLongInt; */ - -inline EXTERN int IsLargeNumTerm(Term); - -inline EXTERN int IsLargeNumTerm(Term t) -{ - return (int) (IsApplTerm(t) && ((FunctorOfTerm(t) <= FunctorDouble) && (FunctorOfTerm(t) >= FunctorLongInt))); -} - - - - -inline EXTERN int IsNumTerm(Term); - -inline EXTERN int IsNumTerm(Term t) -{ - return (int) ((IsIntTerm(t) || IsLargeNumTerm(t))); -} - - - - -inline EXTERN Int IsAtomicTerm(Term); - -inline EXTERN Int IsAtomicTerm(Term t) -{ - return (Int) (IsAtomOrIntTerm(t) || IsLargeNumTerm(t)); -} - - - - -inline EXTERN Int IsExtensionFunctor(Functor); - -inline EXTERN Int IsExtensionFunctor(Functor f) -{ - return (Int) (f <= FunctorDouble); -} - - - -inline EXTERN Int IsBlobFunctor(Functor); - -inline EXTERN Int IsBlobFunctor(Functor f) -{ - return (Int) ((f <= FunctorDouble && f >= FunctorDBRef)); -} - - - -inline EXTERN Int IsPrimitiveTerm(Term); - -inline EXTERN Int IsPrimitiveTerm(Term t) -{ - return (Int) ((IsAtomOrIntTerm(t) || (IsApplTerm(t) && IsBlobFunctor(FunctorOfTerm(t))))); -} - - - -#ifdef TERM_EXTENSIONS - - -inline EXTERN Int IsAttachFunc(Functor); - -inline EXTERN Int IsAttachFunc(Functor f) -{ - return (Int) (FALSE); -} - - - - -inline EXTERN Int IsAttachedTerm(Term); - -inline EXTERN Int IsAttachedTerm(Term t) -{ - return (Int) ((IsVarTerm(t) && VarOfTerm(t) < H0) ); -} - - - - -inline EXTERN exts ExtFromCell(CELL *); - -inline EXTERN exts ExtFromCell(CELL * pt) -{ - return (exts) (pt[1]); -} - - - -#else - - -inline EXTERN Int IsAttachFunc(Functor); - -inline EXTERN Int IsAttachFunc(Functor f) -{ - return (Int) (FALSE); -} - - - - -inline EXTERN Int IsAttachedTerm(Term); - -inline EXTERN Int IsAttachedTerm(Term t) -{ - return (Int) (FALSE); -} - - - - -#endif - -EXTERN int STD_PROTO(unify_extension,(Functor, CELL, CELL *, CELL)); - -inline EXTERN int -unify_extension(Functor f, CELL d0, CELL *pt0, CELL d1) -{ - switch(BlobOfFunctor(f)) { - case db_ref_e: - return (d0 == d1); - case long_int_e: - return(pt0[1] == RepAppl(d1)[1]); -#ifdef USE_GMP - case big_int_e: - return (mpz_cmp(BigIntOfTerm(d0),BigIntOfTerm(d1)) == 0); -#endif /* USE_GMP */ - case double_e: - { - CELL *pt1 = RepAppl(d1); - return (pt0[1] == pt1[1] -#if SIZEOF_DOUBLE == 2*SIZEOF_LONG_INT - && pt0[2] == pt1[2] -#endif - ); - } - } - return(FALSE); -} - diff --git a/VC/include/Yap.h b/VC/include/Yap.h deleted file mode 100644 index 627a55f15..000000000 --- a/VC/include/Yap.h +++ /dev/null @@ -1,1039 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: Yap.h.m4 * -* mods: * -* comments: main header file for YAP * -* version: $Id: Yap.h,v 1.9 2002-06-01 04:29:01 vsc Exp $ * -*************************************************************************/ - -#include "config.h" - -/* - -#define RATIONAL_TREES 1 - -#define DEPTH_LIMIT 1 - -#define COROUTINING 1 - -#define YAPOR 1 - -#define ANALYST 1 - -*/ - -#define MULTI_ASSIGNMENT_VARIABLES 1 - -#if defined(TABLING) -#error Do not explicitly define TABLING -#endif /* YAPOR */ - -#if defined(TABLING_BATCHED_SCHEDULING) && defined(TABLING_LOCAL_SCHEDULING) -#error Do not define multiple tabling scheduling strategies -#endif /* TABLING_BATCHED_SCHEDULING || TABLING_LOCAL_SCHEDULING */ - -#if defined(TABLING_BATCHED_SCHEDULING) || defined(TABLING_LOCAL_SCHEDULING) -#define TABLING 1 -#endif /* TABLING_BATCHED_SCHEDULING || TABLING_LOCAL_SCHEDULING */ - -#if defined(YAPOR) -#error Do not explicitly define YAPOR -#endif /* YAPOR */ - -#if (defined(YAPOR_COPY) && (defined(YAPOR_COW) || defined(YAPOR_SBA))) || (defined(YAPOR_COW) && defined(YAPOR_SBA)) -#error Do not define multiple or-parallel models -#endif /* (YAPOR_COPY && (YAPOR_COW || YAPOR_SBA)) || (YAPOR_COW && YAPOR_SBA) */ - -#if defined(YAPOR_COPY) || defined(YAPOR_COW) || defined(YAPOR_SBA) -#define YAPOR 1 -#endif /* YAPOR_COPY || YAPOR_COW || YAPOR_SBA */ - -#if defined(TABLING) && (defined(YAPOR_COW) || defined(YAPOR_SBA)) -#error Currently TABLING only works with YAPOR_COPY -#endif /* TABLING && (YAPOR_COW || YAPOR_SBA) */ - -#ifdef YAPOR -#define FIXED_STACKS 1 -#endif /* YAPOR */ - -#if defined(YAPOR) || defined(TABLING) -#undef TRAILING_REQUIRES_BRANCH -#endif /* YAPOR || TABLING */ - -#if ANALYST -#ifdef USE_THREADED_CODE -#undef USE_THREADED_CODE -#endif -#endif - -#ifdef COROUTINING -#ifndef TERM_EXTENSIONS -#define TERM_EXTENSIONS 1 -#endif -#endif - -#ifdef YAPOR_SBA -#ifdef YAPOR -#ifndef FROZEN_STACKS -#define FROZEN_STACKS 1 -#endif -#endif -#endif - -#ifdef TABLING -#ifndef FROZEN_STACKS -#define FROZEN_STACKS 1 -#endif -#endif - -#ifdef _MSC_VER /* Microsoft's Visual C++ Compiler */ -/* adjust a config.h from mingw32 to work with vc++ */ -#ifdef HAVE_GCC -#undef HAVE_GCC -#endif -#ifdef USE_THREADED_CODE -#undef USE_THREADED_CODE -#endif -#define inline __inline -#define YAP_VERSION "Yap-4.3.21" -#define BIN_DIR "c:\\Program Files\\Yap\\bin" -#define LIB_DIR "c:\\Program Files\\Yap\\lib\\Yap" -#define SHARE_DIR "c:\\Program Files\\Yap\\share\\Yap" -#ifdef HOST_ALIAS -#undef HOST_ALIAS -#endif -#define HOST_ALIAS "i386-pc-win32" -#ifdef HAVE_IEEEFP_H -#undef HAVE_IEEEFP_H -#endif -#ifdef HAVE_UNISTD_H -#undef HAVE_UNISTD_H -#endif -#ifdef HAVE_SYS_TIME_H -#undef HAVE_SYS_TIME_H -#endif -#endif - -#ifdef __MINGW32__ -#ifndef _WIN32 -#define _WIN32 1 -#endif -#endif - -#if HAVE_GCC -#define MIN_ARRAY 0 -#define DUMMY_FILLER_FOR_ABS_TYPE -#else -#define MIN_ARRAY 1 -#define DUMMY_FILLER_FOR_ABS_TYPE int dummy; -#endif - -#ifndef ADTDEFS_C -#define EXTERN static -#else -#define EXTERN -#endif - -/* truth-values */ -#define TRUE 1 -#define FALSE 0 - -/* null pointer */ -#define NIL 0 - -/* Basic types */ - -/* defines integer types Int and UInt (unsigned) with the same size as a ptr -** and integer types Short and UShort with half the size of a ptr -*/ - -#if SIZEOF_INT_P==4 - -#if SIZEOF_INT==4 -/* */ typedef int Int; -/* */ typedef unsigned int UInt; - -#elif SIZEOF_LONG_INT==4 -/* */ typedef long int Int; -/* */ typedef unsigned long int UInt; - -#else -# error Yap require integer types of the same size as a pointer -#endif - -#if SIZEOF_SHORT_INT==2 -/* */ typedef short int Short; -/* */ typedef unsigned short int UShort; - -#else -# error Yap requires integer types half the size of a pointer -#endif - -#elif SIZEOF_INT_P==8 - -# if SIZEOF_INT==8 -/* */ typedef int Int; -/* */ typedef unsigned int UInt; - -#elif SIZEOF_LONG_INT==8 -/* */ typedef long int Int; -/* */ typedef unsigned long int UInt; - -# elif SIZEOF_LONG_LONG_INT==8 -/* */ typedef long long int Int; -/* */ typedef unsigned long long int UInt; - -# else -# error Yap requires integer types of the same size as a pointer -# endif - -# if SIZEOF_SHORT_INT==4 -/* */ typedef short int Short; -/* */ typedef unsigned short int UShort; - -# elif SIZEOF_INT==4 -/* */ typedef int Short; -/* */ typedef short int UShort; - -# else -# error Yap requires integer types half the size of a pointer -# endif - -#else - -# error Yap requires pointers of size 4 or 8 - -#endif - -/* */ typedef double Float; - -#if SIZEOF_INT -#else -#ifdef i386 -#include -#endif -#if defined(sparc) || defined(__sparc) -#include -#endif -#ifdef mips -#include -#endif -#ifdef __alpha -#include -#endif -#endif - -/********************** use an auxiliary function for ranges ************/ - -#ifdef __GNUC__ -#define IN_BETWEEN(MIN,X,MAX) (Unsigned((Int)(X)-(Int)(MIN)) <= \ - Unsigned((Int)(MAX)-(Int)(MIN)) ) - -#define OUTSIDE(MIN,X,MAX) (Unsigned((Int)(X)-(Int)(MIN)) > \ - Unsigned((Int)(MAX)-(Int)(MIN)) ) -#else -#define IN_BETWEEN(MIN,X,MAX) ((void *)(X) >= (void *)(MIN) && (void *)(X) <= (void *)(MAX)) - -#define OUTSIDE(MIN,X,MAX) ((void *)(X) < (void *)(MIN) || (void *)(X) > (void *)(MAX)) -#endif - -/* ************************* Atoms *************************************/ - -#include "Atoms.h" - -/* ************************* Coroutining **********************************/ - -#ifdef COROUTINING -/* Support for co-routining */ -#include "corout.h" -#endif - -/********* abstract machine registers **********************************/ - - -#include "amidefs.h" - -#include "Regs.h" - - -#if defined(YAPOR) ||defined(THREADS) -#ifdef mips -#include -#endif -#ifdef __alpha -#include -#endif -#endif - -/************ variables concerned with Error Handling *************/ - -#include - -#if defined(SIMICS) || !HAVE_SIGSETJMP -#define sigjmp_buf jmp_buf -#define sigsetjmp(Env, Arg) setjmp(Env) -#define siglongjmp(Env, Arg) longjmp(Env, Arg) -#endif - -extern sigjmp_buf RestartEnv; /* used to restart after an abort */ - -/* Support for arrays */ -#include "arrays.h" - -/************ variables concerned with Error Handling *************/ - -/* Types of Errors */ -typedef enum { - YAP_NO_ERROR, - FATAL_ERROR, - INTERNAL_ERROR, - PURE_ABORT, - /* ISO_ERRORS */ - DOMAIN_ERROR_ARRAY_OVERFLOW, - DOMAIN_ERROR_ARRAY_TYPE, - DOMAIN_ERROR_IO_MODE, - DOMAIN_ERROR_MUTABLE, - DOMAIN_ERROR_NON_EMPTY_LIST, - DOMAIN_ERROR_NOT_LESS_THAN_ZERO, - DOMAIN_ERROR_NOT_NL, - DOMAIN_ERROR_NOT_ZERO, - DOMAIN_ERROR_OUT_OF_RANGE, - DOMAIN_ERROR_OPERATOR_PRIORITY, - DOMAIN_ERROR_OPERATOR_SPECIFIER, - DOMAIN_ERROR_RADIX, - DOMAIN_ERROR_SHIFT_COUNT_OVERFLOW, - DOMAIN_ERROR_SOURCE_SINK, - DOMAIN_ERROR_STREAM, - DOMAIN_ERROR_STREAM_OR_ALIAS, - DOMAIN_ERROR_STREAM_POSITION, - DOMAIN_ERROR_TIMEOUT_SPEC, - DOMAIN_ERROR_SYNTAX_ERROR_HANDLER, - EVALUATION_ERROR_FLOAT_OVERFLOW, - EVALUATION_ERROR_FLOAT_UNDERFLOW, - EVALUATION_ERROR_INT_OVERFLOW, - EVALUATION_ERROR_UNDEFINED, - EVALUATION_ERROR_UNDERFLOW, - EVALUATION_ERROR_ZERO_DIVISOR, - EXISTENCE_ERROR_ARRAY, - EXISTENCE_ERROR_SOURCE_SINK, - EXISTENCE_ERROR_STREAM, - INSTANTIATION_ERROR, - PERMISSION_ERROR_ACCESS_PRIVATE_PROCEDURE, - PERMISSION_ERROR_NEW_ALIAS_FOR_STREAM, - PERMISSION_ERROR_CREATE_ARRAY, - PERMISSION_ERROR_CREATE_OPERATOR, - PERMISSION_ERROR_INPUT_BINARY_STREAM, - PERMISSION_ERROR_INPUT_PAST_END_OF_STREAM, - PERMISSION_ERROR_INPUT_STREAM, - PERMISSION_ERROR_INPUT_TEXT_STREAM, - PERMISSION_ERROR_MODIFY_STATIC_PROCEDURE, - PERMISSION_ERROR_OPEN_SOURCE_SINK, - PERMISSION_ERROR_OUTPUT_BINARY_STREAM, - PERMISSION_ERROR_OUTPUT_STREAM, - PERMISSION_ERROR_OUTPUT_TEXT_STREAM, - PERMISSION_ERROR_RESIZE_ARRAY, - PERMISSION_ERROR_REPOSITION_STREAM, - REPRESENTATION_ERROR_CHARACTER, - REPRESENTATION_ERROR_CHARACTER_CODE, - REPRESENTATION_ERROR_MAX_ARITY, - SYNTAX_ERROR, - SYSTEM_ERROR, - TYPE_ERROR_ARRAY, - TYPE_ERROR_ATOM, - TYPE_ERROR_ATOMIC, - TYPE_ERROR_BYTE, - TYPE_ERROR_CALLABLE, - TYPE_ERROR_CHARACTER, - TYPE_ERROR_COMPOUND, - TYPE_ERROR_DBREF, - TYPE_ERROR_DBTERM, - TYPE_ERROR_EVALUABLE, - TYPE_ERROR_FLOAT, - TYPE_ERROR_INTEGER, - TYPE_ERROR_KEY, - TYPE_ERROR_LIST, - TYPE_ERROR_NUMBER, - TYPE_ERROR_PREDICATE_INDICATOR, - TYPE_ERROR_PTR, - TYPE_ERROR_UBYTE, - TYPE_ERROR_VARIABLE, - UNKNOWN_ERROR -} yap_error_number; - -extern char *ErrorMessage; /* used to pass error messages */ -extern Term Error_Term; /* used to pass error terms */ -extern yap_error_number Error_TYPE; /* used to pass the error */ - -typedef enum { - YAP_INT_BOUNDED_FLAG = 0, - MAX_ARITY_FLAG = 1, - INTEGER_ROUNDING_FLAG = 2, - YAP_MAX_INTEGER_FLAG = 3, - YAP_MIN_INTEGER_FLAG = 4, - CHAR_CONVERSION_FLAG = 5, - YAP_DOUBLE_QUOTES_FLAG = 6, - YAP_TO_CHARS_FLAG = 7, - LANGUAGE_MODE_FLAG = 8, - STRICT_ISO_FLAG = 9, - SPY_CREEP_FLAG = 10, - SOURCE_MODE_FLAG = 11, - CHARACTER_ESCAPE_FLAG = 12, - WRITE_QUOTED_STRING_FLAG = 13, - ALLOW_ASSERTING_STATIC_FLAG = 14, - HALT_AFTER_CONSULT_FLAG = 15, - FAST_BOOT_FLAG = 16 -} yap_flags; - -#define STRING_AS_CHARS 0 -#define STRING_AS_ATOM 2 - -#define QUINTUS_TO_CHARS 0 -#define ISO_TO_CHARS 1 - -#define CPROLOG_CHARACTER_ESCAPES 0 -#define ISO_CHARACTER_ESCAPES 1 -#define SICSTUS_CHARACTER_ESCAPES 2 - -#define NUMBER_OF_YAP_FLAGS FAST_BOOT_FLAG+1 - -/************************ prototypes **********************************/ - -#include "Yapproto.h" - -/************************ OPTYap configuration ************************/ - -/* These must be included before unification handlers */ -#if defined(YAPOR) || defined(TABLING) -#include "opt.config.h" -#endif - -/***********************************************************************/ - - /* -absrectype Term = Int + Float + Atom + Pair + Appl + Ref + Var - -with AbsAppl(t) : *CELL -> Term -and RepAppl(t) : Term -> *CELL - -and AbsPair(t) : *CELL -> Term -and RepPair(t) : Term -> *CELL - -and IsIntTerm(t) = ... -and IsAtomTerm(t) = ... -and IsVarTerm(t) = ... -and IsPairTerm(t) = ... -and IsApplTerm(t) = ... -and IsFloatTerm(t) = ... -and IsRefTerm(t) = ... -and IsNonVarTerm(t) = ! IsVar(t) -and IsNumterm(t) = IsIntTerm(t) || IsFloatTerm(t) -and IsAtomicTerm(t) = IsNumTerm(t) || IsAtomTerm(t) -and IsPrimitiveTerm(t) = IsAtomicTerm(t) || IsRefTerm(t) - -and MkIntTerm(n) = ... -and MkFloatTerm(f) = ... -and MkAtomTerm(a) = ... -and MkVarTerm(r) = ... -and MkApplTerm(f,n,args) = ... -and MkPairTerm(hd,tl) = ... -and MkRefTerm(R) = ... - -and PtrOfTerm(t) : Term -> CELL * = ... -and IntOfTerm(t) : Term -> int = ... -and FloatOfTerm(t) : Term -> flt = ... -and AtomOfTerm(t) : Term -> Atom = ... -and VarOfTerm(t) : Term -> *Term = .... -and HeadOfTerm(t) : Term -> Term = ... -and TailOfTerm(t) : Term -> Term = ... -and FunctorOfTerm(t) : Term -> Functor = ... -and ArgOfTerm(i,t) : Term -> Term= ... -and RefOfTerm(t) : Term -> DBRef = ... - -*/ - -/* - YAP can use several different tag schemes, according to the kind of - machine we are experimenting with. -*/ - -#if LONG_ADDRESSES && defined(OLD_TAG_SCHEME) - -#include "Tags_32bits.h" - -#endif /* LONG_ADDRESSES && defined(OLD_TAG_SCHEME) */ - -/* AIX will by default place mmaped segments at 0x30000000. This is - incompatible with the high tag scheme. Linux-ELF also does not like - if you place things in the lower addresses (power to the libc people). -*/ -#if (defined(_AIX) || defined(_WIN32) || defined(sparc) || defined(__sparc) || defined(mips) || defined(__FreeBSD__) || defined(_POWER) || defined(__linux__) || defined(IN_SECOND_QUADRANT)) && !defined(TABLING) -#define USE_LOW32_TAGS 1 -#endif - -#if LONG_ADDRESSES && SIZEOF_INT_P==4 && !defined(OLD_TAG_SCHEME) && !defined(USE_LOW32_TAGS) - -#include "Tags_32Ops.h" - -#endif /* LONG_ADDRESSES && !defined(OLD_TAG_SCHEME) && !defined(USE_LOW32_TAGS) */ - -#if LONG_ADDRESSES && SIZEOF_INT_P==4 && !defined(OLD_TAG_SCHEME) && defined(USE_LOW32_TAGS) - -#include "Tags_32LowTag.h" - -#endif /* LONG_ADDRESSES && !defined(OLD_TAG_SCHEME) */ - -#if LONG_ADDRESSES && SIZEOF_INT_P==8 && !defined(OLD_TAG_SCHEME) - -#include "Tags_64bits.h" - -#endif /* LONG_ADDRESSES && SIZEOF_INT_P==8 && !defined(OLD_TAG_SCHEME) */ - -#if !LONG_ADDRESSES - -#include "Tags_24bits.h" - -#endif /* !LONG_ADDRESSES */ - -#ifdef TAG_LOW_BITS_32 -#define MBIT 0x80000000 -#define RBIT 0x40000000 - -#if IN_SECOND_QUADRANT -#define INVERT_RBIT 1 /* RBIT is 1 by default */ -#endif - -#else - -#if defined(YAPOR_SBA) && defined(__linux__) -#define MBIT /* 0x20000000 */ MKTAG(0x1,0) /* mark bit */ -#else -#define RBIT /* 0x20000000 */ MKTAG(0x1,0) /* relocation chain bit */ -#define MBIT /* 0x40000000 */ MKTAG(0x2,0) /* mark bit */ -#endif -#endif - -#define TermSize sizeof(Term) - -/************* variables related to memory allocation *******************/ -/* must be before TermExt.h */ -extern ADDR HeapBase, - LocalBase, - GlobalBase, - TrailBase, TrailTop, - ForeignCodeBase, ForeignCodeTop, ForeignCodeMax; - - -/* applies to unbound variables */ - -inline EXTERN Term * VarOfTerm(Term t); - -inline EXTERN Term * VarOfTerm(Term t) -{ - return (Term *) (t); -} - - -#if YAPOR_SBA - -inline EXTERN Term MkVarTerm(void); - -inline EXTERN Term MkVarTerm() -{ - return (Term) ((*H = 0, H++)); -} - - - -inline EXTERN int IsUnboundVar(Term); - -inline EXTERN int IsUnboundVar(Term t) -{ - return (int) (t == 0); -} - - -#else - -inline EXTERN Term MkVarTerm(void); - -inline EXTERN Term MkVarTerm() -{ - return (Term) ((*H = (CELL) H, H++)); -} - - - -inline EXTERN int IsUnboundVar(Term); - -inline EXTERN int IsUnboundVar(Term t) -{ - return (int) (*VarOfTerm(t) == (t)); -} - - -#endif - -inline EXTERN CELL * PtrOfTerm(Term); - -inline EXTERN CELL * PtrOfTerm(Term t) -{ - return (CELL *) (*(CELL *)(t)); -} - - - - -inline EXTERN Functor FunctorOfTerm(Term); - -inline EXTERN Functor FunctorOfTerm(Term t) -{ - return (Functor) (*RepAppl(t)); -} - - - -inline EXTERN Term MkAtomTerm(Atom); - -inline EXTERN Term MkAtomTerm(Atom a) -{ - return (Term) (TAGGEDA(AtomTag, (CELL)(a)-HEAP_INIT_BASE)); -} - - - -inline EXTERN Atom AtomOfTerm(Term t); - -inline EXTERN Atom AtomOfTerm(Term t) -{ - return (Atom) (HEAP_INIT_BASE+NonTagPart(t)); -} - - - -inline EXTERN int IsAtomTerm(Term); - -inline EXTERN int IsAtomTerm(Term t) -{ - return (int) (CHKTAG((t), AtomTag)); -} - - - - -inline EXTERN Term MkIntTerm(Int); - -inline EXTERN Term MkIntTerm(Int n) -{ - return (Term) (TAGGED(NumberTag, (n))); -} - - -/* - A constant to subtract or add to a well-known term, we assume no - overflow problems are possible -*/ - -inline EXTERN Term MkIntConstant(Int); - -inline EXTERN Term MkIntConstant(Int n) -{ - return (Term) (NONTAGGED(NumberTag, (n))); -} - - - -inline EXTERN int IsIntTerm(Term); - -inline EXTERN int IsIntTerm(Term t) -{ - return (int) (CHKTAG((t), NumberTag)); -} - - - -/* Needed to handle numbers: - these two macros are fundamental in the integer/float conversions */ - -#ifdef M_WILLIAMS -#define IntInBnd(X) (TRUE) -#else -#ifdef TAGS_FAST_OPS -#define IntInBnd(X) (Unsigned( ( (Int)(X) >> (32-7) ) + 1) <= 1) -#else -#define IntInBnd(X) ( (X) < MAX_ABS_INT && \ - (X) > -MAX_ABS_INT-1L ) -#endif -#endif -#ifdef C_PROLOG -#define FlIsInt(X) ( (X) == (Int)(X) && IntInBnd((X)) ) -#else -#define FlIsInt(X) ( FALSE ) -#endif - - -/* - There are two types of functors: - - o Special functors mark special terms - on the heap that should be seen as constants. - - o Standard functors mark normal applications. - -*/ - -#include "TermExt.h" - -#define IsAccessFunc(func) ((func) == FunctorAccess) - - -inline EXTERN Term MkIntegerTerm(Int); - -inline EXTERN Term MkIntegerTerm(Int n) -{ - return (Term) (IntInBnd(n) ? MkIntTerm(n) : MkLongIntTerm(n)); -} - - - -inline EXTERN int IsIntegerTerm(Term); - -inline EXTERN int IsIntegerTerm(Term t) -{ - return (int) (IsIntTerm(t) || IsLongIntTerm(t)); -} - - - -inline EXTERN Int IntegerOfTerm(Term); - -inline EXTERN Int IntegerOfTerm(Term t) -{ - return (Int) (IsIntTerm(t) ? IntOfTerm(t) : LongIntOfTerm(t)); -} - - - - -/*************** unification routines ***********************************/ - -#if YAPOR_SBA -#include "or.sba_amiops.h" -#else -#include "amiops.h" -#endif - -/*************** High level macros to access arguments ******************/ - - -inline EXTERN Term ArgOfTerm(int i, Term t); - -inline EXTERN Term ArgOfTerm(int i, Term t) -{ - return (Term) (Derefa(RepAppl(t) + (i))); -} - - - -inline EXTERN Term HeadOfTerm(Term); - -inline EXTERN Term HeadOfTerm(Term t) -{ - return (Term) (Derefa(RepPair(t))); -} - - - -inline EXTERN Term TailOfTerm(Term); - -inline EXTERN Term TailOfTerm(Term t) -{ - return (Term) (Derefa(RepPair(t) + 1)); -} - - - - -inline EXTERN Term ArgOfTermCell(int i, Term t); - -inline EXTERN Term ArgOfTermCell(int i, Term t) -{ - return (Term) ((CELL)(RepAppl(t) + (i))); -} - - - -inline EXTERN Term HeadOfTermCell(Term); - -inline EXTERN Term HeadOfTermCell(Term t) -{ - return (Term) ((CELL)(RepPair(t))); -} - - - -inline EXTERN Term TailOfTermCell(Term); - -inline EXTERN Term TailOfTermCell(Term t) -{ - return (Term) ((CELL)(RepPair(t) + 1)); -} - - - -/*************** variables concerned with atoms table *******************/ -#define MaxHash 1001 - -/************ variables concerned with save and restore *************/ -extern int splfild; - -#define FAIL_RESTORE 0 -#define DO_EVERYTHING 1 -#define DO_ONLY_CODE 2 - -/************ variable concerned with version number *****************/ -extern char version_number[]; - -/********* common instructions codes*************************/ - -#define MAX_PROMPT 256 - -#if USE_THREADED_CODE - -/************ reverse lookup of instructions *****************/ -typedef struct opcode_tab_entry { - OPCODE opc; - op_numbers opnum; -} opentry; - -#endif - -/******************* controlling the compiler ****************************/ -extern int optimizer_on; - -/******************* the line for the current parse **********************/ -extern int LOCAL_StartLine; -extern int StartCh; -extern int CurFileNo; - -/********************* how to write a Prolog term ***********************/ - -/********* Prolog may be in several modes *******************************/ - -typedef enum { - BootMode = 1, /* if booting or restoring */ - UserMode = 2, /* Normal mode */ - CritMode = 4, /* If we are meddling with the heap */ - AbortMode = 8, /* expecting to abort */ - InterruptMode = 16, /* under an interrupt */ - InErrorMode = 32, /* under an interrupt */ - ConsoleGetcMode = 64 /* blocked reading from console */ -} prolog_exec_mode; - -extern prolog_exec_mode PrologMode; -extern int CritLocks; - -/************** Access to yap initial arguments ***************************/ - -extern char **yap_args; -extern int yap_argc; - -/******************* controlling debugging ****************************/ -extern int creep_on; - -#ifdef YAPOR -#define YAPEnterCriticalSection() \ - { \ - if (worker_id != GLOBAL_LOCKS_who_locked_heap) { \ - LOCK(GLOBAL_LOCKS_heap_access); \ - GLOBAL_LOCKS_who_locked_heap = worker_id; \ - } \ - PrologMode |= CritMode; \ - CritLocks++; \ - } -#define YAPLeaveCriticalSection() \ - { \ - CritLocks--; \ - if (!CritLocks) { \ - PrologMode &= ~CritMode; \ - if (PrologMode & InterruptMode) { \ - PrologMode &= ~InterruptMode; \ - ProcessSIGINT(); \ - } \ - if (PrologMode & AbortMode) { \ - PrologMode &= ~AbortMode; \ - Error(PURE_ABORT, 0, ""); \ - } \ - GLOBAL_LOCKS_who_locked_heap = MAX_WORKERS; \ - UNLOCK(GLOBAL_LOCKS_heap_access); \ - } \ - } -#else -#define YAPEnterCriticalSection() \ - { \ - PrologMode |= CritMode; \ - CritLocks++; \ - } -#define YAPLeaveCriticalSection() \ - { \ - CritLocks--; \ - if (!CritLocks) { \ - PrologMode &= ~CritMode; \ - if (PrologMode & InterruptMode) { \ - PrologMode &= ~InterruptMode; \ - ProcessSIGINT(); \ - } \ - if (PrologMode & AbortMode) { \ - PrologMode &= ~AbortMode; \ - Error(PURE_ABORT, 0, ""); \ - } \ - } \ - } -#endif /* YAPOR */ - -/* when we are calling the InitStaff procedures */ -#define AT_BOOT 0 -#define AT_RESTORE 1 - -/********* whether we should try to compile array references ******************/ - -extern int compile_arrays; - -/********* mutable variables ******************/ - -/* I assume that the size of this structure is a multiple of the size - of CELL!!! */ -typedef struct TIMED_MAVAR{ - CELL value; - CELL clock; -} timed_var; - -/********* while debugging you may need some info ***********************/ - -#if DEBUG -extern int output_msg; -#endif - -#if HAVE_SIGNAL -extern int snoozing; -#endif - -#if defined(YAPOR) || defined(TABLING) -#include "opt.structs.h" -#include "opt.macros.h" -#include "opt.proto.h" -#endif /* YAPOR || TABLING */ - -#if YAPOR_SBA -#include "or.sba_unify.h" -#endif - diff --git a/VC/include/Yatom.h b/VC/include/Yatom.h deleted file mode 100644 index 7460d1d7c..000000000 --- a/VC/include/Yatom.h +++ /dev/null @@ -1,1079 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: YAtom.h.m4 * -* Last rev: 19/2/88 * -* mods: * -* comments: atom properties header file for YAP * -* * -*************************************************************************/ - -/* This code can only be defined *after* including Regs.h!!! */ - -#if USE_OFFSETS - -inline EXTERN Atom AbsAtom(AtomEntry * p); - -inline EXTERN Atom AbsAtom(AtomEntry * p) -{ - return (Atom) (Addr(p) - AtomBase); -} - - - -inline EXTERN AtomEntry * RepAtom(Atom a); - -inline EXTERN AtomEntry * RepAtom(Atom a) -{ - return (AtomEntry *) (AtomBase + Unsigned(a)); -} - - -#else - -inline EXTERN Atom AbsAtom(AtomEntry * p); - -inline EXTERN Atom AbsAtom(AtomEntry * p) -{ - return (Atom) (p); -} - - - -inline EXTERN AtomEntry * RepAtom(Atom a); - -inline EXTERN AtomEntry * RepAtom(Atom a) -{ - return (AtomEntry *) (a); -} - - -#endif - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN Prop AbsProp(PropEntry * p); - -inline EXTERN Prop AbsProp(PropEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - - -inline EXTERN PropEntry * RepProp(Prop p); - -inline EXTERN PropEntry * RepProp(Prop p) -{ - return (PropEntry *) (AtomBase+Unsigned(p)); -} - - -#else - -inline EXTERN Prop AbsProp(PropEntry * p); - -inline EXTERN Prop AbsProp(PropEntry * p) -{ - return (Prop) (p); -} - - - -inline EXTERN PropEntry * RepProp(Prop p); - -inline EXTERN PropEntry * RepProp(Prop p) -{ - return (PropEntry *) (p); -} - - -#endif - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN FunctorEntry * RepFunctorProp(Prop p); - -inline EXTERN FunctorEntry * RepFunctorProp(Prop p) -{ - return (FunctorEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsFunctorProp(FunctorEntry * p); - -inline EXTERN Prop AbsFunctorProp(FunctorEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN FunctorEntry * RepFunctorProp(Prop p); - -inline EXTERN FunctorEntry * RepFunctorProp(Prop p) -{ - return (FunctorEntry *) (p); -} - - - -inline EXTERN Prop AbsFunctorProp(FunctorEntry * p); - -inline EXTERN Prop AbsFunctorProp(FunctorEntry * p) -{ - return (Prop) (p); -} - - -#endif - - -inline EXTERN Int ArityOfFunctor(Functor); - -inline EXTERN Int ArityOfFunctor(Functor Fun) -{ - return (Int) (((FunctorEntry *)Fun)->ArityOfFE); -} - - - -inline EXTERN Atom NameOfFunctor(Functor); - -inline EXTERN Atom NameOfFunctor(Functor Fun) -{ - return (Atom) (((FunctorEntry *)Fun)->NameOfFE); -} - - - - -inline EXTERN PropFlags IsFunctorProperty(int); - -inline EXTERN PropFlags IsFunctorProperty(int flags) -{ - return (PropFlags) ((flags == FunctorProperty) ); -} - - - -/* summary of property codes used - - 00 00 predicate entry - 80 00 db property - bb 00 functor entry - ff df sparse functor - ff ex arithmetic property - ff f7 array - ff fa module property - ff fb blackboard property - ff fc value property - ff ff op property -*/ - -/* Module property */ -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - SMALLUNSGN IndexOfMod; /* indec in module table */ -} ModEntry; - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN ModEntry * RepModProp(Prop p); - -inline EXTERN ModEntry * RepModProp(Prop p) -{ - return (ModEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsModProp(ModEntry * p); - -inline EXTERN Prop AbsModProp(ModEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN ModEntry * RepModProp(Prop p); - -inline EXTERN ModEntry * RepModProp(Prop p) -{ - return (ModEntry *) (p); -} - - - -inline EXTERN Prop AbsModProp(ModEntry * p); - -inline EXTERN Prop AbsModProp(ModEntry * p) -{ - return (Prop) (p); -} - - -#endif - -#define ModProperty ((PropFlags)0xfffa) - - -inline EXTERN PropFlags IsModProperty(int); - -inline EXTERN PropFlags IsModProperty(int flags) -{ - return (PropFlags) ((flags == ModProperty)); -} - - - -/* operator property entry structure */ -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t OpRWLock; /* a read-write lock to protect the entry */ -#endif - BITS16 Prefix, Infix, Posfix; /* precedences */ - } OpEntry; -#if USE_OFFSETS_IN_PROPS - -inline EXTERN OpEntry * RepOpProp(Prop p); - -inline EXTERN OpEntry * RepOpProp(Prop p) -{ - return (OpEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsOpProp(OpEntry * p); - -inline EXTERN Prop AbsOpProp(OpEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN OpEntry * RepOpProp(Prop p); - -inline EXTERN OpEntry * RepOpProp(Prop p) -{ - return (OpEntry *) (p); -} - - - -inline EXTERN Prop AbsOpProp(OpEntry * p); - -inline EXTERN Prop AbsOpProp(OpEntry * p) -{ - return (Prop) (p); -} - - -#endif -#define OpProperty ((PropFlags)0xffff) - - -inline EXTERN PropFlags IsOpProperty(int); - -inline EXTERN PropFlags IsOpProperty(int flags) -{ - return (PropFlags) ((flags == OpProperty) ); -} - - - -/* defines related to operator specifications */ -#define MaskPrio 0x0fff -#define DcrlpFlag 0x1000 -#define DcrrpFlag 0x2000 - -typedef union arith_ret *eval_ret; - -/* expression property entry structure */ -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - unsigned int ArityOfEE; - BITS16 ENoOfEE; - BITS16 FlagsOfEE; - /* operations that implement the expression */ - union { - blob_type (*constant)(eval_ret); - blob_type (*unary)(Term, eval_ret); - blob_type (*binary)(Term, Term, eval_ret); - } FOfEE; -} ExpEntry; -#if USE_OFFSETS_IN_PROPS - -inline EXTERN ExpEntry * RepExpProp(Prop p); - -inline EXTERN ExpEntry * RepExpProp(Prop p) -{ - return (ExpEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsExpProp(ExpEntry * p); - -inline EXTERN Prop AbsExpProp(ExpEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN ExpEntry * RepExpProp(Prop p); - -inline EXTERN ExpEntry * RepExpProp(Prop p) -{ - return (ExpEntry *) (p); -} - - - -inline EXTERN Prop AbsExpProp(ExpEntry * p); - -inline EXTERN Prop AbsExpProp(ExpEntry * p) -{ - return (Prop) (p); -} - - -#endif -#define ExpProperty 0xffe0 - -/* only unary and binary expressions are acceptable */ - -inline EXTERN PropFlags IsExpProperty(int); - -inline EXTERN PropFlags IsExpProperty(int flags) -{ - return (PropFlags) ((flags == ExpProperty) ); -} - - - - -/* value property entry structure */ -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t VRWLock; /* a read-write lock to protect the entry */ -#endif - Term ValueOfVE; /* (atomic) value associated with the atom */ - } ValEntry; -#if USE_OFFSETS_IN_PROPS - -inline EXTERN ValEntry * RepValProp(Prop p); - -inline EXTERN ValEntry * RepValProp(Prop p) -{ - return (ValEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsValProp(ValEntry * p); - -inline EXTERN Prop AbsValProp(ValEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN ValEntry * RepValProp(Prop p); - -inline EXTERN ValEntry * RepValProp(Prop p) -{ - return (ValEntry *) (p); -} - - - -inline EXTERN Prop AbsValProp(ValEntry * p); - -inline EXTERN Prop AbsValProp(ValEntry * p) -{ - return (Prop) (p); -} - - -#endif -#define ValProperty ((PropFlags)0xfffc) - - -inline EXTERN PropFlags IsValProperty(int); - -inline EXTERN PropFlags IsValProperty(int flags) -{ - return (PropFlags) ((flags == ValProperty) ); -} - - - -/* predicate property entry structure */ -/* AsmPreds are things like var, nonvar, atom ...which are implemented - through dedicated machine instructions. In this case the 8 lower - bits of PredFlags are used to hold the machine instruction code - for the pred. - C_Preds are things write, read, ... implemented in C. In this case - CodeOfPred holds the address of the correspondent C-function. -*/ -typedef enum { - CArgsPredFlag = 0x1000000L, /* ! should ! across */ - CutTransparentPredFlag = 0x800000L, /* ! should ! across */ - SourcePredFlag = 0x400000L, /* static predicate with source declaration */ - MetaPredFlag = 0x200000L, /* predicate subject to a meta declaration */ - SyncPredFlag = 0x100000L, /* has to synch before it can execute*/ - UserCPredFlag = 0x080000L, /* CPred defined by the user */ - MultiFileFlag = 0x040000L, /* is multi-file */ - FastPredFlag = 0x020000L, /* is "compiled" */ - TestPredFlag = 0x010000L, /* is a test (optim. comit) */ - AsmPredFlag = 0x008000L, /* inline */ - StandardPredFlag= 0x004000L, /* system predicate */ - DynamicPredFlag= 0x002000L, /* dynamic predicate */ - CPredFlag = 0x001000L, /* written in C */ - SafePredFlag = 0x000800L, /* does not alter arguments */ - CompiledPredFlag= 0x000400L, /* is static */ - IndexedPredFlag= 0x000200L, /* has indexing code */ - SpiedPredFlag = 0x000100L, /* is a spy point */ - BinaryTestPredFlag=0x000080L, /* test predicate. */ -#ifdef TABLING - TabledPredFlag = 0x000040L, /* is tabled */ -#endif /* TABLING */ -#ifdef YAPOR - SequentialPredFlag=0x000020L, /* may not create par. choice points!*/ -#endif /* YAPOR */ - ProfiledPredFlag = 0x000010L, /* pred is being profiled */ - LogUpdatePredFlag= 0x000008L /* dynamic predicate with log. upd. sem.*/ -} pred_flag; - -/* profile data */ -typedef struct { -#if defined(YAPOR) || defined(THREADS) - lockvar lock; /* a simple lock to protect this entry */ -#endif - Int NOfEntries; /* nbr of times head unification succeeded*/ - Int NOfHeadSuccesses; /* nbr of times head unification succeeded*/ - Int NOfRetries; /* nbr of times a clause for the pred - was retried */ -} profile_data; - -typedef struct pred_entry { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - unsigned int ArityOfPE; /* arity of property */ - CELL PredFlags; - CODEADDR CodeOfPred; /* code address */ - CODEADDR TrueCodeOfPred; /* if needing to spy or to lock */ - Functor FunctorOfPred; /* functor for Predicate */ - CODEADDR FirstClause, LastClause; - Atom OwnerFile; /* File where the predicate was defined */ - struct pred_entry *NextPredOfModule; /* next pred for same module */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t PRWLock; /* a simple lock to protect this entry */ -#endif -#ifdef TABLING - tab_ent_ptr TableOfPred; -#endif /* TABLING */ - SMALLUNSGN ModuleOfPred; /* module for this definition */ - OPCODE OpcodeOfPred; /* undefcode, indexcode, spycode, .... */ - profile_data StatisticsForPred; /* enable profiling for predicate */ - SMALLUNSGN StateOfPred; /* actual state of predicate */ -} PredEntry; -#define PEProp ((PropFlags)(0x0000)) - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN PredEntry * RepPredProp(Prop p); - -inline EXTERN PredEntry * RepPredProp(Prop p) -{ - return (PredEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsPredProp(PredEntry * p); - -inline EXTERN Prop AbsPredProp(PredEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN PredEntry * RepPredProp(Prop p); - -inline EXTERN PredEntry * RepPredProp(Prop p) -{ - return (PredEntry *) (p); -} - - - -inline EXTERN Prop AbsPredProp(PredEntry * p); - -inline EXTERN Prop AbsPredProp(PredEntry * p) -{ - return (Prop) (p); -} - - -#endif - - -inline EXTERN PropFlags IsPredProperty(int); - -inline EXTERN PropFlags IsPredProperty(int flags) -{ - return (PropFlags) ((flags == PEProp) ); -} - - - -/********* maximum number of C-written predicates and cmp funcs ******************/ - -#define MAX_C_PREDS 360 -#define MAX_CMP_FUNCS 20 - -typedef struct { - PredEntry *p; - CmpPredicate f; -} cmp_entry; - -extern CPredicate c_predicates[MAX_C_PREDS]; -extern cmp_entry cmp_funcs[MAX_CMP_FUNCS]; - - -/* Flags for code or dbase entry */ -/* There are several flags for code and data base entries */ -typedef enum { - GcFoundMask = 0x10000, /* informs this is a dynamic predicate */ - DynamicMask = 0x8000, /* informs this is a dynamic predicate */ - InUseMask = 0x4000, /* informs this block is being used */ - ErasedMask = 0x2000, /* informs this block has been erased */ - IndexMask = 0x1000, /* informs this is indexing code */ - DBClMask = 0x0800, /* informs this is a data base structure */ - LogUpdRuleMask= 0x0400, /* informs the code is for a log upd rule with env */ - LogUpdMask = 0x0200, /* informs this is a logic update index. */ - StaticMask = 0x0100, /* dealing with static predicates */ - SpiedMask = 0x0080 /* this predicate is being spied */ -/* other flags belong to DB */ -} dbentry_flags; - -/* *********************** DBrefs **************************************/ - -#define KEEP_ENTRY_AGE 1 - -typedef struct DB_STRUCT { - Functor id; /* allow pointers to this struct to id */ - /* as dbref */ - Term EntryTerm; /* cell bound to itself */ - SMALLUNSGN Flags; /* Term Flags */ - SMALLUNSGN NOfRefsTo; /* Number of references pointing here */ - struct struct_dbentry *Parent; /* key of DBase reference */ - CODEADDR Code; /* pointer to code if this is a clause */ - struct DB_STRUCT **DBRefs; /* pointer to other references */ - struct DB_STRUCT *Prev; /* Previous element in chain */ - struct DB_STRUCT *Next; /* Next element in chain */ -#if defined(YAPOR) || defined(THREADS) - lockvar lock; /* a simple lock to protect this entry */ - Int ref_count; /* how many branches are using this entry */ -#endif -#ifdef KEEP_ENTRY_AGE - Int age; /* entry's age, negative if from recorda, - positive if it was recordz */ -#endif /* KEEP_ENTRY_AGE */ -#ifdef COROUTINING - CELL attachments; /* attached terms */ -#endif - CELL Mask; /* parts that should be cleared */ - CELL Key; /* A mask that can be used to check before - you unify */ - CELL NOfCells; /* Size of Term */ - CELL Entry; /* entry point */ - Term Contents[MIN_ARRAY]; /* stored term */ -} DBStruct; - -#define DBStructFlagsToDBStruct(X) ((DBRef)((X) - (CELL) &(((DBRef) NIL)->Flags))) - -#if defined(YAPOR) || defined(THREADS) -#define INIT_DBREF_COUNT(X) (X)->ref_count = 0 -#define INC_DBREF_COUNT(X) (X)->ref_count++ -#define DEC_DBREF_COUNT(X) (X)->ref_count-- -#define DBREF_IN_USE(X) ((X)->ref_count != 0) -#else -#define INIT_DBREF_COUNT(X) -#define INC_DBREF_COUNT(X) -#define DEC_DBREF_COUNT(X) -#define DBREF_IN_USE(X) ((X)->Flags & InUseMask) -#endif - -typedef DBStruct *DBRef; - -/* extern Functor FunctorDBRef; */ - -inline EXTERN int IsDBRefTerm(Term); - -inline EXTERN int IsDBRefTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorDBRef); -} - - - -inline EXTERN Term MkDBRefTerm(DBRef); - -inline EXTERN Term MkDBRefTerm(DBRef p) -{ - return (Term) ((AbsAppl(((CELL *)(p))))); -} - - - -inline EXTERN DBRef DBRefOfTerm(Term t); - -inline EXTERN DBRef DBRefOfTerm(Term t) -{ - return (DBRef) (((DBRef)(RepAppl(t)))); -} - - - - -inline EXTERN int IsRefTerm(Term); - -inline EXTERN int IsRefTerm(Term t) -{ - return (int) (IsApplTerm(t) && FunctorOfTerm(t) == FunctorDBRef); -} - - - -inline EXTERN CODEADDR RefOfTerm(Term t); - -inline EXTERN CODEADDR RefOfTerm(Term t) -{ - return (CODEADDR) (DBRefOfTerm(t)); -} - - - -typedef struct struct_dbentry { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - unsigned int ArityOfDB; /* kind of property */ - Functor FunctorOfDB; /* functor for this property */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t DBRWLock; /* a simple lock to protect this entry */ -#endif - DBRef First; /* first DBase entry */ - DBRef Last; /* last DBase entry */ - SMALLUNSGN ModuleOfDB; /* module for this definition */ -#ifdef KEEP_ENTRY_AGE - Int age; /* age counter */ -#else - DBRef FirstNEr; /* first non-erased DBase entry */ -#endif /* KEEP_ENTRY_AGE */ -} DBEntry; -typedef DBEntry *DBProp; -#define DBProperty ((PropFlags)0x8000) - -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - unsigned int ArityOfDB; /* kind of property */ - Functor FunctorOfDB; /* functor for this property */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t DBRWLock; /* a simple lock to protect this entry */ -#endif - DBRef First; /* first DBase entry */ - DBRef Last; /* last DBase entry */ - SMALLUNSGN ModuleOfDB; /* module for this definition */ - Int NOfEntries; /* age counter */ - DBRef Index; /* age counter */ -} LogUpdDBEntry; -typedef LogUpdDBEntry *LogUpdDBProp; -#define LogUpdDBBit 0x1 -#define CodeDBBit 0x2 - -#define LogUpdDBProperty ((PropFlags)(0x8000|LogUpdDBBit)) -#define CodeLogUpdDBProperty (DBProperty|LogUpdDBBit|CodeDBBit) -#define CodeDBProperty (DBProperty|CodeDBBit) - - -inline EXTERN PropFlags IsDBProperty(int); - -inline EXTERN PropFlags IsDBProperty(int flags) -{ - return (PropFlags) (((flags & ~(LogUpdDBBit|CodeDBBit)) == DBProperty) ); -} - - - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN DBProp RepDBProp(Prop p); - -inline EXTERN DBProp RepDBProp(Prop p) -{ - return (DBProp) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsDBProp(DBProp p); - -inline EXTERN Prop AbsDBProp(DBProp p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN DBProp RepDBProp(Prop p); - -inline EXTERN DBProp RepDBProp(Prop p) -{ - return (DBProp) (p); -} - - - -inline EXTERN Prop AbsDBProp(DBProp p); - -inline EXTERN Prop AbsDBProp(DBProp p) -{ - return (Prop) (p); -} - - -#endif - - -/* These are the actual flags for DataBase terms */ -typedef enum { - DBAtomic = 0x1, - DBVar = 0x2, - DBNoVars = 0x4, - DBComplex = 0x8, - DBCode = 0x10, - DBNoCode = 0x20, - DBWithRefs = 0x40 -} db_term_flags; - -#define MaxModules 256 - -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - Atom KeyOfBB; /* functor for this property */ - DBRef Element; /* blackboard element */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t BBRWLock; /* a read-write lock to protect the entry */ -#endif - SMALLUNSGN ModuleOfBB; /* module for this definition */ -} BlackBoardEntry; -typedef BlackBoardEntry *BBProp; - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN BlackBoardEntry * RepBBProp(Prop p); - -inline EXTERN BlackBoardEntry * RepBBProp(Prop p) -{ - return (BlackBoardEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsBBProp(BlackBoardEntry * p); - -inline EXTERN Prop AbsBBProp(BlackBoardEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN BlackBoardEntry * RepBBProp(Prop p); - -inline EXTERN BlackBoardEntry * RepBBProp(Prop p) -{ - return (BlackBoardEntry *) (p); -} - - - -inline EXTERN Prop AbsBBProp(BlackBoardEntry * p); - -inline EXTERN Prop AbsBBProp(BlackBoardEntry * p) -{ - return (Prop) (p); -} - - -#endif - -#define BBProperty ((PropFlags)0xfffb) - - -inline EXTERN PropFlags IsBBProperty(int); - -inline EXTERN PropFlags IsBBProperty(int flags) -{ - return (PropFlags) ((flags == BBProperty)); -} - - - - -/* array property entry structure */ -/* first case is for dynamic arrays */ -typedef struct array_entry { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - Int ArrayEArity; /* Arity of Array (positive) */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t ArRWLock; /* a read-write lock to protect the entry */ -#endif - struct array_entry *NextArrayE; /* Pointer to the actual array */ - Term ValueOfVE; /* Pointer to the actual array */ -} ArrayEntry; - -/* second case is for static arrays */ - -/* first, the valid types */ -typedef enum { - array_of_ints, - array_of_chars, - array_of_uchars, - array_of_doubles, - array_of_ptrs, - array_of_atoms, - array_of_dbrefs, - array_of_terms -} static_array_types; - -typedef union { - Int *ints; - char *chars; - unsigned char *uchars; - Float *floats; - AtomEntry **ptrs; - Term *atoms; - Term *dbrefs; - DBRef *terms; -} statarray_elements; - -/* next, the actual data structure */ -typedef struct { - Prop NextOfPE; /* used to chain properties */ - PropFlags KindOfPE; /* kind of property */ - Int ArrayEArity; /* Arity of Array (negative) */ -#if defined(YAPOR) || defined(THREADS) - rwlock_t ArRWLock; /* a read-write lock to protect the entry */ -#endif - static_array_types ArrayType; /* Type of Array Elements. */ - statarray_elements ValueOfVE; /* Pointer to the Array itself */ -} StaticArrayEntry; - - -#if USE_OFFSETS_IN_PROPS - -inline EXTERN ArrayEntry * RepArrayProp(Prop p); - -inline EXTERN ArrayEntry * RepArrayProp(Prop p) -{ - return (ArrayEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsArrayProp(ArrayEntry * p); - -inline EXTERN Prop AbsArrayProp(ArrayEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - - -inline EXTERN StaticArrayEntry * RepStaticArrayProp(Prop p); - -inline EXTERN StaticArrayEntry * RepStaticArrayProp(Prop p) -{ - return (StaticArrayEntry *) (AtomBase + Unsigned(p)); -} - - - -inline EXTERN Prop AbsStaticArrayProp(StaticArrayEntry * p); - -inline EXTERN Prop AbsStaticArrayProp(StaticArrayEntry * p) -{ - return (Prop) (Addr(p)-AtomBase); -} - - -#else - -inline EXTERN ArrayEntry * RepArrayProp(Prop p); - -inline EXTERN ArrayEntry * RepArrayProp(Prop p) -{ - return (ArrayEntry *) (p); -} - - - -inline EXTERN Prop AbsArrayProp(ArrayEntry * p); - -inline EXTERN Prop AbsArrayProp(ArrayEntry * p) -{ - return (Prop) (p); -} - - - -inline EXTERN StaticArrayEntry * RepStaticArrayProp(Prop p); - -inline EXTERN StaticArrayEntry * RepStaticArrayProp(Prop p) -{ - return (StaticArrayEntry *) (p); -} - - - -inline EXTERN Prop AbsStaticArrayProp(StaticArrayEntry * p); - -inline EXTERN Prop AbsStaticArrayProp(StaticArrayEntry * p) -{ - return (Prop) (p); -} - - -#endif -#define ArrayProperty ((PropFlags)0xfff7) - - -inline EXTERN int ArrayIsDynamic(ArrayEntry *); - -inline EXTERN int ArrayIsDynamic(ArrayEntry * are) -{ - return (int) (((are)->ArrayEArity > 0 )); -} - - - - -inline EXTERN PropFlags IsArrayProperty(int); - -inline EXTERN PropFlags IsArrayProperty(int flags) -{ - return (PropFlags) ((flags == ArrayProperty) ); -} - - - -/* Proto types */ - -/* cdmgr.c */ -int STD_PROTO(RemoveIndexation,(PredEntry *)); - -/* dbase.c */ -void STD_PROTO(ErDBE,(DBRef)); -DBRef STD_PROTO(StoreTermInDB,(int,int)); -Term STD_PROTO(FetchTermFromDB,(DBRef,int)); -void STD_PROTO(ReleaseTermFromDB,(DBRef)); - -/* .c */ -CODEADDR STD_PROTO(PredIsIndexable,(PredEntry *)); - -/* init.c */ -Atom STD_PROTO(GetOp,(OpEntry *,int *,int)); - -/* vsc: redefined to GetAProp to avoid conflicts with Windows header files */ -Prop STD_PROTO(GetAProp,(Atom,PropFlags)); -Prop STD_PROTO(GetAPropHavingLock,(AtomEntry *,PropFlags)); - -EXTERN inline Prop -PredPropByFunc(Functor f, SMALLUNSGN cur_mod) -/* get predicate entry for ap/arity; create it if neccessary. */ -{ - Prop p0; - FunctorEntry *fe = (FunctorEntry *)f; - - WRITE_LOCK(fe->FRWLock); - p0 = fe->PropsOfFE; - while (p0) { - PredEntry *p = RepPredProp(p0); - if (/* p->KindOfPE != 0 || only props */ - (p->ModuleOfPred == cur_mod || !(p->ModuleOfPred))) { - WRITE_UNLOCK(f->FRWLock); - return (p0); - } - p0 = p->NextOfPE; - } - return(NewPredPropByFunctor(fe,cur_mod)); -} - -EXTERN inline Prop -PredPropByAtom(Atom at, SMALLUNSGN cur_mod) -/* get predicate entry for ap/arity; create it if neccessary. */ -{ - Prop p0; - AtomEntry *ae = RepAtom(at); - - WRITE_LOCK(ae->ARWLock); - p0 = ae->PropsOfAE; - while (p0) { - PredEntry *pe = RepPredProp(p0); - if ( pe->KindOfPE == PEProp && - (pe->ModuleOfPred == cur_mod || !pe->ModuleOfPred)) { - WRITE_UNLOCK(ae->ARWLock); - return(p0); - } - p0 = pe->NextOfPE; - } - return(NewPredPropByAtom(ae,cur_mod)); -} - -#if defined(YAPOR) || defined(THREADS) -void STD_PROTO(ReleasePreAllocCodeSpace, (ADDR)); -#else -#define ReleasePreAllocCodeSpace(x) -#endif diff --git a/VC/include/config.h b/VC/include/config.h deleted file mode 100644 index 20ec034f1..000000000 --- a/VC/include/config.h +++ /dev/null @@ -1,235 +0,0 @@ -/* config.h. Generated automatically by configure. */ - -/* are we using gcc */ -/* #define HAVE_GCC 1 */ - -/* should we use gcc threaded code (i.e. goto *adrs) */ -/* #define USE_THREADED_CODE 1*/ - -/* Should we use lib readline ? */ -/* #undef HAVE_LIBREADLINE */ - -/* Should we use gmp ? */ -/* #define HAVE_LIBGMP 1 */ - -/* does the compiler support inline ? */ -/* #undef inline */ - -/* Do we have Ansi headers ? */ -#define STDC_HEADERS 1 - -/* Host Name ? */ -#define HOST_ALIAS "" - -/* #undef HAVE_SYS_WAIT_H */ -#define NO_UNION_WAIT 1 - -/* #undef HAVE_ARPA_INET_H */ -#define HAVE_CTYPE_H 1 -#define HAVE_DIRECT_H 1 -#define HAVE_DIRENT_H 1 -#define HAVE_ERRNO_H 1 -#define HAVE_FCNTL_H 1 -/* #undef HAVE_FENV_H */ -/* #undef HAVE_FPU_CONTROL_H */ -/* #undef HAVE_GMP_H */ -/* #undef HAVE_IEEEFP_H */ -#define HAVE_IO_H 1 -#define HAVE_LIMITS_H 1 -#define HAVE_MEMORY_H 1 -/* #undef HAVE_NETDB_H */ -/* #undef HAVE_NETINET_IN_H */ -/* #undef HAVE_READLINE_READLINE_H */ -/* #undef HAVE_REGEX_H */ -/* #undef HAVE_SIGINFO_H */ -#define HAVE_SIGNAL_H 1 -#define HAVE_STDARG_H 1 -#define HAVE_STRING_H 1 -/* #undef HAVE_STROPTS_H */ -/* #undef HAVE_SYS_CONF_H */ -#define HAVE_SYS_FILE_H 1 -/* #undef HAVE_SYS_MMAN_H */ -/* #undef HAVE_SYS_PARAM_H */ -/* #undef HAVE_SYS_RESOURCE_H */ -/* #undef HAVE_SYS_SELECT_H */ -/* #undef HAVE_SYS_SHM_H */ -/* #undef HAVE_SYS_SOCKET_H */ -#define HAVE_SYS_STAT_H 1 -#define HAVE_SYS_TIME_H 1 -/* #undef HAVE_SYS_TIMES_H */ -#define HAVE_SYS_TYPES_H 1 -/* #undef HAVE_SYS_UCONTEXT_H */ -/* #undef HAVE_SYS_UN_H */ -#define HAVE_TIME_H 1 -#define HAVE_UNISTD_H 1 -#define HAVE_WINSOCK_H 1 -#define HAVE_WINSOCK2_H 1 - -/* Do we have restartable syscalls */ -/* #undef HAVE_RESTARTABLE_SYSCALLS */ - -/* is 'tms' defined in ? */ -/* #undef TM_IN_SYS_TIME */ - -/* define type of prt returned by malloc: char or void */ -#define MALLOC_T void * - -/* Define byte order */ -/* #undef WORDS_BIGENDIAN */ - -/* Define sizes of some basic types */ -#define SIZEOF_INT_P 4 -#define SIZEOF_INT 4 -#define SIZEOF_SHORT_INT 2 -#define SIZEOF_LONG_INT 4 -#define SIZEOF_LONG_LONG_INT 8 -#define SIZEOF_FLOAT 4 -#define SIZEOF_DOUBLE 8 - -/* Define representation of floats */ -/* only one of the following shoud be set */ -/* to add a new representation you must edit FloatOfTerm and MkFloatTerm - in adtdefs.c -*/ -#define FFIEEE 1 -/* #undef FFVAX */ /* manual */ - -/* Define the standard type of a float argument to a function */ -#define FAFloat double /* manual */ - -/* Set the minimum and default heap, trail and stack size */ -#define MinTrailSpace ( 32*SIZEOF_INT_P) -#define MinStackSpace (200*SIZEOF_INT_P) -#define MinHeapSpace (200*SIZEOF_INT_P) - -#define UsrTrailSpace (0) -#define UsrStackSpace (0) -#define UsrHeapSpace (0) - -#if (UsrTrailSpace > MinTrailSpace) - #define DefTrailSpace UsrTrailSpace -#else - #define DefTrailSpace MinTrailSpace -#endif - -#if (UsrStackSpace > MinStackSpace) - #define DefStackSpace UsrStackSpace -#else - #define DefStackSpace MinStackSpace -#endif - -#if (UsrHeapSpace > MinHeapSpace) - #define DefHeapSpace UsrHeapSpace -#else - #define DefHeapSpace MinHeapSpace -#endif - - - -/* Define return type for signal */ -#define RETSIGTYPE void - -/* #undef HAVE_ACOSH */ -/* #undef HAVE_ALARM */ -/* #undef HAVE_ASINH */ -/* #undef HAVE_ATANH */ -#define HAVE_CHDIR 1 -#define HAVE_DUP2 1 -/* #undef HAVE_FETESTEXCEPT */ -/* #undef HAVE_FINITE */ -#define HAVE_GETCWD 1 -#define HAVE_GETENV 1 -/* #undef HAVE_GETHOSTBYNAME */ -/* #undef HAVE_GETHOSTID */ -/* #undef HAVE_GETHOSTNAME */ -/* #undef HAVE_GETHRTIME */ -/* #undef HAVE_GETPWNAM */ -/* #undef HAVE_GETRUSAGE */ -/* #undef HAVE_GETTIMEOFDAY */ -/* #undef HAVE_GETWD */ -#define HAVE_ISATTY 1 -/* #undef HAVE_ISNAN */ -/* #undef HAVE_KILL */ -#define HAVE_LABS 1 -/* #undef HAVE_LINK */ -#define HAVE_LOCALTIME 1 -/* #undef HAVE_LSTAT */ -#define HAVE_MEMCPY 1 -#define HAVE_MEMMOVE 1 -/* #undef HAVE_MKSTEMP */ -#define HAVE_MKTEMP 1 -/* #undef HAVE_MMAP */ -#define HAVE_OPENDIR 1 -#define HAVE_POPEN 1 -#define HAVE_PUTENV 1 -#define HAVE_RAND 1 -/* #undef HAVE_RANDOM */ -#define HAVE_RENAME 1 -/* #undef HAVE_RINT */ -/* #undef HAVE_RL_SET_PROMPT */ -/* #undef HAVE_SBRK */ -/* #undef HAVE_SELECT */ -#define HAVE_SETBUF 1 -/* #undef HAVE_SETLINEBUF */ -/* #undef HAVE_SHMAT */ -/* #undef HAVE_SIGACTION */ -/* #undef HAVE_SIGGETMASK */ -/* #undef HAVE_SIGINTERRUPT */ -#define HAVE_SIGNAL 1 -/* #undef HAVE_SIGPROCMASK */ -#define HAVE_SIGSETJMP 0 -#define HAVE_SLEEP 1 -/* #undef HAVE_SNPRINTF */ -/* #undef HAVE_SOCKET */ -#define HAVE_STAT 1 -#define HAVE_STRCHR 1 -#define HAVE_STRERROR 1 -#define HAVE_STRNCAT 1 -#define HAVE_STRNCPY 1 -#define HAVE_STRTOD 1 -#define HAVE_SYSTEM 1 -#define HAVE_TIME 1 -/* #undef HAVE_TIMES */ -#define HAVE_TMPNAM 1 -/* #undef HAVE_USLEEP */ -/* #undef HAVE_VSNPRINTF */ -/* #undef HAVE_WAITPID */ -#define HAVE_MPZ_XOR 0 - -#define HAVE_SIGSEGV 1 - -#define HAVE_ENVIRON 1 - -#define SELECT_TYPE_ARG1 -#define SELECT_TYPE_ARG234 -#define SELECT_TYPE_ARG5 - -#define TYPE_SELECT_ -#define MYTYPE(X) MYTYPE1#X - -/* define how to pass the address of a function */ -#define FunAdr(Fn) Fn - -#define ALIGN_LONGS 1 -#define LOW_ABSMI 0 - -#define MSHIFTOFFS 1 - -#define USE_MMAP (HAVE_MMAP) -#define USE_SHM (HAVE_SHMAT & !HAVE_MMAP) -#define USE_SBRK (HAVE_SBRK & !HAVE_MMAP & !HAVE_SHMAT) - -/* for OSes that do not allow user access to the first - quadrant of the memory space */ -/* #undef FORCE_SECOND_QUADRANT */ - -#if (HAVE_SOCKET || defined(__MINGW32__)) && !defined(SIMICS) -#define USE_SOCKET 1 -#endif - -#if HAVE_GMP_H && HAVE_LIBGMP -#define USE_GMP 1 -#endif - -/* Is fflush(NULL) clobbering input streams? */ -#define BROKEN_FFLUSH_NULL 1 diff --git a/VC/include/corout_utils.h b/VC/include/corout_utils.h deleted file mode 100644 index 7283e2c00..000000000 --- a/VC/include/corout_utils.h +++ /dev/null @@ -1,128 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* YAP Prolog * -* * -* Yap Prolog was developed at NCCUP - Universidade do Porto * -* * -* Copyright L.Damas, V.S.Costa and Universidade do Porto 1985-1997 * -* * -************************************************************************** -* * -* File: corout_utils.h * -* Last rev: * -* mods: * -* comments: Co-routining from within YAP * -* * -*************************************************************************/ - -STATIC_PROTO (Term SDeref, (Term)); -STATIC_PROTO (Term SDerefa, (CELL *)); -STATIC_PROTO (sus_tag * deref_susp_chain, (sus_tag *)); - -static inline Term -SDeref (Term a) -{ - while (IsVarTerm (a)) - { - Term *b = (Term *) a; - a = *b; -#if YAPOR_SBA - if (a == (0)) - return (CELL) b; -#else - if (a == ((Term) b)) - return a; -#endif - } - return (a); -} - -static inline Term -SDerefa (CELL * b) -{ - Term a = *b; - while (IsVarTerm (a)) - { -#if YAPOR_SBA - if (a == (0)) - return (CELL) b; -#else - if (a == ((Term) b)) - return a; -#endif - b = (Term *) a; - a = *b; - } - return (a); -} - -static inline CELL * -SADerefa (CELL * b) -{ - Term a = *b; - while (IsVarTerm (a)) - { -#if YAPOR_SBA - if (a == (0)) - return b; -#else - if (a == ((Term) b)) - return b; -#endif - b = (Term *) a; - a = *b; - } - return (b); -} - - - -inline EXTERN Term SArgOfTerm (int i, Term t); - -inline EXTERN Term -SArgOfTerm (int i, Term t) -{ - return (Term) (SDerefa (RepAppl (t) + (i))); -} - - - -inline EXTERN Term SHeadOfTerm (Term); - -inline EXTERN Term -SHeadOfTerm (Term t) -{ - return (Term) (SDerefa (RepPair (t))); -} - - - -inline EXTERN Term STailOfTerm (Term); - -inline EXTERN Term -STailOfTerm (Term t) -{ - return (Term) (SDerefa (RepPair (t) + 1)); -} - - - -static inline sus_tag * -deref_susp_chain (sus_tag * susp) -{ - /* we may have bound several suspension chains together. Follow the - reference chain - */ - while (IsVarTerm (susp->ActiveSus) - && susp->ActiveSus != (CELL) & susp->ActiveSus) - susp = - (sus_tag *) (susp->ActiveSus - (Int) (&(((sus_tag *) (0))->ActiveSus))); - return (susp); -} diff --git a/VC/include/sshift.h b/VC/include/sshift.h deleted file mode 100644 index d75c9f727..000000000 --- a/VC/include/sshift.h +++ /dev/null @@ -1,543 +0,0 @@ - - - - - - - -/************************************************************************* -* * -* 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: sshift.h * -* Last rev: 19/2/88 * -* mods: * -* comments: stack shifter functionality for YAP * -* * -*************************************************************************/ - - -/* The difference between the old stack pointers and the new ones */ -extern Int LOCAL_HDiff, - LOCAL_GDiff, - LOCAL_LDiff, - LOCAL_TrDiff, - LOCAL_XDiff, - LOCAL_DelayDiff; - -/* The old stack pointers */ -extern CELL *LOCAL_OldASP, *LOCAL_OldLCL0; -extern tr_fr_ptr LOCAL_OldTR; -extern CELL *LOCAL_OldGlobalBase, *LOCAL_OldH, *LOCAL_OldH0; -extern ADDR LOCAL_OldTrailBase, LOCAL_OldTrailTop; -extern ADDR LOCAL_OldHeapBase, LOCAL_OldHeapTop; - -#define CharP(ptr) ((char *) (ptr)) - - -inline EXTERN int IsHeapP(CELL *); - -inline EXTERN int IsHeapP(CELL * ptr) -{ - return (int) ((ptr >= (CELL *)HeapBase && ptr <= (CELL *)HeapTop) ); -} - - - -/* Adjusting cells and pointers to cells */ - -inline EXTERN CELL * PtoGloAdjust(CELL *); - -inline EXTERN CELL * PtoGloAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_GDiff)) ); -} - - - -inline EXTERN CELL * PtoDelayAdjust(CELL *); - -inline EXTERN CELL * PtoDelayAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_DelayDiff)) ); -} - - - -inline EXTERN tr_fr_ptr PtoTRAdjust(tr_fr_ptr); - -inline EXTERN tr_fr_ptr PtoTRAdjust(tr_fr_ptr ptr) -{ - return (tr_fr_ptr) (((tr_fr_ptr)(CharP(ptr) + LOCAL_TrDiff)) ); -} - - - -inline EXTERN CELL * CellPtoTRAdjust(CELL *); - -inline EXTERN CELL * CellPtoTRAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_TrDiff)) ); -} - - - -inline EXTERN CELL * PtoLocAdjust(CELL *); - -inline EXTERN CELL * PtoLocAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_LDiff)) ); -} - - - -inline EXTERN choiceptr ChoicePtrAdjust(choiceptr); - -inline EXTERN choiceptr ChoicePtrAdjust(choiceptr ptr) -{ - return (choiceptr) (((choiceptr)(CharP(ptr) + LOCAL_LDiff)) ); -} - - -#ifdef TABLING - -inline EXTERN choiceptr ConsumerChoicePtrAdjust(choiceptr); - -inline EXTERN choiceptr ConsumerChoicePtrAdjust(choiceptr ptr) -{ - return (choiceptr) (((choiceptr)(CharP(ptr) + LOCAL_LDiff)) ); -} - - - -inline EXTERN choiceptr GeneratorChoicePtrAdjust(choiceptr); - -inline EXTERN choiceptr GeneratorChoicePtrAdjust(choiceptr ptr) -{ - return (choiceptr) (((choiceptr)(CharP(ptr) + LOCAL_LDiff)) ); -} - - -#endif /* TABLING */ - - -inline EXTERN CELL GlobalAdjust(CELL); - -inline EXTERN CELL GlobalAdjust(CELL val) -{ - return (CELL) ((val+LOCAL_GDiff) ); -} - - - -inline EXTERN CELL DelayAdjust(CELL); - -inline EXTERN CELL DelayAdjust(CELL val) -{ - return (CELL) ((val+LOCAL_DelayDiff) ); -} - - - -inline EXTERN ADDR GlobalAddrAdjust(ADDR); - -inline EXTERN ADDR GlobalAddrAdjust(ADDR ptr) -{ - return (ADDR) ((ptr+LOCAL_GDiff) ); -} - - - -inline EXTERN ADDR DelayAddrAdjust(ADDR); - -inline EXTERN ADDR DelayAddrAdjust(ADDR ptr) -{ - return (ADDR) ((ptr+LOCAL_DelayDiff) ); -} - - - -inline EXTERN CELL LocalAdjust(CELL); - -inline EXTERN CELL LocalAdjust(CELL val) -{ - return (CELL) ((val+LOCAL_LDiff) ); -} - - - -inline EXTERN ADDR LocalAddrAdjust(ADDR); - -inline EXTERN ADDR LocalAddrAdjust(ADDR ptr) -{ - return (ADDR) ((ptr+LOCAL_LDiff) ); -} - - - -inline EXTERN CELL TrailAdjust(CELL); - -inline EXTERN CELL TrailAdjust(CELL val) -{ - return (CELL) ((val+LOCAL_TrDiff) ); -} - - - -inline EXTERN ADDR TrailAddrAdjust(ADDR); - -inline EXTERN ADDR TrailAddrAdjust(ADDR ptr) -{ - return (ADDR) ((ptr+LOCAL_TrDiff) ); -} - - -/* heap data structures */ - -inline EXTERN Functor FuncAdjust(Functor); - -inline EXTERN Functor FuncAdjust(Functor f) -{ - return (Functor) ((Functor)(CharP(f)+LOCAL_HDiff) ); -} - - - -inline EXTERN CELL * CellPtoHeapAdjust(CELL *); - -inline EXTERN CELL * CellPtoHeapAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_HDiff)) ); -} - - -#if USE_OFFSETS - -inline EXTERN Atom AtomAdjust(Atom); - -inline EXTERN Atom AtomAdjust(Atom at) -{ - return (Atom) ((at) ); -} - - - -inline EXTERN Prop PropAdjust(Prop); - -inline EXTERN Prop PropAdjust(Prop p) -{ - return (Prop) ((p) ); -} - - -#else - -inline EXTERN Atom AtomAdjust(Atom); - -inline EXTERN Atom AtomAdjust(Atom at) -{ - return (Atom) ((at == NULL ? (at) : (Atom)(CharP(at)+LOCAL_HDiff) )); -} - - - -inline EXTERN Prop PropAdjust(Prop); - -inline EXTERN Prop PropAdjust(Prop p) -{ - return (Prop) ((p == NULL ? (p) : (Prop)(CharP(p)+LOCAL_HDiff)) ); -} - - -#endif - -inline EXTERN Term AtomTermAdjust(Term); - -inline EXTERN Term AtomTermAdjust(Term at) -{ - return (Term) ((at) ); -} - - -#if TAGS_FAST_OPS - -inline EXTERN Term BlobTermAdjust(Term); - -inline EXTERN Term BlobTermAdjust(Term t) -{ - return (Term) ((t-LOCAL_HDiff) ); -} - - -#else - -inline EXTERN Term BlobTermAdjust(Term); - -inline EXTERN Term BlobTermAdjust(Term t) -{ - return (Term) ((t+LOCAL_HDiff) ); -} - - -#endif - -inline EXTERN AtomEntry * AtomEntryAdjust(AtomEntry *); - -inline EXTERN AtomEntry * AtomEntryAdjust(AtomEntry * at) -{ - return (AtomEntry *) ((AtomEntry *)(CharP(at)+LOCAL_HDiff) ); -} - - - -inline EXTERN union CONSULT_OBJ * ConsultObjAdjust(union CONSULT_OBJ *); - -inline EXTERN union CONSULT_OBJ * ConsultObjAdjust(union CONSULT_OBJ * co) -{ - return (union CONSULT_OBJ *) ((union CONSULT_OBJ *)(CharP(co)+LOCAL_HDiff) ); -} - - - -inline EXTERN DBRef DBRefAdjust(DBRef); - -inline EXTERN DBRef DBRefAdjust(DBRef dbr) -{ - return (DBRef) ((DBRef)(CharP(dbr)+LOCAL_HDiff) ); -} - - - -inline EXTERN Term CodeAdjust(Term); - -inline EXTERN Term CodeAdjust(Term dbr) -{ - return (Term) (((Term)(dbr)+LOCAL_HDiff) ); -} - - - -inline EXTERN ADDR AddrAdjust(ADDR); - -inline EXTERN ADDR AddrAdjust(ADDR addr) -{ - return (ADDR) ((ADDR)(CharP(addr)+LOCAL_HDiff) ); -} - - - -inline EXTERN CODEADDR CodeAddrAdjust(CODEADDR); - -inline EXTERN CODEADDR CodeAddrAdjust(CODEADDR addr) -{ - return (CODEADDR) ((CODEADDR)(CharP(addr)+LOCAL_HDiff) ); -} - - - -inline EXTERN BlockHeader * BlockAdjust(BlockHeader *); - -inline EXTERN BlockHeader * BlockAdjust(BlockHeader * addr) -{ - return (BlockHeader *) ((BlockHeader *)(CharP(addr)+LOCAL_HDiff) ); -} - - - -inline EXTERN yamop * PtoOpAdjust(yamop *); - -inline EXTERN yamop * PtoOpAdjust(yamop * ptr) -{ - return (yamop *) (((yamop *)(CharP(ptr) + LOCAL_HDiff)) ); -} - - - -inline EXTERN CELL * PtoHeapCellAdjust(CELL *); - -inline EXTERN CELL * PtoHeapCellAdjust(CELL * ptr) -{ - return (CELL *) (((CELL *)(CharP(ptr) + LOCAL_HDiff)) ); -} - - - -inline EXTERN PredEntry * PtoPredAdjust(PredEntry *); - -inline EXTERN PredEntry * PtoPredAdjust(PredEntry * ptr) -{ - return (PredEntry *) (((PredEntry *)(CharP(ptr) + LOCAL_HDiff)) ); -} - - - -inline EXTERN ArrayEntry * PtoArrayEAdjust(ArrayEntry *); - -inline EXTERN ArrayEntry * PtoArrayEAdjust(ArrayEntry * ptr) -{ - return (ArrayEntry *) (((ArrayEntry *)(CharP(ptr) + LOCAL_HDiff)) ); -} - - -#if PRECOMPUTE_REGADDRESS - -inline EXTERN AREG XAdjust(AREG); - -inline EXTERN AREG XAdjust(AREG reg) -{ - return (AREG) ((AREG)((reg)+LOCAL_XDiff) ); -} - - -#else - -inline EXTERN AREG XAdjust(AREG); - -inline EXTERN AREG XAdjust(AREG reg) -{ - return (AREG) ((reg) ); -} - - -#endif - -inline EXTERN YREG YAdjust(YREG); - -inline EXTERN YREG YAdjust(YREG reg) -{ - return (YREG) ((reg) ); -} - - - - -inline EXTERN int IsOldLocal(CELL); - -inline EXTERN int IsOldLocal(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldASP, reg, LOCAL_OldLCL0)); -} - - - -/* require because the trail might contain dangling pointers */ - -inline EXTERN int IsOldLocalInTR(CELL); - -inline EXTERN int IsOldLocalInTR(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldH, reg, LOCAL_OldLCL0) ); -} - - - -inline EXTERN int IsOldLocalInTRPtr(CELL *); - -inline EXTERN int IsOldLocalInTRPtr(CELL * ptr) -{ - return (int) (IN_BETWEEN(LOCAL_OldH, ptr, LOCAL_OldLCL0) ); -} - - - - -inline EXTERN int IsOldH(CELL); - -inline EXTERN int IsOldH(CELL reg) -{ - return (int) (( CharP(reg) == CharP(LOCAL_OldH) ) ); -} - - - - - -inline EXTERN int IsOldGlobal(CELL); - -inline EXTERN int IsOldGlobal(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldH0, reg, LOCAL_OldH) ); -} - - - -inline EXTERN int IsOldGlobalPtr(CELL *); - -inline EXTERN int IsOldGlobalPtr(CELL * ptr) -{ - return (int) (IN_BETWEEN( LOCAL_OldH0, ptr, LOCAL_OldH) ); -} - - - -inline EXTERN int IsOldDelay(CELL); - -inline EXTERN int IsOldDelay(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldGlobalBase, reg, LOCAL_OldH0) ); -} - - - -inline EXTERN int IsOldDelayPtr(CELL *); - -inline EXTERN int IsOldDelayPtr(CELL * ptr) -{ - return (int) (IN_BETWEEN( LOCAL_OldGlobalBase, ptr, LOCAL_OldH0) ); -} - - - -inline EXTERN int IsOldTrail(CELL); - -inline EXTERN int IsOldTrail(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldTrailBase, reg, LOCAL_OldTR) ); -} - - - -inline EXTERN int IsOldTrailPtr(CELL *); - -inline EXTERN int IsOldTrailPtr(CELL * ptr) -{ - return (int) (IN_BETWEEN(LOCAL_OldTrailBase, ptr, LOCAL_OldTR) ); -} - - - -inline EXTERN int IsOldCode(CELL); - -inline EXTERN int IsOldCode(CELL reg) -{ - return (int) (IN_BETWEEN(LOCAL_OldHeapBase, reg, LOCAL_OldHeapTop) ); -} - - - -inline EXTERN int IsOldCodeCellPtr(CELL *); - -inline EXTERN int IsOldCodeCellPtr(CELL * ptr) -{ - return (int) (IN_BETWEEN(LOCAL_OldHeapBase, ptr, LOCAL_OldHeapTop) ); -} - - - -inline EXTERN int IsGlobal(CELL); - -inline EXTERN int IsGlobal(CELL reg) -{ - return (int) (IN_BETWEEN(GlobalBase, reg, H) ); -} - - - -void STD_PROTO(AdjustStacksAndTrail, (void)); -void STD_PROTO(AdjustRegs, (int)); diff --git a/VC/wyap.mak b/VC/wyap.mak deleted file mode 100644 index bccfa2f89..000000000 --- a/VC/wyap.mak +++ /dev/null @@ -1,153 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on wyap.dsp -!IF "$(CFG)" == "" -CFG=wyap - Win32 Debug -!MESSAGE No configuration specified. Defaulting to wyap - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "wyap - Win32 Release" && "$(CFG)" != "wyap - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "wyap.mak" CFG="wyap - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "wyap - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "wyap - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "wyap - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\wyap.exe" - - -CLEAN : - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\yap.obj" - -@erase "$(OUTDIR)\wyap.exe" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /ML /W3 /GX /O2 /I "..\include" /I "..\VC\include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\wyap.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\wyap.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ws2_32.lib ..\yapdll\Release\yapdll.lib /nologo /subsystem:console /incremental:no /pdb:"$(OUTDIR)\wyap.pdb" /machine:I386 /out:"$(OUTDIR)\wyap.exe" -LINK32_OBJS= \ - "$(INTDIR)\yap.obj" - -"$(OUTDIR)\wyap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "wyap - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\wyap.exe" - - -CLEAN : - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\yap.obj" - -@erase "$(OUTDIR)\wyap.exe" - -@erase "$(OUTDIR)\wyap.ilk" - -@erase "$(OUTDIR)\wyap.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MLd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /Fp"$(INTDIR)\wyap.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\wyap.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /incremental:yes /pdb:"$(OUTDIR)\wyap.pdb" /debug /machine:I386 /out:"$(OUTDIR)\wyap.exe" /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\yap.obj" - -"$(OUTDIR)\wyap.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("wyap.dep") -!INCLUDE "wyap.dep" -!ELSE -!MESSAGE Warning: cannot find "wyap.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "wyap - Win32 Release" || "$(CFG)" == "wyap - Win32 Debug" -SOURCE="\Yap\Yap-4.3.17\console\yap.c" - -"$(INTDIR)\yap.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF - diff --git a/VC/yapdll.mak b/VC/yapdll.mak deleted file mode 100644 index 6c46efa1f..000000000 --- a/VC/yapdll.mak +++ /dev/null @@ -1,780 +0,0 @@ -# Microsoft Developer Studio Generated NMAKE File, Based on yapdll.dsp -!IF "$(CFG)" == "" -CFG=yapdll - Win32 Debug -!MESSAGE No configuration specified. Defaulting to yapdll - Win32 Debug. -!ENDIF - -!IF "$(CFG)" != "yapdll - Win32 Release" && "$(CFG)" != "yapdll - Win32 Debug" -!MESSAGE Invalid configuration "$(CFG)" specified. -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "yapdll.mak" CFG="yapdll - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "yapdll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE "yapdll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") -!MESSAGE -!ERROR An invalid configuration is specified. -!ENDIF - -!IF "$(OS)" == "Windows_NT" -NULL= -!ELSE -NULL=nul -!ENDIF - -CPP=cl.exe -MTL=midl.exe -RSC=rc.exe - -!IF "$(CFG)" == "yapdll - Win32 Release" - -OUTDIR=.\Release -INTDIR=.\Release -# Begin Custom Macros -OutDir=.\Release -# End Custom Macros - -ALL : "$(OUTDIR)\yapdll.dll" - - -CLEAN : - -@erase "$(INTDIR)\absmi.obj" - -@erase "$(INTDIR)\adtdefs.obj" - -@erase "$(INTDIR)\alloc.obj" - -@erase "$(INTDIR)\amasm.obj" - -@erase "$(INTDIR)\analyst.obj" - -@erase "$(INTDIR)\arith0.obj" - -@erase "$(INTDIR)\arith1.obj" - -@erase "$(INTDIR)\arith2.obj" - -@erase "$(INTDIR)\arrays.obj" - -@erase "$(INTDIR)\attvar.obj" - -@erase "$(INTDIR)\bb.obj" - -@erase "$(INTDIR)\bignum.obj" - -@erase "$(INTDIR)\c_interface.obj" - -@erase "$(INTDIR)\cdmgr.obj" - -@erase "$(INTDIR)\cmppreds.obj" - -@erase "$(INTDIR)\compiler.obj" - -@erase "$(INTDIR)\computils.obj" - -@erase "$(INTDIR)\corout.obj" - -@erase "$(INTDIR)\dbase.obj" - -@erase "$(INTDIR)\depth_bound.obj" - -@erase "$(INTDIR)\errors.obj" - -@erase "$(INTDIR)\eval.obj" - -@erase "$(INTDIR)\exec.obj" - -@erase "$(INTDIR)\grow.obj" - -@erase "$(INTDIR)\heapgc.obj" - -@erase "$(INTDIR)\index.obj" - -@erase "$(INTDIR)\init.obj" - -@erase "$(INTDIR)\iopreds.obj" - -@erase "$(INTDIR)\load_aix.obj" - -@erase "$(INTDIR)\load_aout.obj" - -@erase "$(INTDIR)\load_coff.obj" - -@erase "$(INTDIR)\load_dl.obj" - -@erase "$(INTDIR)\load_dld.obj" - -@erase "$(INTDIR)\load_dll.obj" - -@erase "$(INTDIR)\load_foreign.obj" - -@erase "$(INTDIR)\load_none.obj" - -@erase "$(INTDIR)\load_shl.obj" - -@erase "$(INTDIR)\mavar.obj" - -@erase "$(INTDIR)\modules.obj" - -@erase "$(INTDIR)\opt.init.obj" - -@erase "$(INTDIR)\or.memory.obj" - -@erase "$(INTDIR)\opt.preds.obj" - -@erase "$(INTDIR)\or.cowengine.obj" - -@erase "$(INTDIR)\or.cut.obj" - -@erase "$(INTDIR)\or.engine.obj" - -@erase "$(INTDIR)\or.sbaengine.obj" - -@erase "$(INTDIR)\or.scheduler.obj" - -@erase "$(INTDIR)\other.obj" - -@erase "$(INTDIR)\parser.obj" - -@erase "$(INTDIR)\save.obj" - -@erase "$(INTDIR)\scanner.obj" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\stdpreds.obj" - -@erase "$(INTDIR)\sysbits.obj" - -@erase "$(INTDIR)\tab.completion.obj" - -@erase "$(INTDIR)\tab.tries.obj" - -@erase "$(INTDIR)\tracer.obj" - -@erase "$(INTDIR)\unify.obj" - -@erase "$(INTDIR)\userpreds.obj" - -@erase "$(INTDIR)\utilpreds.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\write.obj" - -@erase "$(INTDIR)\ypsocks.obj" - -@erase "$(INTDIR)\ypstdio.obj" - -@erase "$(OUTDIR)\yapdll.dll" - -@erase "$(OUTDIR)\yapdll.exp" - -@erase "$(OUTDIR)\yapdll.lib" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MT /W3 /GX /O2 /I "..\include" /I "..\H" /I "..\OPTYap" /I "..\VC\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAPDLL_EXPORTS" /Fp"$(INTDIR)\yapdll.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /c -MTL_PROJ=/nologo /D "NDEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\yapdll.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:no /pdb:"$(OUTDIR)\yapdll.pdb" /machine:I386 /out:"$(OUTDIR)\yapdll.dll" /implib:"$(OUTDIR)\yapdll.lib" -LINK32_OBJS= \ - "$(INTDIR)\absmi.obj" \ - "$(INTDIR)\adtdefs.obj" \ - "$(INTDIR)\alloc.obj" \ - "$(INTDIR)\amasm.obj" \ - "$(INTDIR)\analyst.obj" \ - "$(INTDIR)\arith0.obj" \ - "$(INTDIR)\arith1.obj" \ - "$(INTDIR)\arith2.obj" \ - "$(INTDIR)\arrays.obj" \ - "$(INTDIR)\attvar.obj" \ - "$(INTDIR)\bb.obj" \ - "$(INTDIR)\bignum.obj" \ - "$(INTDIR)\c_interface.obj" \ - "$(INTDIR)\cdmgr.obj" \ - "$(INTDIR)\cmppreds.obj" \ - "$(INTDIR)\compiler.obj" \ - "$(INTDIR)\computils.obj" \ - "$(INTDIR)\corout.obj" \ - "$(INTDIR)\dbase.obj" \ - "$(INTDIR)\depth_bound.obj" \ - "$(INTDIR)\errors.obj" \ - "$(INTDIR)\eval.obj" \ - "$(INTDIR)\exec.obj" \ - "$(INTDIR)\grow.obj" \ - "$(INTDIR)\heapgc.obj" \ - "$(INTDIR)\index.obj" \ - "$(INTDIR)\init.obj" \ - "$(INTDIR)\iopreds.obj" \ - "$(INTDIR)\load_aix.obj" \ - "$(INTDIR)\load_aout.obj" \ - "$(INTDIR)\load_coff.obj" \ - "$(INTDIR)\load_dl.obj" \ - "$(INTDIR)\load_dld.obj" \ - "$(INTDIR)\load_dll.obj" \ - "$(INTDIR)\load_foreign.obj" \ - "$(INTDIR)\load_none.obj" \ - "$(INTDIR)\load_shl.obj" \ - "$(INTDIR)\mavar.obj" \ - "$(INTDIR)\modules.obj" \ - "$(INTDIR)\opt.init.obj" \ - "$(INTDIR)\or.memory.obj" \ - "$(INTDIR)\opt.preds.obj" \ - "$(INTDIR)\or.cowengine.obj" \ - "$(INTDIR)\or.cut.obj" \ - "$(INTDIR)\or.engine.obj" \ - "$(INTDIR)\or.sbaengine.obj" \ - "$(INTDIR)\or.scheduler.obj" \ - "$(INTDIR)\other.obj" \ - "$(INTDIR)\parser.obj" \ - "$(INTDIR)\save.obj" \ - "$(INTDIR)\scanner.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\stdpreds.obj" \ - "$(INTDIR)\sysbits.obj" \ - "$(INTDIR)\tab.completion.obj" \ - "$(INTDIR)\tab.tries.obj" \ - "$(INTDIR)\tracer.obj" \ - "$(INTDIR)\unify.obj" \ - "$(INTDIR)\userpreds.obj" \ - "$(INTDIR)\utilpreds.obj" \ - "$(INTDIR)\write.obj" \ - "$(INTDIR)\ypsocks.obj" \ - "$(INTDIR)\ypstdio.obj" - -"$(OUTDIR)\yapdll.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ELSEIF "$(CFG)" == "yapdll - Win32 Debug" - -OUTDIR=.\Debug -INTDIR=.\Debug -# Begin Custom Macros -OutDir=.\Debug -# End Custom Macros - -ALL : "$(OUTDIR)\yapdll.dll" - - -CLEAN : - -@erase "$(INTDIR)\absmi.obj" - -@erase "$(INTDIR)\adtdefs.obj" - -@erase "$(INTDIR)\alloc.obj" - -@erase "$(INTDIR)\amasm.obj" - -@erase "$(INTDIR)\analyst.obj" - -@erase "$(INTDIR)\arith0.obj" - -@erase "$(INTDIR)\arith1.obj" - -@erase "$(INTDIR)\arith2.obj" - -@erase "$(INTDIR)\arrays.obj" - -@erase "$(INTDIR)\attvar.obj" - -@erase "$(INTDIR)\bb.obj" - -@erase "$(INTDIR)\bignum.obj" - -@erase "$(INTDIR)\c_interface.obj" - -@erase "$(INTDIR)\cdmgr.obj" - -@erase "$(INTDIR)\cmppreds.obj" - -@erase "$(INTDIR)\compiler.obj" - -@erase "$(INTDIR)\computils.obj" - -@erase "$(INTDIR)\corout.obj" - -@erase "$(INTDIR)\dbase.obj" - -@erase "$(INTDIR)\depth_bound.obj" - -@erase "$(INTDIR)\errors.obj" - -@erase "$(INTDIR)\eval.obj" - -@erase "$(INTDIR)\exec.obj" - -@erase "$(INTDIR)\grow.obj" - -@erase "$(INTDIR)\heapgc.obj" - -@erase "$(INTDIR)\index.obj" - -@erase "$(INTDIR)\init.obj" - -@erase "$(INTDIR)\iopreds.obj" - -@erase "$(INTDIR)\load_aix.obj" - -@erase "$(INTDIR)\load_aout.obj" - -@erase "$(INTDIR)\load_coff.obj" - -@erase "$(INTDIR)\load_dl.obj" - -@erase "$(INTDIR)\load_dld.obj" - -@erase "$(INTDIR)\load_dll.obj" - -@erase "$(INTDIR)\load_foreign.obj" - -@erase "$(INTDIR)\load_none.obj" - -@erase "$(INTDIR)\load_shl.obj" - -@erase "$(INTDIR)\mavar.obj" - -@erase "$(INTDIR)\modules.obj" - -@erase "$(INTDIR)\opt.init.obj" - -@erase "$(INTDIR)\or.memory.obj" - -@erase "$(INTDIR)\opt.preds.obj" - -@erase "$(INTDIR)\or.cowengine.obj" - -@erase "$(INTDIR)\or.cut.obj" - -@erase "$(INTDIR)\or.engine.obj" - -@erase "$(INTDIR)\or.sbaengine.obj" - -@erase "$(INTDIR)\or.scheduler.obj" - -@erase "$(INTDIR)\other.obj" - -@erase "$(INTDIR)\parser.obj" - -@erase "$(INTDIR)\save.obj" - -@erase "$(INTDIR)\scanner.obj" - -@erase "$(INTDIR)\sort.obj" - -@erase "$(INTDIR)\stdpreds.obj" - -@erase "$(INTDIR)\sysbits.obj" - -@erase "$(INTDIR)\tab.completion.obj" - -@erase "$(INTDIR)\tab.tries.obj" - -@erase "$(INTDIR)\tracer.obj" - -@erase "$(INTDIR)\unify.obj" - -@erase "$(INTDIR)\userpreds.obj" - -@erase "$(INTDIR)\utilpreds.obj" - -@erase "$(INTDIR)\vc60.idb" - -@erase "$(INTDIR)\vc60.pdb" - -@erase "$(INTDIR)\write.obj" - -@erase "$(INTDIR)\ypsocks.obj" - -@erase "$(INTDIR)\ypstdio.obj" - -@erase "$(OUTDIR)\yapdll.dll" - -@erase "$(OUTDIR)\yapdll.exp" - -@erase "$(OUTDIR)\yapdll.ilk" - -@erase "$(OUTDIR)\yapdll.lib" - -@erase "$(OUTDIR)\yapdll.pdb" - -"$(OUTDIR)" : - if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" - -CPP_PROJ=/nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "YAPDLL_EXPORTS" /U "..\include" /U "..\H" /U "..\OPTYap" /U "..\VC\include" /Fp"$(INTDIR)\yapdll.pch" /YX /Fo"$(INTDIR)\\" /Fd"$(INTDIR)\\" /FD /GZ /c -MTL_PROJ=/nologo /D "_DEBUG" /mktyplib203 /win32 -BSC32=bscmake.exe -BSC32_FLAGS=/nologo /o"$(OUTDIR)\yapdll.bsc" -BSC32_SBRS= \ - -LINK32=link.exe -LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /dll /incremental:yes /pdb:"$(OUTDIR)\yapdll.pdb" /debug /machine:I386 /out:"$(OUTDIR)\yapdll.dll" /implib:"$(OUTDIR)\yapdll.lib" /pdbtype:sept -LINK32_OBJS= \ - "$(INTDIR)\absmi.obj" \ - "$(INTDIR)\adtdefs.obj" \ - "$(INTDIR)\alloc.obj" \ - "$(INTDIR)\amasm.obj" \ - "$(INTDIR)\analyst.obj" \ - "$(INTDIR)\arith0.obj" \ - "$(INTDIR)\arith1.obj" \ - "$(INTDIR)\arith2.obj" \ - "$(INTDIR)\arrays.obj" \ - "$(INTDIR)\attvar.obj" \ - "$(INTDIR)\bb.obj" \ - "$(INTDIR)\bignum.obj" \ - "$(INTDIR)\c_interface.obj" \ - "$(INTDIR)\cdmgr.obj" \ - "$(INTDIR)\cmppreds.obj" \ - "$(INTDIR)\compiler.obj" \ - "$(INTDIR)\computils.obj" \ - "$(INTDIR)\corout.obj" \ - "$(INTDIR)\dbase.obj" \ - "$(INTDIR)\depth_bound.obj" \ - "$(INTDIR)\errors.obj" \ - "$(INTDIR)\eval.obj" \ - "$(INTDIR)\exec.obj" \ - "$(INTDIR)\grow.obj" \ - "$(INTDIR)\heapgc.obj" \ - "$(INTDIR)\index.obj" \ - "$(INTDIR)\init.obj" \ - "$(INTDIR)\iopreds.obj" \ - "$(INTDIR)\load_aix.obj" \ - "$(INTDIR)\load_aout.obj" \ - "$(INTDIR)\load_coff.obj" \ - "$(INTDIR)\load_dl.obj" \ - "$(INTDIR)\load_dld.obj" \ - "$(INTDIR)\load_dll.obj" \ - "$(INTDIR)\load_foreign.obj" \ - "$(INTDIR)\load_none.obj" \ - "$(INTDIR)\load_shl.obj" \ - "$(INTDIR)\mavar.obj" \ - "$(INTDIR)\modules.obj" \ - "$(INTDIR)\opt.init.obj" \ - "$(INTDIR)\or.memory.obj" \ - "$(INTDIR)\opt.preds.obj" \ - "$(INTDIR)\or.cowengine.obj" \ - "$(INTDIR)\or.cut.obj" \ - "$(INTDIR)\or.engine.obj" \ - "$(INTDIR)\or.sbaengine.obj" \ - "$(INTDIR)\or.scheduler.obj" \ - "$(INTDIR)\other.obj" \ - "$(INTDIR)\parser.obj" \ - "$(INTDIR)\save.obj" \ - "$(INTDIR)\scanner.obj" \ - "$(INTDIR)\sort.obj" \ - "$(INTDIR)\stdpreds.obj" \ - "$(INTDIR)\sysbits.obj" \ - "$(INTDIR)\tab.completion.obj" \ - "$(INTDIR)\tab.tries.obj" \ - "$(INTDIR)\tracer.obj" \ - "$(INTDIR)\unify.obj" \ - "$(INTDIR)\userpreds.obj" \ - "$(INTDIR)\utilpreds.obj" \ - "$(INTDIR)\write.obj" \ - "$(INTDIR)\ypsocks.obj" \ - "$(INTDIR)\ypstdio.obj" - -"$(OUTDIR)\yapdll.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) - $(LINK32) @<< - $(LINK32_FLAGS) $(LINK32_OBJS) -<< - -!ENDIF - -.c{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.obj:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.c{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cpp{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - -.cxx{$(INTDIR)}.sbr:: - $(CPP) @<< - $(CPP_PROJ) $< -<< - - -!IF "$(NO_EXTERNAL_DEPS)" != "1" -!IF EXISTS("yapdll.dep") -!INCLUDE "yapdll.dep" -!ELSE -!MESSAGE Warning: cannot find "yapdll.dep" -!ENDIF -!ENDIF - - -!IF "$(CFG)" == "yapdll - Win32 Release" || "$(CFG)" == "yapdll - Win32 Debug" -SOURCE="\Yap\Yap-4.3.17\C\absmi.c" - -"$(INTDIR)\absmi.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\adtdefs.c" - -"$(INTDIR)\adtdefs.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\alloc.c" - -"$(INTDIR)\alloc.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\amasm.c" - -"$(INTDIR)\amasm.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\analyst.c" - -"$(INTDIR)\analyst.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\arith0.c" - -"$(INTDIR)\arith0.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\arith1.c" - -"$(INTDIR)\arith1.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\arith2.c" - -"$(INTDIR)\arith2.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\arrays.c" - -"$(INTDIR)\arrays.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\attvar.c" - -"$(INTDIR)\attvar.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\bb.c" - -"$(INTDIR)\bb.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\bignum.c" - -"$(INTDIR)\bignum.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\c_interface.c" - -"$(INTDIR)\c_interface.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\cdmgr.c" - -"$(INTDIR)\cdmgr.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\cmppreds.c" - -"$(INTDIR)\cmppreds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\compiler.c" - -"$(INTDIR)\compiler.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\computils.c" - -"$(INTDIR)\computils.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\corout.c" - -"$(INTDIR)\corout.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\dbase.c" - -"$(INTDIR)\dbase.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\depth_bound.c" - -"$(INTDIR)\depth_bound.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\errors.c" - -"$(INTDIR)\errors.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\eval.c" - -"$(INTDIR)\eval.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\exec.c" - -"$(INTDIR)\exec.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\grow.c" - -"$(INTDIR)\grow.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\heapgc.c" - -"$(INTDIR)\heapgc.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\index.c" - -"$(INTDIR)\index.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\init.c" - -"$(INTDIR)\init.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\iopreds.c" - -"$(INTDIR)\iopreds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_aix.c" - -"$(INTDIR)\load_aix.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_aout.c" - -"$(INTDIR)\load_aout.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_coff.c" - -"$(INTDIR)\load_coff.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_dl.c" - -"$(INTDIR)\load_dl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_dld.c" - -"$(INTDIR)\load_dld.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_dll.c" - -"$(INTDIR)\load_dll.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_foreign.c" - -"$(INTDIR)\load_foreign.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_none.c" - -"$(INTDIR)\load_none.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\load_shl.c" - -"$(INTDIR)\load_shl.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\mavar.c" - -"$(INTDIR)\mavar.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\modules.c" - -"$(INTDIR)\modules.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\opt.init.c" - -"$(INTDIR)\opt.init.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.memory.c" - -"$(INTDIR)\or.memory.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\opt.preds.c" - -"$(INTDIR)\opt.preds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.cowengine.c" - -"$(INTDIR)\or.cowengine.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.cut.c" - -"$(INTDIR)\or.cut.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.engine.c" - -"$(INTDIR)\or.engine.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.sbaengine.c" - -"$(INTDIR)\or.sbaengine.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\or.scheduler.c" - -"$(INTDIR)\or.scheduler.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\other.c" - -"$(INTDIR)\other.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\parser.c" - -"$(INTDIR)\parser.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\save.c" - -"$(INTDIR)\save.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\scanner.c" - -"$(INTDIR)\scanner.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\sort.c" - -"$(INTDIR)\sort.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\stdpreds.c" - -"$(INTDIR)\stdpreds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\sysbits.c" - -"$(INTDIR)\sysbits.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\tab.completion.c" - -"$(INTDIR)\tab.completion.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\OPTYap\tab.tries.c" - -"$(INTDIR)\tab.tries.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\tracer.c" - -"$(INTDIR)\tracer.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\unify.c" - -"$(INTDIR)\unify.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\userpreds.c" - -"$(INTDIR)\userpreds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\utilpreds.c" - -"$(INTDIR)\utilpreds.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\write.c" - -"$(INTDIR)\write.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\ypsocks.c" - -"$(INTDIR)\ypsocks.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -SOURCE="\Yap\Yap-4.3.17\C\ypstdio.c" - -"$(INTDIR)\ypstdio.obj" : $(SOURCE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - - -!ENDIF -