source: vis_dev/vis-2.3/src/var/var.h @ 23

Last change on this file since 23 was 14, checked in by cecile, 13 years ago

vis2.3

File size: 6.8 KB
RevLine 
[14]1/**CHeaderFile*****************************************************************
2
3  FileName    [var.h]
4
5  PackageName [var]
6
7  Synopsis    [Multi-valued variables.]
8
9  Description [This package contains the data structure for multi-valued
10  variables. For each variable in a BLIF-MV network, this structure is
11  created. The information contained in this structure for a variable is
12  the name, the type (PI,PO,PS,NS etc), the range size, the list of symbolic
13  value names if any, and the encoding of a variable. Any variable can be
14  categorized either to an enumerative variable or a symbolic variable.
15  Enumerative variables are variables which take values from [0,...,n-1\],
16  where n is the range of the variable, while symbolic variables are
17  variables which take symbolic values (e.g., [red,blue,green\]). ]
18
19  SeeAlso     []
20
21  Author      [Yuji Kukimoto]
22
23  Copyright   [Copyright (c) 1994-1996 The Regents of the Univ. of California.
24  All rights reserved.
25
26  Permission is hereby granted, without written agreement and without license
27  or royalty fees, to use, copy, modify, and distribute this software and its
28  documentation for any purpose, provided that the above copyright notice and
29  the following two paragraphs appear in all copies of this software.
30
31  IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
32  DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
33  OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
34  CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
35
36  THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
37  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
38  FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN
39  "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE
40  MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.]
41
42  Revision    [$Id: var.h,v 1.3 1998/05/19 22:04:27 hsv Exp $]
43
44******************************************************************************/
45
46#ifndef _VAR
47#define _VAR
48
49/*---------------------------------------------------------------------------*/
50/* Nested includes                                                           */
51/*---------------------------------------------------------------------------*/
52
53/*---------------------------------------------------------------------------*/
54/* Constant declarations                                                     */
55/*---------------------------------------------------------------------------*/
56
57
58/*---------------------------------------------------------------------------*/
59/* Stucture declarations                                                     */
60/*---------------------------------------------------------------------------*/
61
62/*---------------------------------------------------------------------------*/
63/* Type declarations                                                         */
64/*---------------------------------------------------------------------------*/
65typedef struct VarVariableStruct Var_Variable_t;
66
67/*---------------------------------------------------------------------------*/
68/* Variable declarations                                                     */
69/*---------------------------------------------------------------------------*/
70
71
72/*---------------------------------------------------------------------------*/
73/* Macro declarations                                                        */
74/*---------------------------------------------------------------------------*/
75
76#include "hrc.h"
77
78/**AutomaticStart*************************************************************/
79
80/*---------------------------------------------------------------------------*/
81/* Function prototypes                                                       */
82/*---------------------------------------------------------------------------*/
83
84EXTERN boolean Var_VariableAddRangeInfo(Var_Variable_t * var, int numValues, array_t * symValArray);
85EXTERN boolean Var_VariableExpandRange(Var_Variable_t *var, int numValues);
86EXTERN boolean Var_VariableReduceRange(Var_Variable_t *var, int numValues);
87EXTERN Var_Variable_t * Var_VariableAlloc(Hrc_Node_t *hnode, char *name);
88EXTERN void Var_VariableFree(Var_Variable_t *var);
89EXTERN Var_Variable_t * Var_VariableDup(Var_Variable_t *var, Hrc_Node_t *hnode);
90EXTERN char * Var_VariableReadName(Var_Variable_t *var);
91EXTERN boolean Var_VariableTestIsPI(Var_Variable_t *var);
92EXTERN boolean Var_VariableTestIsPO(Var_Variable_t *var);
93EXTERN boolean Var_VariableTestIsPS(Var_Variable_t *var);
94EXTERN boolean Var_VariableTestIsNS(Var_Variable_t *var);
95EXTERN boolean Var_VariableTestIsSI(Var_Variable_t *var);
96EXTERN boolean Var_VariableTestIsSO(Var_Variable_t *var);
97EXTERN boolean Var_VariableTestIsSymbolic(Var_Variable_t *var);
98EXTERN boolean Var_VariableTestIsEnumerative(Var_Variable_t *var);
99EXTERN boolean Var_VariableTestIsValueInRange(Var_Variable_t *var, int value);
100EXTERN int Var_VariableReadNumValues(Var_Variable_t *var);
101EXTERN int Var_VariableReadNumFanoutTables(Var_Variable_t *var);
102EXTERN void Var_VariableIncrementNumFanoutTables(Var_Variable_t *var);
103EXTERN void Var_VariableResetNumFanoutTables(Var_Variable_t* var);
104EXTERN char * Var_VariableReadSymbolicValueFromIndex(Var_Variable_t *var, int i);
105EXTERN int Var_VariableReadIndexFromSymbolicValue(Var_Variable_t *var, char *symbolicValue);
106EXTERN Hrc_Node_t * Var_VariableReadHnode(Var_Variable_t *var);
107EXTERN char * Var_VariableReadTypeIdentifier(Var_Variable_t *var);
108EXTERN void * Var_VariableReadUndef(Var_Variable_t *var);
109EXTERN boolean Var_VariableChangeName(Var_Variable_t *var, char *name);
110EXTERN int Var_VariableSetPI(Var_Variable_t *var);
111EXTERN int Var_VariableSetPO(Var_Variable_t *var);
112EXTERN int Var_VariableSetPS(Var_Variable_t *var);
113EXTERN int Var_VariableSetNS(Var_Variable_t *var);
114EXTERN int Var_VariableSetSI(Var_Variable_t *var);
115EXTERN int Var_VariableSetSO(Var_Variable_t *var);
116EXTERN int Var_VariableResetPI(Var_Variable_t *var);
117EXTERN int Var_VariableResetPO(Var_Variable_t *var);
118EXTERN int Var_VariableResetPS(Var_Variable_t *var);
119EXTERN int Var_VariableResetNS(Var_Variable_t *var);
120EXTERN int Var_VariableResetSI(Var_Variable_t *var);
121EXTERN int Var_VariableResetSO(Var_Variable_t *var);
122EXTERN void Var_VariableResetAllTypes(Var_Variable_t *var);
123EXTERN void Var_VariableSetTypeIdentifier(Var_Variable_t *var, char *typeIdentifier);
124EXTERN boolean Var_VariablesTestIdentical(Var_Variable_t *var1, Var_Variable_t *var2);
125EXTERN boolean Var_VariablesTestHaveSameDomain(Var_Variable_t *var1, Var_Variable_t *var2);
126EXTERN boolean Var_VariableTestTypeConsistency(Var_Variable_t *var);
127EXTERN boolean Var_VariablesTestHaveSameTypeIdentifier(Var_Variable_t *var1, Var_Variable_t *var2);
128
129/**AutomaticEnd***************************************************************/
130
131#endif /* _VAR */
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
Note: See TracBrowser for help on using the repository browser.