update isl for change in representation of isl_constraint
[ppcg.git] / clan / source / clan.c
blob3a732d08f51b14fa320f33af60df8ea870628eb6
2 /*+------- <| --------------------------------------------------------**
3 ** A Clan **
4 **--- /.\ -----------------------------------------------------**
5 ** <| [""M# clan.c **
6 **- A | # -----------------------------------------------------**
7 ** /.\ [""M# First version: 30/04/2008 **
8 **- [""M# | # U"U#U -----------------------------------------------**
9 | # | # \ .:/
10 | # | #___| #
11 ****** | "--' .-" ******************************************************
12 * |"-"-"-"-"-#-#-## Clan : the Chunky Loop Analyzer (experimental) *
13 **** | # ## ###### *****************************************************
14 * \ .::::'/ *
15 * \ ::::'/ Copyright (C) 2008 Cedric Bastoul *
16 * :8a| # # ## *
17 * ::88a ### This is free software; you can redistribute it *
18 * ::::888a 8a ##::. and/or modify it under the terms of the GNU Lesser *
19 * ::::::::888a88a[]::: General Public License as published by the Free *
20 *::8:::::::::SUNDOGa8a::. Software Foundation, either version 3 of the *
21 *::::::::8::::888:Y8888:: License, or (at your option) any later version. *
22 *::::':::88::::888::Y88a::::::::::::... *
23 *::'::.. . ..... .. ... . *
24 * This software is distributed in the hope that it will be useful, but *
25 * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
26 * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License *
27 * for more details. *
28 * *
29 * You should have received a copy of the GNU Lesser General Public License *
30 * along with software; if not, write to the Free Software Foundation, Inc., *
31 * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA *
32 * *
33 * Clan, the Chunky Loop Analyzer *
34 * Written by Cedric Bastoul, Cedric.Bastoul@inria.fr *
35 * *
36 ******************************************************************************/
38 #include <stdlib.h>
39 #include <stdio.h>
41 #include <clan/scop.h>
42 #include <clan/options.h>
45 int main(int argc, char * argv[])
47 scoplib_scop_p scop;
48 clan_options_p options;
49 FILE * input;
50 FILE * output;
52 /* Options and input/output file setting. */
53 options = clan_options_read(argc,argv,&input,&output);
55 /* Extraction of the polyhedral representation of the SCoP from the input. */
56 if (options->inputscop)
57 /* Input is a .scop file. */
58 scop = scoplib_scop_read(input);
59 else
60 /* Input is a source code. */
61 scop = clan_scop_extract(input,options);
63 /* Printing of the internal data structure of the SCoP if asked. */
64 if (options->structure)
65 scoplib_scop_print(stdout,scop);
67 /* Generation of the .scop output file. */
68 int sopt = 0;
69 if (options->castle)
70 sopt |= SCOPLIB_SCOP_PRINT_CASTLE;
71 if (options->arraystag)
72 sopt |= SCOPLIB_SCOP_PRINT_ARRAYSTAG;
73 scoplib_scop_print_dot_scop_options(output,scop,sopt);
75 /* Save the planet. */
76 clan_options_free(options);
77 scoplib_scop_free(scop);
79 return 0;