source: vis_dev/vis-2.3/src/vm/vmInit.c @ 44

Last change on this file since 44 was 27, checked in by cecile, 13 years ago

add debug code source

File size: 4.6 KB
Line 
1/**CFile***********************************************************************
2
3  FileName    [vmInit.c]
4
5  PackageName [vm]
6
7  Synopsis    [Initializes and ends VIS.]
8
9  Author      [Originated from SIS]
10
11  Copyright   [Copyright (c) 1994-1996 The Regents of the Univ. of California.
12  All rights reserved.
13
14  Permission is hereby granted, without written agreement and without license
15  or royalty fees, to use, copy, modify, and distribute this software and its
16  documentation for any purpose, provided that the above copyright notice and
17  the following two paragraphs appear in all copies of this software.
18
19  IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
20  DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT
21  OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
22  CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
23
24  THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
25  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
26  FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS ON AN
27  "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE
28  MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.]
29
30******************************************************************************/
31
32#include "vmInt.h"
33
34static char rcsid[] UNUSED = "$Id: vmInit.c,v 1.17 2004/12/27 00:25:32 bli Exp $";
35
36/**AutomaticStart*************************************************************/
37
38/*---------------------------------------------------------------------------*/
39/* Static function prototypes                                                */
40/*---------------------------------------------------------------------------*/
41
42
43/**AutomaticEnd***************************************************************/
44
45
46/*---------------------------------------------------------------------------*/
47/* Definition of exported functions                                          */
48/*---------------------------------------------------------------------------*/
49
50/*---------------------------------------------------------------------------*/
51/* Definition of internal functions                                          */
52/*---------------------------------------------------------------------------*/
53
54
55/**Function********************************************************************
56
57  Synopsis    [Calls the initialization routines of all the packages.]
58
59  SideEffects [Sets the global variables vis_stdout, vis_stderr,
60  vis_historyFile.]
61
62  SeeAlso     [VmEnd]
63
64******************************************************************************/
65void
66VmInit(void)
67{
68  vis_stdout      = stdout; 
69  vis_stderr      = stderr;
70  vis_historyFile = NIL(FILE);
71 
72  Cmd_Init();
73  Tst_Init();
74  Debug_Init();
75  Tbl_Init();
76  Io_Init();
77  Hrc_Init();
78  Rst_Init();
79  Ntk_Init();
80  Ord_Init();
81  Ntm_Init();
82  Ctlp_Init();
83  Ctlsp_Init(); 
84  Fsm_Init();
85  Ltl_Init();   
86  Grab_Init();   
87  Sim_Init();
88  Part_Init();
89  Mvf_Init();
90  Img_Init();
91  Mc_Init();
92  Eqv_Init();
93  Amc_Init();
94  Res_Init();
95  Synth_Init();
96  Abs_Init();
97  Restr_Init();
98  Imc_Init();
99  Spfd_Init();
100  Truesim_Init();
101  Rt_Init();
102  bAig_Init();
103  mAig_Init();
104  MvfAig_Init();
105  ntmaig_Init();
106  Bmc_Init();
107  PureSat_Init();
108  Rob_Init();
109}
110
111
112/**Function********************************************************************
113
114  Synopsis    [Calls the end routines of all the packages.]
115
116  SideEffects [Closes the output files if not the standard ones.]
117
118  SeeAlso     [VmInit]
119
120******************************************************************************/
121void
122VmEnd(void)
123{
124  Synth_End();
125  Amc_End();
126  Eqv_End();
127  Mc_End();
128  Img_End();
129  Mvf_End();
130  Part_End();
131  Sim_End();
132  Fsm_End();
133  Grab_End();
134  Ltl_End();   
135  Ctlp_End();
136  Ctlsp_End(); 
137  Ntm_End();
138  Ord_End();
139  Ntk_End();
140  Rst_End();
141  Hrc_End();
142  Tbl_End();
143  Io_End();
144  Res_End();
145  Tst_End();
146  Debug_End();
147  Cmd_End();
148  Abs_End();
149  Restr_End();
150  Imc_End();
151  Spfd_End();
152  Truesim_End();
153  Rt_End();
154  bAig_End();
155  mAig_End();
156  MvfAig_End();
157  ntmaig_End();
158  Bmc_End();
159  Rob_End();
160  if (vis_stdout != stdout) { 
161    (void) fclose(vis_stdout);
162  } 
163  if (vis_stderr != stderr) {
164    (void) fclose(vis_stderr);
165  }
166  if (vis_historyFile != NIL(FILE)) {
167    (void) fclose(vis_historyFile);
168  }
169 
170  vis_stdout      = stdout;
171  vis_stderr      = stderr;
172  vis_historyFile = NIL(FILE);
173}
174
175
176/*---------------------------------------------------------------------------*/
177/* Definition of static functions                                            */
178/*---------------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.