diff --git a/common/docs.png b/common/docs.png new file mode 100644 index 0000000..751c18c Binary files /dev/null and b/common/docs.png differ diff --git a/common/github32.png b/common/github32.png new file mode 100644 index 0000000..8b25551 Binary files /dev/null and b/common/github32.png differ diff --git a/report/Makefile b/report/Makefile index 5e90246..935279d 100644 --- a/report/Makefile +++ b/report/Makefile @@ -2,3 +2,6 @@ SRC=report.tex all: latexmk -pdf $(SRC) + +upload: + scp report.pdf www.tobast:~/tobast.fr/public_html/m1/internship.pdf diff --git a/report/img/io_adj_term.png b/report/img/io_adj_term.png new file mode 100644 index 0000000..b304893 Binary files /dev/null and b/report/img/io_adj_term.png differ diff --git a/report/img/io_adj_term.svg b/report/img/io_adj_term.svg new file mode 100644 index 0000000..4a9faab --- /dev/null +++ b/report/img/io_adj_term.svg @@ -0,0 +1,425 @@ + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + Group + + + + + + + + + + + + + + + + + + + + + + + + + + + + A + B + C + D + E + + diff --git a/report/img/tree_local.png b/report/img/tree_local.png new file mode 100644 index 0000000..fbc213d Binary files /dev/null and b/report/img/tree_local.png differ diff --git a/report/report.tex b/report/report.tex index d0fa818..e5b13d9 100644 --- a/report/report.tex +++ b/report/report.tex @@ -332,7 +332,7 @@ subgraph isomorphism~\cite{ullmann1976algorithm}, a well-known algorithm for this problem, that uses the specificities of the graph to be a little faster. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% -\section{Signatures} +\section{Signatures}\label{sec:signatures} The signature is computed as a simple hash of the element, and is defined for every type of expression and circuit. It could probably be enhanced with a bit @@ -573,12 +573,14 @@ The refining function is detailed in Figure~\ref{alg:ullmann_refine}. \While{changes during last run} \For{each needle vertex $i$} \For{each haystack vertex $j$} + \If{\lstc{perm[i][j]} $=$ 1} \For{each neighbour $k$ of $i$ in needle} \If{\lstc{perm[k] & haystack\_adjacency[j]} $= 0$} \State{} \lstc{perm[i][j]} $\gets 0$ \EndIf{} \EndFor{} + \EndIf{} \EndFor{} \EndFor{} \EndWhile{} @@ -738,7 +740,24 @@ certain configurations, and a few other such cases that could be fixed. \todo{More corner cases} -\todo{Corner case: io pins, io adjacency} +\paragraph{I/O pins.} In Section~\ref{sec:signatures}, we introduce a term +named \emph{IO adjacency} in the signatures of order higher than $0$. This is +because some sub-circuits can be told apart from their signatures only through +this information, and the absence of this term slowed down considerably the +program before its introduction. This is the case for instance in circuits like +the one in Figure~\ref{fig:io_adj_term}. + +\begin{figure} + \centering + \includegraphics[width=0.8\textwidth]{img/io_adj_term.png} + \caption{A case where the I/O adjacency term is necessary}\label{fig:io_adj_term} +\end{figure} + +Here, if the adjacent input and output pins of Group are not taken into account +in the signatures of the gates (A, B, C, D, E), there is apparently no way to +differentiate A from B and C from D. The example can of course be pushed +further to way more dramatic cases, for instance with a (binary) tree of +circuits in the same shape as above. \paragraph{Split/merge trees.} A common pattern that tends to slow down the algorithm is split/merge trees. Those patterns occur when one wants to merge @@ -763,7 +782,15 @@ interchangeable: indeed, when checking for an equality between two such trees, it does not matter which node is the left one; but once this is fixed, the nodes on the layer below cannot be freely exchanged. -\todo{Figure describing the problem} +For instance, in Figure~\ref{fig:split_tree}, the orange borders are the +boundaries of what can be taken into account for the signatures of order $1$ of +the gates marked with a red dot. Thus, those signatures are exactly the same. + +\begin{figure} + \centering + \includegraphics[width=0.8\textwidth]{img/tree_local.png} + \caption{Case of a split (or merge) tree}\label{fig:split_tree} +\end{figure} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%