Clan  0.8.0
relation_list.c
Go to the documentation of this file.
00001 
00002    /*+------- <| --------------------------------------------------------**
00003     **         A                     Clan                                **
00004     **---     /.\   -----------------------------------------------------**
00005     **   <|  [""M#              relation_list.c                          **
00006     **-   A   | #   -----------------------------------------------------**
00007     **   /.\ [""M#         First version: 16/04/2011                     **
00008     **- [""M# | #  U"U#U  -----------------------------------------------**
00009          | #  | #  \ .:/
00010          | #  | #___| #
00011  ******  | "--'     .-"  ******************************************************
00012  *     |"-"-"-"-"-#-#-##   Clan : the Chunky Loop Analyzer (experimental)     *
00013  ****  |     # ## ######  *****************************************************
00014  *      \       .::::'/                                                       *
00015  *       \      ::::'/     Copyright (C) 2008 University Paris-Sud 11         *
00016  *     :8a|    # # ##                                                         *
00017  *     ::88a      ###      This is free software; you can redistribute it     *
00018  *    ::::888a  8a ##::.   and/or modify it under the terms of the GNU Lesser *
00019  *  ::::::::888a88a[]:::   General Public License as published by the Free    *
00020  *::8:::::::::SUNDOGa8a::. Software Foundation, either version 2.1 of the     *
00021  *::::::::8::::888:Y8888:: License, or (at your option) any later version.    *
00022  *::::':::88::::888::Y88a::::::::::::...                                      *
00023  *::'::..    .   .....   ..   ...  .                                          *
00024  * This software is distributed in the hope that it will be useful, but       *
00025  * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY *
00026  * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License   *
00027  * for more details.                                                          *
00028  *                                                                            *
00029  * You should have received a copy of the GNU Lesser General Public License   *
00030  * along with software; if not, write to the Free Software Foundation, Inc.,  *
00031  * 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA                     *
00032  *                                                                            *
00033  * Clan, the Chunky Loop Analyzer                                             *
00034  * Written by Cedric Bastoul, Cedric.Bastoul@u-psud.fr                        *
00035  *                                                                            *
00036  ******************************************************************************/
00037 
00038 
00039 #include <stdlib.h>
00040 #include <stdio.h>
00041 #include <string.h>
00042 #include <ctype.h>
00043 
00044 #include <osl/macros.h>
00045 #include <osl/relation_list.h>
00046 #include <clan/relation.h>
00047 #include <clan/relation_list.h>
00048 
00049 
00050 /*+****************************************************************************
00051  *                            Processing functions                            *
00052  ******************************************************************************/
00053 
00054 
00065 void clan_relation_list_compact(osl_relation_list_p list, int nb_parameters) {
00066   while (list != NULL) {
00067      clan_relation_compact(list->elt, nb_parameters);
00068      list = list->next;
00069   }
00070 }
00071 
00072 
00080 void clan_relation_list_define_type(osl_relation_list_p list, int type) {
00081   osl_relation_p relation;
00082 
00083   while (list != NULL) {
00084     if (list->elt != NULL) {
00085       relation = list->elt;
00086       while (relation != NULL) {
00087         if (relation->type == OSL_UNDEFINED)
00088           relation->type = type;
00089         relation = relation->next;
00090       }
00091     }
00092     list = list->next;
00093   }
00094 }