Today I have submitted the final version of the report of the master's thesis to my examiner. He will take a look and approve or suggest changes for the final report.
I hope everything is alright and only minor changes from him will need to be applied.
Next week is my opposition, so I will be done with all the requirements that Linköping University asks for the final project.
Showing posts with label omcc. Show all posts
Showing posts with label omcc. Show all posts
Wednesday, June 1, 2011
Tuesday, May 31, 2011
Thesis presented!!
After a successful presentation today, now it remains only the correction of a few mistakes in the report and wait for the approval of the examiner for the final version of the report.
Next week I will have a meeting with my examiner to define the final modifications for submitting the final version of this report.
The project is almost done!
Next week I will have a meeting with my examiner to define the final modifications for submitting the final version of this report.
The project is almost done!
Monday, May 30, 2011
OMCC Presentation coming soon
Only one day left for the presentation, the latex Beamer software helped me for the first time to produce a PDF for the presentation. It is quite uncommon but very interesting to use LaTeX for a presentation. The result seems quite professional and only a few will tell it is LaTeX.
Today I will do one last rehearsal to prepare the presentation. It will take place in the room called Donald Knuth which is nice due to the contribution of Knuth to the LR parsing in 1965.
The last week I have been working only in the presentation and I did some reading again of the literature in order to have fresh all the concepts of compilers in case tricky questions come up by the opponent.
After a remarkable progress with the grammar with about 92% of the test suite working, OMCC is getting ready to be incorporated into the OMC compiler for OpenModelica.
Today I will do one last rehearsal to prepare the presentation. It will take place in the room called Donald Knuth which is nice due to the contribution of Knuth to the LR parsing in 1965.
The last week I have been working only in the presentation and I did some reading again of the literature in order to have fresh all the concepts of compilers in case tricky questions come up by the opponent.
After a remarkable progress with the grammar with about 92% of the test suite working, OMCC is getting ready to be incorporated into the OMC compiler for OpenModelica.
Thursday, May 19, 2011
Final optimizations
I have increase the performance of my parser by simplifying the lexer and the parser. After I took out the recursion lexing and parsing one token at the time was easier.
My examiner wants me to implement an external C function to improve the speed of the lexer but the lexer is not my concern now. The time that the parser takes is considerable long, compared to the lexer.
More test will be performed over this weekend at the same time I keep growing the grammar which now only fails in 98 out of 568 cases in the grammar.
My examiner wants me to implement an external C function to improve the speed of the lexer but the lexer is not my concern now. The time that the parser takes is considerable long, compared to the lexer.
More test will be performed over this weekend at the same time I keep growing the grammar which now only fails in 98 out of 568 cases in the grammar.
Tuesday, May 10, 2011
My parser can parse itself
Finally after several months of hard work, I have archive the OMCC parser generator for MetaModelica and Modelica grammar. It is still a subset but it is working pretty fine.
The grammar for modelica file is about 700 lines of code. The files generated even more. In the last test it took around 6 seconds to parse all the file. This is quite big but it was running in debug mode. It means that some other optimizations should be made before the end of the thesis.
A new version of the draft will be released soon. So I hope I can post here the day of the presentation very soon when I talk with my examiner.
this was the last result of the test
The grammar for modelica file is about 700 lines of code. The files generated even more. In the last test it took around 6 seconds to parse all the file. This is quite big but it was running in debug mode. It means that some other optimizations should be made before the end of the thesis.
A new version of the draft will be released soon. So I hope I can post here the day of the presentation very soon when I talk with my examiner.
this was the last result of the test
***************-ACCEPTED-***************
SUCCEED - (AST)
args:ParserModelica.mo
Total time:6.113409437
Tuesday, April 12, 2011
OMCC with error handling
I have been working on the thesis very hard lately, so far I have
accomplished this:
* Lexer and Parser
* Lexer and Parser Generator
* Error Handling
The last part is now working like this:
It uses error recovery to detect more errors, but it always fails at the end. Right now it only recovers from the action ERASE token, however if there are tokens with errors nearby it will stop parsing.
From the papers I read, I have this primary error handling techniques (single correction) which could be insert, replace or erase. So far I have not implemented MERGE because my parser only understand tokens and has no idea about the semantic value of the tokens. I need to implement a table to look for the semantic value, also important for displaying the errors with the right String not with the Token NAME as now.
My thesis is getting close to the end, I hope it can be completed by the end of this month.
accomplished this:
* Lexer and Parser
* Lexer and Parser Generator
* Error Handling
The last part is now working like this:
It uses error recovery to detect more errors, but it always fails at the end. Right now it only recovers from the action ERASE token, however if there are tokens with errors nearby it will stop parsing.
From the papers I read, I have this primary error handling techniques (single correction) which could be insert, replace or erase. So far I have not implemented MERGE because my parser only understand tokens and has no idea about the semantic value of the tokens. I need to implement a table to look for the semantic value, also important for displaying the errors with the right String not with the Token NAME as now.
***ERRORS WERE FOUND AND COULD NOT RECOVER ***
Syntax Error near [TOKEN:T_DO 'do' from (line:3 col:18) until (line:3
col:20)], ERASE token
Syntax Error near [TOKEN:T_ADD '+' from (line:4 col:13) until (line:4
col:14)], INSERT token {T_INTCONST or T_IDENT}
Syntax Error near [TOKEN:T_ADD '+' from (line:4 col:13) until (line:4
col:14)], REPLACE token with {T_LPAREN}
Syntax Error near [TOKEN:T_ADD '+' from (line:4 col:13) until (line:4
col:14)], ERASE token
Syntax Error near [TOKEN:T_IDENT 'y' from (line:8 col:5) until (line:8
col:6)], INSERT token {T_THEN}
program file:
1/* this is while test of comment */
2read x y z w;
3while x <> 99 do do
4 ans := (x++1) - (y/3);
5 write ans;
6 read x, y;
7 if x = 10
8 y := 234;
9 endif
10end
My thesis is getting close to the end, I hope it can be completed by the end of this month.
Subscribe to:
Posts (Atom)