Hide metadata

dc.date.accessioned2013-03-12T08:02:10Z
dc.date.available2013-03-12T08:02:10Z
dc.date.issued2002en_US
dc.date.submitted2002-10-01en_US
dc.identifier.citationPersson, Hans Marcus. Kompilator fra OUN til Java. Hovedoppgave, University of Oslo, 2002en_US
dc.identifier.urihttp://hdl.handle.net/10852/9328
dc.description.abstractOUN (Oslo University Notation)is developed at the University of Oslo. It is a formal notation intended to be easier to understand and use. It is adjusted to support the development of distributed systems. In the rst part of this thesis, we have found the principles of translation from OUN to Java. In OUN all objects are active, they execute their own methods, even if other objects calls them. To solve that, all objects in the generated Java code runs in its own thread. These objects have a queue of calls, where calls are taken and methods are executed. Return values are put back in a queue of return values in the caller's object. When the queue of calls is empty, the object will fall asleep. We save processing time, when not having to poll on the queue. When an object wants a method in another object executed, it puts a call into the queue of calls, and wakes the object. If the method has return values, the caller will have to wait for them. It falls asleep, and is wakened by the object running the method after the return values is placed in the queue of return values. We have considered several ways of implementing this. Even though OUN and Java are quite similar, they have important differences. It has not been possible to find a perfect solution. We have prioritized to choose solutions similar to the principles of OUN. In the second part of the thesis, we have built a compiler for the translation. We have continued to build on the syntax checker already built in JavaCC. That is a tool for automatic generation of syntax checkers. We ran the grammar file through JJTree to build up a syntax tree. It generates a class for every non-terminal in the language. The nodes are linked together to form a tree. In every node we added a method to translate the code. After the syntax is checked, we now can translate the OUN code by calling the added method in the root of the tree. Code is generated by traversing down the tree from the root. Semantic check of OUN is not yet added, and we have no symbol table implemented. In this version of the compiler, we therefore had to put some limitations on the functionality of OUN.nor
dc.language.isonoben_US
dc.titleKompilator fra OUN til Javaen_US
dc.typeMaster thesisen_US
dc.date.updated2003-07-04en_US
dc.creator.authorPersson, Hans Marcusen_US
dc.subject.nsiVDP::420en_US
dc.identifier.bibliographiccitationinfo:ofi/fmt:kev:mtx:ctx&ctx_ver=Z39.88-2004&rft_val_fmt=info:ofi/fmt:kev:mtx:dissertation&rft.au=Persson, Hans Marcus&rft.title=Kompilator fra OUN til Java&rft.inst=University of Oslo&rft.date=2002&rft.degree=Hovedoppgaveen_US
dc.identifier.urnURN:NBN:no-5313en_US
dc.type.documentHovedoppgaveen_US
dc.identifier.duo2921en_US
dc.identifier.bibsys020299478en_US


Files in this item

FilesSizeFormatView

No file.

Appears in the following Collection

Hide metadata