Commit 3f46221c authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Raise an error when systems miss a start transition

parent e16ae63f
...@@ -145,6 +145,7 @@ Changelog ...@@ -145,6 +145,7 @@ Changelog
1.5.13 (10/2016) 1.5.13 (10/2016)
- Better support of warnings - Better support of warnings
- Fixed detection of CHOICE assignment erros - Fixed detection of CHOICE assignment erros
- Raise error if process miss the start transition
1.5.12 (09/2016) 1.5.12 (09/2016)
- Detect duplicate declaration of procedures - Detect duplicate declaration of procedures
......
...@@ -2890,6 +2890,10 @@ def process_definition(root, parent=None, context=None): ...@@ -2890,6 +2890,10 @@ def process_definition(root, parent=None, context=None):
err, warn = procedure_post(proc, content, context=process) err, warn = procedure_post(proc, content, context=process)
errors.extend(err) errors.extend(err)
warnings.extend(warn) warnings.extend(warn)
if not process.referenced and not process.content.start:
# detect missing START transition
errors.append(['Mandatory START transition is missing in process',
[process.pos_x, process.pos_y], []])
for each in chain(errors, warnings): for each in chain(errors, warnings):
try: try:
each[2].insert(0, 'PROCESS {}'.format(process.processName)) each[2].insert(0, 'PROCESS {}'.format(process.processName))
......
...@@ -117,6 +117,10 @@ PROCESS DemoDemoDeviceDSAP; ...@@ -117,6 +117,10 @@ PROCESS DemoDemoDeviceDSAP;
RETURN; RETURN;
ENDPROCEDURE; ENDPROCEDURE;
start;
nextstate wait;
state wait;
endstate;
ENDPROCESS DemoDemoDeviceDSAP; ENDPROCESS DemoDemoDeviceDSAP;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment