Add figures

This commit is contained in:
Théophile Bastian 2017-08-24 19:04:33 +02:00
parent 4f5b0e8784
commit 53ff786f91
7 changed files with 458 additions and 3 deletions

BIN
common/docs.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

BIN
common/github32.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

View file

@ -2,3 +2,6 @@ SRC=report.tex
all:
latexmk -pdf $(SRC)
upload:
scp report.pdf www.tobast:~/tobast.fr/public_html/m1/internship.pdf

BIN
report/img/io_adj_term.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

425
report/img/io_adj_term.svg Normal file
View file

@ -0,0 +1,425 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="146.30324mm"
height="87.66172mm"
viewBox="0 0 146.30324 87.66172"
version="1.1"
id="svg8"
inkscape:version="0.92.2 5c3e80d, 2017-08-06"
sodipodi:docname="io.svg">
<defs
id="defs2">
<inkscape:path-effect
effect="bspline"
id="path-effect4716"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4712"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4708"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4704"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4696"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4594"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4586"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4586-3"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4586-6"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4586-6-2"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
<inkscape:path-effect
effect="bspline"
id="path-effect4586-6-2-0"
is_visible="true"
weight="33.333333"
steps="2"
helper_size="0"
apply_no_weight="true"
apply_with_weight="true"
only_selected="false" />
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="0.5"
inkscape:cx="-235.40174"
inkscape:cy="308.13655"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
inkscape:window-width="1362"
inkscape:window-height="729"
inkscape:window-x="0"
inkscape:window-y="18"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-3.015309,-9.8202344)">
<rect
style="opacity:0;fill:#4d4d4d;fill-opacity:1;stroke:#4747ff;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.96862745"
id="rect4504"
width="87.664406"
height="76.973618"
x="7.2162771"
y="9.952527" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4506"
width="141.92012"
height="87.397141"
x="7.2162771"
y="9.9525261" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:4.93888903px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
x="114.83055"
y="20.589584"
id="text4510"><tspan
sodipodi:role="line"
id="tspan4508"
x="114.83055"
y="20.589584"
style="font-size:10.58333302px;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none">Group</tspan></text>
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4518"
width="28.597837"
height="20.045216"
x="17.105249"
y="19.57423" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4518-3"
width="28.597839"
height="20.045216"
x="17.506155"
y="63.005527" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4518-6"
width="28.597839"
height="20.045216"
x="62.941975"
y="26.122332" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4518-6-7"
width="28.597841"
height="20.045216"
x="63.209244"
y="57.660137" />
<rect
style="opacity:1;fill:none;fill-opacity:1;stroke:#000000;stroke-width:0.26458332;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.96862745"
id="rect4518-6-7-5"
width="28.597841"
height="20.045216"
x="107.57598"
y="41.623966" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 7.2162772,28.928663 c 3.2911778,0 6.5820978,0 9.8727598,0"
id="path4584"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4586"
inkscape:original-d="m 7.2162772,28.928663 c 3.2911778,-2.65e-4 6.5820978,-2.65e-4 9.8727598,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 7.2162772,72.760866 c 3.3856788,0 6.7710928,0 10.1562418,0"
id="path4592"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4594"
inkscape:original-d="m 7.2162772,72.760866 c 3.3856788,-2.65e-4 6.7710928,-2.65e-4 10.1562418,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 7.2162766,72.760866 c 3.3856784,0 6.7710924,0 10.1562424,0"
id="path4584-5"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4586-3"
inkscape:original-d="m 7.2162766,72.760866 c 3.3856784,-2.65e-4 6.7710924,-2.65e-4 10.1562424,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 45.577561,33.071342 c 5.751917,0 11.503386,0 17.254401,0"
id="path4584-2"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4586-6"
inkscape:original-d="m 45.577561,33.071342 c 5.751917,-2.66e-4 11.503386,-2.66e-4 17.254401,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
d="m 46.37937,70.756345 c 5.563147,0 11.125858,0 16.688133,0"
id="path4584-2-7"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4586-6-2"
inkscape:original-d="m 46.37937,70.756345 c 5.563147,-2.66e-4 11.125858,-2.66e-4 16.688133,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 7.2760416,42.735415 c 18.5210974,0 37.0419304,0 55.5624994,0"
id="path4694"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4696"
inkscape:original-d="m 7.2760416,42.735415 c 18.5210974,-2.65e-4 37.0419304,-2.65e-4 55.5624994,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 7.4083332,59.139581 c 18.5651948,0 37.1301248,0 55.6947908,0"
id="path4702"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4704"
inkscape:original-d="m 7.4083332,59.139581 c 18.5651948,-2.64e-4 37.1301248,-2.64e-4 55.6947908,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 91.810416,60.330206 c 5.247833,0 10.495404,0 15.742704,0"
id="path4706"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4708"
inkscape:original-d="m 91.810416,60.330206 c 5.247833,-2.64e-4 10.495404,-2.64e-4 15.742704,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 91.545832,42.603123 c 5.336029,0 10.671788,0 16.007288,0"
id="path4710"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4712"
inkscape:original-d="m 91.545832,42.603123 c 5.336029,-2.64e-4 10.671788,-2.64e-4 16.007288,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#1a2566;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 136.12812,50.011456 c 4.36589,0 8.73152,0 13.09688,0"
id="path4714"
inkscape:connector-curvature="0"
inkscape:path-effect="#path-effect4716"
inkscape:original-d="m 136.12812,50.011456 c 4.36589,-2.64e-4 8.73152,-2.64e-4 13.09688,0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 3.2411458,24.942187 7.1437499,28.84479"
id="path4730"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 7.1437499,28.84479 3.1088533,32.879686"
id="path4747"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.3136725,68.858263 3.9026041,3.902603"
id="path4730-6"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 7.2162766,72.760866 3.18138,76.795762"
id="path4747-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.5057292,55.236978 3.902604,3.902603"
id="path4730-7"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 7.4083332,59.139581 3.3734367,63.174477"
id="path4747-9"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 3.3734375,38.832813 3.9026041,3.902602"
id="path4730-2"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="M 7.2760416,42.735415 3.241145,46.770312"
id="path4747-0"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 145.32239,46.108853 3.90261,3.902603"
id="path4730-23"
inkscape:connector-curvature="0" />
<path
style="fill:none;fill-rule:evenodd;stroke:#815523;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
d="m 149.225,50.011456 -4.0349,4.034896"
id="path4747-7"
inkscape:connector-curvature="0" />
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="27.149746"
y="29.007502"
id="text4801"><tspan
sodipodi:role="line"
id="tspan4799"
x="27.149746"
y="38.371269"
style="stroke-width:0.26458332px"></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="17.089037"
y="28.928663"
id="text4817"><tspan
sodipodi:role="line"
id="tspan4815"
x="17.089037"
y="38.292431"
style="stroke-width:0.26458332px"></tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="25.769474"
y="31.336123"
id="text4821"><tspan
sodipodi:role="line"
id="tspan4819"
x="25.769474"
y="31.336123"
style="stroke-width:0.26458332px">A</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="28.944477"
y="75.786125"
id="text4825"><tspan
sodipodi:role="line"
id="tspan4823"
x="28.944477"
y="75.786125"
style="stroke-width:0.26458332px">B</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="73.923637"
y="38.744453"
id="text4829"><tspan
sodipodi:role="line"
id="tspan4827"
x="73.923637"
y="38.744453"
style="stroke-width:0.26458332px">C</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="73.923637"
y="70.494453"
id="text4833"><tspan
sodipodi:role="line"
id="tspan4831"
x="73.923637"
y="70.494453"
style="stroke-width:0.26458332px">D</tspan></text>
<text
xml:space="preserve"
style="font-style:normal;font-weight:normal;font-size:10.58333302px;line-height:125%;font-family:Sans;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
x="117.84447"
y="55.148621"
id="text4837"><tspan
sodipodi:role="line"
id="tspan4835"
x="117.84447"
y="55.148621"
style="stroke-width:0.26458332px">E</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 18 KiB

BIN
report/img/tree_local.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

View file

@ -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}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%