Comparing Asynchronous and Synchronous Approaches to Knowledge Processing
Independent thesis Basic level (degree of Bachelor), 10 credits / 15 HE creditsStudent thesis
This thesis presents a comparison between the synchronous and asynchronous model of computation in the area of knowledge processing. Focus lies on evaluating if a synchronous approach to knowledge processing is possible and practical. This has been done by implementing the reconﬁgurable fault diagnosis framework FlexDx using the synchronous programming language SIGNAL, a language designed to be used in embedded real-time systems. FlexDx have previously been implemented using the asynchronous knowledge processing middleware DyKnow, from which an example system with multiple failure scenarios consisting of input signals and results were available. Matlab code for many algorithms in FlexDx from the existing implementation could also be reused.
The SIGNAL implementation was tested using one of the available scenarios and the results matched the expected results from the DyKnow implementation almost perfectly.
The synchronous aspect of the new implementation was not a problem as the behavior of all parts of FlexDx that had to be reimplemented easily could be described synchronously. However, using SIGNAL for this purpose proved to be both complicated and cumbersome. This was partly because of the strict declarative coding style, but mostly because of limitations of SIGNAL and the POLYCHRONY compiler. Two such limitations caused most of the problems that were encountered. First, SIGNAL does not support dynamic arrays and all iteration constructs require that the number of iterations is determined at compile time. This could be overcome by using external types and processes, the method used in SIGNAL to import code written in other languages, to implement the needed functionality in C++ and Matlab. Second, the POLYCHRONY compiler provides very limited feedback that can be used to correct non-trivial coding errors, making the task of programming with SIGNAL far more complicated than necessary.
While it is clear that a synchronous approach to knowledge processing works well, it is not practical to write a working implementation of FlexDx using only SIGNAL. Because of the limitations of SIGNAL a large part of the system had to be implemented using other languages.
Place, publisher, year, edition, pages
2011. , 36 p.
SIGNAL, FlexDx, DyKnow, Knowledge Processing, Synchronous Programming
IdentifiersURN: urn:nbn:se:liu:diva-68935ISRN: LIU-IDA/LITH-EX-G--11/009--SEOAI: oai:DiVA.org:liu-68935DiVA: diva2:422205
Subject / course
Computer and information science at the Institute of Technology
Alan Turing, Linköpings universitet, Linköping (Swedish)