SCION@4.3.1 Release Notes, Part 1
June 26, 2018
Table of Contents
tl;dr The first and main feature that was added to SCION@4.3.1 is full compliance with the SCXML IRP test suite (passes all of the required, automated tests).
Notably, this includes support for SCXML’s <invoke>
tag; provides a compliant implementation of the “Algorithm for SCXML Interpretation” described in Appendix D of the specification; and fixes several open issues.
There are many different semantics for Statecharts family of languages (for a good overview of various Statechart semantics, see “Big-Step Semantics” by Shahram Esmaeilsabzali, Nancy A. Day, Joanne M. Atlee, and Jianwei Niu). SCION now implements by default the semantics described in Appendix D of the SCXML specification. This is a breaking change.
Versions of SCION@3.3.1 implements a slightly different semantics, described here, here, and here. The semantics of SCION@3.3.1 have been deprecated in SCION@4.3.1 in favor of the semantics described in Appendix D of the SCXML specification.
If you are upgrading an existing application, and you require support for SCION@3.3.1 semantics, the scion-core-legacy module provides a backwards-compatible, drop-in replacement module.
Further documentation on the scion-core-legacy module will be forthcoming, but for now, you can find an example of its use here, in the node-test-server.
Testing backwards-compatibility
This section describes the approach used by SCION for testing backwards-compatibility.
The SCION node.js test framework supports testing the backwards-compatibility mode. In terms of what is being tested, all the tests that were passing in SCION@3.3.1 also pass in SCION@4.3.1. In fact, SCION@4.3.1 includes more tests for the legacy semantics than SCION@3.3.1 did:
> const _ = require('underscore')
> undefined
> > const v431 = require('./4.3.1.json') //4.3.1 tests
> undefined
> > const v331 = require('./3.3.1.json') //3.3.1 tests
> _.difference(v431, v331)
[ 'node_modules/scxml-test-framework/test/actionSend/*.scxml',
'node_modules/scxml-test-framework/test/assign-current-small-step/*.scxml',
'node_modules/scxml-test-framework/test/assign/*.scxml',
'node_modules/scxml-test-framework/test/atom3-basic-tests/*.scxml',
'node_modules/scxml-test-framework/test/basic/*.scxml',
'node_modules/scxml-test-framework/test/cond-js/*.scxml',
'node_modules/scxml-test-framework/test/data/*.scxml',
'node_modules/scxml-test-framework/test/default-initial-state/*.scxml',
'node_modules/scxml-test-framework/test/delayedSend/*.scxml',
'node_modules/scxml-test-framework/test/documentOrder/*.scxml',
'node_modules/scxml-test-framework/test/error/*.scxml',
'node_modules/scxml-test-framework/test/foreach/*.scxml',
'node_modules/scxml-test-framework/test/hierarchy+documentOrder/*.scxml',
'node_modules/scxml-test-framework/test/hierarchy/*.scxml',
'node_modules/scxml-test-framework/test/history/*.scxml',
'node_modules/scxml-test-framework/test/if-else/*.scxml',
'node_modules/scxml-test-framework/test/in/*.scxml',
'node_modules/scxml-test-framework/test/internal-transitions/*.scxml',
'node_modules/scxml-test-framework/test/more-parallel/*.scxml',
'node_modules/scxml-test-framework/test/multiple-events-per-transition/*.scxml',
'node_modules/scxml-test-framework/test/parallel+interrupt/*.scxml',
'node_modules/scxml-test-framework/test/parallel/*.scxml',
'node_modules/scxml-test-framework/test/script/*.scxml',
'node_modules/scxml-test-framework/test/send-idlocation/*.scxml' ]
> _.difference(v331, v431)
[ 'node_modules/scxml-test-framework/test/w3c-ecma/test201.txml.scxml' ]
w3c-ecma/test201.txml.scxml
is an optional test for the Basic HTTP Event I/O Processor defined in the specification, which SCION does not support. I believe it was listed in 3.3.1 erroneously, and I removed the test for it.
For tests that are shared between Appendix D and the legacy semantics, two different test scripts are sometimes needed, because the semantics change the outcome of the test. For this, a special property legacySemantics
has been added to the JSON test scripts in scxml-test-framework, which describes the test used for the legacy semantics. Currently, the following test scripts required changes because of different semantics regarding transition priority:
- more-parallel/test10.json
- more-parallel/test10b.json
- more-parallel/test2.json
- more-parallel/test3.json
- more-parallel/test6.json
- parallel+interrupt/test21.json
- parallel+interrupt/test21b.json
- parallel+interrupt/test7.json
You can run the tests for legacy semantics with the following invocation:
grunt test --legacy-semantics
<invoke>
in legacy semantics
Support for Note that <invoke>
is not currently supported in the legacy semantics. It does work, but it will invoke a new session with the Appendix D semantics. I could add an API to configure SCION to start new invoked sessions with legacy semantics, if people report this as a desirable feature.