[39298] trunk/dports/devel
macsforever2000 at macports.org
macsforever2000 at macports.org
Sat Aug 16 12:44:44 PDT 2008
Revision: 39298
http://trac.macosforge.org/projects/macports/changeset/39298
Author: macsforever2000 at macports.org
Date: 2008-08-16 12:44:43 -0700 (Sat, 16 Aug 2008)
Log Message:
-----------
Added new port. Satisfies ticket #16210.
Added Paths:
-----------
trunk/dports/devel/libcudd/
trunk/dports/devel/libcudd/Portfile
trunk/dports/devel/libcudd/files/
trunk/dports/devel/libcudd/files/patch-Makefile.diff
trunk/dports/devel/libcudd/files/patch-cudd-Makefile.diff
trunk/dports/devel/libcudd/files/patch-dddmp-Makefile.diff
trunk/dports/devel/libcudd/files/patch-epd-Makefile.diff
trunk/dports/devel/libcudd/files/patch-mtr-Makefile.diff
trunk/dports/devel/libcudd/files/patch-obj-Makefile.diff
trunk/dports/devel/libcudd/files/patch-obj-cuddObj.cc.diff
trunk/dports/devel/libcudd/files/patch-obj-cuddObj.hh.diff
trunk/dports/devel/libcudd/files/patch-st-Makefile.diff
trunk/dports/devel/libcudd/files/patch-util-Makefile.diff
Added: trunk/dports/devel/libcudd/Portfile
===================================================================
--- trunk/dports/devel/libcudd/Portfile (rev 0)
+++ trunk/dports/devel/libcudd/Portfile 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,54 @@
+# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
+# $Id$
+
+PortSystem 1.0
+
+name libcudd
+version 2.4.1
+categories devel
+maintainers bitchx.it:mij
+description An efficient library for manipulating decision diagrams
+long_description The CUDD package provides functions to manipulate Binary \
+ Decision Diagrams (BDDs), Algebraic Decision Diagrams (ADDs), \
+ and Zero-suppressed Binary Decision Diagrams (ZDDs). It's \
+ been written by Fabio Somenzi at the University of Colorado, \
+ Boulder.
+
+homepage http://vlsi.colorado.edu/~fabio/CUDD/
+master_sites ftp://vlsi.colorado.edu/pub/
+distname cudd-${version}
+checksums sha1 0a0894ff5a2798a73fcacf76d451777aa02919ce
+platforms darwin
+
+# patch to:
+# Makefile: avoid compiler flags that cause errors, add C++ interface target
+patchfiles patch-Makefile.diff patch-obj-cuddObj.cc.diff patch-obj-cuddObj.hh.diff patch-cudd-Makefile.diff patch-dddmp-Makefile.diff patch-epd-Makefile.diff patch-mtr-Makefile.diff patch-obj-Makefile.diff patch-st-Makefile.diff patch-util-Makefile.diff
+
+use_configure no
+build.target distclean
+build.target-append build
+
+post-build {
+ # generate dylib for C interface
+ exec /bin/sh -c "gcc -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcudd.dylib -o ${worksrcpath}/libcudd.dylib `find ${worksrcpath}/cudd ${worksrcpath}/dddmp ${worksrcpath}/epd ${worksrcpath}/mtr ${worksrcpath}/st ${worksrcpath}/util -name '*.o'`"
+
+ # compile the additional C++ interface
+ exec /bin/sh -c "cd ${worksrcpath}/obj && make distclean && make 1>/dev/null 2>/dev/null"
+ # generate dylib for C++ interface
+ exec /bin/sh -c "g++ -dynamiclib -O6 -headerpad_max_install_names -install_name ${prefix}/lib/cudd/libcuddobj.dylib -L${worksrcpath} -lcudd -o ${worksrcpath}/libcuddobj.dylib ${worksrcpath}/obj/cuddObj.o"
+}
+
+destroot {
+ # install header files
+ xinstall -m 755 -d ${destroot}${prefix}/include/cudd
+ xinstall -m 644 -W ${worksrcpath}/include cudd.h cuddInt.h cuddObj.hh \
+ dddmp.h epd.h mtr.h st.h util.h \
+ ${destroot}${prefix}/include/cudd
+ # install libraries
+ xinstall -m 755 -d ${destroot}${prefix}/lib/cudd
+ xinstall -m 644 -W ${worksrcpath} libcudd.dylib libcuddobj.dylib ${destroot}${prefix}/lib/cudd
+ # TODO: install documentation ...
+ # Print message on how to use the library
+ ui_msg "\n=============\nThe CUDD library for the Mac is compiled dynamically as per Apple's recommendations.\nTo compile against it, use:\n\t'-I${prefix}/cudd -L${prefix}/cudd -lcudd' for the C interface\n\t'-I${prefix}/cudd -L${prefix}/cudd -lcudd -lcuddobj' for the C++ interface.\n============="
+}
+
Property changes on: trunk/dports/devel/libcudd/Portfile
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Added: trunk/dports/devel/libcudd/files/patch-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,20 @@
+--- oldMakefile 2004-08-18 02:18:45.000000000 +0200
++++ Makefile 2008-08-16 17:55:20.000000000 +0200
+@@ -50,7 +50,7 @@
+ # These four are typical settings for optimized code with gcc. The
+ # last two also work with icc/ecc.
+ #ICFLAGS = -g -O6 -Wall
+-ICFLAGS = -g -O6
++ICFLAGS = -g -O6 -dynamiclib
+ #ICFLAGS = -g -O3 -Wall
+ #ICFLAGS = -g -O3
+
+@@ -62,7 +62,7 @@
+ # Linux
+ #
+ # Gcc 2.8.1 or higher on i686.
+-XCFLAGS = -mcpu=pentiumpro -malign-double -DHAVE_IEEE_754 -DBSD
++XCFLAGS = -DHAVE_IEEE_754
+ # Gcc 3.2.2 or higher on i686.
+ #XCFLAGS = -mcpu=pentium4 -malign-double -DHAVE_IEEE_754 -DBSD
+ # Icc on i686.
Added: trunk/dports/devel/libcudd/files/patch-cudd-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-cudd-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-cudd-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldcudd/Makefile 1999-08-20 00:34:24.000000000 +0200
++++ cudd/Makefile 2008-08-16 17:56:14.000000000 +0200
+@@ -12,7 +12,7 @@
+ #EXE = .exe
+
+ MFLAG =
+-ICFLAGS = -g
++ICFLAGS = -g -dynamiclib
+ XCFLAGS = -DDD_STATS
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
+ #DDDEBUG = -DDD_DEBUG -DDD_CACHE_PROFILE -DDD_VERBOSE -DDD_UNIQUE_PROFILE
Added: trunk/dports/devel/libcudd/files/patch-dddmp-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-dddmp-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-dddmp-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- olddddmp/Makefile 2004-02-20 17:13:24.000000000 +0100
++++ dddmp/Makefile 2008-08-16 18:30:14.000000000 +0200
+@@ -67,7 +67,7 @@
+ # Settings for optimized code with gcc
+ #ICFLAGS = -g -Wall
+ #ICFLAGS = -g -O3 -Wall
+-ICFLAGS = -g -O6 -Wall
++ICFLAGS = -g -O6 -Wall -dynamiclib
+
+ #--------------------------------#
+ # Define Machine Dependent Flags #
Added: trunk/dports/devel/libcudd/files/patch-epd-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-epd-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-epd-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldepd/Makefile 2003-12-31 17:31:30.000000000 +0100
++++ epd/Makefile 2008-08-16 18:30:31.000000000 +0200
+@@ -8,7 +8,7 @@
+ RANLIB = ranlib
+
+ MFLAG =
+-ICFLAGS = -g -O6 -Wall
++ICFLAGS = -g -O6 -Wall -dynamiclib
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
+
+ LINTFLAGS = -u -n
Added: trunk/dports/devel/libcudd/files/patch-mtr-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-mtr-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-mtr-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldmtr/Makefile 2004-01-01 19:47:16.000000000 +0100
++++ mtr/Makefile 2008-08-16 18:31:05.000000000 +0200
+@@ -12,7 +12,7 @@
+ #EXE = .exe
+
+ MFLAG =
+-ICFLAGS = -g
++ICFLAGS = -g -dynamiclib
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
+ MTRDEBUG = -DMTR_STATS -DMTR_VERBOSE -DMTR_DEBUG
+
Added: trunk/dports/devel/libcudd/files/patch-obj-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-obj-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-obj-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldobj/Makefile 2001-03-19 08:35:09.000000000 +0100
++++ obj/Makefile 2008-08-16 18:31:37.000000000 +0200
+@@ -12,7 +12,7 @@
+ #EXE = .exe
+
+ MFLAG =
+-ICFLAGS = -g
++ICFLAGS = -g -O6 -dynamiclib
+ XCFLAGS =
+ CPPFLAGS =
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS) $(CPPFLAGS)
Added: trunk/dports/devel/libcudd/files/patch-obj-cuddObj.cc.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-obj-cuddObj.cc.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-obj-cuddObj.cc.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,139 @@
+--- oldobj/cuddObj.cc 2004-08-24 23:13:14.000000000 +0200
++++ obj/cuddObj.cc 2008-08-16 18:36:28.000000000 +0200
+@@ -94,84 +94,6 @@
+ } // DD::DD
+
+
+-inline DdManager *
+-DD::checkSameManager(
+- const DD &other) const
+-{
+- DdManager *mgr = ddMgr->p->manager;
+- if (mgr != other.ddMgr->p->manager) {
+- ddMgr->p->errorHandler("Operands come from different manager.");
+- }
+- return mgr;
+-
+-} // DD::checkSameManager
+-
+-
+-inline void
+-DD::checkReturnValue(
+- const DdNode *result) const
+-{
+- if (result == 0) {
+- DdManager *mgr = ddMgr->p->manager;
+- Cudd_ErrorType errType = Cudd_ReadErrorCode(mgr);
+- switch (errType) {
+- CUDD_MEMORY_OUT:
+- ddMgr->p->errorHandler("Out of memory.");
+- break;
+- CUDD_TOO_MANY_NODES:
+- break;
+- CUDD_MAX_MEM_EXCEEDED:
+- ddMgr->p->errorHandler("Maximum memory exceeded.");
+- break;
+- CUDD_INVALID_ARG:
+- ddMgr->p->errorHandler("Invalid argument.");
+- break;
+- CUDD_INTERNAL_ERROR:
+- ddMgr->p->errorHandler("Internal error.");
+- break;
+- CUDD_NO_ERROR:
+- default:
+- ddMgr->p->errorHandler("Unexpected error.");
+- break;
+- }
+- }
+-
+-} // DD::checkReturnValue
+-
+-
+-inline void
+-DD::checkReturnValue(
+- const int result,
+- const int expected) const
+-{
+- if (result != expected) {
+- DdManager *mgr = ddMgr->p->manager;
+- Cudd_ErrorType errType = Cudd_ReadErrorCode(mgr);
+- switch (errType) {
+- CUDD_MEMORY_OUT:
+- ddMgr->p->errorHandler("Out of memory.");
+- break;
+- CUDD_TOO_MANY_NODES:
+- break;
+- CUDD_MAX_MEM_EXCEEDED:
+- ddMgr->p->errorHandler("Maximum memory exceeded.");
+- break;
+- CUDD_INVALID_ARG:
+- ddMgr->p->errorHandler("Invalid argument.");
+- break;
+- CUDD_INTERNAL_ERROR:
+- ddMgr->p->errorHandler("Internal error.");
+- break;
+- CUDD_NO_ERROR:
+- default:
+- ddMgr->p->errorHandler("Unexpected error.");
+- break;
+- }
+- }
+-
+-} // DD::checkReturnValue
+-
+-
+ Cudd *
+ DD::manager() const
+ {
+@@ -180,14 +102,6 @@
+ } // DD::manager
+
+
+-inline DdNode *
+-DD::getNode() const
+-{
+- return node;
+-
+-} // DD::getNode
+-
+-
+ int
+ DD::nodeCount() const
+ {
+@@ -1097,36 +1011,6 @@
+ } // Cudd::getHandler
+
+
+-inline void
+-Cudd::checkReturnValue(
+- const DdNode *result) const
+-{
+- if (result == 0) {
+- if (Cudd_ReadErrorCode(p->manager) == CUDD_MEMORY_OUT) {
+- p->errorHandler("Out of memory.");
+- } else {
+- p->errorHandler("Internal error.");
+- }
+- }
+-
+-} // Cudd::checkReturnValue
+-
+-
+-inline void
+-Cudd::checkReturnValue(
+- const int result) const
+-{
+- if (result == 0) {
+- if (Cudd_ReadErrorCode(p->manager) == CUDD_MEMORY_OUT) {
+- p->errorHandler("Out of memory.");
+- } else {
+- p->errorHandler("Internal error.");
+- }
+- }
+-
+-} // Cudd::checkReturnValue
+-
+-
+ void
+ Cudd::info() const
+ {
Added: trunk/dports/devel/libcudd/files/patch-obj-cuddObj.hh.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-obj-cuddObj.hh.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-obj-cuddObj.hh.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,530 @@
+--- oldobj/cuddObj.hh 2004-08-24 23:13:14.000000000 +0200
++++ obj/cuddObj.hh 2008-08-16 18:37:32.000000000 +0200
+@@ -89,6 +89,232 @@
+
+ /**Class***********************************************************************
+
++ Synopsis [Class for CUDD managers.]
++
++ Description []
++
++ SeeAlso [DD]
++
++******************************************************************************/
++class Cudd {
++ friend class DD;
++ friend class ABDD;
++ friend class ADD;
++ friend class BDD;
++ friend class ZDD;
++ struct capsule {
++ DdManager *manager;
++ PFC errorHandler;
++ int verbose;
++ int ref;
++ };
++ capsule *p;
++public:
++ Cudd(
++ unsigned int numVars = 0,
++ unsigned int numVarsZ = 0,
++ unsigned int numSlots = CUDD_UNIQUE_SLOTS,
++ unsigned int cacheSize = CUDD_CACHE_SLOTS,
++ unsigned long maxMemory = 0);
++ Cudd(Cudd& x);
++ ~Cudd();
++ PFC setHandler(PFC newHandler);
++ PFC getHandler() const;
++ DdManager *getManager() const {return p->manager;}
++ inline void makeVerbose() {p->verbose = 1;}
++ inline void makeTerse() {p->verbose = 0;}
++ inline int isVerbose() const {return p->verbose;}
++ inline void checkReturnValue(const DdNode *result) const {
++ if (result == 0) {
++ if (Cudd_ReadErrorCode(p->manager) == CUDD_MEMORY_OUT) {
++ p->errorHandler("Out of memory.");
++ } else {
++ p->errorHandler("Internal error.");
++ }
++ }
++ }
++ inline void checkReturnValue(const int result) const {
++ if (result == 0) {
++ if (Cudd_ReadErrorCode(p->manager) == CUDD_MEMORY_OUT) {
++ p->errorHandler("Out of memory.");
++ } else {
++ p->errorHandler("Internal error.");
++ }
++ }
++ }
++ Cudd& operator=(const Cudd& right);
++ void info() const;
++ BDD bddVar();
++ BDD bddVar(int index);
++ BDD bddOne();
++ BDD bddZero();
++ ADD addVar();
++ ADD addVar(int index);
++ ADD addOne();
++ ADD addZero();
++ ADD constant(CUDD_VALUE_TYPE c);
++ ADD plusInfinity();
++ ADD minusInfinity();
++ ZDD zddVar(int index);
++ ZDD zddOne(int i);
++ ZDD zddZero();
++ ADD addNewVarAtLevel(int level);
++ BDD bddNewVarAtLevel(int level);
++ void zddVarsFromBddVars(int multiplicity);
++ void AutodynEnable(Cudd_ReorderingType method);
++ void AutodynDisable();
++ int ReorderingStatus(Cudd_ReorderingType * method) const;
++ void AutodynEnableZdd(Cudd_ReorderingType method);
++ void AutodynDisableZdd();
++ int ReorderingStatusZdd(Cudd_ReorderingType * method) const;
++ int zddRealignmentEnabled() const;
++ void zddRealignEnable();
++ void zddRealignDisable();
++ int bddRealignmentEnabled() const;
++ void bddRealignEnable();
++ void bddRealignDisable();
++ ADD background();
++ void SetBackground(ADD bg);
++ unsigned int ReadCacheSlots() const;
++ double ReadCacheUsedSlots() const;
++ double ReadCacheLookUps() const;
++ double ReadCacheHits() const;
++ unsigned int ReadMinHit() const;
++ void SetMinHit(unsigned int hr);
++ unsigned int ReadLooseUpTo() const;
++ void SetLooseUpTo(unsigned int lut);
++ unsigned int ReadMaxCache() const;
++ unsigned int ReadMaxCacheHard() const;
++ void SetMaxCacheHard(unsigned int mc);
++ int ReadSize() const;
++ int ReadZddSize() const;
++ unsigned int ReadSlots() const;
++ unsigned int ReadKeys() const;
++ unsigned int ReadDead() const;
++ unsigned int ReadMinDead() const;
++ int ReadReorderings() const;
++ long ReadReorderingTime() const;
++ int ReadGarbageCollections() const;
++ long ReadGarbageCollectionTime() const;
++ int ReadSiftMaxVar() const;
++ void SetSiftMaxVar(int smv);
++ int ReadSiftMaxSwap() const;
++ void SetSiftMaxSwap(int sms);
++ double ReadMaxGrowth() const;
++ void SetMaxGrowth(double mg);
++ MtrNode * ReadTree() const;
++ void SetTree(MtrNode * tree);
++ void FreeTree();
++ MtrNode * ReadZddTree() const;
++ void SetZddTree(MtrNode * tree);
++ void FreeZddTree();
++ int ReadPerm(int i) const;
++ int ReadPermZdd(int i) const;
++ int ReadInvPerm(int i) const;
++ int ReadInvPermZdd(int i) const;
++ BDD ReadVars(int i);
++ CUDD_VALUE_TYPE ReadEpsilon() const;
++ void SetEpsilon(CUDD_VALUE_TYPE ep);
++ Cudd_AggregationType ReadGroupcheck() const;
++ void SetGroupcheck(Cudd_AggregationType gc);
++ int GarbageCollectionEnabled() const;
++ void EnableGarbageCollection();
++ void DisableGarbageCollection();
++ int DeadAreCounted() const;
++ void TurnOnCountDead();
++ void TurnOffCountDead();
++ int ReadRecomb() const;
++ void SetRecomb(int recomb);
++ int ReadSymmviolation() const;
++ void SetSymmviolation(int symmviolation);
++ int ReadArcviolation() const;
++ void SetArcviolation(int arcviolation);
++ int ReadPopulationSize() const;
++ void SetPopulationSize(int populationSize);
++ int ReadNumberXovers() const;
++ void SetNumberXovers(int numberXovers);
++ unsigned long ReadMemoryInUse() const;
++ long ReadPeakNodeCount() const;
++ long ReadNodeCount() const;
++ long zddReadNodeCount() const;
++ void AddHook(DD_HFP f, Cudd_HookType where);
++ void RemoveHook(DD_HFP f, Cudd_HookType where);
++ int IsInHook(DD_HFP f, Cudd_HookType where) const;
++ void EnableReorderingReporting();
++ void DisableReorderingReporting();
++ int ReorderingReporting();
++ int ReadErrorCode() const;
++ void ClearErrorCode();
++ FILE *ReadStdout() const;
++ void SetStdout(FILE *);
++ FILE *ReadStderr() const;
++ void SetStderr(FILE *);
++ unsigned int ReadNextReordering() const;
++ double ReadSwapSteps() const;
++ unsigned int ReadMaxLive() const;
++ void SetMaxLive(unsigned int);
++ unsigned long ReadMaxMemory() const;
++ void SetMaxMemory(unsigned long);
++ int bddBindVar(int);
++ int bddUnbindVar(int);
++ int bddVarIsBound(int) const;
++ ADD Walsh(ADDvector x, ADDvector y);
++ ADD addResidue(int n, int m, int options, int top);
++ int ApaNumberOfDigits(int binaryDigits) const;
++ DdApaNumber NewApaNumber(int digits) const;
++ void ApaCopy(int digits, DdApaNumber source, DdApaNumber dest) const;
++ DdApaDigit ApaAdd(int digits, DdApaNumber a, DdApaNumber b, DdApaNumber
++ sum) const;
++ DdApaDigit ApaSubtract(int digits, DdApaNumber a, DdApaNumber b,
++ DdApaNumber diff) const;
++ DdApaDigit ApaShortDivision(int digits, DdApaNumber dividend, DdApaDigit
++ divisor, DdApaNumber quotient) const;
++ void ApaShiftRight(int digits, DdApaDigit in, DdApaNumber a, DdApaNumber
++ b) const;
++ void ApaSetToLiteral(int digits, DdApaNumber number, DdApaDigit literal)
++ const;
++ void ApaPowerOfTwo(int digits, DdApaNumber number, int power) const;
++ void ApaPrintHex(FILE * fp, int digits, DdApaNumber number) const;
++ void ApaPrintDecimal(FILE * fp, int digits, DdApaNumber number) const;
++ void DebugCheck();
++ void CheckKeys();
++ MtrNode * MakeTreeNode(unsigned int low, unsigned int size, unsigned int type);
++ // void Harwell(FILE * fp, ADD* E, ADD** x, ADD** y, ADD** xn, ADD** yn_, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy, int pr);
++ void PrintLinear();
++ int ReadLinear(int x, int y);
++ BDD Xgty(BDDvector z, BDDvector x, BDDvector y);
++ BDD Xeqy(BDDvector x, BDDvector y);
++ ADD Xeqy(ADDvector x, ADDvector y);
++ BDD Dxygtdxz(BDDvector x, BDDvector y, BDDvector z);
++ BDD Dxygtdyz(BDDvector x, BDDvector y, BDDvector z);
++ ADD Hamming(ADDvector xVars, ADDvector yVars);
++ // void Read(FILE * fp, ADD* E, ADD** x, ADD** y, ADD** xn, ADD** yn_, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy);
++ // void Read(FILE * fp, BDD* E, BDD** x, BDD** y, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy);
++ void ReduceHeap(Cudd_ReorderingType heuristic, int minsize);
++ void ShuffleHeap(int * permutation);
++ void SymmProfile(int lower, int upper) const;
++ unsigned int Prime(unsigned int pr) const;
++ int SharingSize(DD* nodes, int n) const;
++ BDD bddComputeCube(BDD * vars, int * phase, int n);
++ ADD addComputeCube(ADD * vars, int * phase, int n);
++ int NextNode(DdGen * gen, BDD * nnode);
++ BDD IndicesToCube(int * array, int n);
++ void PrintVersion(FILE * fp) const;
++ double AverageDistance() const;
++ long Random();
++ void Srandom(long seed);
++ MtrNode * MakeZddTreeNode(unsigned int low, unsigned int size, unsigned int type);
++ void zddPrintSubtable() const;
++ void zddReduceHeap(Cudd_ReorderingType heuristic, int minsize);
++ void zddShuffleHeap(int * permutation);
++ void zddSymmProfile(int lower, int upper) const;
++ //void DumpDot(int n, ZDD* f, char ** inames, char ** onames, FILE * fp);
++
++}; // Cudd
++
++
++/**Class***********************************************************************
++
+ Synopsis [Base class for all decision diagrams in CUDD.]
+
+ Description []
+@@ -103,16 +329,73 @@
+ friend class ZDD;
+ Cudd *ddMgr;
+ DdNode *node;
+- inline DdManager * checkSameManager(const DD &other) const;
+- inline void checkReturnValue(const DdNode *result) const;
+- inline void checkReturnValue(const int result, const int expected = 1)
+- const;
++ inline DdManager * checkSameManager(const DD &other) const {
++ DdManager *mgr = ddMgr->p->manager;
++ if (mgr != other.ddMgr->p->manager) {
++ ddMgr->p->errorHandler("Operands come from different manager.");
++ }
++ return mgr;
++ }
++ inline void checkReturnValue(const DdNode *result) const {
++ if (result == 0) {
++ DdManager *mgr = ddMgr->p->manager;
++ Cudd_ErrorType errType = Cudd_ReadErrorCode(mgr);
++ switch (errType) {
++ case CUDD_MEMORY_OUT:
++ ddMgr->p->errorHandler("Out of memory.");
++ break;
++ case CUDD_TOO_MANY_NODES:
++ break;
++ case CUDD_MAX_MEM_EXCEEDED:
++ ddMgr->p->errorHandler("Maximum memory exceeded.");
++ break;
++ case CUDD_INVALID_ARG:
++ ddMgr->p->errorHandler("Invalid argument.");
++ break;
++ case CUDD_INTERNAL_ERROR:
++ ddMgr->p->errorHandler("Internal error.");
++ break;
++ case CUDD_NO_ERROR:
++ default:
++ ddMgr->p->errorHandler("Unexpected error.");
++ break;
++ }
++ }
++ }
++ inline void checkReturnValue(const int result, const int expected = 1) const {
++ if (result != expected) {
++ DdManager *mgr = ddMgr->p->manager;
++ Cudd_ErrorType errType = Cudd_ReadErrorCode(mgr);
++ switch (errType) {
++ case CUDD_MEMORY_OUT:
++ ddMgr->p->errorHandler("Out of memory.");
++ break;
++ case CUDD_TOO_MANY_NODES:
++ break;
++ case CUDD_MAX_MEM_EXCEEDED:
++ ddMgr->p->errorHandler("Maximum memory exceeded.");
++ break;
++ case CUDD_INVALID_ARG:
++ ddMgr->p->errorHandler("Invalid argument.");
++ break;
++ case CUDD_INTERNAL_ERROR:
++ ddMgr->p->errorHandler("Internal error.");
++ break;
++ case CUDD_NO_ERROR:
++ default:
++ ddMgr->p->errorHandler("Unexpected error.");
++ break;
++ }
++ }
++ }
+ public:
+ DD(Cudd *ddManager, DdNode *ddNode);
+ DD();
+ DD(const DD &from);
+ Cudd *manager() const;
+- inline DdNode * getNode() const;
++ inline DdNode * getNode() const {
++ return node;
++ }
+ int nodeCount() const;
+ unsigned int NodeReadIndex() const;
+
+@@ -442,215 +725,6 @@
+ }; // ZDD
+
+
+-/**Class***********************************************************************
+-
+- Synopsis [Class for CUDD managers.]
+-
+- Description []
+-
+- SeeAlso [DD]
+-
+-******************************************************************************/
+-class Cudd {
+- friend class DD;
+- friend class ABDD;
+- friend class ADD;
+- friend class BDD;
+- friend class ZDD;
+- struct capsule {
+- DdManager *manager;
+- PFC errorHandler;
+- int verbose;
+- int ref;
+- };
+- capsule *p;
+-public:
+- Cudd(
+- unsigned int numVars = 0,
+- unsigned int numVarsZ = 0,
+- unsigned int numSlots = CUDD_UNIQUE_SLOTS,
+- unsigned int cacheSize = CUDD_CACHE_SLOTS,
+- unsigned long maxMemory = 0);
+- Cudd(Cudd& x);
+- ~Cudd();
+- PFC setHandler(PFC newHandler);
+- PFC getHandler() const;
+- DdManager *getManager() const {return p->manager;}
+- inline void makeVerbose() {p->verbose = 1;}
+- inline void makeTerse() {p->verbose = 0;}
+- inline int isVerbose() const {return p->verbose;}
+- inline void checkReturnValue(const DdNode *result) const;
+- inline void checkReturnValue(const int result) const;
+- Cudd& operator=(const Cudd& right);
+- void info() const;
+- BDD bddVar();
+- BDD bddVar(int index);
+- BDD bddOne();
+- BDD bddZero();
+- ADD addVar();
+- ADD addVar(int index);
+- ADD addOne();
+- ADD addZero();
+- ADD constant(CUDD_VALUE_TYPE c);
+- ADD plusInfinity();
+- ADD minusInfinity();
+- ZDD zddVar(int index);
+- ZDD zddOne(int i);
+- ZDD zddZero();
+- ADD addNewVarAtLevel(int level);
+- BDD bddNewVarAtLevel(int level);
+- void zddVarsFromBddVars(int multiplicity);
+- void AutodynEnable(Cudd_ReorderingType method);
+- void AutodynDisable();
+- int ReorderingStatus(Cudd_ReorderingType * method) const;
+- void AutodynEnableZdd(Cudd_ReorderingType method);
+- void AutodynDisableZdd();
+- int ReorderingStatusZdd(Cudd_ReorderingType * method) const;
+- int zddRealignmentEnabled() const;
+- void zddRealignEnable();
+- void zddRealignDisable();
+- int bddRealignmentEnabled() const;
+- void bddRealignEnable();
+- void bddRealignDisable();
+- ADD background();
+- void SetBackground(ADD bg);
+- unsigned int ReadCacheSlots() const;
+- double ReadCacheUsedSlots() const;
+- double ReadCacheLookUps() const;
+- double ReadCacheHits() const;
+- unsigned int ReadMinHit() const;
+- void SetMinHit(unsigned int hr);
+- unsigned int ReadLooseUpTo() const;
+- void SetLooseUpTo(unsigned int lut);
+- unsigned int ReadMaxCache() const;
+- unsigned int ReadMaxCacheHard() const;
+- void SetMaxCacheHard(unsigned int mc);
+- int ReadSize() const;
+- int ReadZddSize() const;
+- unsigned int ReadSlots() const;
+- unsigned int ReadKeys() const;
+- unsigned int ReadDead() const;
+- unsigned int ReadMinDead() const;
+- int ReadReorderings() const;
+- long ReadReorderingTime() const;
+- int ReadGarbageCollections() const;
+- long ReadGarbageCollectionTime() const;
+- int ReadSiftMaxVar() const;
+- void SetSiftMaxVar(int smv);
+- int ReadSiftMaxSwap() const;
+- void SetSiftMaxSwap(int sms);
+- double ReadMaxGrowth() const;
+- void SetMaxGrowth(double mg);
+- MtrNode * ReadTree() const;
+- void SetTree(MtrNode * tree);
+- void FreeTree();
+- MtrNode * ReadZddTree() const;
+- void SetZddTree(MtrNode * tree);
+- void FreeZddTree();
+- int ReadPerm(int i) const;
+- int ReadPermZdd(int i) const;
+- int ReadInvPerm(int i) const;
+- int ReadInvPermZdd(int i) const;
+- BDD ReadVars(int i);
+- CUDD_VALUE_TYPE ReadEpsilon() const;
+- void SetEpsilon(CUDD_VALUE_TYPE ep);
+- Cudd_AggregationType ReadGroupcheck() const;
+- void SetGroupcheck(Cudd_AggregationType gc);
+- int GarbageCollectionEnabled() const;
+- void EnableGarbageCollection();
+- void DisableGarbageCollection();
+- int DeadAreCounted() const;
+- void TurnOnCountDead();
+- void TurnOffCountDead();
+- int ReadRecomb() const;
+- void SetRecomb(int recomb);
+- int ReadSymmviolation() const;
+- void SetSymmviolation(int symmviolation);
+- int ReadArcviolation() const;
+- void SetArcviolation(int arcviolation);
+- int ReadPopulationSize() const;
+- void SetPopulationSize(int populationSize);
+- int ReadNumberXovers() const;
+- void SetNumberXovers(int numberXovers);
+- unsigned long ReadMemoryInUse() const;
+- long ReadPeakNodeCount() const;
+- long ReadNodeCount() const;
+- long zddReadNodeCount() const;
+- void AddHook(DD_HFP f, Cudd_HookType where);
+- void RemoveHook(DD_HFP f, Cudd_HookType where);
+- int IsInHook(DD_HFP f, Cudd_HookType where) const;
+- void EnableReorderingReporting();
+- void DisableReorderingReporting();
+- int ReorderingReporting();
+- int ReadErrorCode() const;
+- void ClearErrorCode();
+- FILE *ReadStdout() const;
+- void SetStdout(FILE *);
+- FILE *ReadStderr() const;
+- void SetStderr(FILE *);
+- unsigned int ReadNextReordering() const;
+- double ReadSwapSteps() const;
+- unsigned int ReadMaxLive() const;
+- void SetMaxLive(unsigned int);
+- unsigned long ReadMaxMemory() const;
+- void SetMaxMemory(unsigned long);
+- int bddBindVar(int);
+- int bddUnbindVar(int);
+- int bddVarIsBound(int) const;
+- ADD Walsh(ADDvector x, ADDvector y);
+- ADD addResidue(int n, int m, int options, int top);
+- int ApaNumberOfDigits(int binaryDigits) const;
+- DdApaNumber NewApaNumber(int digits) const;
+- void ApaCopy(int digits, DdApaNumber source, DdApaNumber dest) const;
+- DdApaDigit ApaAdd(int digits, DdApaNumber a, DdApaNumber b, DdApaNumber
+- sum) const;
+- DdApaDigit ApaSubtract(int digits, DdApaNumber a, DdApaNumber b,
+- DdApaNumber diff) const;
+- DdApaDigit ApaShortDivision(int digits, DdApaNumber dividend, DdApaDigit
+- divisor, DdApaNumber quotient) const;
+- void ApaShiftRight(int digits, DdApaDigit in, DdApaNumber a, DdApaNumber
+- b) const;
+- void ApaSetToLiteral(int digits, DdApaNumber number, DdApaDigit literal)
+- const;
+- void ApaPowerOfTwo(int digits, DdApaNumber number, int power) const;
+- void ApaPrintHex(FILE * fp, int digits, DdApaNumber number) const;
+- void ApaPrintDecimal(FILE * fp, int digits, DdApaNumber number) const;
+- void DebugCheck();
+- void CheckKeys();
+- MtrNode * MakeTreeNode(unsigned int low, unsigned int size, unsigned int type);
+- // void Harwell(FILE * fp, ADD* E, ADD** x, ADD** y, ADD** xn, ADD** yn_, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy, int pr);
+- void PrintLinear();
+- int ReadLinear(int x, int y);
+- BDD Xgty(BDDvector z, BDDvector x, BDDvector y);
+- BDD Xeqy(BDDvector x, BDDvector y);
+- ADD Xeqy(ADDvector x, ADDvector y);
+- BDD Dxygtdxz(BDDvector x, BDDvector y, BDDvector z);
+- BDD Dxygtdyz(BDDvector x, BDDvector y, BDDvector z);
+- ADD Hamming(ADDvector xVars, ADDvector yVars);
+- // void Read(FILE * fp, ADD* E, ADD** x, ADD** y, ADD** xn, ADD** yn_, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy);
+- // void Read(FILE * fp, BDD* E, BDD** x, BDD** y, int * nx, int * ny, int * m, int * n, int bx, int sx, int by, int sy);
+- void ReduceHeap(Cudd_ReorderingType heuristic, int minsize);
+- void ShuffleHeap(int * permutation);
+- void SymmProfile(int lower, int upper) const;
+- unsigned int Prime(unsigned int pr) const;
+- int SharingSize(DD* nodes, int n) const;
+- BDD bddComputeCube(BDD * vars, int * phase, int n);
+- ADD addComputeCube(ADD * vars, int * phase, int n);
+- int NextNode(DdGen * gen, BDD * nnode);
+- BDD IndicesToCube(int * array, int n);
+- void PrintVersion(FILE * fp) const;
+- double AverageDistance() const;
+- long Random();
+- void Srandom(long seed);
+- MtrNode * MakeZddTreeNode(unsigned int low, unsigned int size, unsigned int type);
+- void zddPrintSubtable() const;
+- void zddReduceHeap(Cudd_ReorderingType heuristic, int minsize);
+- void zddShuffleHeap(int * permutation);
+- void zddSymmProfile(int lower, int upper) const;
+- //void DumpDot(int n, ZDD* f, char ** inames, char ** onames, FILE * fp);
+-
+-}; // Cudd
+-
+
+ /**Class***********************************************************************
+
Added: trunk/dports/devel/libcudd/files/patch-st-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-st-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-st-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldst/Makefile 2004-01-01 17:53:24.000000000 +0100
++++ st/Makefile 2008-08-16 18:31:31.000000000 +0200
+@@ -8,7 +8,7 @@
+ RANLIB = ranlib
+
+ MFLAG =
+-ICFLAGS = -g -O6 -Wall
++ICFLAGS = -g -O6 -Wall -dynamiclib
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
+
+ LINTFLAGS = -u -n
Added: trunk/dports/devel/libcudd/files/patch-util-Makefile.diff
===================================================================
--- trunk/dports/devel/libcudd/files/patch-util-Makefile.diff (rev 0)
+++ trunk/dports/devel/libcudd/files/patch-util-Makefile.diff 2008-08-16 19:44:43 UTC (rev 39298)
@@ -0,0 +1,11 @@
+--- oldutil/Makefile 2004-01-03 18:15:30.000000000 +0100
++++ util/Makefile 2008-08-16 18:31:45.000000000 +0200
+@@ -9,7 +9,7 @@
+
+ FLAGS = -DUNIX
+ MFLAG =
+-ICFLAGS = -g
++ICFLAGS = -g -dynamiclib
+ CFLAGS = $(ICFLAGS) $(MFLAG) $(XCFLAGS)
+
+ LINTFLAGS = -u -n
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20080816/8d421c3a/attachment-0001.html
More information about the macports-changes
mailing list