/
compiler.tex
27 lines (24 loc) · 1.24 KB
/
compiler.tex
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
At this point we need to make the actual 2d layout that will
interpreted by the 2d interpreter. This is a non-trivial process,
since the placement of each new command is dependent on all the
previous commands, and not in a trivial way. Command boxes could
overlap with each other or perhaps block already placed wires or
arrows.
\paragraph{Modules}
\label{compiler:modules}
In order to cut down on the needed work, we decided to encapsulate
many of our functions in predefined modules. An example of this could
be the multiplication operator which we attempted to write manually,
both to get a sense of how 2D worked, as well as optimizing our use of
time until the layout system was up and running. Even though we had
already specified much of the logic needed for unary multiplication,
the construction was not straightforward. We found the biggest
problem to be flow-control, as this required many wires, even for
small cases, which made the program much harder to write and modify.
We therefore abandoned this approach, even for basic features of our
language, and given the time we would instead have used our layout
system to make all of our needed modules, by specifying the connections.
%%% Local Variables:
%%% mode: latex
%%% TeX-master: "master"
%%% End: