symphonytool / symphony

The Symphony IDE
5 stars 4 forks source link

Interpreter does not seem to evaluate pre-conditions #219

Closed pglvdm closed 10 years ago

pglvdm commented 10 years ago

If one tries the standard ProcessManager example with a trace:

[init, admit.2, admit.5, dispatch.6] one gets a run time error:
Error 4010: Cannot take head of empty sequence in 'C:\TEMP\SymphonyIDE\workspace\ProcessManager\ProcessManager.cml' at line 31:6 at in 'C:\TEMP\SymphonyIDE\workspace\ProcessManager\ProcessManager.cml' at line 31:6

which as such is correct but the pre-condition protects against that so it should have reported a pre-condition violation instead...

lausdahl commented 10 years ago

The interpreter evaluates pre-conditions:

process A = begin
operations
op:()==>()
op()==Skip
pre false

@op(); Skip
end

When executed the following output is produced:

Terminated
Error 4071: Precondition failure: pre_op in 'issue-219\issue-219.cml' at line 5:4 at in 'issue-219\issue-219.cml' at line 5:4

If there is a but with the specific model then strip it down and report the case where the problem is.

pglvdm commented 10 years ago

well try it for the function in the model referred to in the bug report. It may be because that is a function quoted in a guard that it is not checking the pre-condition, which it should do...

joey-coleman commented 10 years ago

This looks like it was a model error (agreed with PGL)