2architecture.tex 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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. For parsing the JSON file the JSON-java library~\cite{leary_json-java:_2018} is used.
  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. \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. \raggedright
  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. \begin{lstlisting}[language=json,emph={}]
  52. {
  53. "layers":[
  54. [
  55. {
  56. "name":"n2",
  57. "width":10,
  58. "height":10
  59. },
  60. {
  61. "name":"n1",
  62. "width":10,
  63. "height":10,
  64. "layers":[
  65. [
  66. {
  67. "name":"n2",
  68. "width":10,
  69. "height":10
  70. }
  71. ]
  72. ]
  73. }
  74. ]
  75. ],
  76. "name":"n0"
  77. }
  78. \end{lstlisting}
  79. \caption[Example Input File]{Example Input file that is understood by \appname.}
  80. \label{fig:json-example}
  81. \end{figure}
  82. \section{Class Diagrams}\label{sec:classDiagrams}
  83. \TODO{run vpp}