Skip to main content
Jump to: navigation, search

Eclipse 4diacWiki/Development/Dynamic Type Loader

Revision as of 07:05, 28 August 2019 by (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Evaluating the existing Tool
Testing the functionality of the Lua Code Generator with custom built Function Blocks (FBs)
  • Using all language specific constructs from Structured Text - ST:
    • IF/ SWITCH CASE working
    • FOR working // WHILE/ DO WHILE not working
    • Function Calls not working
    • Variable Declaration working
  • Creating different Execution Control Charts (ECC):
    • All combinations of algorithms and events working
    • Corner Cases working (at least for all my corner cases)
  • Testing if events from adapters can be used, when deploying in Lua. Furthermore defining the adapters themselfs in Lua not working
  • Testing the new simple FB: a FB with one algorithm, one input event and one output event. not working
In general, the FBs will no be applicable in the real world. The are on purpose kept very synthetically to encapsulate certain functionality and test it.

Testing Results:

I added a summary to the description above.

A detailed description on the errormessages and what works, does not work is found in the sheet Errorsheet.

Identifying errors
We have now identified where bugs occure and what functionality is working and which not. The next Step will be to figure out, why and where this errors occure e.g. if it is the fault from the Lua code generator, because it can not generate code for a certain FB or if parsing errors happen while downloading the code to the 4diac FORTE.
For this i have created a road map of bugs in Bugzilla. After this is done, i am going to start to fix this bugs.
I will also keep track of the errors and their causes in my Errorsheet.
Final Report
In this section, will give a brief overview on the current state we are now in, a reference to all the code i wrote and what bugs we did not manage to finish.
As of the end of the GSoC, i created a whole set of new function blocks, for testing most of the functionality Eclipse 4diac provides. Overall 35 new function blocks have been created, trying to cover most of the test cases and corner cases.
There is now a documentation, on how to get the Lua JIT into the 4diac FORTE and to use the Dynamic Type Loader.
Now working is the deploying mechanism, function block types and adapter types are genreated correctly and the 4diac FORTE responds with proper answers.
All arithmetic operations are working (e.g. multiplication, division).
All until now verfied issues with adapter are resolved and should be working correctly.
Still Open
Unfortunately i could not finish all of the open bugs, as many of them where much more complicated than expected. I will list all of the bugs here tht are still open and need treatment. Although they are open, i had some some ideas in mind on how to fix them.
  • Structured Text Functions (e.g. SQRT, LOG) Bugzilla bug: It is possible to call C-Code from Lua. Therefore we do not neet to implement all functions from the Structured-Text library in Lua, we should be able to call them through the Lua-C API.
  • Duartion Literals Bugzilla bug: Duration literals are a bit tricky, as the format, on how they are written varies between Eclipse 4diac, Lua and C. It has to be decide, on how to handle these literals in Lua and how they are then converted into the right format in C.
  • Bitwise/Logical Operators are not working Bugzilla bug: To differentiate between bitwise and logical operators in Lua, we have to evaluate the expression written in structured text. This means if the result from this expression is either a bit result (e.g. <, >=) or a byte/int etc. result (e.g. 0110 & 1100, which yields 0100). My idea is to evaluate expressions like (5 < 7) & ((9 | 1) > (3*2)) recursively, to find out if the LHS and RHS yield boolean result. If they do, we know the & is a logical operator, otherwise it is a bitwise operator.

Copyright © Eclipse Foundation, Inc. All Rights Reserved.