[m-rev.] diff/for review: library changes from mode_constraints branch (part 3)
Zoltan Somogyi
zs at cs.mu.OZ.AU
Wed Dec 15 16:35:53 AEDT 2004
Index: robdd/bryant.h
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/bryant.h,v
retrieving revision 1.1
diff -u -r1.1 bryant.h
--- robdd/bryant.h 10 Mar 2000 05:17:21 -0000 1.1
+++ robdd/bryant.h 31 Aug 2003 14:47:05 -0000
@@ -1,77 +1,105 @@
+/*
+** Copyright (C) 1995, 2001-2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : bryant.h
- RCS : $Id: bryant.h,v 1.1 2000/03/10 05:17:21 dmo Exp $
Author : Peter Schachte
Origin : Sun Jul 30 15:08:53 1995
Purpose : header file for users of bryant.c ROBDD package
- Copyright: © 1995 Peter Schachte. All rights reserved.
*****************************************************************/
+#ifndef MERCURY_BRYANT_H
+#define MERCURY_BRYANT_H
+
#if defined(QUINTUS)
-#include <quintus/quintus.h>
+ #include <quintus/quintus.h>
#endif
#include <string.h>
#include <assert.h>
#include "var.h"
-
+#if defined(CONSERVATIVE_GC)
+ #define GC_I_HIDE_POINTERS
+ #include "gc.h"
+ #define MR_ROBDD_BRYANT_CONSERVATIVE_GC
+ #define MR_ROBDD_HIDE_POINTER(p) HIDE_POINTER(p)
+ #define MR_ROBDD_REVEAL_POINTER(p) REVEAL_POINTER(p)
+#else
+ #define MR_ROBDD_HIDE_POINTER(p) (p)
+ #define MR_ROBDD_REVEAL_POINTER(p) (p)
+#endif
/*****************************************************************
Tunable Parameters
*****************************************************************/
#if defined(AMIGA)
-/* number of buckets in unique table */
-#define UNIQUE_TABLE_SIZE 4096
+ /* number of buckets in unique table */
+ #define MR_ROBDD_UNIQUE_TABLE_SIZE 4096
-/* number of entries in ite computed table */
-#define ITE_COMPUTED_TABLE_SIZE 4096
+ /* number of entries in MR_ROBDD_ite computed table */
+ #define MR_ROBDD_ITE_COMPUTED_TABLE_SIZE 4096
-/* number of entries in computed table for binary functions (and, or) */
-#define BINARY_CACHE_SIZE 4096
+ /* number of entries in computed table for binary functions (and, or) */
+ #define MR_ROBDD_BINARY_CACHE_SIZE 4096
-/* allocate bryant nodes this many at a time */
-#define POOL_SIZE 4096
+ /* allocate bryant nodes this many at a time */
+ #define MR_ROBDD_POOL_SIZE 4096
#else
-/* number of buckets in unique table */
-#define UNIQUE_TABLE_SIZE 65537 /* first prime number > 64K */
+ /* number of buckets in unique table */
+ #define MR_ROBDD_UNIQUE_TABLE_SIZE 65537 /* first prime number > 64K */
+
+ /* number of entries in MR_ROBDD_ite computed table */
+ #define MR_ROBDD_COMPUTED_TABLE_SIZE 16411 /* first prime number > 16K */
-/* number of entries in ite computed table */
-#define COMPUTED_TABLE_SIZE 16411 /* first prime number > 16K */
+ /* allocate bryant nodes this many at a time */
+ #define MR_ROBDD_POOL_SIZE 65535
-/* allocate bryant nodes this many at a time */
-#define POOL_SIZE 65535
#endif
/* number of bits in an unsigned long, and the log (base 2) of that */
-#define BITS_PER_WORD 32
-#define LOG_BITS_PER_WORD 5
+#define MR_ROBDD_BITS_PER_WORD 32
+#define MR_ROBDD_LOG_BITS_PER_WORD 5
-/* number of bits in an unsigned char, and a bitmask the size of a char */
-#define BITS_PER_CHAR 8
-#define CHAR_MASK ((1<<BITS_PER_CHAR)-1)
+/* number of bits in an unsigned char, and a MR_ROBDD_bitmask the size of a char */
+#define MR_ROBDD_BITS_PER_CHAR 8
+#define MR_ROBDD_CHAR_MASK ((1<<MR_ROBDD_BITS_PER_CHAR)-1)
-#define INTCAST(p) ((size_t)(p))
+#define MR_ROBDD_INTCAST(p) ((size_t)(p))
/****************************************************************
Bryant Graph (ROBDD) Node Data Structure
****************************************************************/
-typedef struct graphnode {
+typedef struct MR_ROBDD_graphnode {
int value; /* contains name of variable */
- struct graphnode *tr; /* true (then) child */
- struct graphnode *fa; /* false (else) child */
- struct graphnode *unique; /* pointer to next elt in unique table */
-} node, type;
-
-/* zero and one are terminal nodes (sinks). */
-#define zero ((node *) 0)
-#define one ((node *) 1)
-#define nonterminal ((node *) 2) /* only used by ite_constant */
+ struct MR_ROBDD_graphnode *tr; /* true (then) child */
+ struct MR_ROBDD_graphnode *fa; /* false (else) child */
+#if defined(MR_ROBDD_BRYANT_CONSERVATIVE_GC)
+ GC_hidden_pointer unique; /* pointer to next elt in unique table */
+ GC_hidden_pointer uprev; /* pointer to the prev elt in unique table */
+#else
+ struct MR_ROBDD_graphnode *unique; /* pointer to next elt in unique table */
+#endif
+} MR_ROBDD_node, MR_ROBDD_type;
-#define IS_TERMINAL(n) (INTCAST(n) <= 1)
+#if defined(MR_ROBDD_BRYANT_CONSERVATIVE_GC)
+ typedef GC_hidden_pointer MR_ROBDD_BRYANT_hidden_node_pointer;
+#else
+ typedef MR_ROBDD_node *MR_ROBDD_BRYANT_hidden_node_pointer;
+#endif
+
+/* MR_ROBDD_zero and MR_ROBDD_one are terminal nodes (sinks). */
+#define MR_ROBDD_zero ((MR_ROBDD_node *) 0)
+#define MR_ROBDD_one ((MR_ROBDD_node *) 1)
+#define MR_ROBDD_nonterminal ((MR_ROBDD_node *) 2) /* only used by MR_ROBDD_ite_constant */
+
+#define MR_ROBDD_IS_TERMINAL(n) (MR_ROBDD_INTCAST(n) <= 1)
/****************************************************************
Bit Set Data Structure
@@ -79,9 +107,9 @@
/* array must put it into a struct because arrays are pretty feeble in C */
typedef struct {
- unsigned long bits[1+(MAXVAR-1)/BITS_PER_WORD];
-} bitset;
-typedef unsigned long bitmask;
+ unsigned long bits[1+(MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD];
+} MR_ROBDD_bitset;
+typedef unsigned long MR_ROBDD_bitmask;
/* Operations to add, remove, toggle, and check for membership of a
* single element. The first two of these are used to find the word
@@ -90,32 +118,32 @@
* I'd code the last 4 of these in terms of the first two, so that
* they would each take only 2 arguments. But I don't.
*/
-#define BITSET_WORD(elt) ((elt)>>LOG_BITS_PER_WORD)
-#define BITSET_MASK(elt) (1 << ((elt)&(BITS_PER_WORD-1)))
-#define BITSET_CLEAR(set) memset(&set, 0, sizeof(bitset))
-#define BITSET_UNIVERSE(set) memset(&set, ~0, sizeof(bitset))
-#define BITSET_MEMBER(set,word,mask) (0!=((set).bits[(word)]&(mask)))
-#define BITSET_ADD(set,word,mask) (set).bits[(word)] |= (mask)
-#define BITSET_REMOVE(set,word,mask) (set).bits[(word)] &= ~(mask)
-#define BITSET_TOGGLE(set,word,mask) (set).bits[(word)] ^= (mask)
+#define MR_ROBDD_BITSET_WORD(elt) ((elt)>>MR_ROBDD_LOG_BITS_PER_WORD)
+#define MR_ROBDD_BITSET_MASK(elt) (1 << ((elt)&(MR_ROBDD_BITS_PER_WORD-1)))
+#define MR_ROBDD_BITSET_CLEAR(set) memset(&set, 0, sizeof(MR_ROBDD_bitset))
+#define MR_ROBDD_BITSET_UNIVERSE(set) memset(&set, ~0, sizeof(MR_ROBDD_bitset))
+#define MR_ROBDD_BITSET_MEMBER(set,word,mask) (0!=((set).bits[(word)]&(mask)))
+#define MR_ROBDD_BITSET_ADD(set,word,mask) (set).bits[(word)] |= (mask)
+#define MR_ROBDD_BITSET_REMOVE(set,word,mask) (set).bits[(word)] &= ~(mask)
+#define MR_ROBDD_BITSET_TOGGLE(set,word,mask) (set).bits[(word)] ^= (mask)
/* important bit masks */
-#if defined(NO_CHEAP_SHIFT) && BITS_PER_WORD == 32
-#define FOLLOWING_BITS(n) following_bits[n]
-#define PRECEDING_BITS(n) preceding_bits[n]
-#else /* ! NO_CHEAP_SHIFT */
-#define FOLLOWING_BITS(n) ((~0UL)<<(n))
-#define PRECEDING_BITS(n) ((~0UL)>>(BITS_PER_WORD-1-(n)))
-#endif /* NO_CHEAP_SHIFT */
-
-#define BITSET_IS_MEMBER(set,n) \
- BITSET_MEMBER(set, BITSET_WORD(n), BITSET_MASK(n))
-#define BITSET_ADD_ELEMENT(set,n) \
- BITSET_ADD(set, BITSET_WORD(n), BITSET_MASK(n))
-#define BITSET_REMOVE_ELEMENT(set,n) \
- BITSET_REMOVE(set, BITSET_WORD(n), BITSET_MASK(n))
-#define BITSET_TOGGLE_ELEMENT(set,n) \
- BITSET_TOGGLE(set, BITSET_WORD(n), BITSET_MASK(n))
+#if defined(MR_ROBDD_NO_CHEAP_SHIFT) && MR_ROBDD_BITS_PER_WORD == 32
+ #define MR_ROBDD_FOLLOWING_BITS(n) MR_ROBDD_following_bits[n]
+ #define MR_ROBDD_PRECEDING_BITS(n) MR_ROBDD_preceding_bits[n]
+#else /* ! MR_ROBDD_NO_CHEAP_SHIFT */
+ #define MR_ROBDD_FOLLOWING_BITS(n) ((~0UL)<<(n))
+ #define MR_ROBDD_PRECEDING_BITS(n) ((~0UL)>>(MR_ROBDD_BITS_PER_WORD-1-(n)))
+#endif /* MR_ROBDD_NO_CHEAP_SHIFT */
+
+#define MR_ROBDD_BITSET_IS_MEMBER(set,n) \
+ MR_ROBDD_BITSET_MEMBER(set, MR_ROBDD_BITSET_WORD(n), MR_ROBDD_BITSET_MASK(n))
+#define MR_ROBDD_BITSET_ADD_ELEMENT(set,n) \
+ MR_ROBDD_BITSET_ADD(set, MR_ROBDD_BITSET_WORD(n), MR_ROBDD_BITSET_MASK(n))
+#define MR_ROBDD_BITSET_REMOVE_ELEMENT(set,n) \
+ MR_ROBDD_BITSET_REMOVE(set, MR_ROBDD_BITSET_WORD(n), MR_ROBDD_BITSET_MASK(n))
+#define MR_ROBDD_BITSET_TOGGLE_ELEMENT(set,n) \
+ MR_ROBDD_BITSET_TOGGLE(set, MR_ROBDD_BITSET_WORD(n), MR_ROBDD_BITSET_MASK(n))
/* Macros for operations on sets. These are destructive: the first
* argument is modified to hold the result. The i parameter is just a
@@ -123,118 +151,117 @@
* should probably be __inline functions, but I don't trust that,
* either. Portability, you know.
*/
-#define BITSET_INTERSECTION(set,set1,set2) \
- do { int i; for (i=0; i<=((MAXVAR-1)/BITS_PER_WORD); ++i) \
+#define MR_ROBDD_BITSET_INTERSECTION(set,set1,set2) \
+ do { int i; for (i=0; i<=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD); ++i) \
(set).bits[i] = (set1).bits[i] & (set2).bits[i];} while (0)
-#define BITSET_DIFFERENCE(set,set1,set2) \
- do { int i; for (i=0; i<=((MAXVAR-1)/BITS_PER_WORD); ++i) \
+#define MR_ROBDD_BITSET_DIFFERENCE(set,set1,set2) \
+ do { int i; for (i=0; i<=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD); ++i) \
(set).bits[i] = (set1).bits[i] & ~((set2).bits[i]); } while (0)
-#define BITSET_UNION(set,set1,set2) \
- do { int i; for (i=0; i<=((MAXVAR-1)/BITS_PER_WORD); ++i) \
+#define MR_ROBDD_BITSET_UNION(set,set1,set2) \
+ do { int i; for (i=0; i<=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD); ++i) \
(set).bits[i] = (set1).bits[i] | (set2).bits[i]; } while (0)
-#define BITSET_EXCLUSIVE_UNION(set,set1,set2) \
- do { int i; for (i=0; i<=((MAXVAR-1)/BITS_PER_WORD); ++i) \
+#define MR_ROBDD_BITSET_EXCLUSIVE_UNION(set,set1,set2) \
+ do { int i; for (i=0; i<=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD); ++i) \
(set).bits[i] = (set1).bits[i] ^ (set2).bits[i]; } while (0)
-#define BITSET_EQUAL(set1, set2) bitset_equal(&set1, &set2)
-#define BITSET_DISJOINT(set1, set2) bitset_disjoint(&set1, &set2)
-#define BITSET_SUBSET(set1, set2) bitset_subset(&set1, &set2)
-#define BITSET_EMPTY(set) bitset_empty(&set)
-
+#define MR_ROBDD_BITSET_EQUAL(set1, set2) MR_ROBDD_bitset_equal(&set1, &set2)
+#define MR_ROBDD_BITSET_DISJOINT(set1, set2) MR_ROBDD_bitset_disjoint(&set1, &set2)
+#define MR_ROBDD_BITSET_SUBSET(set1, set2) MR_ROBDD_bitset_subset(&set1, &set2)
+#define MR_ROBDD_BITSET_EMPTY(set) MR_ROBDD_bitset_empty(&set)
/* Successor and predecessor for possible set elements. These are
* expressions that are false if there are no more possible elements.
*/
-#define NEXT_POSSIBLE_ELEMENT(var,word,mask) \
- (++var<MAXVAR && ((mask<<=1) || (mask=1,++word)))
-#define PREV_POSSIBLE_ELEMENT(var,word,mask) \
- (--var>=0 && ((mask>>=1) || (mask=1<<(BITS_PER_WORD-1),--word)))
-
+#define MR_ROBDD_NEXT_POSSIBLE_ELEMENT(var,word,mask) \
+ (++var<MR_ROBDD_MAXVAR && ((mask<<=1) || (mask=1,++word)))
+#define MR_ROBDD_PREV_POSSIBLE_ELEMENT(var,word,mask) \
+ (--var>=0 && ((mask>>=1) || (mask=1<<(MR_ROBDD_BITS_PER_WORD-1),--word)))
/* Enumerating sets. Use these like for loops: follow the macro call with
* a statement (or an open brace, some statements, and a close brace). The
* first three iterate from low to high, the last three from high to low.
*/
-#define FOREACH_POSSIBLE_ELEMENT(var,word,mask) \
- for (var=0,word=0,mask=1; var<MAXVAR; \
- (void) NEXT_POSSIBLE_ELEMENT(var,word,mask))
-#define FOREACH_ELEMENT(set,var,word,mask) \
- for (var=0,word=0,mask=1; next_element(&set,&var,&word,&mask); \
- (void) NEXT_POSSIBLE_ELEMENT(var,word,mask))
-#define FOREACH_NONELEMENT(set,var,word,mask) \
- for (var=0,word=0,mask=1; next_nonelement(&set,&var,&word,&mask); \
- (void) NEXT_POSSIBLE_ELEMENT(var,word,mask))
-
-#define REV_FOREACH_POSSIBLE_ELEMENT(var,word,mask) \
- for (var=MAXVAR-1,word=((MAXVAR-1)/BITS_PER_WORD),mask=1<<(BITS_PER_WORD-1); \
- var>0; (void) PREV_POSSIBLE_ELEMENT(var,word,mask))
-#define REV_FOREACH_ELEMENT(set,var,word,mask) \
- for (var=MAXVAR-1,word=((MAXVAR-1)/BITS_PER_WORD),mask=1<<(BITS_PER_WORD-1); \
- prev_element(&set,&var,&word,&mask); \
- (void) PREV_POSSIBLE_ELEMENT(var,word,mask))
-#define REV_FOREACH_NONELEMENT(set,var,word,mask) \
- for (var=MAXVAR-1,word=((MAXVAR-1)/BITS_PER_WORD),mask=1<<(BITS_PER_WORD-1); \
- prev_nonelement(&set,&var,&word,&mask); \
- (void) PREV_POSSIBLE_ELEMENT(var,word,mask))
-
+#define MR_ROBDD_FOREACH_POSSIBLE_ELEMENT(var,word,mask) \
+ for (var=0,word=0,mask=1; var<MR_ROBDD_MAXVAR; \
+ (void) MR_ROBDD_NEXT_POSSIBLE_ELEMENT(var,word,mask))
+#define MR_ROBDD_FOREACH_ELEMENT(set,var,word,mask) \
+ for (var=0,word=0,mask=1; MR_ROBDD_next_element(&set,&var,&word,&mask); \
+ (void) MR_ROBDD_NEXT_POSSIBLE_ELEMENT(var,word,mask))
+#define MR_ROBDD_FOREACH_NONELEMENT(set,var,word,mask) \
+ for (var=0,word=0,mask=1; MR_ROBDD_next_nonelement(&set,&var,&word,&mask); \
+ (void) MR_ROBDD_NEXT_POSSIBLE_ELEMENT(var,word,mask))
+
+#define MR_ROBDD_REV_FOREACH_POSSIBLE_ELEMENT(var,word,mask) \
+ for (var=MR_ROBDD_MAXVAR-1,word=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD),mask=1<<(MR_ROBDD_BITS_PER_WORD-1); \
+ var>0; (void) MR_ROBDD_PREV_POSSIBLE_ELEMENT(var,word,mask))
+#define MR_ROBDD_REV_FOREACH_ELEMENT(set,var,word,mask) \
+ for (var=MR_ROBDD_MAXVAR-1,word=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD),mask=1<<(MR_ROBDD_BITS_PER_WORD-1); \
+ MR_ROBDD_prev_element(&set,&var,&word,&mask); \
+ (void) MR_ROBDD_PREV_POSSIBLE_ELEMENT(var,word,mask))
+#define MR_ROBDD_REV_FOREACH_NONELEMENT(set,var,word,mask) \
+ for (var=MR_ROBDD_MAXVAR-1,word=((MR_ROBDD_MAXVAR-1)/MR_ROBDD_BITS_PER_WORD),mask=1<<(MR_ROBDD_BITS_PER_WORD-1); \
+ MR_ROBDD_prev_nonelement(&set,&var,&word,&mask); \
+ (void) MR_ROBDD_PREV_POSSIBLE_ELEMENT(var,word,mask))
/*****************************************************************
Other Definitions
*****************************************************************/
+#ifndef MR_TRUE
+ #define MR_TRUE 1
+#endif
+#ifndef MR_FALSE
+ #define MR_FALSE 0
+#endif
-#define TRUE 1
-#define FALSE 0
+/* sneaky trick to make MR_ROBDD_NEW the default */
+#if !defined(MR_ROBDD_USE_RGLB) \
+ && !defined(MR_ROBDD_USE_THRESH) \
+ && !defined(MR_ROBDD_OLD) \
+ && !defined(MR_ROBDD_NAIVE) \
+ && !defined(MR_ROBDD_NEW)
+ #define MR_ROBDD_NEW
+#endif
-/* sneaky trick to make NEW the default */
-#if !defined(USE_RGLB) \
- && !defined(USE_THRESH) \
- && !defined(OLD) \
- && !defined(NAIVE) \
- && !defined(NEW)
-#define NEW
-#endif
-
-#if defined(NEW)
-#define USE_RGLB
-#endif /* NEW */
-
-#if defined(USE_RGLB)
-#define USE_THRESH
-#endif /* USE_RGLB */
-
-#if defined(USE_THRESH)
-#define OLD
-#if !defined(NEW)
-#define USE_ITE_CONSTANT /* for var_entailed */
-#endif /* !NEW */
-#endif /* USE_THRESH */
-
-#if defined(NEW)
-#define WHICH "NEW"
-#elif defined(USE_RGLB)
-#define WHICH "RGLB"
-#elif defined(USE_THRESH)
-#define WHICH "THRESH"
-#elif defined(OLD)
-#define WHICH "OLD"
-#elif defined(NAIVE)
-#define WHICH "NAIVE"
+#if defined(MR_ROBDD_NEW)
+ #define MR_ROBDD_USE_RGLB
+#endif /* MR_ROBDD_NEW */
+
+#if defined(MR_ROBDD_USE_RGLB)
+ #define MR_ROBDD_USE_THRESH
+#endif /* MR_ROBDD_USE_RGLB */
+
+#if defined(MR_ROBDD_USE_THRESH)
+ #define MR_ROBDD_OLD
+ #if !defined(MR_ROBDD_NEW)
+ #define MR_ROBDD_USE_ITE_CONSTANT /* for MR_ROBDD_var_entailed */
+ #endif /* !MR_ROBDD_NEW */
+#endif /* MR_ROBDD_USE_THRESH */
+
+#if defined(MR_ROBDD_NEW)
+ #define MR_ROBDD_WHICH "MR_ROBDD_NEW"
+#elif defined(MR_ROBDD_USE_RGLB)
+ #define MR_ROBDD_WHICH "RGLB"
+#elif defined(MR_ROBDD_USE_THRESH)
+ #define MR_ROBDD_WHICH "THRESH"
+#elif defined(MR_ROBDD_OLD)
+ #define MR_ROBDD_WHICH "MR_ROBDD_OLD"
+#elif defined(MR_ROBDD_NAIVE)
+ #define MR_ROBDD_WHICH "MR_ROBDD_NAIVE"
#else
-#error "must define one of NEW, USE_RGLB, USE_THRESH, OLD, or NAIVE."
+ #error "must define MR_ROBDD_one of MR_ROBDD_NEW, MR_ROBDD_USE_RGLB, MR_ROBDD_USE_THRESH, MR_ROBDD_OLD, or MR_ROBDD_NAIVE."
#endif
-
/*****************************************************************
Public Data
*****************************************************************/
-extern unsigned char first_one_bit[256];
-extern unsigned char last_one_bit[256];
+extern unsigned char MR_ROBDD_first_one_bit[256];
+extern unsigned char MR_ROBDD_last_one_bit[256];
-#if defined(NO_CHEAP_SHIFT) && BITS_PER_WORD == 32
-extern bitmask following_bits[BITS_PER_WORD];
-extern bitmask preceding_bits[BITS_PER_WORD];
+#if defined(MR_ROBDD_NO_CHEAP_SHIFT) && MR_ROBDD_BITS_PER_WORD == 32
+ extern MR_ROBDD_bitmask MR_ROBDD_following_bits[MR_ROBDD_BITS_PER_WORD];
+ extern MR_ROBDD_bitmask MR_ROBDD_preceding_bits[MR_ROBDD_BITS_PER_WORD];
#endif
/*****************************************************************
@@ -242,164 +269,181 @@
*****************************************************************/
/* this must be called before any other function in this file */
-extern void initRep(void);
+extern void MR_ROBDD_initRep(void);
+
+extern void MR_ROBDD_init_caches(void);
/* this should be called when you're done calling functions in this file */
/* to clean up memory used by ROBDDs. After calling this, you must call */
/* InitRep() again before calling any other functions in this file */
-extern void concludeRep(void);
+extern void MR_ROBDD_concludeRep(void);
+/* the basic make a MR_ROBDD_node or return an existing MR_ROBDD_node operation */
+extern MR_ROBDD_node *MR_ROBDD_make_node(int var, MR_ROBDD_node *tr, MR_ROBDD_node *fa);
-/* the basic make a node or return an existing node operation */
-extern node *make_node(int var, node *tr, node *fa);
-
-/* returns one (the Boolean function true) */
-extern node *trueVar(void);
-/* returns zero (the Boolean function false) */
-extern node *falseVar(void);
+/* returns MR_ROBDD_one (the Boolean function true) */
+extern MR_ROBDD_node *MR_ROBDD_trueVar(void);
+/* returns MR_ROBDD_zero (the Boolean function false) */
+extern MR_ROBDD_node *MR_ROBDD_falseVar(void);
/* returns var, as an ROBDD. */
-extern node *variableRep(int var);
+extern MR_ROBDD_node *MR_ROBDD_variableRep(int var);
+
+/* if then else algorithm */
+extern MR_ROBDD_node *MR_ROBDD_ite(MR_ROBDD_node *f, MR_ROBDD_node *g, MR_ROBDD_node *h);
+
+/* This is sort of an "approximate MR_ROBDD_ite()." It returns MR_ROBDD_zero or MR_ROBDD_one if
+** that's what MR_ROBDD_ite() would do. Otherwise it just returns the
+** pseudo-MR_ROBDD_node `MR_ROBDD_nonterminal' or some real MR_ROBDD_node. In any case, it does
+** not create any new nodes.
+*/
+#ifdef MR_ROBDD_USE_ITE_CONSTANT
+ extern MR_ROBDD_node *MR_ROBDD_ite_constant(MR_ROBDD_node *f,MR_ROBDD_node *g,MR_ROBDD_node *h);
+#endif
+extern MR_ROBDD_node *MR_ROBDD_ite_var(int f, MR_ROBDD_node *g, MR_ROBDD_node *h);
/* returns a \wedge b */
-extern node *glb(node *a, node *b);
+extern MR_ROBDD_node *MR_ROBDD_glb(MR_ROBDD_node *a, MR_ROBDD_node *b);
/* returns a \vee b */
-extern node *lub(node *a, node *b);
+extern MR_ROBDD_node *MR_ROBDD_lub(MR_ROBDD_node *a, MR_ROBDD_node *b);
/* returns a \rightarrow b */
-extern node *implies(node *a, node *b);
+extern MR_ROBDD_node *MR_ROBDD_implies(MR_ROBDD_node *a, MR_ROBDD_node *b);
/* returns \exists c . a */
-/* extern node *restrict(int c, node *a); */
+extern MR_ROBDD_node *MR_ROBDD_restrict(int c, MR_ROBDD_node *f);
/* returns \bigglb_{0 \leq i \leq n} array[i] */
-extern node *glb_array(int n, int arr[]);
+extern MR_ROBDD_node *MR_ROBDD_glb_array(int n, int arr[]);
/* returns a with variable o renamed to n */
-extern node *changename(int o, int n, node *a);
+extern MR_ROBDD_node *changename(int o, int n, MR_ROBDD_node *a);
/* returns a with variable 1 renamed to v1, 2 renamed to v2, ... n renamed */
/* to v_n. Here n is the number of variables to rename */
-extern node *renameList(node *a, int n, int v1, int v2, int v3, int v4, int v5,
+extern MR_ROBDD_node *renameList(MR_ROBDD_node *a, int n, int v1, int v2, int v3, int v4, int v5,
int v6, int v7, int v8, int v9, int v10, int v11, int v12,
int v13, int v14, int v15, int v16);
/* returns a with variable v1 renamed to 1, v2 renamed to 2, ... v_n renamed */
/* to n. Here n is the number of variables to rename */
-extern node *reverseRenameList(node *a, int n, int v1, int v2, int v3, int v4,
+extern MR_ROBDD_node *reverseRenameList(MR_ROBDD_node *a, int n, int v1, int v2, int v3, int v4,
int v5, int v6, int v7, int v8, int v9, int v10,
int v11, int v12, int v13, int v14, int v15, int v16);
/* returns a with variable 0 renamed to mapping[0], 1 renamed to */
/* mapping[1], ... count renamed to mapping[count]. */
-extern node *renameArray(node *in, int count, int mappping[]);
+extern MR_ROBDD_node *MR_ROBDD_renameArray(MR_ROBDD_node *in, int count, int mappping[]);
/* returns a with variable mapping[0] renamed to 0, mapping[1] renamed to */
/* 1, ... mapping[count] renamed to count. */
-extern node *reverseRenameArray(node *in, int count, int rev_mappping[]);
+extern MR_ROBDD_node *MR_ROBDD_reverseRenameArray(MR_ROBDD_node *in, int count, int rev_mappping[]);
/* returns v0 \leftrightarrow \bigwedge_{i=0}^{n} arr[i] */
-extern node *iff_conj_array(int v0, int n, int arr[]);
+extern MR_ROBDD_node *MR_ROBDD_iff_conj_array(int v0, int n, int arr[]);
/* returns v0 \leftrightarrow \bigwedge_{i=0}^{n} v_i */
-extern node *iff_conj(int v0, int n, int v1, int v2, int v3, int v4, int v5,
+extern MR_ROBDD_node *iff_conj(int v0, int n, int v1, int v2, int v3, int v4, int v5,
int v6, int v7, int v8, int v9, int v10, int v11,
int v12, int v13, int v14, int v15, int v16);
-/* returns non-zero iff f entails variable number var */
-extern int var_entailed(node *f, int var);
+/* returns non-MR_ROBDD_zero iff f entails variable number var */
+extern int MR_ROBDD_var_entailed(MR_ROBDD_node *f, int var);
/* Finds the smallest n such that n \in set and n \geq *var. word and */
-/* mask must be as set by BITSET_WORD(*var) and BITSET_MASK(*var), */
+/* mask must be as set by MR_ROBDD_BITSET_WORD(*var) and MR_ROBDD_BITSET_MASK(*var), */
/* respectively. The resulting n is placed in *var, and *word and *mask */
-/* are updated correspondingly. Returns TRUE iff there is such an n. */
-int next_element(bitset *set, int *var, int *word, bitmask *mask);
+/* are updated correspondingly. Returns MR_TRUE iff there is such an n. */
+int MR_ROBDD_next_element(MR_ROBDD_bitset *set, int *var, int *word, MR_ROBDD_bitmask *mask);
/* Finds the largest n such that n \in set and n \leq *var. word and */
-/* mask must be as set by BITSET_WORD(*var) and BITSET_MASK(*var), */
+/* mask must be as set by MR_ROBDD_BITSET_WORD(*var) and MR_ROBDD_BITSET_MASK(*var), */
/* respectively. The resulting n is placed in *var, and *word and *mask */
-/* are updated correspondingly. Returns TRUE iff there is such an n. */
-int prev_element(bitset *set, int *var, int *word, bitmask *mask);
+/* are updated correspondingly. Returns MR_TRUE iff there is such an n. */
+int MR_ROBDD_prev_element(MR_ROBDD_bitset *set, int *var, int *word, MR_ROBDD_bitmask *mask);
/* Finds the smallest n such that n \not \in set and n \geq *var. word and */
-/* mask must be as set by BITSET_WORD(*var) and BITSET_MASK(*var), */
+/* mask must be as set by MR_ROBDD_BITSET_WORD(*var) and MR_ROBDD_BITSET_MASK(*var), */
/* respectively. The resulting n is placed in *var, and *word and *mask */
-/* are updated correspondingly. Returns TRUE iff there is such an n. */
-int next_nonelement(bitset *set, int *var, int *word, bitmask *mask);
+/* are updated correspondingly. Returns MR_TRUE iff there is such an n. */
+int MR_ROBDD_next_nonelement(MR_ROBDD_bitset *set, int *var, int *word, MR_ROBDD_bitmask *mask);
/* Finds the largest n such that n \not \in set and n \leq *var. word and */
-/* mask must be as set by BITSET_WORD(*var) and BITSET_MASK(*var), */
+/* mask must be as set by MR_ROBDD_BITSET_WORD(*var) and MR_ROBDD_BITSET_MASK(*var), */
/* respectively. The resulting n is placed in *var, and *word and *mask */
-/* are updated correspondingly. Returns TRUE iff there is such an n. */
-int prev_nonelement(bitset *set, int *var, int *word, bitmask *mask);
+/* are updated correspondingly. Returns MR_TRUE iff there is such an n. */
+int MR_ROBDD_prev_nonelement(MR_ROBDD_bitset *set, int *var, int *word, MR_ROBDD_bitmask *mask);
+#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
-#if !defined(USE_THRESH) && !defined(RESTRICT_SET)
+ /* returns a with all variables lo \leq v \leq hi restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_restrictThresh(int lo, int hi, MR_ROBDD_node *a);
-/* returns a with all variables lo \leq v \leq hi restricted away */
-extern node *restrictThresh(int lo, int hi, node *a);
+ /* returns f \wedge g with all variables lo \leq v \leq hi restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_restricted_glb(int lo, int hi, MR_ROBDD_node *f, MR_ROBDD_node *g);
-/* returns f \wedge g with all variables lo \leq v \leq hi restricted away */
-extern node *restricted_glb(int lo, int hi, node *f, node *g);
-
-/* computes g = f with variable 0 renamed to mapping[0], 1 renamed to */
-/* mapping[1], ... count renamed to mapping[count]. Returns context */
-/* \wedge g with all variables lo \leq v \leq hi restricted away */
-extern node *abstract_exit(node *context, node *f, int count, int mapping[],
+ /* computes g = f with variable 0 renamed to mapping[0], 1 renamed to */
+ /* mapping[1], ... count renamed to mapping[count]. Returns context */
+ /* \wedge g with all variables lo \leq v \leq hi restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_abstract_exit(MR_ROBDD_node *context, MR_ROBDD_node *f, int count, int mapping[],
+ int lo, int hi);
+ /* returns f \wedge (v0 \leftrightarrow \bigwedge_{i=0}^{n} arr[i]), */
+ /* with all variables lo \leq v \leq hi restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_abstract_unify(MR_ROBDD_node *f, int v0, int n, int arr[],
int lo, int hi);
-/* returns f \wedge (v0 \leftrightarrow \bigwedge_{i=0}^{n} arr[i]), */
-/* with all variables lo \leq v \leq hi restricted away */
-extern node *abstract_unify(node *f, int v0, int n, int arr[], int lo, int hi);
-#else /* USE_THRESH || RESTRICT_SET */
-
-/* returns a with all variables lo \leq v \leq hi restricted away */
-extern node *restrictThresh(int c,node *a);
-
-/* returns f \wedge g with all variables v \geq c restricted away */
-extern node *restricted_glb(int c, node *f, node *g);
-
-/* computes g = f with variable 0 renamed to mapping[0], 1 renamed to */
-/* mapping[1], ... count renamed to mapping[count]. Returns context */
-/* \wedge g with all variables v \geq thresh restricted away */
-extern node *abstract_exit(node *context, node *f, int count, int mapping[],
+
+#else /* MR_ROBDD_USE_THRESH || MR_ROBDD_RESTRICT_SET */
+
+ /* returns a with all variables lo \leq v \leq hi restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_restrictThresh(int c,MR_ROBDD_node *a);
+
+ /* returns f \wedge g with all variables v \geq c restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_restricted_glb(int c, MR_ROBDD_node *f, MR_ROBDD_node *g);
+
+ /* computes g = f with variable 0 renamed to mapping[0], 1 renamed to */
+ /* mapping[1], ... count renamed to mapping[count]. Returns context */
+ /* \wedge g with all variables v \geq thresh restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_abstract_exit(MR_ROBDD_node *context, MR_ROBDD_node *f, int count, int mapping[],
int thresh);
-/* returns f \wedge (v0 \leftrightarrow \bigwedge_{i=0}^{n} arr[i]), */
-/* with all variables v \eq thresh restricted away */
-extern node *abstract_unify(node *f, int v0, int n, int arr[], int thresh);
-#endif /* !OLD || USE_THRESH */
-
-#if !defined(NEW)
-/* returns the set of all v entailed by f where v \leq topvar */
-extern bitset *vars_entailed(node *f, int topvar);
-#else /* NEW */
-/* returns the set of all v entailed by f */
-extern bitset *vars_entailed(node *f);
-#endif /* NEW */
+ /* returns f \wedge (v0 \leftrightarrow \bigwedge_{i=0}^{n} arr[i]), */
+ /* with all variables v \eq thresh restricted away */
+ extern MR_ROBDD_node *MR_ROBDD_abstract_unify(MR_ROBDD_node *f, int v0, int n, int arr[], int thresh);
+
+#endif /* !MR_ROBDD_OLD || MR_ROBDD_USE_THRESH */
+
+#if !defined(MR_ROBDD_NEW)
+ /* returns the set of all v MR_ROBDD_entailed by f where v \leq MR_ROBDD_topvar */
+ extern MR_ROBDD_bitset *MR_ROBDD_vars_entailed(MR_ROBDD_node *f, int MR_ROBDD_topvar);
+#else /* MR_ROBDD_NEW */
+ /* returns the set of all v MR_ROBDD_entailed by f */
+ extern MR_ROBDD_bitset *MR_ROBDD_vars_entailed(MR_ROBDD_node *f);
+#endif /* MR_ROBDD_NEW */
/* return the initial set sharing representation for n variables */
-extern node *init_set_sharing(int n);
+extern MR_ROBDD_node *MR_ROBDD_init_set_sharing(int n);
/* computes the set sharing upward closure of f */
-extern node *upclose(node *f);
-/* performs Langen's bin operation, used for set sharing analysis */
-extern node *bin(node *f, node *g);
+extern MR_ROBDD_node *MR_ROBDD_upclose(MR_ROBDD_node *f);
+/* performs Langen's MR_ROBDD_bin operation, used for set sharing analysis */
+extern MR_ROBDD_node *MR_ROBDD_bin(MR_ROBDD_node *f, MR_ROBDD_node *g);
/* prints out the bryant graph a */
-extern void printOut(node *a);
+extern void printOut(MR_ROBDD_node *a);
/* for profiling purposes: return the number of ROBDD nodes in use */
-extern int nodes_in_use(void);
-/* for profiling only: the same as iff_conj_array(), but as efficient */
+extern int MR_ROBDD_nodes_in_use(void);
+/* for profiling only: the same as MR_ROBDD_iff_conj_array(), but as efficient */
/* as possible, whatever variables are #defined */
-node *testing_iff_conj_array(int v0, int n, int arr[]);
-
+MR_ROBDD_node *MR_ROBDD_testing_iff_conj_array(int v0, int n, int arr[]);
/* These are not really useful for ROBDDs but are needed for other */
/* representations of Boolean functions. */
/* free n */
-extern void free_rep(node *n);
+extern void MR_ROBDD_free_rep(MR_ROBDD_node *n);
/* free n if it doesn't share with m */
-extern void free_rep_if_diff(node *n, node *m);
-/* returns a copy of a. For ROBDDs this is just a */
-extern node *copy(node *a);
-/* returns non-zero iff a = b; for ROBDDs, use a==b instead */
-extern int equiv(node *a, node *b);
+extern void free_rep_if_diff(MR_ROBDD_node *n, MR_ROBDD_node *m);
+/* returns a MR_ROBDD_copy of a. For ROBDDs this is just a */
+extern MR_ROBDD_node *MR_ROBDD_copy(MR_ROBDD_node *a);
+/* returns non-MR_ROBDD_zero iff a = b; for ROBDDs, use a==b instead */
+extern int MR_ROBDD_equiv(MR_ROBDD_node *a, MR_ROBDD_node *b);
/* for a more efficient interface from Quintus Prolog. */
#if defined(QUINTUS)
-extern node *renameTerm(node *in, QP_term_ref term);
-extern node *reverseRenameTerm(node *in, QP_term_ref term);
+ extern MR_ROBDD_node *renameTerm(MR_ROBDD_node *in, QP_term_ref term);
+ extern MR_ROBDD_node *reverseRenameTerm(MR_ROBDD_node *in, QP_term_ref term);
#endif /* QUINTUS */
+
+#endif /* MERCURY_BRYANT_H */
Index: robdd/bryantPrint.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/bryantPrint.c,v
retrieving revision 1.1
diff -u -r1.1 bryantPrint.c
--- robdd/bryantPrint.c 10 Mar 2000 05:17:21 -0000 1.1
+++ robdd/bryantPrint.c 27 Feb 2003 02:10:49 -0000
@@ -1,3 +1,9 @@
+/*
+** Copyright (C) 2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
#include <stdio.h>
#include <stdlib.h>
#ifdef QUINTUS
@@ -7,42 +13,42 @@
#include "bryantPrint.h"
-int print_bryant(node *f, bitset *trues, bitset *falses, int terms);
+int print_bryant(MR_ROBDD_node *f, MR_ROBDD_bitset *trues, MR_ROBDD_bitset *falses, int terms);
/* Print out an ROBDD in some readable format. We display it in disjunctive
* form.
*/
-void printOut(node *f)
+void printOut(MR_ROBDD_node *f)
{
- bitset trues, falses;
+ MR_ROBDD_bitset trues, falses;
- if (f == one) {
- printf("TRUE");
- } else if (f == zero) {
- printf("FALSE");
+ if (f == MR_ROBDD_one) {
+ printf("MR_TRUE");
+ } else if (f == MR_ROBDD_zero) {
+ printf("MR_FALSE");
} else {
- BITSET_CLEAR(trues);
- BITSET_CLEAR(falses);
+ MR_ROBDD_BITSET_CLEAR(trues);
+ MR_ROBDD_BITSET_CLEAR(falses);
(void)print_bryant(f, &trues, &falses, 0);
}
}
-int print_bryant(node *f, bitset *trues, bitset *falses, int terms)
+int print_bryant(MR_ROBDD_node *f, MR_ROBDD_bitset *trues, MR_ROBDD_bitset *falses, int terms)
{
- if (f == one) {
- bitset all;
+ if (f == MR_ROBDD_one) {
+ MR_ROBDD_bitset all;
int var;
int word;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
char sep = '(';
if (terms>0) printf(" ");
- BITSET_UNION(all, *trues, *falses);
- FOREACH_ELEMENT(all, var, word, mask) {
- if (BITSET_MEMBER(*trues, word, mask)) {
+ MR_ROBDD_BITSET_UNION(all, *trues, *falses);
+ MR_ROBDD_FOREACH_ELEMENT(all, var, word, mask) {
+ if (MR_ROBDD_BITSET_MEMBER(*trues, word, mask)) {
printf("%c%d", sep, var);
} else {
printf("%c~%d", sep, var);
@@ -51,14 +57,14 @@
}
printf(")");
++terms;
- } else if (f != zero) {
- BITSET_ADD_ELEMENT(*trues, f->value);
+ } else if (f != MR_ROBDD_zero) {
+ MR_ROBDD_BITSET_ADD_ELEMENT(*trues, f->value);
terms += print_bryant(f->tr, trues, falses, terms);
- BITSET_TOGGLE_ELEMENT(*trues, f->value);
- BITSET_ADD_ELEMENT(*falses, f->value);
+ MR_ROBDD_BITSET_TOGGLE_ELEMENT(*trues, f->value);
+ MR_ROBDD_BITSET_ADD_ELEMENT(*falses, f->value);
terms += print_bryant(f->fa, trues, falses, terms);
- BITSET_TOGGLE_ELEMENT(*falses, f->value);
+ MR_ROBDD_BITSET_TOGGLE_ELEMENT(*falses, f->value);
}
- /* don't do anything for zero terminal */
+ /* don't do anything for MR_ROBDD_zero terminal */
return terms;
}
Index: robdd/table.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/table.c,v
retrieving revision 1.1
diff -u -r1.1 table.c
--- robdd/table.c 10 Mar 2000 05:17:21 -0000 1.1
+++ robdd/table.c 27 Feb 2003 02:10:49 -0000
@@ -1,3 +1,9 @@
+/*
+** Copyright (C) 2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
#include <stdio.h>
#include <stdlib.h>
#include "bryant.h"
@@ -5,27 +11,27 @@
#define TABLESIZE 4096
-node *lookupUniqueTable(int val, node *tr, node *fa);
-void insertUniqueTable(node *newnode);
+MR_ROBDD_node *lookupUniqueTable(int val, MR_ROBDD_node *tr, MR_ROBDD_node *fa);
+void insertUniqueTable(MR_ROBDD_node *newnode);
-node *checkComputed(node *f,node *g, node *h);
-void insertComputed(node *f, node *g, node *h, node *result);
+MR_ROBDD_node *checkComputed(MR_ROBDD_node *f,MR_ROBDD_node *g, MR_ROBDD_node *h);
+void insertComputed(MR_ROBDD_node *f, MR_ROBDD_node *g, MR_ROBDD_node *h, MR_ROBDD_node *result);
void printUnique(); /* prints no. of entries in Unique table */
-static node *unique[TABLESIZE];
+static MR_ROBDD_node *unique[TABLESIZE];
static iteEntry computed[TABLESIZE];
-static int findHashUnique(int var, node *tr, node *fa);
-static int findHashComputed(node *f, node *g, node *h);
+static int findHashUnique(int var, MR_ROBDD_node *tr, MR_ROBDD_node *fa);
+static int findHashComputed(MR_ROBDD_node *f, MR_ROBDD_node *g, MR_ROBDD_node *h);
-node *lookupUniqueTable(int val, node *tr, node *fa)
-/* checks to see if node (val,tr,fa) exists, and if so returns pointer to
-that node, otherwise returns null */
-{
- extern node *unique[];
- node *entry;
- node *result;
+MR_ROBDD_node *lookupUniqueTable(int val, MR_ROBDD_node *tr, MR_ROBDD_node *fa)
+/* checks to see if MR_ROBDD_node (val,tr,fa) exists, and if so returns pointer to
+that MR_ROBDD_node, otherwise returns null */
+{
+ extern MR_ROBDD_node *unique[];
+ MR_ROBDD_node *entry;
+ MR_ROBDD_node *result;
int hash;
result = NULL;
@@ -43,13 +49,13 @@
}
return result;
}
-void insertUniqueTable(node *newnode)
+void insertUniqueTable(MR_ROBDD_node *newnode)
{
-/* inserts the node newnode into the unique table */
+/* inserts the MR_ROBDD_node newnode into the unique table */
/* insertion is at head of list */
- extern node *unique[];
- node *first;
- node *newentry;
+ extern MR_ROBDD_node *unique[];
+ MR_ROBDD_node *first;
+ MR_ROBDD_node *newentry;
int hash;
/* find hash value - get 12 bits, ie. 4096, size of unique */
@@ -61,7 +67,7 @@
void printUnique()
{
- node *t;
+ MR_ROBDD_node *t;
int i;
int cnt;
int total;
@@ -90,7 +96,7 @@
printf("total nodes is %d: longest string is %d\n",total,longest);
}
-node *checkComputed(node *f,node *g, node *h)
+MR_ROBDD_node *checkComputed(MR_ROBDD_node *f,MR_ROBDD_node *g, MR_ROBDD_node *h)
{
extern iteEntry computed[];
int hash;
@@ -105,14 +111,14 @@
}
return NULL;
}
-void insertComputed(node *f, node *g, node *h, node *result)
+void insertComputed(MR_ROBDD_node *f, MR_ROBDD_node *g, MR_ROBDD_node *h, MR_ROBDD_node *result)
{
extern iteEntry computed[];
int hash;
int i;
/* find hash value - get 12 bits, ie. 4096, size of computed */
- /* check hashing function, g or h is always zero or one */
+ /* check hashing function, g or h is always MR_ROBDD_zero or MR_ROBDD_one */
hash = findHashComputed(f,g,h);
@@ -132,14 +138,14 @@
*/
}
-static int findHashUnique(int var, node *tr, node *fa)
+static int findHashUnique(int var, MR_ROBDD_node *tr, MR_ROBDD_node *fa)
{
/* find hash value - get 12 bits, ie. 4096, size of unique */
return (var + ((long)tr << 1) +
((long)fa >> 2)) & 0xfff;
}
-static int findHashComputed(node *f, node *g, node *h)
+static int findHashComputed(MR_ROBDD_node *f, MR_ROBDD_node *g, MR_ROBDD_node *h)
{
/* find hash value - get 12 bits, ie. 4096, size of computed */
return (((long)h) + ((long)g << 1) +
Index: robdd/table.h
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/table.h,v
retrieving revision 1.1
diff -u -r1.1 table.h
--- robdd/table.h 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/table.h 27 Feb 2003 02:11:26 -0000
@@ -1,6 +1,12 @@
+/*
+** Copyright (C) 2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
typedef struct IteEntry{
- node *f;
- node *g;
- node *h;
- node *where;
- }iteEntry;
+ MR_ROBDD_node *f;
+ MR_ROBDD_node *g;
+ MR_ROBDD_node *h;
+ MR_ROBDD_node *where;
+} iteEntry;
Index: robdd/test_abexit.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_abexit.c,v
retrieving revision 1.1
diff -u -r1.1 test_abexit.c
--- robdd/test_abexit.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_abexit.c 27 Feb 2003 02:11:31 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_abexit.c
- RCS : $Id: test_abexit.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Tue Aug 1 11:27:35 1995
- Purpose : Timing test for bryant graph abstract_exit code
+ Purpose : Timing test for bryant graph MR_ROBDD_abstract_exit code
*****************************************************************/
@@ -24,56 +29,56 @@
}
-void init_array(int top, int array[], bitset *usedvars)
+void init_array(int top, int array[], MR_ROBDD_bitset *usedvars)
{
int i, word;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
- BITSET_CLEAR(*usedvars);
- FOREACH_POSSIBLE_ELEMENT(i, word, mask) {
+ MR_ROBDD_BITSET_CLEAR(*usedvars);
+ MR_ROBDD_FOREACH_POSSIBLE_ELEMENT(i, word, mask) {
if (i >= top) break;
array[i] = i;
- BITSET_ADD(*usedvars, word, mask);
+ MR_ROBDD_BITSET_ADD(*usedvars, word, mask);
}
}
-int next_array(int n, int varmax, int array[], bitset *usedvars)
+int next_array(int n, int varmax, int array[], MR_ROBDD_bitset *usedvars)
{
int i, word;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
int elt;
/* Search backward for first cell with "room" to be incremented. */
for (i=n-1;; --i) {
- if (i<0) return FALSE; /* no more combinations possible */
+ if (i<0) return MR_FALSE; /* no more combinations possible */
elt=array[i];
- word = BITSET_WORD(elt);
- mask = BITSET_MASK(elt);
- BITSET_REMOVE(*usedvars, word, mask);
- (void) NEXT_POSSIBLE_ELEMENT(elt, word, mask);
- if (next_nonelement(usedvars, &elt, &word, &mask) && elt<varmax)
+ word = MR_ROBDD_BITSET_WORD(elt);
+ mask = MR_ROBDD_BITSET_MASK(elt);
+ MR_ROBDD_BITSET_REMOVE(*usedvars, word, mask);
+ (void) MR_ROBDD_NEXT_POSSIBLE_ELEMENT(elt, word, mask);
+ if (MR_ROBDD_next_nonelement(usedvars, &elt, &word, &mask) && elt<varmax)
break;
}
for (; i<n; ++i) {
array[i] = elt;
- BITSET_ADD(*usedvars, word, mask);
+ MR_ROBDD_BITSET_ADD(*usedvars, word, mask);
elt = 0;
- word = BITSET_WORD(0);
- mask = BITSET_MASK(0);
- if (!next_nonelement(usedvars, &elt, &word, &mask)) return FALSE;
+ word = MR_ROBDD_BITSET_WORD(0);
+ mask = MR_ROBDD_BITSET_MASK(0);
+ if (!MR_ROBDD_next_nonelement(usedvars, &elt, &word, &mask)) return MR_FALSE;
}
- return TRUE;
+ return MR_TRUE;
}
-void doit(int n, int array[], int varmax, type *f, type *g, int thresh)
+void doit(int n, int array[], int varmax, MR_ROBDD_type *f, MR_ROBDD_type *g, int thresh)
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
int i;
- printf("abstract_exit(");
+ printf("MR_ROBDD_abstract_exit(");
printOut(f),
printf(", ");
printOut(g),
@@ -82,11 +87,11 @@
printf("], %d {, %d}) = ", thresh, varmax);
fflush(stdout);
#endif /* DEBUGALL */
-#if !defined(USE_THRESH) && !defined(RESTRICT_SET)
- result = abstract_exit(f, g, n, array, thresh, varmax);
-#else /* USE_THRESH */
- result = abstract_exit(f, g, n, array, thresh);
-#endif /* !OLD || USE_THRESH */
+#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
+ result = MR_ROBDD_abstract_exit(f, g, n, array, thresh, varmax);
+#else /* MR_ROBDD_USE_THRESH */
+ result = MR_ROBDD_abstract_exit(f, g, n, array, thresh);
+#endif /* !MR_ROBDD_OLD || MR_ROBDD_USE_THRESH */
#ifdef DEBUGALL
printOut(result);
printf("\n");
@@ -95,7 +100,7 @@
}
-void dont_doit(int n, int array[], int varmax, type *f, type *g, int thresh)
+void dont_doit(int n, int array[], int varmax, MR_ROBDD_type *f, MR_ROBDD_type *g, int thresh)
{
}
@@ -103,10 +108,10 @@
int main(int argc, char **argv)
{
int varmax, size, repetitions;
- int array[MAXVAR];
- bitset set;
+ int array[MR_ROBDD_MAXVAR];
+ MR_ROBDD_bitset set;
int reps, i, thresh;
- type *f, *g;
+ MR_ROBDD_type *f, *g;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -115,9 +120,9 @@
usage(argv[0]);
return 20;
}
- if ((varmax=atoi(argv[2]))<4 || varmax>=MAXVAR) {
+ if ((varmax=atoi(argv[2]))<4 || varmax>=MR_ROBDD_MAXVAR) {
usage(argv[0]);
- printf("\n varmax must be between 4 <= varmax < %d\n", MAXVAR);
+ printf("\n varmax must be between 4 <= varmax < %d\n", MR_ROBDD_MAXVAR);
return 20;
}
if ((size=atoi(argv[1]))<0 || size>varmax) {
@@ -129,12 +134,12 @@
if (repetitions <= 0) repetitions = 1;
for (i=0; i<size/2; ++i) array[i] = i*2;
- f = testing_iff_conj_array(((size-1)/2)|1, size/2, array);
+ f = MR_ROBDD_testing_iff_conj_array(((size-1)/2)|1, size/2, array);
for (i=0; i<(size-1)/2; ++i) array[i] = i*2+1;
- g = testing_iff_conj_array(0, (size-1)/2, array);
+ g = MR_ROBDD_testing_iff_conj_array(0, (size-1)/2, array);
for (i=0; i<(size-2)/2; ++i) array[i] = i*2+2;
- g = glb(g, testing_iff_conj_array(size-1, (size-2)/2, array));
+ g = MR_ROBDD_glb(g, MR_ROBDD_testing_iff_conj_array(size-1, (size-2)/2, array));
thresh = size/2;
@@ -148,13 +153,13 @@
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
for (i=0; i<(size-1)/2; ++i) array[i] = i*2+1;
- f = testing_iff_conj_array(0, (size-1)/2, array);
+ f = MR_ROBDD_testing_iff_conj_array(0, (size-1)/2, array);
for (i=0; i<(size-2)/2; ++i) array[i] = i*2+2;
- f = glb(f, testing_iff_conj_array(size-1, (size-2)/2, array));
+ f = MR_ROBDD_glb(f, MR_ROBDD_testing_iff_conj_array(size-1, (size-2)/2, array));
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
@@ -165,7 +170,7 @@
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_abunify.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_abunify.c,v
retrieving revision 1.1
diff -u -r1.1 test_abunify.c
--- robdd/test_abunify.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_abunify.c 27 Feb 2003 02:11:34 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_abunify.c
- RCS : $Id: test_abunify.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Fri Aug 4 14:39:44 1995
- Purpose : Timing test for bryant graph abstract_unify code
+ Purpose : Timing test for bryant graph MR_ROBDD_abstract_unify code
*****************************************************************/
@@ -18,7 +23,7 @@
void usage(char *progname)
{
printf("usage: %s size maxvar [repetitions]\n", progname);
- printf(" for all possible v <-> v1 & v2 & ... & vsize functions, computes the glb\n");
+ printf(" for all possible v <-> v1 & v2 & ... & vsize functions, computes the MR_ROBDD_glb\n");
printf(" of that and each possible v <-> v1 & v2 & ... & vsize function, restricted\n");
printf(" to each threshold between 0 and maxvar. Each v and the vi are between 0\n");
printf(" and maxvar inclusive. If repetitions is >0, this will be done that many\n");
@@ -65,13 +70,13 @@
}
-void doit(int thresh, int varmax, type *f, int v0, int n, int arr[])
+void doit(int thresh, int varmax, MR_ROBDD_type *f, int v0, int n, int arr[])
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
int i;
- printf("abstract_unify(");
+ printf("MR_ROBDD_abstract_unify(");
printOut(f);
printf(", %d, %d, [", v0, n);
if (n>0) {
@@ -82,11 +87,11 @@
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
-#if !defined(USE_THRESH) && !defined(RESTRICT_SET)
- result = abstract_unify(f, v0, n, arr, thresh, varmax);
-#else /* USE_THRESH */
- result = abstract_unify(f, v0, n, arr, thresh);
-#endif /* OLD */
+#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
+ result = MR_ROBDD_abstract_unify(f, v0, n, arr, thresh, varmax);
+#else /* MR_ROBDD_USE_THRESH */
+ result = MR_ROBDD_abstract_unify(f, v0, n, arr, thresh);
+#endif /* MR_ROBDD_OLD */
#ifdef DEBUGALL
printOut(result);
printf("\n");
@@ -96,14 +101,14 @@
}
-void dont_doit(int thresh, int varmax, type *f, int v0, int n, int arr[])
+void dont_doit(int thresh, int varmax, MR_ROBDD_type *f, int v0, int n, int arr[])
{
}
-void inner_loop(int varmax, int top, int thresh, type *f)
+void inner_loop(int varmax, int top, int thresh, MR_ROBDD_type *f)
{
- int arrayg[MAXVAR];
+ int arrayg[MR_ROBDD_MAXVAR];
int vg;
for (vg=0; vg<varmax; ++vg) {
@@ -117,9 +122,9 @@
-void dont_inner_loop(int varmax, int top, int thresh, type *f)
+void dont_inner_loop(int varmax, int top, int thresh, MR_ROBDD_type *f)
{
- int arrayg[MAXVAR];
+ int arrayg[MR_ROBDD_MAXVAR];
int vg;
for (vg=0; vg<varmax; ++vg) {
@@ -136,9 +141,9 @@
int main(int argc, char **argv)
{
int varmax, size, repetitions;
- int arrayf[MAXVAR];
+ int arrayf[MR_ROBDD_MAXVAR];
int reps, vf, thresh;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -147,9 +152,9 @@
usage(argv[0]);
return 20;
}
- if ((varmax=atoi(argv[2]))<1 || varmax>=MAXVAR) {
+ if ((varmax=atoi(argv[2]))<1 || varmax>=MR_ROBDD_MAXVAR) {
usage(argv[0]);
- printf("\n varmax must be between 1 <= varmax < %d\n", MAXVAR);
+ printf("\n varmax must be between 1 <= varmax < %d\n", MR_ROBDD_MAXVAR);
return 20;
}
if ((size=atoi(argv[1]))<0 || size>=varmax) {
@@ -166,34 +171,34 @@
for (thresh=0; thresh<=varmax; ++thresh) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, thresh, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, thresh, f);
}
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (thresh=0; thresh<=varmax; ++thresh) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, thresh, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, thresh, f);
}
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_glb.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_glb.c,v
retrieving revision 1.1
diff -u -r1.1 test_glb.c
--- robdd/test_glb.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_glb.c 27 Feb 2003 02:11:37 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_glb.c
- RCS : $Id: test_glb.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Thu Jul 13 14:25:12 1995
- Purpose: Timing test for bryant graph glb code
+ Purpose: Timing test for bryant graph MR_ROBDD_glb code
*****************************************************************/
@@ -20,7 +25,7 @@
{
printf("usage: %s size maxvar [repetitions]\n", progname);
printf(" creates all possible pairs of v <-> v1 & v2 & ... & vsize functions and\n");
- printf(" computes their glb. Each V and the vi are between 0 and maxvar inclusive.\n");
+ printf(" computes their MR_ROBDD_glb. Each V and the vi are between 0 and maxvar inclusive.\n");
printf(" If repetitions is >0, this will be done that many times.\n");
}
@@ -64,11 +69,11 @@
}
-void doit(type *f, type *g)
+void doit(MR_ROBDD_type *f, MR_ROBDD_type *g)
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
- printf("glb("),
+ printf("MR_ROBDD_glb("),
printOut(f),
printf(", ");
printOut(g),
@@ -76,7 +81,7 @@
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
- result = glb(f, g);
+ result = MR_ROBDD_glb(f, g);
#endif /* !OVERHEAD */
#ifdef DEBUGALL
printOut(result);
@@ -85,22 +90,22 @@
++opcount;
}
-void dont_doit(type *f, type *g)
+void dont_doit(MR_ROBDD_type *f, MR_ROBDD_type *g)
{
}
-void inner_loop(int varmax, int top, type *f)
+void inner_loop(int varmax, int top, MR_ROBDD_type *f)
{
int arrayg[33];
int vg;
- type *g;
+ MR_ROBDD_type *g;
for (vg=0; vg<varmax; ++vg) {
init_array(top, vg, arrayg);
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
doit(f, g);
while (next_array(top, varmax, vg, arrayg)) {
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
doit(f, g);
}
}
@@ -108,18 +113,18 @@
-void dont_inner_loop(int varmax, int top, type *f)
+void dont_inner_loop(int varmax, int top, MR_ROBDD_type *f)
{
int arrayg[33];
int vg;
- type *g;
+ MR_ROBDD_type *g;
for (vg=0; vg<varmax; ++vg) {
init_array(top, vg, arrayg);
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
dont_doit(f, g);
while (next_array(top, varmax, vg, arrayg)) {
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
dont_doit(f, g);
}
}
@@ -132,7 +137,7 @@
int varmax, size, repetitions;
int arrayf[VARLIMIT];
int reps, vf;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -159,31 +164,31 @@
for (reps=repetitions; reps>0; --reps) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, f);
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, f);
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_iff.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_iff.c,v
retrieving revision 1.1
diff -u -r1.1 test_iff.c
--- robdd/test_iff.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_iff.c 27 Feb 2003 02:11:40 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test.c
- RCS : $Id: test_iff.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Tue Jun 20 15:51:07 1995
- Purpose: Timing test for bryant graph iff_conj_array code
+ Purpose: Timing test for bryant graph MR_ROBDD_iff_conj_array code
*****************************************************************/
@@ -67,7 +72,7 @@
void doit(int v0, int top, int array[])
{
- type *f;
+ MR_ROBDD_type *f;
#ifdef DEBUGALL
int i;
@@ -77,7 +82,7 @@
}
#endif /* DEBUGALL */
#ifndef OVERHEAD
- f = iff_conj_array(v0, top, array);
+ f = MR_ROBDD_iff_conj_array(v0, top, array);
#ifdef DEBUGALL
printf(" ==> ");
printOut(f);
@@ -129,8 +134,8 @@
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
@@ -142,7 +147,7 @@
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_rename.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_rename.c,v
retrieving revision 1.1
diff -u -r1.1 test_rename.c
--- robdd/test_rename.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_rename.c 27 Feb 2003 02:11:43 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_rename.c
- RCS : $Id: test_rename.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Sat Jul 29 20:53:11 1995
- Purpose : Timing test for bryant graph renameArray code
+ Purpose : Timing test for bryant graph MR_ROBDD_renameArray code
*****************************************************************/
@@ -24,56 +29,56 @@
}
-void init_array(int top, int array[], bitset *usedvars)
+void init_array(int top, int array[], MR_ROBDD_bitset *usedvars)
{
int i, word;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
- BITSET_CLEAR(*usedvars);
- FOREACH_POSSIBLE_ELEMENT(i, word, mask) {
+ MR_ROBDD_BITSET_CLEAR(*usedvars);
+ MR_ROBDD_FOREACH_POSSIBLE_ELEMENT(i, word, mask) {
if (i >= top) break;
array[i] = i;
- BITSET_ADD(*usedvars, word, mask);
+ MR_ROBDD_BITSET_ADD(*usedvars, word, mask);
}
}
-int next_array(int n, int varmax, int array[], bitset *usedvars)
+int next_array(int n, int varmax, int array[], MR_ROBDD_bitset *usedvars)
{
int i, word;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
int elt;
/* Search backward for first cell with "room" to be incremented. */
for (i=n-1;; --i) {
- if (i<0) return FALSE; /* no more combinations possible */
+ if (i<0) return MR_FALSE; /* no more combinations possible */
elt=array[i];
- word = BITSET_WORD(elt);
- mask = BITSET_MASK(elt);
- BITSET_REMOVE(*usedvars, word, mask);
- (void) NEXT_POSSIBLE_ELEMENT(elt, word, mask);
- if (next_nonelement(usedvars, &elt, &word, &mask) && elt<varmax)
+ word = MR_ROBDD_BITSET_WORD(elt);
+ mask = MR_ROBDD_BITSET_MASK(elt);
+ MR_ROBDD_BITSET_REMOVE(*usedvars, word, mask);
+ (void) MR_ROBDD_NEXT_POSSIBLE_ELEMENT(elt, word, mask);
+ if (MR_ROBDD_next_nonelement(usedvars, &elt, &word, &mask) && elt<varmax)
break;
}
for (; i<n; ++i) {
array[i] = elt;
- BITSET_ADD(*usedvars, word, mask);
+ MR_ROBDD_BITSET_ADD(*usedvars, word, mask);
elt = 0;
- word = BITSET_WORD(0);
- mask = BITSET_MASK(0);
- if (!next_nonelement(usedvars, &elt, &word, &mask)) return FALSE;
+ word = MR_ROBDD_BITSET_WORD(0);
+ mask = MR_ROBDD_BITSET_MASK(0);
+ if (!MR_ROBDD_next_nonelement(usedvars, &elt, &word, &mask)) return MR_FALSE;
}
- return TRUE;
+ return MR_TRUE;
}
-void doit(int n, int array[], int varmax, type *f)
+void doit(int n, int array[], int varmax, MR_ROBDD_type *f)
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
int i;
- printf("renameArray(");
+ printf("MR_ROBDD_renameArray(");
printOut(f),
printf(", %d, [%d", n, array[0]);
for (i=1; i<n; ++i) printf(",%d", array[i]);
@@ -81,7 +86,7 @@
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
- result = renameArray(f, n, array);
+ result = MR_ROBDD_renameArray(f, n, array);
#ifdef DEBUGALL
printOut(result);
printf("\n");
@@ -91,7 +96,7 @@
}
-void dont_doit(int n, int array[], int varmax, type *f)
+void dont_doit(int n, int array[], int varmax, MR_ROBDD_type *f)
{
}
@@ -99,10 +104,10 @@
int main(int argc, char **argv)
{
int varmax, size, repetitions;
- int array[MAXVAR];
- bitset set;
+ int array[MR_ROBDD_MAXVAR];
+ MR_ROBDD_bitset set;
int reps, i;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -111,9 +116,9 @@
usage(argv[0]);
return 20;
}
- if ((varmax=atoi(argv[2]))<2 || varmax>=MAXVAR) {
+ if ((varmax=atoi(argv[2]))<2 || varmax>=MR_ROBDD_MAXVAR) {
usage(argv[0]);
- printf("\n varmax must be between 2 <= varmax < %d\n", MAXVAR);
+ printf("\n varmax must be between 2 <= varmax < %d\n", MR_ROBDD_MAXVAR);
return 20;
}
if ((size=atoi(argv[1]))<0 || size>varmax) {
@@ -125,9 +130,9 @@
if (repetitions <= 0) repetitions = 1;
for (i=0; i<(size-1)/2; ++i) array[i] = i*2+1;
- f = testing_iff_conj_array(0, (size-1)/2, array);
+ f = MR_ROBDD_testing_iff_conj_array(0, (size-1)/2, array);
for (i=0; i<(size-2)/2; ++i) array[i] = i*2+2;
- f = glb(f, testing_iff_conj_array(size-1, (size-2)/2, array));
+ f = MR_ROBDD_glb(f, MR_ROBDD_testing_iff_conj_array(size-1, (size-2)/2, array));
opcount = 0;
clock0 = milli_time();
@@ -139,13 +144,13 @@
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
for (i=0; i<(size-1)/2; ++i) array[i] = i*2+1;
- f = testing_iff_conj_array(0, (size-1)/2, array);
+ f = MR_ROBDD_testing_iff_conj_array(0, (size-1)/2, array);
for (i=0; i<(size-2)/2; ++i) array[i] = i*2+2;
- f = glb(f, testing_iff_conj_array(size-1, (size-2)/2, array));
+ f = MR_ROBDD_glb(f, MR_ROBDD_testing_iff_conj_array(size-1, (size-2)/2, array));
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
@@ -156,7 +161,7 @@
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_restrict.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_restrict.c,v
retrieving revision 1.1
diff -u -r1.1 test_restrict.c
--- robdd/test_restrict.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_restrict.c 27 Feb 2003 02:11:46 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_restrict.c
- RCS : $Id: test_restrict.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Mon Jul 17 19:54:11 1995
- Purpose : Timing test for bryant graph restrictThresh code
+ Purpose : Timing test for bryant graph MR_ROBDD_restrictThresh code
*****************************************************************/
@@ -66,21 +71,21 @@
}
-void doit(int thresh, int varmax, type *f)
+void doit(int thresh, int varmax, MR_ROBDD_type *f)
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
- printf("restrictThresh(%d, [%d,]", thresh, varmax-1),
+ printf("MR_ROBDD_restrictThresh(%d, [%d,]", thresh, varmax-1),
printOut(f),
printf(") =");
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
-#if !defined(USE_THRESH) && !defined(RESTRICT_SET)
- result = restrictThresh(thresh, varmax-1, f);
-#else /* USE_THRESH */
- result = restrictThresh(thresh, f);
-#endif /* OLD */
+#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
+ result = MR_ROBDD_restrictThresh(thresh, varmax-1, f);
+#else /* MR_ROBDD_USE_THRESH */
+ result = MR_ROBDD_restrictThresh(thresh, f);
+#endif /* MR_ROBDD_OLD */
#ifdef DEBUGALL
printOut(result);
printf("\n");
@@ -90,7 +95,7 @@
}
-void dont_doit(int thresh, int varmax, type *f)
+void dont_doit(int thresh, int varmax, MR_ROBDD_type *f)
{
}
@@ -100,7 +105,7 @@
int varmax, size, repetitions;
int array[VARLIMIT];
int reps, v0, thresh;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -128,34 +133,34 @@
for (v0=0; v0<varmax; ++v0) {
for (thresh=0; thresh<varmax; thresh++) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
doit(thresh, varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
doit(thresh, varmax, f);
}
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
for (thresh=0; thresh<varmax; thresh++) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_doit(thresh, varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_doit(thresh, varmax, f);
}
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_rglb.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_rglb.c,v
retrieving revision 1.1
diff -u -r1.1 test_rglb.c
--- robdd/test_rglb.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_rglb.c 27 Feb 2003 02:11:48 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_rglb.c
- RCS : $Id: test_rglb.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Thu Jul 13 17:57:03 1995
- Purpose : Timing test for bryant graph restricted_glb code
+ Purpose : Timing test for bryant graph MR_ROBDD_restricted_glb code
*****************************************************************/
@@ -21,7 +26,7 @@
{
printf("usage: %s size maxvar [repetitions]\n", progname);
printf(" creates all possible pairs of v <-> v1 & v2 & ... & vsize functions, computes\n");
- printf(" their glb, and restricts this to each threshold between 0 and maxvar. Each V\n");
+ printf(" their MR_ROBDD_glb, and restricts this to each threshold between 0 and maxvar. Each V\n");
printf(" and the vi are between 0 and maxvar inclusive. If repetitions is >0, this\n");
printf(" will be done that many times.\n");
}
@@ -66,11 +71,11 @@
}
-void doit(int thresh, int varmax, type *f, type *g)
+void doit(int thresh, int varmax, MR_ROBDD_type *f, MR_ROBDD_type *g)
{
- type *result;
+ MR_ROBDD_type *result;
#ifdef DEBUGALL
- printf("restricted_glb(%d, [%d,]", thresh, varmax),
+ printf("MR_ROBDD_restricted_glb(%d, [%d,]", thresh, varmax),
printOut(f),
printf(", ");
printOut(g),
@@ -78,11 +83,11 @@
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
-#if !defined(USE_THRESH) && !defined(RESTRICT_SET)
- result = restricted_glb(thresh, varmax, f, g);
-#else /* USE_THRESH */
- result = restricted_glb(thresh, f, g);
-#endif /* OLD */
+#if !defined(MR_ROBDD_USE_THRESH) && !defined(MR_ROBDD_RESTRICT_SET)
+ result = MR_ROBDD_restricted_glb(thresh, varmax, f, g);
+#else /* MR_ROBDD_USE_THRESH */
+ result = MR_ROBDD_restricted_glb(thresh, f, g);
+#endif /* MR_ROBDD_OLD */
#ifdef DEBUGALL
printOut(result);
printf("\n");
@@ -92,23 +97,23 @@
}
-void dont_doit(int thresh, int varmax, type *f, type *g)
+void dont_doit(int thresh, int varmax, MR_ROBDD_type *f, MR_ROBDD_type *g)
{
}
-void inner_loop(int varmax, int top, int thresh, type *f)
+void inner_loop(int varmax, int top, int thresh, MR_ROBDD_type *f)
{
int arrayg[33];
int vg;
- type *g;
+ MR_ROBDD_type *g;
for (vg=0; vg<varmax; ++vg) {
init_array(top, vg, arrayg);
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
doit(thresh, varmax, f, g);
while (next_array(top, varmax, vg, arrayg)) {
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
doit(thresh, varmax, f, g);
}
}
@@ -116,18 +121,18 @@
-void dont_inner_loop(int varmax, int top, int thresh, type *f)
+void dont_inner_loop(int varmax, int top, int thresh, MR_ROBDD_type *f)
{
int arrayg[33];
int vg;
- type *g;
+ MR_ROBDD_type *g;
for (vg=0; vg<varmax; ++vg) {
init_array(top, vg, arrayg);
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
dont_doit(thresh, varmax, f, g);
while (next_array(top, varmax, vg, arrayg)) {
- g = testing_iff_conj_array(vg, top, arrayg);
+ g = MR_ROBDD_testing_iff_conj_array(vg, top, arrayg);
dont_doit(thresh, varmax, f, g);
}
}
@@ -140,7 +145,7 @@
int varmax, size, repetitions;
int arrayf[VARLIMIT];
int reps, vf, thresh;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -168,34 +173,34 @@
for (thresh=0; thresh<=varmax; ++thresh) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, thresh, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
inner_loop(varmax, size, thresh, f);
}
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (thresh=0; thresh<=varmax; ++thresh) {
for (vf=0; vf<varmax; ++vf) {
init_array(size, vf, arrayf);
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, thresh, f);
while (next_array(size, varmax, vf, arrayf)) {
- f = testing_iff_conj_array(vf, size, arrayf);
+ f = MR_ROBDD_testing_iff_conj_array(vf, size, arrayf);
dont_inner_loop(varmax, size, thresh, f);
}
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_upclose.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_upclose.c,v
retrieving revision 1.1
diff -u -r1.1 test_upclose.c
--- robdd/test_upclose.c 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/test_upclose.c 27 Feb 2003 02:11:49 -0000
@@ -1,6 +1,11 @@
+/*
+** Copyright (C) 1998,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_upclose
- RCS : $Id: test_upclose.c,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : 4 May 1998
Purpose: Test of set sharing upward closure operation
@@ -25,21 +30,21 @@
#if 0
-node *boolfn(unsigned long n)
+MR_ROBDD_node *boolfn(unsigned long n)
{
int d;
unsigned long tr, fa;
- node *trfn, *fafn;
+ MR_ROBDD_node *trfn, *fafn;
- if (n == 0) return zero;
- if (n == 1) return one;
+ if (n == 0) return MR_ROBDD_zero;
+ if (n == 1) return MR_ROBDD_one;
- for (d = LOG_BITS_PER_WORD-1; (fa=(n>>(1<<d)))==0 && d >= 0; --d);
+ for (d = MR_ROBDD_LOG_BITS_PER_WORD-1; (fa=(n>>(1<<d)))==0 && d >= 0; --d);
tr = n & ((1<<(1<<d))-1);
trfn = boolfn(tr);
fa ^= tr;
fafn = boolfn(fa);
- return make_node((LOG_BITS_PER_WORD-d), trfn, fafn);
+ return MR_ROBDD_make_node((MR_ROBDD_LOG_BITS_PER_WORD-d), trfn, fafn);
}
#endif
@@ -57,17 +62,17 @@
}
-node *randboolfn(int depth, int level)
+MR_ROBDD_node *randboolfn(int depth, int level)
{
- node *result;
+ MR_ROBDD_node *result;
if (bits <= 0) rnd = rand(), bits = rand_bits;
if (level == 0) {
- result = (rnd&1) ? one : zero;
+ result = (rnd&1) ? MR_ROBDD_one : MR_ROBDD_zero;
bits--; rnd >>= 1;
} else {
- result = make_node(depth-level,
+ result = MR_ROBDD_make_node(depth-level,
randboolfn(depth, level-1),
randboolfn(depth, level-1));
}
@@ -76,17 +81,17 @@
void doit(int depth, int num)
{
- node *f = randboolfn(depth, depth);
- node *uf;
+ MR_ROBDD_node *f = randboolfn(depth, depth);
+ MR_ROBDD_node *uf;
#ifdef DEBUGALL
- printf("%6d upclose(", num);
+ printf("%6d MR_ROBDD_upclose(", num);
printOut(f);
printf(") ==> ");
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
- uf = upclose(f);
+ uf = MR_ROBDD_upclose(f);
#ifdef DEBUGALL
if (f == uf) {
printf("UNCHANGED");
@@ -118,32 +123,32 @@
usage(argv[0]);
return 20;
}
- if ((depth=atoi(argv[1]))<1 || depth>=MAXVAR) {
+ if ((depth=atoi(argv[1]))<1 || depth>=MR_ROBDD_MAXVAR) {
usage(argv[0]);
- printf("\n depth must be between 1 <= depth < %d\n", MAXVAR);
+ printf("\n depth must be between 1 <= depth < %d\n", MR_ROBDD_MAXVAR);
return 20;
}
repetitions=(argc>2 ? atoi(argv[2]) : 1);
if (repetitions <= 0) repetitions = 1;
opcount = 0;
- initRep();
+ MR_ROBDD_initRep();
init_random();
clock0 = milli_time();
for (reps=0; reps<repetitions; ++reps) {
doit(depth, reps);
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- concludeRep();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_concludeRep();
+ MR_ROBDD_initRep();
init_random();
clock2 = milli_time();
for (reps=0; reps<repetitions; ++reps) {
dont_doit(depth, reps);
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_var.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_var.c,v
retrieving revision 1.1
diff -u -r1.1 test_var.c
--- robdd/test_var.c 10 Mar 2000 05:17:23 -0000 1.1
+++ robdd/test_var.c 27 Feb 2003 02:11:51 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_var.c
- RCS : $Id: test_var.c,v 1.1 2000/03/10 05:17:23 dmo Exp $
Author : Peter Schachte
Origin : Tue Jul 18 14:28:15 1995
- Purpose : Timing test for bryant graph var_entailed function
+ Purpose : Timing test for bryant graph MR_ROBDD_var_entailed function
*****************************************************************/
@@ -22,7 +27,7 @@
printf("usage: %s size maxvar [repetitions]\n", progname);
printf(" creates all possible v <-> v1 & v2 & ... & vsize functions and conjoins this\n");
printf(" with each variable between 0 and maxvar, and then determines for each variable\n");
- printf(" between 0 and maxvar if that variable is entailed by this function.\n");
+ printf(" between 0 and maxvar if that variable is MR_ROBDD_entailed by this function.\n");
printf(" V and the vi are between 0 and maxvar inclusive. If repetitions is >0,\n");
printf(" this will be done that many times.\n");
}
@@ -67,18 +72,18 @@
}
-void doit(int w, type *f)
+void doit(int w, MR_ROBDD_type *f)
{
int result;
#ifdef DEBUGALL
- printf("var_entailed(");
+ printf("MR_ROBDD_var_entailed(");
printOut(f),
printf(", %d) = ", w);
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
- result = var_entailed(f, w);
+ result = MR_ROBDD_var_entailed(f, w);
#ifdef DEBUGALL
printf("%s\n", (result ? "true" : "false"));
#endif /* DEBUGALL */
@@ -87,18 +92,18 @@
}
-void dont_doit(int w, type *f)
+void dont_doit(int w, MR_ROBDD_type *f)
{
}
-void inner_loop(int varmax, type *f)
+void inner_loop(int varmax, MR_ROBDD_type *f)
{
- type *g;
+ MR_ROBDD_type *g;
int v, w;
for (v=0; v<varmax; ++v) {
- g = glb(variableRep(v), f);
+ g = MR_ROBDD_glb(MR_ROBDD_variableRep(v), f);
for (w=0; w<varmax; ++w) {
doit(w, g);
}
@@ -106,13 +111,13 @@
}
-void dont_inner_loop(int varmax, type *f)
+void dont_inner_loop(int varmax, MR_ROBDD_type *f)
{
- type *g;
+ MR_ROBDD_type *g;
int v, w;
for (v=0; v<varmax; ++v) {
- g = glb(variableRep(v), f);
+ g = MR_ROBDD_glb(MR_ROBDD_variableRep(v), f);
for (w=0; w<varmax; ++w) {
dont_doit(w, g);
}
@@ -126,7 +131,7 @@
int varmax, size, repetitions;
int array[VARLIMIT];
int reps, v0;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -153,31 +158,31 @@
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
inner_loop(varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
inner_loop(varmax, f);
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_inner_loop(varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_inner_loop(varmax, f);
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/test_vars.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/test_vars.c,v
retrieving revision 1.1
diff -u -r1.1 test_vars.c
--- robdd/test_vars.c 10 Mar 2000 05:17:23 -0000 1.1
+++ robdd/test_vars.c 27 Feb 2003 02:11:53 -0000
@@ -1,9 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : test_vars.c
- RCS : $Id: test_vars.c,v 1.1 2000/03/10 05:17:23 dmo Exp $
Author : Peter Schachte
Origin : Tue Jul 18 20:13:51 1995
- Purpose : Timing test for bryant graph vars_entailed function
+ Purpose : Timing test for bryant graph MR_ROBDD_vars_entailed function
*****************************************************************/
@@ -22,7 +27,7 @@
printf("usage: %s size maxvar [repetitions]\n", progname);
printf(" creates all possible v <-> v1 & v2 & ... & vsize functions and conjoins this\n");
printf(" with each variable between 0 and maxvar, and then determines the set of\n");
- printf(" variables entailed by this function. V and the vi are between 0 and maxvar\n");
+ printf(" variables MR_ROBDD_entailed by this function. V and the vi are between 0 and maxvar\n");
printf(" inclusive. If repetitions is >0, this will be done that many times.\n");
}
@@ -66,27 +71,27 @@
}
-void doit(int top, type *f)
+void doit(int top, MR_ROBDD_type *f)
{
- bitset *set;
+ MR_ROBDD_bitset *set;
#ifdef DEBUGALL
int var;
- bitmask mask;
+ MR_ROBDD_bitmask mask;
int word;
- printf("vars_entailed(");
+ printf("MR_ROBDD_vars_entailed(");
printOut(f),
printf("[, %d]) =", top);
fflush(stdout);
#endif /* DEBUGALL */
#ifndef OVERHEAD
-#ifndef NEW
- set = vars_entailed(f, top);
-#else /* !NAIVE */
- set = vars_entailed(f);
-#endif /* OLD */
+#ifndef MR_ROBDD_NEW
+ set = MR_ROBDD_vars_entailed(f, top);
+#else /* !MR_ROBDD_NAIVE */
+ set = MR_ROBDD_vars_entailed(f);
+#endif /* MR_ROBDD_OLD */
#ifdef DEBUGALL
- FOREACH_ELEMENT(*set,var,word,mask) {
+ MR_ROBDD_FOREACH_ELEMENT(*set,var,word,mask) {
printf(" %d", var);
}
printf("\n");
@@ -96,30 +101,30 @@
}
-void dont_doit(int top, type *f)
+void dont_doit(int top, MR_ROBDD_type *f)
{
}
-void inner_loop(int varmax, type *f)
+void inner_loop(int varmax, MR_ROBDD_type *f)
{
- type *g;
+ MR_ROBDD_type *g;
int v;
for (v=0; v<varmax; ++v) {
- g = glb(variableRep(v), f);
+ g = MR_ROBDD_glb(MR_ROBDD_variableRep(v), f);
doit(varmax, g);
}
}
-void dont_inner_loop(int varmax, type *f)
+void dont_inner_loop(int varmax, MR_ROBDD_type *f)
{
- type *g;
+ MR_ROBDD_type *g;
int v;
for (v=0; v<varmax; ++v) {
- g = glb(variableRep(v), f);
+ g = MR_ROBDD_glb(MR_ROBDD_variableRep(v), f);
dont_doit(varmax, g);
}
}
@@ -130,7 +135,7 @@
int varmax, size, repetitions;
int array[VARLIMIT];
int reps, v0;
- type *f;
+ MR_ROBDD_type *f;
millisec clock0, clock1, clock2, clock3;
float runtime, overhead, rate;
int test_nodes, overhead_nodes;
@@ -157,31 +162,31 @@
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
inner_loop(varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
inner_loop(varmax, f);
}
}
}
clock1 = milli_time();
- test_nodes = nodes_in_use();
- initRep();
+ test_nodes = MR_ROBDD_nodes_in_use();
+ MR_ROBDD_initRep();
clock2 = milli_time();
for (reps=repetitions; reps>0; --reps) {
for (v0=0; v0<varmax; ++v0) {
init_array(size, v0, array);
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_inner_loop(varmax, f);
while (next_array(size, varmax, v0, array)) {
- f = testing_iff_conj_array(v0, size, array);
+ f = MR_ROBDD_testing_iff_conj_array(v0, size, array);
dont_inner_loop(varmax, f);
}
}
}
clock3 = milli_time();
- overhead_nodes = nodes_in_use();
+ overhead_nodes = MR_ROBDD_nodes_in_use();
runtime = (float)(clock1-clock0)/1000;
overhead = (float)(clock3-clock2)/1000;
rate = ((float)opcount)/(runtime-overhead);
Index: robdd/timing.c
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/timing.c,v
retrieving revision 1.1
diff -u -r1.1 timing.c
--- robdd/timing.c 10 Mar 2000 05:17:23 -0000 1.1
+++ robdd/timing.c 4 Mar 2003 03:26:09 -0000
@@ -1,10 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : timing.c
- RCS : $Id: timing.c,v 1.1 2000/03/10 05:17:23 dmo Exp $
Author :
Origin : Sat Aug 12 15:20:42 1995
Purpose : Provide timing information for benchmarking
- Copyright: © 1995 Peter Schachte. All rights reserved.
*****************************************************************/
@@ -23,18 +27,18 @@
#include <sys/time.h>
#include <sys/resource.h>
-#if 0
-#include <sys/rusage.h>
-#else
-void getrusage(int, struct rusage *);
-#endif
+int getrusage(int, struct rusage *);
millisec milli_time(void)
{
struct rusage p;
- getrusage(RUSAGE_SELF, &p);
- return (millisec)(p.ru_utime.tv_sec * 1000) +
- (millisec)(p.ru_utime.tv_usec / 1000);
+ if (getrusage(RUSAGE_SELF, &p) != 0) {
+ fprintf(stderr, "getrusage failed");
+ return 1;
+ } else {
+ return (millisec)(p.ru_utime.tv_sec * 1000) +
+ (millisec)(p.ru_utime.tv_usec / 1000);
+ }
}
#endif
Index: robdd/timing.h
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/timing.h,v
retrieving revision 1.1
diff -u -r1.1 timing.h
--- robdd/timing.h 10 Mar 2000 05:17:23 -0000 1.1
+++ robdd/timing.h 27 Feb 2003 02:12:01 -0000
@@ -1,10 +1,14 @@
+/*
+** Copyright (C) 1995,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : timing.h
- RCS : $Id: timing.h,v 1.1 2000/03/10 05:17:23 dmo Exp $
Author : Peter Schachte
Origin : Sat Aug 12 15:28:57 1995
Purpose : header file for timing support
- Copyright: © 1995 Peter Schachte. All rights reserved.
*****************************************************************/
Index: robdd/var.h
===================================================================
RCS file: /home/mercury1/repository/mercury/robdd/var.h,v
retrieving revision 1.1
diff -u -r1.1 var.h
--- robdd/var.h 10 Mar 2000 05:17:22 -0000 1.1
+++ robdd/var.h 27 Feb 2003 02:10:59 -0000
@@ -1,13 +1,16 @@
+/*
+** Copyright (C) 1998,2003 Peter Schachte and The University of Melbourne.
+** This file may only be copied under the terms of the GNU Library General
+** Public License - see the file COPYING.LIB in the Mercury distribution.
+*/
+
/*****************************************************************
File : var.h
- RCS : $Id: var.h,v 1.1 2000/03/10 05:17:22 dmo Exp $
Author : Peter Schachte
Origin : Mon Oct 12 06:09:27 1998
Purpose : Definitions common to all representations of Boolean variables
- Copyright: © 1998 . All rights reserved.
*****************************************************************/
-
/* the most variables we can support */
-#define MAXVAR 64
+#define MR_ROBDD_MAXVAR 64
cvs diff: Diffing runtime
Index: runtime/RESERVED_MACRO_NAMES
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/RESERVED_MACRO_NAMES,v
retrieving revision 1.15
diff -u -r1.15 RESERVED_MACRO_NAMES
--- runtime/RESERVED_MACRO_NAMES 8 Apr 2003 04:39:06 -0000 1.15
+++ runtime/RESERVED_MACRO_NAMES 9 Apr 2003 08:35:50 -0000
@@ -30,6 +30,8 @@
# These are defined by boehm_gc/gc.h.
__GC
_GC_H
+HIDE_POINTER
+REVEAL_POINTER
#-----------------------------------------------------------------------------#
# This is defined by mps_gc/code/mercury_mps.h,
# which uses this macro for its header guard.
Index: runtime/mercury.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury.h,v
retrieving revision 1.68
diff -u -r1.68 mercury.h
--- runtime/mercury.h 20 Oct 2004 09:45:09 -0000 1.68
+++ runtime/mercury.h 6 Dec 2004 04:32:57 -0000
@@ -46,6 +46,7 @@
#endif
#ifdef MR_BOEHM_GC
#include "gc.h"
+ #define GC_I_HIDE_POINTERS
#ifdef MR_INLINE_ALLOC
#include "gc_inl.h"
#endif
Index: runtime/mercury_heap.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_heap.h,v
retrieving revision 1.32
diff -u -r1.32 mercury_heap.h
--- runtime/mercury_heap.h 7 Jul 2004 07:11:11 -0000 1.32
+++ runtime/mercury_heap.h 19 Jul 2004 03:39:47 -0000
@@ -27,6 +27,7 @@
#include "mercury_mps.h"
#endif
#ifdef MR_BOEHM_GC
+ #define GC_I_HIDE_POINTERS
#include "gc.h"
#endif
#endif
Index: runtime/mercury_init.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_init.h,v
retrieving revision 1.43
diff -u -r1.43 mercury_init.h
--- runtime/mercury_init.h 14 Dec 2004 01:07:24 -0000 1.43
+++ runtime/mercury_init.h 14 Dec 2004 01:11:50 -0000
@@ -93,6 +93,7 @@
#include "mercury_mps.h" /* for GC_INIT(), GC_stack_bottom */
#endif
#ifdef MR_BOEHM_GC
+ #define GC_I_HIDE_POINTERS
#include "gc.h" /* for GC_INIT(), GC_stack_bottom */
#endif
#endif
Index: runtime/mercury_memory.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_memory.h,v
retrieving revision 1.18
diff -u -r1.18 mercury_memory.h
--- runtime/mercury_memory.h 21 Aug 2002 11:27:43 -0000 1.18
+++ runtime/mercury_memory.h 26 Aug 2002 01:59:25 -0000
@@ -31,6 +31,7 @@
#include "mercury_mps.h" /* for GC_FREE */
#endif
#if defined(MR_BOEHM_GC)
+ #define GC_I_HIDE_POINTERS
#include "gc.h" /* for GC_FREE */
#endif
#endif
Index: runtime/mercury_reg_workarounds.c
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_reg_workarounds.c,v
retrieving revision 1.6
diff -u -r1.6 mercury_reg_workarounds.c
--- runtime/mercury_reg_workarounds.c 22 Nov 2002 08:50:41 -0000 1.6
+++ runtime/mercury_reg_workarounds.c 26 Feb 2003 08:46:37 -0000
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 1998, 2000, 2002 The University of Melbourne.
+** Copyright (C) 1998, 2001-2003 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
@@ -46,6 +46,19 @@
while (nbytes-- > 0)
*d++ = *s++;
+}
+
+/*
+** See the header file for documentation on why we need this function.
+*/
+
+void
+MR_memset(void *dest, char c, size_t nbytes)
+{
+ char *d = (char *) dest;
+
+ while (nbytes-- > 0)
+ *d++ = c;
}
#endif /* MR_CANNOT_USE_STRUCTURE_ASSIGNMENT && MR_USE_GCC_GLOBAL_REGISTERS */
Index: runtime/mercury_reg_workarounds.h
===================================================================
RCS file: /home/mercury1/repository/mercury/runtime/mercury_reg_workarounds.h,v
retrieving revision 1.5
diff -u -r1.5 mercury_reg_workarounds.h
--- runtime/mercury_reg_workarounds.h 22 Nov 2002 08:50:41 -0000 1.5
+++ runtime/mercury_reg_workarounds.h 26 Feb 2003 08:47:24 -0000
@@ -1,5 +1,5 @@
/*
-** Copyright (C) 1998-2000, 2002 The University of Melbourne.
+** Copyright (C) 1998-2003 The University of Melbourne.
** This file may only be copied under the terms of the GNU Library General
** Public License - see the file COPYING.LIB in the Mercury distribution.
*/
@@ -43,11 +43,13 @@
** c_code may call the builtin functions.
*/
extern void MR_memcpy(void *dest, const void *src, size_t nbytes);
+ extern void MR_memset(void *dest, char c, size_t nbytes);
#else /* !MR_CANNOT_USE_STRUCTURE_ASSIGNMENT || !MR_USE_GCC_GLOBAL_REGISTERS */
#define MR_assign_structure(dest, src) ((dest) = (src))
#define MR_memcpy(dest, src, nbytes) memcpy((dest), (src), (nbytes))
+ #define MR_memset(dest, c, nbytes) memset((dest), (c), (nbytes))
#endif /* !MR_CANNOT_USE_STRUCTURE_ASSIGNMENT || !MR_USE_GCC_GLOBAL_REGISTERS */
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
Index: tests/debugger/declarative/if_then_else.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/if_then_else.exp,v
retrieving revision 1.11
diff -u -r1.11 if_then_else.exp
--- tests/debugger/declarative/if_then_else.exp 16 Nov 2004 00:16:42 -0000 1.11
+++ tests/debugger/declarative/if_then_else.exp 6 Dec 2004 04:33:03 -0000
@@ -2,7 +2,7 @@
mdb> echo on
Command echo enabled.
mdb> register --quiet
-mdb> break ite
+mdb> break if_then_else.ite
0: + stop interface pred if_then_else.ite/2-0 (det)
mdb> continue
E2: C2 CALL pred if_then_else.ite/2-0 (det) if_then_else.m:22 (if_then_else.m:8)
Index: tests/debugger/declarative/if_then_else.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/if_then_else.inp,v
retrieving revision 1.6
diff -u -r1.6 if_then_else.inp
--- tests/debugger/declarative/if_then_else.inp 18 Aug 2000 10:59:37 -0000 1.6
+++ tests/debugger/declarative/if_then_else.inp 24 Jun 2004 05:31:47 -0000
@@ -1,6 +1,6 @@
echo on
register --quiet
-break ite
+break if_then_else.ite
continue
finish
dd
Index: tests/debugger/declarative/ite_2.exp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/ite_2.exp,v
retrieving revision 1.3
diff -u -r1.3 ite_2.exp
--- tests/debugger/declarative/ite_2.exp 30 Jan 2003 05:59:28 -0000 1.3
+++ tests/debugger/declarative/ite_2.exp 24 Jun 2004 11:17:31 -0000
@@ -2,7 +2,7 @@
mdb> echo on
Command echo enabled.
mdb> register --quiet
-mdb> break ite
+mdb> break ite_2.ite
Ambiguous procedure specification. The matches are:
0: pred ite_2.ite/3-1 (multi)
1: pred ite_2.ite/3-0 (det)
Index: tests/debugger/declarative/ite_2.exp2
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/ite_2.exp2,v
retrieving revision 1.1
diff -u -r1.1 ite_2.exp2
--- tests/debugger/declarative/ite_2.exp2 30 Jan 2003 05:59:28 -0000 1.1
+++ tests/debugger/declarative/ite_2.exp2 24 Jun 2004 05:41:26 -0000
@@ -2,7 +2,7 @@
mdb> echo on
Command echo enabled.
mdb> register --quiet
-mdb> break ite
+mdb> break ite_2.ite
Ambiguous procedure specification. The matches are:
0: pred ite_2.ite/3-1 (multi)
1: pred ite_2.ite/3-0 (det)
Index: tests/debugger/declarative/ite_2.inp
===================================================================
RCS file: /home/mercury1/repository/tests/debugger/declarative/ite_2.inp,v
retrieving revision 1.2
diff -u -r1.2 ite_2.inp
--- tests/debugger/declarative/ite_2.inp 30 Jan 2003 05:59:28 -0000 1.2
+++ tests/debugger/declarative/ite_2.inp 24 Jun 2004 05:32:00 -0000
@@ -1,6 +1,6 @@
echo on
register --quiet
-break ite
+break ite_2.ite
*
continue
finish
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
Index: tools/bootcheck
===================================================================
RCS file: /home/mercury1/repository/mercury/tools/bootcheck,v
retrieving revision 1.162
diff -u -r1.162 bootcheck
--- tools/bootcheck 16 Aug 2004 03:51:13 -0000 1.162
+++ tools/bootcheck 16 Aug 2004 04:08:58 -0000
@@ -616,9 +616,18 @@
cp $root/trace/Mmake* .
$LN_S $root/trace/RESERVED_MACRO_NAMES .
cd $root/$stage2dir
+ rm -f robdd
+ mkdir robdd
+ cd robdd
+ $LN_S $root/robdd/*.h .
+ $LN_S $root/robdd/*.c .
+ cp $root/robdd/Mmake* .
+ cp $root/robdd/Make* .
+ cd $root/$stage2dir
else
$LN_S $root/runtime .
$LN_S $root/trace .
+ $LN_S $root/robdd .
fi
if $copy_boehm_gc
then
@@ -965,6 +974,7 @@
$LN_S $root/doc .
$LN_S $root/$stage2dir/runtime .
$LN_S $root/$stage2dir/trace .
+ $LN_S $root/$stage2dir/robdd .
$LN_S $root/scripts .
$LN_S $root/tools .
$LN_S $root/util .
cvs diff: Diffing trace
Index: trace/RESERVED_MACRO_NAMES
===================================================================
RCS file: /home/mercury1/repository/mercury/trace/RESERVED_MACRO_NAMES,v
retrieving revision 1.1
diff -u -r1.1 RESERVED_MACRO_NAMES
--- trace/RESERVED_MACRO_NAMES 20 May 2003 03:18:18 -0000 1.1
+++ trace/RESERVED_MACRO_NAMES 29 May 2003 07:03:05 -0000
@@ -30,6 +30,8 @@
# These are defined by boehm_gc/gc.h.
__GC
_GC_H
+HIDE_POINTER
+REVEAL_POINTER
#-----------------------------------------------------------------------------#
# This is defined by mps_gc/code/mercury_mps.h,
# which uses this macro for its header guard.
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list