You are here

Simile Error messages difficult to understand

Hi

I'm just starting to use Simile for an undergraduate course I'm giving. On the whole the program looks very good, and I think it will be an excellent teaching resource. An the fact that the evaluation edition is available is important for giving students long-term access to the program.

But the error messages from Simile can be very difficult to understand. And even if they can be understood, it can be difficult to pinpoint the problem in the model.  For people getting to grips with Simile and trying to understand the errors they are making I think it's important that the error messages guide you a little more to where the problem is.I have a lot of experience writing code, and I can find the error messages difficult.

 

For example, if you create an intermediate variable in an equation, but you forget to put a comma at the end of the line, the error message is

The contents of the "Equation" field could not be parsed

The parser responded: syntax_error(constant term stream:3 (char:1). or operator expected after expression)

 

and clicking on the "more info tab" actually gives less info. The information is there in the final part of the message, but it is very unclear, and someone learning Simile will not understand this message.

So my biggest wish for Simile would be that the error messages are improved, and made more specific (so in the above example it would be nice if the error message said something like

"missing comma at the end of the line starting "xxxx=yyy..."

But in the meantime, some help files on the website would keep me happy :)

Thanks for your work developing Simile

Jon

Reporter: 
jyearsle
Created: 
Sun, 17/05/2009 - 10:57
Updated: 
Fri, 12/10/2012 - 11:52

Comments

These error messages used to be more user-friendly, but had a problem in Simile v5.4 because we started using a different Prolog implementation which produced parse errors in a different format. As of v5.5 it is producing more user-friendly messages again. For example, in the case you cite, the error will look something like this:

The contents of the "Equation" field could not be parsed.

The parser responded: Attempting to decipher this item failed, generating this diagnostic message:
"eof or operator expected after expression".
This is what was read in, with an indication of where the problem was found:
 'v'=3
 <HERE> 5*'v'

Hope this is a useful improvement.