https://hal.archives-ouvertes.fr/hal-03445821
dvk.h
/*
Copyright Universite de Versailles Saint-Quentin en Yvelines 2009
AUTHORS: Sebastien Briais, Sid Touati
This file is part of RS.
RS is free software: you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
RS is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with RS. If not, see
<http://www.gnu.org/licenses/>.
*/
#ifndef __RS_DVK_H
#define __RS_DVK_H
/** \file dvk.h
\brief Disjoint values graph */
#include <SCEDA/hashmap.h>
#include <SCEDA/graph.h>
#include <SCEDA/list.h>
#include <GDD/dag.h>
/** Compute a list of saturating values of given type, when using the
given killing function.
@param[in] dag = GDD_DAG
@param[in] type = type of values
@param[in] pkg = potential killers graph
@param[in] killing_map = killing function
@return a list of saturating values */
SCEDA_List *RS_ddag_saturating_values(GDD_DAG *dag, const char *type, SCEDA_Graph *pkg, SCEDA_HashMap *killing_map);
/** Compute the register need of given type, according to the given
killing function.
@param[in] dag = GDD_DAG
@param[in] type = type of values
@param[in] pkg = potential killers graph
@param[in] killing_map = killing function
@param[in] fast = TRUE to use fast version, FALSE to use precise one
@return the register need */
int RS_ddag_register_need(GDD_DAG *dag, const char *type, SCEDA_Graph *pkg, SCEDA_HashMap *killing_map, int fast);
/** Compute DV_k(G), the disjoint values DAG.
@param[in] dag = GDD_DAG
@param[in] type = type of values
@param[in] pkg = potential killers graph
@param[in] killing_map = killing function
@return the disjoint value DAG.
Vertices are labelled with vertex of the underlying DAG.
Edges are not labelled. */
SCEDA_Graph *RS_ddag_dvk(GDD_DAG *dag, const char *type, SCEDA_Graph *pkg, SCEDA_HashMap *killing_map);
/** Compute a maximal antichain in the disjoint value DAG
@param[in] dag = GDD_DAG
@param[in] dvk = disjoint value DAG
@return a list of vertices of the ddg which is a maximal antichain
of dvk */
SCEDA_List *RS_ddag_amk(GDD_DAG *dag, SCEDA_Graph *dvk);
#endif