2architecture.tex 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. \TODO{some text}
  2. \section{Assumptions}
  3. The following assumptions are made for the implementation of the node placement algorithm:
  4. \begin{itemize}
  5. \item There are no hyperedges.
  6. \item There are no port constraints.
  7. \item There are no labels.
  8. \item There are no cross-hierarchy edges.
  9. \end{itemize}
  10. \section{Input File Format}\label{sec:inputFileFormat}
  11. The input to \appname is a JSON file.
  12. An example is displayed in figure~\ref{fig:json-example}.
  13. The structure is as follows:
  14. \begin{itemize}
  15. \item The object in the JSON file is a node.
  16. \item A node has the attributes that are displayed in table~\ref{table:node-attributes}. \TODO{remove x and y from implementation}
  17. \item An edge has the attributes that are displayed in table~\ref{table:edge-attributes}.
  18. \end{itemize}
  19. \centering
  20. \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
  21. \hline
  22. Attribute & Type & Optional & Explanation \\\hline\hline
  23. name & string & yes & If not omitted, this must be unique for a given parent node. \\\hline
  24. width & integer & yes & The minimum width of the node.
  25. The node can be wider if it contains other nodes that need more space. \\\hline
  26. height & integer & yes & The minimum height of the node.
  27. The node can be higher if it contains other nodes that need more space. \\\hline
  28. layers & list of lists of nodes & yes & The layers of nodes inside this node (Hierarchy). \\\hline
  29. edges & list of edges & yes & The edges between nodes whose parent node is this node. \\\hline
  30. \caption{Node Attributes}
  31. \label{table:node-attributes}
  32. \end{longtable}
  33. \centering
  34. \begin{longtable}{|p{1.8cm}|p{2cm}|p{1.8cm}|p{8.5cm}|}
  35. \hline
  36. Attribute & Type & Optional & Explanation \\\hline\hline
  37. source & string & no & The name of the source of this edge.
  38. Must be a node with the same parent node as the node specified by the \enquote{target} attribute. \\\hline
  39. target & string & no & The name of the target of this edge.
  40. Must be a node with the same parent node as the node specified by the \enquote{source} attribute. \\\hline
  41. \caption{Edge Attributes}
  42. \label{table:edge-attributes}
  43. \end{longtable}
  44. %\begin{figure}[tp]
  45. % \centering
  46. % \includegraphics[width=0.9\textwidth]{img/json.png}
  47. % \caption[Input file format]{Input file format illustrated as a HERM diagram}
  48. % \label{fig:iff}
  49. %\end{figure}
  50. \begin{figure}
  51. % \lstinputlisting[language=Python,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]{src/keras_example_conv.py}
  52. \begin{lstlisting}[language=json,emph={Conv2D,MaxPooling2D,Dropout,Flatten,Sequential,Dense}]
  53. {
  54. "layers":[
  55. [
  56. {
  57. "name":"n2",
  58. "width":10,
  59. "height":10
  60. },
  61. {
  62. "name":"n1",
  63. "width":10,
  64. "height":10,
  65. "layers":[
  66. [
  67. {
  68. "name":"n2",
  69. "width":10,
  70. "height":10
  71. }
  72. ]
  73. ]
  74. }
  75. ]
  76. ],
  77. "name":"n0"
  78. }
  79. \end{lstlisting}
  80. \caption[Example Input File]{Example Input file that is understood by \appname.}
  81. \label{fig:json-example}
  82. \end{figure}
  83. \section{Class Diagrams}\label{sec:classDiagrams}
  84. \TODO{run vpp}