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

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

vis2.3

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 Tbl_Init();
75 Io_Init();
76 Hrc_Init();
77 Rst_Init();
78 Ntk_Init();
79 Ord_Init();
80 Ntm_Init();
81 Ctlp_Init();
82 Ctlsp_Init();
83 Fsm_Init();
84 Ltl_Init();
85 Grab_Init();
86 Sim_Init();
87 Part_Init();
88 Mvf_Init();
89 Img_Init();
90 Mc_Init();
91 Eqv_Init();
92 Amc_Init();
93 Res_Init();
94 Synth_Init();
95 Abs_Init();
96 Restr_Init();
97 Imc_Init();
98 Spfd_Init();
99 Truesim_Init();
100 Rt_Init();
101 bAig_Init();
102 mAig_Init();
103 MvfAig_Init();
104 ntmaig_Init();
105 Bmc_Init();
106 PureSat_Init();
107}
108
109
110/**Function********************************************************************
111
112 Synopsis [Calls the end routines of all the packages.]
113
114 SideEffects [Closes the output files if not the standard ones.]
115
116 SeeAlso [VmInit]
117
118******************************************************************************/
119void
120VmEnd(void)
121{
122 Synth_End();
123 Amc_End();
124 Eqv_End();
125 Mc_End();
126 Img_End();
127 Mvf_End();
128 Part_End();
129 Sim_End();
130 Fsm_End();
131 Grab_End();
132 Ltl_End();
133 Ctlp_End();
134 Ctlsp_End();
135 Ntm_End();
136 Ord_End();
137 Ntk_End();
138 Rst_End();
139 Hrc_End();
140 Tbl_End();
141 Io_End();
142 Res_End();
143 Tst_End();
144 Cmd_End();
145 Abs_End();
146 Restr_End();
147 Imc_End();
148 Spfd_End();
149 Truesim_End();
150 Rt_End();
151 bAig_End();
152 mAig_End();
153 MvfAig_End();
154 ntmaig_End();
155 Bmc_End();
156
157 if (vis_stdout != stdout) {
158 (void) fclose(vis_stdout);
159 }
160 if (vis_stderr != stderr) {
161 (void) fclose(vis_stderr);
162 }
163 if (vis_historyFile != NIL(FILE)) {
164 (void) fclose(vis_historyFile);
165 }
166
167 vis_stdout = stdout;
168 vis_stderr = stderr;
169 vis_historyFile = NIL(FILE);
170}
171
172
173/*---------------------------------------------------------------------------*/
174/* Definition of static functions */
175/*---------------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.