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

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

Vis main file for expermeriments

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  Rob_Init();
108}
109
110
111/**Function********************************************************************
112
113  Synopsis    [Calls the end routines of all the packages.]
114
115  SideEffects [Closes the output files if not the standard ones.]
116
117  SeeAlso     [VmInit]
118
119******************************************************************************/
120void
121VmEnd(void)
122{
123  Synth_End();
124  Amc_End();
125  Eqv_End();
126  Mc_End();
127  Img_End();
128  Mvf_End();
129  Part_End();
130  Sim_End();
131  Fsm_End();
132  Grab_End();
133  Ltl_End();   
134  Ctlp_End();
135  Ctlsp_End(); 
136  Ntm_End();
137  Ord_End();
138  Ntk_End();
139  Rst_End();
140  Hrc_End();
141  Tbl_End();
142  Io_End();
143  Res_End();
144  Tst_End();
145  Cmd_End();
146  Abs_End();
147  Restr_End();
148  Imc_End();
149  Spfd_End();
150  Truesim_End();
151  Rt_End();
152  bAig_End();
153  mAig_End();
154  MvfAig_End();
155  ntmaig_End();
156  Bmc_End();
157  Rob_End();
158  if (vis_stdout != stdout) { 
159    (void) fclose(vis_stdout);
160  } 
161  if (vis_stderr != stderr) {
162    (void) fclose(vis_stderr);
163  }
164  if (vis_historyFile != NIL(FILE)) {
165    (void) fclose(vis_historyFile);
166  }
167 
168  vis_stdout      = stdout;
169  vis_stderr      = stderr;
170  vis_historyFile = NIL(FILE);
171}
172
173
174/*---------------------------------------------------------------------------*/
175/* Definition of static functions                                            */
176/*---------------------------------------------------------------------------*/
Note: See TracBrowser for help on using the repository browser.