1/*========================================================================
2               Copyright (C) 1996-2001 by Jorn Lind-Nielsen
3                            All rights reserved
4
5    Permission is hereby granted, without written agreement and without
6    license or royalty fees, to use, reproduce, prepare derivative
7    works, distribute, and display this software and its documentation
8    for any purpose, provided that (1) the above copyright notice and
9    the following two paragraphs appear in all copies of the source code
10    and (2) redistributions, including without limitation binaries,
11    reproduce these notices in the supporting documentation. Substantial
12    modifications to this software may be copyrighted by their authors
13    and need not follow the licensing terms described here, provided
14    that the new terms are clearly indicated in all files where they apply.
15
16    IN NO EVENT SHALL JORN LIND-NIELSEN, OR DISTRIBUTORS OF THIS
17    SOFTWARE BE LIABLE TO ANY PARTY FOR DIRECT, INDIRECT, SPECIAL,
18    INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OF THIS
19    SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE AUTHORS OR ANY OF THE
20    ABOVE PARTIES HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
21
22    JORN LIND-NIELSEN SPECIFICALLY DISCLAIM ANY WARRANTIES, INCLUDING,
23    BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
24    FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS
25    ON AN "AS IS" BASIS, AND THE AUTHORS AND DISTRIBUTORS HAVE NO
26    OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR
27    MODIFICATIONS.
28========================================================================*/
29
30/*************************************************************************
31  $Header$
32  FILE:  tree.h
33  DESCR: Trees for BDD variables
34  AUTH:  Jorn Lind
35  DATE:  (C) march 1998
36*************************************************************************/
37
38#ifndef _TREE_H
39#define _TREE_H
40
41typedef struct s_BddTree
42{
43   int first, last;  /* First and last variable in this block */
44   int pos;          /* Sifting position */
45   int *seq;         /* Sequence of first...last in the current order */
46   char fixed;       /* Are the sub-blocks fixed or may they be reordered */
47   int id;           /* A sequential id number given by addblock */
48   struct s_BddTree *next, *prev;
49   struct s_BddTree *nextlevel;
50} BddTree;
51
52BddTree *bddtree_new(int);
53void     bddtree_del(BddTree *);
54BddTree *bddtree_addrange(BddTree *, int, int, int, int);
55void     bddtree_print(FILE *, BddTree *, int);
56
57#endif /* _TREE_H */
58
59
60/* EOF */
61