Skip to content

Graph Algorithms

nils1603 edited this page Oct 27, 2020 · 15 revisions

The graph algorithm plugin provides several algorithms used in graph theory, based on the implementation of the igraph framework. All functions in this plugin handle the interactions with igraph, so the user does not have to deal with the internal igraph functions and structures. The netlist is internally converted to an directed igraph object, where the gates represent the nodes/vertices and the nets the edges. The plugin can be easily extended, since most algorithms of the igraph framework usually only require the graph object as input.

The graph algorithm plugin is build automatically and usually does not need any extra flags during the build process. However to explicitly build or not build the plugin the user can make use of the -DPL_GRAPH_ALGORITHM=1 flag.

Loading the Plugin

Similar to all other plugins, the graph algorithm plugin can be loaded using the following Python snippet:

from hal_plugins import graph_algorithm

pl_ga = hal_py.plugin_manager.get_plugin_instance("graph_algorithm")

Executing different algorithms

All available algorithms with their different input parameters can be found in the documentation (https://emsec.github.io/hal/doc/ / python)

Clone this wiki locally