2architecture.tex 3.1 KB

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