Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Titan » Wrong syntax/ Problem with syntax Checker
Wrong syntax/ Problem with syntax Checker [message #1759741] Tue, 18 April 2017 07:13 Go to next message
Johannes Bro is currently offline Johannes BroFriend
Messages: 56
Registered: June 2015
Member
Hi All,

last week I updated my titan environment from 5.4.1 to 6.1.0 and I faced some errors from the syntax checker. Building and executing of my test suite is working. See below the code snipped:

function f_executeAndExpectAck( TestPort p_port, in template Msg p_Msg ) runs on Tester {
   var TestExc v_error; 
   p_port.call(executeCommand:{p_Msg}, 10.0 ){
       [] p_port.getreply( executeCommand:{ - } value m_Ack ) {
           setverdict( pass );
          }
       [] p_port.getreply(executeCommand:{ - }  value ?) {
           setverdict( fail );
          }
       [] p_port.catch(timeout) {
           setverdict( inconc, "No response, timeout occurred"  );
          }
       [] p_port.catch(executeCommand, TestExc:?)-> value v_error {
           setverdict( inconc, v_error );
          }
     }
}

The following line gives now the error:
p_Port.getreply( executeCommand:{ - } value m_Ack ) {

"Too few elements in value list notation for type `@Libtest_Interface.executeCommand': 1 was expected instead of 0"

The signature is defined as following:

signature executeCommand( in Msg msg ) return Excpt exception ( TestExc );


Is the syntax really wrong and the syntax checker is now more strict ? But why is it compiling anyway... ? Or did I face a bug ?

Thanks,

Johannes
Re: Wrong syntax/ Problem with syntax Checker [message #1759758 is a reply to message #1759741] Tue, 18 April 2017 08:58 Go to previous messageGo to next message
Bence Janos Szabo is currently offline Bence Janos SzaboFriend
Messages: 9
Registered: April 2017
Junior Member
Hi Johannes,

I tried your code with TITAN 6.1 but I did not get the error message you received by the compiler.
It is strange that after you got the error message your code still compiled. (?!) It should be impossible because if an error is generated no c++ code generation will be done.

Make sure that you really use the TITAN 6.1 compiler, and you clear your project (make clean) before trying to compile with TITAN 6.1.

If the problem still persists, then you can send your TTCN project using the command "make archive", so I can compile that and take a look at the result.

Best regards,
Bence
Re: Wrong syntax/ Problem with syntax Checker [message #1759861 is a reply to message #1759758] Wed, 19 April 2017 08:26 Go to previous messageGo to next message
Johannes Bro is currently offline Johannes BroFriend
Messages: 56
Registered: June 2015
Member
Hi Bence,

I double checked the titan version and the titan eclipse plugin version is CRL 113 200/6 R1A (6.1pl0). I'm using Eclipse Neon.3 Release (4.6.3) on a GNU/Linux System.
For easy reproducing the error I created a sample project, see attached.

Thanks,

Johannes
Re: Wrong syntax/ Problem with syntax Checker [message #1759863 is a reply to message #1759861] Wed, 19 April 2017 08:43 Go to previous messageGo to next message
Bence Janos Szabo is currently offline Bence Janos SzaboFriend
Messages: 9
Registered: April 2017
Junior Member
Hi Johannes,

We see what is the problem.
The TITAN compiler and the TITAN eclipse plugin uses different syntax and semantic checking, so there may be some deviations between these two.
For example if we implement some new feature in the TITAN compiler, then the implementation of the same feature is a little delayed in the TITAN eclipse plugin.

Your code compiled because the TITAN eclipse plugin (wrongly) detected some error in your code, but the TITAN compiler didn't.

We will correct this issue in the TITAN eclipse plugin soon.

Thanks,
Bence
Re: Wrong syntax/ Problem with syntax Checker [message #1759878 is a reply to message #1759863] Wed, 19 April 2017 12:52 Go to previous messageGo to next message
Johannes Bro is currently offline Johannes BroFriend
Messages: 56
Registered: June 2015
Member
Thank you too !
Re: Wrong syntax/ Problem with syntax Checker [message #1760682 is a reply to message #1759878] Mon, 01 May 2017 17:24 Go to previous messageGo to next message
Jeno Attila Balasko is currently offline Jeno Attila BalaskoFriend
Messages: 80
Registered: September 2013
Location: Budapest, Hungary
Member

Hi Johannes,

the bug is fixed and the solution has been committed into github. It is available in source code or you can wait until the next release planned in May.

Best regards
Jeno
Re: Wrong syntax/ Problem with syntax Checker [message #1760696 is a reply to message #1760682] Tue, 02 May 2017 07:08 Go to previous message
Elemer Lelik is currently offline Elemer LelikFriend
Messages: 1120
Registered: January 2015
Senior Member
Hi Johannes,

just to avoid any misunderstandings:
-the Eclipse plug-ins and the Titan core are decoupled in the sense that each have their own separate syntactical and semantic analysis;
a fault discovered in Designer is informational only, it will not have any effect on the compilation of the code.
only analysis performed in the core part has an authoritative effect (that is, can stop the code from compiling).
This may not seem to make sense today, but if you factor in that we are working on a Java branch of compiler/executor, where Designer will have full authority, things may fall into place.
Meanwhile we are trying to keep the two parts in sync as much as possible.

Best regards
Elemer





Previous Topic:Handling of version information in Titan
Next Topic: Lego Bob and Titan meets IoT
Goto Forum:
  


Current Time: Tue Apr 23 12:55:20 GMT 2024

Powered by FUDForum. Page generated in 1.21870 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top