From 2317f2bf8beb03c60463a9482dbef23540f5c1e0 Mon Sep 17 00:00:00 2001 From: Stefan Radomski Date: Fri, 29 Mar 2013 00:28:46 +0100 Subject: Refactoring and W3C tests - Moved core of interpreter to support various versions - Added experimental setConfiguration() - There can be more than one initial state --- CMakeLists.txt | 7 + apps/mmi-browser.cpp | 60 +- src/uscxml/Interpreter.cpp | 1362 ++------------------ src/uscxml/Interpreter.h | 83 +- src/uscxml/Message.cpp | 4 + src/uscxml/interpreter/InterpreterDraft6.cpp | 920 +++++++++++++ src/uscxml/interpreter/InterpreterDraft6.h | 31 + src/uscxml/interpreter/InterpreterDraft7.cpp | 439 +++++++ src/uscxml/interpreter/InterpreterDraft7.h | 46 + test/run-scxml-test-framework.sh | 3 +- test/samples/w3c/Blackjack.scxml | 99 -- test/samples/w3c/Main.scxml | 204 --- test/samples/w3c/Test2Sub1.xml | 9 - test/samples/w3c/TrafficReport.scxml | 88 -- test/samples/w3c/calc.scxml | 158 --- test/samples/w3c/confEcma.xsl | 720 +++++++++++ test/samples/w3c/confXPath.xsl | 630 +++++++++ test/samples/w3c/convert-tests.pl | 37 + test/samples/w3c/edit-profile-config.scxml | 70 - test/samples/w3c/log-on-config.scxml | 32 - test/samples/w3c/microwave-01.scxml | 50 - test/samples/w3c/microwave-02.scxml | 63 - test/samples/w3c/simple.xml | 9 - test/samples/w3c/txml/test144.txml | 27 + test/samples/w3c/txml/test147.txml | 34 + test/samples/w3c/txml/test148.txml | 35 + test/samples/w3c/txml/test149.txml | 28 + test/samples/w3c/txml/test150.txml | 45 + test/samples/w3c/txml/test151.txml | 45 + test/samples/w3c/txml/test152.txml | 52 + test/samples/w3c/txml/test153.txml | 39 + test/samples/w3c/txml/test155.txml | 30 + test/samples/w3c/txml/test156.txml | 32 + test/samples/w3c/txml/test158.txml | 27 + test/samples/w3c/txml/test159.txml | 24 + test/samples/w3c/txml/test172.txml | 23 + test/samples/w3c/txml/test173.txml | 24 + test/samples/w3c/txml/test174.txml | 24 + test/samples/w3c/txml/test175.txml | 30 + test/samples/w3c/txml/test176.txml | 33 + test/samples/w3c/txml/test178.txml | 31 + test/samples/w3c/txml/test179.txml | 21 + test/samples/w3c/txml/test183.txml | 24 + test/samples/w3c/txml/test185.txml | 26 + test/samples/w3c/txml/test186.txml | 34 + test/samples/w3c/txml/test187.txml | 36 + test/samples/w3c/txml/test194.txml | 26 + test/samples/w3c/txml/test198.txml | 23 + test/samples/w3c/txml/test199.txml | 22 + test/samples/w3c/txml/test200.txml | 22 + test/samples/w3c/txml/test201.txml | 23 + test/samples/w3c/txml/test205.txml | 34 + test/samples/w3c/txml/test207.txml | 60 + test/samples/w3c/txml/test208.txml | 25 + test/samples/w3c/txml/test210.txml | 28 + test/samples/w3c/txml/test215.txml | 33 + test/samples/w3c/txml/test216.txml | 26 + test/samples/w3c/txml/test220.txml | 25 + test/samples/w3c/txml/test223.txml | 33 + test/samples/w3c/txml/test224.txml | 35 + test/samples/w3c/txml/test225.txml | 42 + test/samples/w3c/txml/test226.txml | 27 + test/samples/w3c/txml/test228.txml | 37 + test/samples/w3c/txml/test229.txml | 46 + test/samples/w3c/txml/test230.txml | 66 + test/samples/w3c/txml/test232.txml | 44 + test/samples/w3c/txml/test233.txml | 39 + test/samples/w3c/txml/test234.txml | 70 + test/samples/w3c/txml/test235.txml | 27 + test/samples/w3c/txml/test236.txml | 43 + test/samples/w3c/txml/test237.txml | 45 + test/samples/w3c/txml/test239.txml | 36 + test/samples/w3c/txml/test240.txml | 71 + test/samples/w3c/txml/test241.txml | 102 ++ test/samples/w3c/txml/test242.txml | 57 + test/samples/w3c/txml/test243.txml | 40 + test/samples/w3c/txml/test244.txml | 43 + test/samples/w3c/txml/test245.txml | 38 + test/samples/w3c/txml/test247.txml | 26 + test/samples/w3c/txml/test250.txml | 46 + test/samples/w3c/txml/test252.txml | 51 + test/samples/w3c/txml/test253.txml | 83 ++ test/samples/w3c/txml/test276.txml | 21 + test/samples/w3c/txml/test279.txml | 25 + test/samples/w3c/txml/test280.txml | 34 + test/samples/w3c/txml/test286.txml | 23 + test/samples/w3c/txml/test287.txml | 23 + test/samples/w3c/txml/test294.txml | 49 + test/samples/w3c/txml/test298.txml | 28 + test/samples/w3c/txml/test301.txml | 17 + test/samples/w3c/txml/test302.txml | 20 + test/samples/w3c/txml/test303.txml | 24 + test/samples/w3c/txml/test304.txml | 17 + test/samples/w3c/txml/test307.txml | 43 + test/samples/w3c/txml/test309.txml | 16 + test/samples/w3c/txml/test310.txml | 23 + test/samples/w3c/txml/test311.txml | 21 + test/samples/w3c/txml/test312.txml | 25 + test/samples/w3c/txml/test313.txml | 26 + test/samples/w3c/txml/test314.txml | 39 + test/samples/w3c/txml/test318.txml | 31 + test/samples/w3c/txml/test319.txml | 25 + test/samples/w3c/txml/test321.txml | 19 + test/samples/w3c/txml/test322.txml | 37 + test/samples/w3c/txml/test323.txml | 19 + test/samples/w3c/txml/test324.txml | 25 + test/samples/w3c/txml/test325.txml | 22 + test/samples/w3c/txml/test326.txml | 38 + test/samples/w3c/txml/test329.txml | 55 + test/samples/w3c/txml/test330.txml | 27 + test/samples/w3c/txml/test331.txml | 62 + test/samples/w3c/txml/test332.txml | 33 + test/samples/w3c/txml/test333.txml | 20 + test/samples/w3c/txml/test335.txml | 20 + test/samples/w3c/txml/test336.txml | 29 + test/samples/w3c/txml/test337.txml | 20 + test/samples/w3c/txml/test338.txml | 43 + test/samples/w3c/txml/test339.txml | 20 + test/samples/w3c/txml/test342.txml | 28 + test/samples/w3c/txml/test343.txml | 37 + test/samples/w3c/txml/test344.txml | 24 + test/samples/w3c/txml/test346.txml | 57 + test/samples/w3c/txml/test355.txml | 18 + test/samples/w3c/txml/test364.txml | 77 ++ test/samples/w3c/txml/test372.txml | 32 + test/samples/w3c/txml/test375.txml | 30 + test/samples/w3c/txml/test376.txml | 26 + test/samples/w3c/txml/test377.txml | 35 + test/samples/w3c/txml/test378.txml | 29 + test/samples/w3c/txml/test387.txml | 101 ++ test/samples/w3c/txml/test388.txml | 80 ++ test/samples/w3c/txml/test396.txml | 20 + test/samples/w3c/txml/test399.txml | 70 + test/samples/w3c/txml/test401.txml | 25 + test/samples/w3c/txml/test402.txml | 44 + test/samples/w3c/txml/test403a.txml | 47 + test/samples/w3c/txml/test403b.txml | 44 + test/samples/w3c/txml/test403c.txml | 58 + test/samples/w3c/txml/test404.txml | 64 + test/samples/w3c/txml/test405.txml | 71 + test/samples/w3c/txml/test406.txml | 68 + test/samples/w3c/txml/test407.txml | 24 + test/samples/w3c/txml/test409.txml | 36 + test/samples/w3c/txml/test411.txml | 36 + test/samples/w3c/txml/test412.txml | 56 + test/samples/w3c/txml/test413.txml | 49 + test/samples/w3c/txml/test416.txml | 26 + test/samples/w3c/txml/test417.txml | 39 + test/samples/w3c/txml/test419.txml | 22 + test/samples/w3c/txml/test421.txml | 33 + test/samples/w3c/txml/test422.txml | 78 ++ test/samples/w3c/txml/test423.txml | 28 + test/samples/w3c/txml/test487.txml | 21 + test/samples/w3c/txml/test488.txml | 37 + test/samples/w3c/txml/test503.txml | 41 + test/samples/w3c/txml/test504.txml | 79 ++ test/samples/w3c/txml/test505.txml | 51 + test/samples/w3c/txml/test506.txml | 57 + test/samples/w3c/txml/test521.txml | 27 + test/samples/w3c/txml/test525.txml | 30 + test/samples/w3c/txml/test527.txml | 28 + test/samples/w3c/txml/test528.txml | 37 + test/samples/w3c/txml/test529.txml | 28 + test/samples/w3c/txml/test530.txml | 30 + test/samples/w3c/txml/test533.txml | 66 + test/samples/w3c/txml/test550.txml | 24 + test/samples/w3c/txml/test551.txml | 27 + test/samples/w3c/txml/test552.txml | 22 + test/samples/w3c/txml/test553.txml | 27 + test/samples/w3c/txml/test554.txml | 29 + test/samples/w3c/txml/test570.txml | 49 + test/samples/w3c/txml/test576.txml | 41 + test/samples/w3c/update-txml.sh | 4 + .../test/w3c/test144.txml.json | 4 + .../test/w3c/test144.txml.scxml | 25 + .../test/w3c/test147.txml.json | 4 + .../test/w3c/test147.txml.scxml | 32 + .../test/w3c/test148.txml.json | 4 + .../test/w3c/test148.txml.scxml | 33 + .../test/w3c/test149.txml.json | 4 + .../test/w3c/test149.txml.scxml | 27 + .../test/w3c/test150.txml.json | 4 + .../test/w3c/test150.txml.scxml | 43 + .../test/w3c/test151.txml.json | 4 + .../test/w3c/test151.txml.scxml | 43 + .../test/w3c/test152.txml.json | 4 + .../test/w3c/test152.txml.scxml | 50 + .../test/w3c/test153.txml.json | 4 + .../test/w3c/test153.txml.scxml | 37 + .../test/w3c/test155.txml.json | 4 + .../test/w3c/test155.txml.scxml | 28 + .../test/w3c/test156.txml.json | 4 + .../test/w3c/test156.txml.scxml | 30 + .../test/w3c/test158.txml.json | 4 + .../test/w3c/test158.txml.scxml | 25 + .../test/w3c/test159.txml.json | 4 + .../test/w3c/test159.txml.scxml | 22 + .../test/w3c/test172.txml.json | 4 + .../test/w3c/test172.txml.scxml | 22 + .../test/w3c/test173.txml.json | 4 + .../test/w3c/test173.txml.scxml | 23 + .../test/w3c/test174.txml.json | 4 + .../test/w3c/test174.txml.scxml | 23 + .../test/w3c/test175.txml.json | 4 + .../test/w3c/test175.txml.scxml | 29 + .../test/w3c/test176.txml.json | 4 + .../test/w3c/test176.txml.scxml | 32 + .../test/w3c/test178.txml.json | 4 + .../test/w3c/test178.txml.scxml | 29 + .../test/w3c/test179.txml.json | 4 + .../test/w3c/test179.txml.scxml | 20 + .../test/w3c/test183.txml.json | 4 + .../test/w3c/test183.txml.scxml | 23 + .../test/w3c/test185.txml.json | 4 + .../test/w3c/test185.txml.scxml | 25 + .../test/w3c/test186.txml.json | 4 + .../test/w3c/test186.txml.scxml | 33 + .../test/w3c/test187.txml.json | 4 + .../test/w3c/test187.txml.scxml | 35 + .../test/w3c/test194.txml.json | 4 + .../test/w3c/test194.txml.scxml | 24 + .../test/w3c/test198.txml.json | 4 + .../test/w3c/test198.txml.scxml | 21 + .../test/w3c/test199.txml.json | 4 + .../test/w3c/test199.txml.scxml | 20 + .../test/w3c/test200.txml.json | 4 + .../test/w3c/test200.txml.scxml | 20 + .../test/w3c/test201.txml.json | 4 + .../test/w3c/test201.txml.scxml | 21 + .../test/w3c/test205.txml.json | 4 + .../test/w3c/test205.txml.scxml | 32 + .../test/w3c/test207.txml.json | 4 + .../test/w3c/test207.txml.scxml | 58 + .../test/w3c/test208.txml.json | 4 + .../test/w3c/test208.txml.scxml | 23 + .../test/w3c/test210.txml.json | 4 + .../test/w3c/test210.txml.scxml | 26 + .../test/w3c/test215.txml.json | 4 + .../test/w3c/test215.txml.scxml | 31 + .../test/w3c/test216.txml.json | 4 + .../test/w3c/test216.txml.scxml | 24 + .../test/w3c/test220.txml.json | 4 + .../test/w3c/test220.txml.scxml | 23 + .../test/w3c/test223.txml.json | 4 + .../test/w3c/test223.txml.scxml | 31 + .../test/w3c/test224.txml.json | 4 + .../test/w3c/test224.txml.scxml | 33 + .../test/w3c/test225.txml.json | 4 + .../test/w3c/test225.txml.scxml | 40 + .../test/w3c/test226.txml.json | 4 + .../test/w3c/test226.txml.scxml | 25 + .../test/w3c/test228.txml.json | 4 + .../test/w3c/test228.txml.scxml | 35 + .../test/w3c/test229.txml.json | 4 + .../test/w3c/test229.txml.scxml | 44 + .../test/w3c/test230.txml.json | 4 + .../test/w3c/test230.txml.scxml | 64 + .../test/w3c/test232.txml.json | 4 + .../test/w3c/test232.txml.scxml | 42 + .../test/w3c/test233.txml.json | 4 + .../test/w3c/test233.txml.scxml | 37 + .../test/w3c/test234.txml.json | 4 + .../test/w3c/test234.txml.scxml | 68 + .../test/w3c/test235.txml.json | 4 + .../test/w3c/test235.txml.scxml | 25 + .../test/w3c/test236.txml.json | 4 + .../test/w3c/test236.txml.scxml | 41 + .../test/w3c/test237.txml.json | 4 + .../test/w3c/test237.txml.scxml | 43 + .../test/w3c/test239.txml.json | 4 + .../test/w3c/test239.txml.scxml | 34 + .../test/w3c/test240.txml.json | 4 + .../test/w3c/test240.txml.scxml | 69 + .../test/w3c/test241.txml.json | 4 + .../test/w3c/test241.txml.scxml | 100 ++ .../test/w3c/test242.txml.json | 4 + .../test/w3c/test242.txml.scxml | 55 + .../test/w3c/test243.txml.json | 4 + .../test/w3c/test243.txml.scxml | 38 + .../test/w3c/test244.txml.json | 4 + .../test/w3c/test244.txml.scxml | 41 + .../test/w3c/test245.txml.json | 4 + .../test/w3c/test245.txml.scxml | 36 + .../test/w3c/test247.txml.json | 4 + .../test/w3c/test247.txml.scxml | 24 + .../test/w3c/test250.txml.json | 4 + .../test/w3c/test250.txml.scxml | 44 + .../test/w3c/test252.txml.json | 4 + .../test/w3c/test252.txml.scxml | 49 + .../test/w3c/test253.txml.json | 4 + .../test/w3c/test253.txml.scxml | 81 ++ .../test/w3c/test276.txml.json | 4 + .../test/w3c/test276.txml.scxml | 19 + .../test/w3c/test279.txml.json | 4 + .../test/w3c/test279.txml.scxml | 23 + .../test/w3c/test280.txml.json | 4 + .../test/w3c/test280.txml.scxml | 30 + .../test/w3c/test286.txml.json | 4 + .../test/w3c/test286.txml.scxml | 20 + .../test/w3c/test287.txml.json | 4 + .../test/w3c/test287.txml.scxml | 21 + .../test/w3c/test294.txml.json | 4 + .../test/w3c/test294.txml.scxml | 48 + .../test/w3c/test298.txml.json | 4 + .../test/w3c/test298.txml.scxml | 25 + .../test/w3c/test301.txml.json | 4 + .../test/w3c/test301.txml.scxml | 15 + .../test/w3c/test302.txml.json | 4 + .../test/w3c/test302.txml.scxml | 17 + .../test/w3c/test303.txml.json | 4 + .../test/w3c/test303.txml.scxml | 22 + .../test/w3c/test304.txml.json | 4 + .../test/w3c/test304.txml.scxml | 15 + .../test/w3c/test307.txml.json | 4 + .../test/w3c/test307.txml.scxml | 43 + .../test/w3c/test309.txml.json | 4 + .../test/w3c/test309.txml.scxml | 14 + .../test/w3c/test310.txml.json | 4 + .../test/w3c/test310.txml.scxml | 20 + .../test/w3c/test311.txml.json | 4 + .../test/w3c/test311.txml.scxml | 18 + .../test/w3c/test312.txml.json | 4 + .../test/w3c/test312.txml.scxml | 22 + .../test/w3c/test313.txml.json | 4 + .../test/w3c/test313.txml.scxml | 23 + .../test/w3c/test314.txml.json | 4 + .../test/w3c/test314.txml.scxml | 36 + .../test/w3c/test318.txml.json | 4 + .../test/w3c/test318.txml.scxml | 29 + .../test/w3c/test319.txml.json | 4 + .../test/w3c/test319.txml.scxml | 22 + .../test/w3c/test321.txml.json | 4 + .../test/w3c/test321.txml.scxml | 17 + .../test/w3c/test322.txml.json | 4 + .../test/w3c/test322.txml.scxml | 35 + .../test/w3c/test323.txml.json | 4 + .../test/w3c/test323.txml.scxml | 17 + .../test/w3c/test324.txml.json | 4 + .../test/w3c/test324.txml.scxml | 23 + .../test/w3c/test325.txml.json | 4 + .../test/w3c/test325.txml.scxml | 20 + .../test/w3c/test326.txml.json | 4 + .../test/w3c/test326.txml.scxml | 37 + .../test/w3c/test329.txml.json | 4 + .../test/w3c/test329.txml.scxml | 55 + .../test/w3c/test330.txml.json | 4 + .../test/w3c/test330.txml.scxml | 25 + .../test/w3c/test331.txml.json | 4 + .../test/w3c/test331.txml.scxml | 61 + .../test/w3c/test332.txml.json | 4 + .../test/w3c/test332.txml.scxml | 31 + .../test/w3c/test333.txml.json | 4 + .../test/w3c/test333.txml.scxml | 18 + .../test/w3c/test335.txml.json | 4 + .../test/w3c/test335.txml.scxml | 18 + .../test/w3c/test336.txml.json | 4 + .../test/w3c/test336.txml.scxml | 27 + .../test/w3c/test337.txml.json | 4 + .../test/w3c/test337.txml.scxml | 18 + .../test/w3c/test338.txml.json | 4 + .../test/w3c/test338.txml.scxml | 41 + .../test/w3c/test339.txml.json | 4 + .../test/w3c/test339.txml.scxml | 18 + .../test/w3c/test342.txml.json | 4 + .../test/w3c/test342.txml.scxml | 27 + .../test/w3c/test343.txml.json | 4 + .../test/w3c/test343.txml.scxml | 36 + .../test/w3c/test344.txml.json | 4 + .../test/w3c/test344.txml.scxml | 22 + .../test/w3c/test346.txml.json | 4 + .../test/w3c/test346.txml.scxml | 55 + .../test/w3c/test355.txml.json | 4 + .../test/w3c/test355.txml.scxml | 16 + .../test/w3c/test364.txml.json | 4 + .../test/w3c/test364.txml.scxml | 75 ++ .../test/w3c/test372.txml.json | 4 + .../test/w3c/test372.txml.scxml | 30 + .../test/w3c/test375.txml.json | 4 + .../test/w3c/test375.txml.scxml | 28 + .../test/w3c/test376.txml.json | 4 + .../test/w3c/test376.txml.scxml | 24 + .../test/w3c/test377.txml.json | 4 + .../test/w3c/test377.txml.scxml | 33 + .../test/w3c/test378.txml.json | 4 + .../test/w3c/test378.txml.scxml | 27 + .../test/w3c/test387.txml.json | 4 + .../test/w3c/test387.txml.scxml | 99 ++ .../test/w3c/test388.txml.json | 4 + .../test/w3c/test388.txml.scxml | 78 ++ .../test/w3c/test396.txml.json | 4 + .../test/w3c/test396.txml.scxml | 18 + .../test/w3c/test399.txml.json | 4 + .../test/w3c/test399.txml.scxml | 68 + .../test/w3c/test401.txml.json | 4 + .../test/w3c/test401.txml.scxml | 23 + .../test/w3c/test402.txml.json | 4 + .../test/w3c/test402.txml.scxml | 42 + .../test/w3c/test403a.txml.json | 4 + .../test/w3c/test403a.txml.scxml | 45 + .../test/w3c/test403b.txml.json | 4 + .../test/w3c/test403b.txml.scxml | 42 + .../test/w3c/test403c.txml.json | 4 + .../test/w3c/test403c.txml.scxml | 56 + .../test/w3c/test404.txml.json | 4 + .../test/w3c/test404.txml.scxml | 62 + .../test/w3c/test405.txml.json | 4 + .../test/w3c/test405.txml.scxml | 69 + .../test/w3c/test406.txml.json | 4 + .../test/w3c/test406.txml.scxml | 66 + .../test/w3c/test407.txml.json | 4 + .../test/w3c/test407.txml.scxml | 22 + .../test/w3c/test409.txml.json | 4 + .../test/w3c/test409.txml.scxml | 34 + .../test/w3c/test411.txml.json | 4 + .../test/w3c/test411.txml.scxml | 34 + .../test/w3c/test412.txml.json | 4 + .../test/w3c/test412.txml.scxml | 54 + .../test/w3c/test413.txml.json | 4 + .../test/w3c/test413.txml.scxml | 47 + .../test/w3c/test416.txml.json | 4 + .../test/w3c/test416.txml.scxml | 24 + .../test/w3c/test417.txml.json | 4 + .../test/w3c/test417.txml.scxml | 36 + .../test/w3c/test419.txml.json | 4 + .../test/w3c/test419.txml.scxml | 19 + .../test/w3c/test421.txml.json | 4 + .../test/w3c/test421.txml.scxml | 30 + .../test/w3c/test422.txml.json | 4 + .../test/w3c/test422.txml.scxml | 77 ++ .../test/w3c/test423.txml.json | 4 + .../test/w3c/test423.txml.scxml | 27 + .../test/w3c/test487.txml.json | 4 + .../test/w3c/test487.txml.scxml | 19 + .../test/w3c/test488.txml.json | 4 + .../test/w3c/test488.txml.scxml | 36 + .../test/w3c/test503.txml.json | 4 + .../test/w3c/test503.txml.scxml | 39 + .../test/w3c/test504.txml.json | 4 + .../test/w3c/test504.txml.scxml | 77 ++ .../test/w3c/test505.txml.json | 4 + .../test/w3c/test505.txml.scxml | 49 + .../test/w3c/test506.txml.json | 4 + .../test/w3c/test506.txml.scxml | 55 + .../test/w3c/test521.txml.json | 4 + .../test/w3c/test521.txml.scxml | 25 + .../test/w3c/test525.txml.json | 4 + .../test/w3c/test525.txml.scxml | 28 + .../test/w3c/test527.txml.json | 4 + .../test/w3c/test527.txml.scxml | 27 + .../test/w3c/test528.txml.json | 4 + .../test/w3c/test528.txml.scxml | 36 + .../test/w3c/test529.txml.json | 4 + .../test/w3c/test529.txml.scxml | 27 + .../test/w3c/test530.txml.json | 4 + .../test/w3c/test530.txml.scxml | 28 + .../test/w3c/test533.txml.json | 4 + .../test/w3c/test533.txml.scxml | 64 + .../test/w3c/test550.txml.json | 4 + .../test/w3c/test550.txml.scxml | 22 + .../test/w3c/test551.txml.json | 4 + .../test/w3c/test551.txml.scxml | 25 + .../test/w3c/test552.txml.json | 4 + .../test/w3c/test552.txml.scxml | 20 + .../test/w3c/test553.txml.json | 4 + .../test/w3c/test553.txml.scxml | 25 + .../test/w3c/test554.txml.json | 4 + .../test/w3c/test554.txml.scxml | 27 + .../test/w3c/test570.txml.json | 4 + .../test/w3c/test570.txml.scxml | 47 + .../test/w3c/test576.txml.json | 4 + .../test/w3c/test576.txml.scxml | 39 + test/src/scxml-test-framework-client.cpp | 10 +- 472 files changed, 14357 insertions(+), 2091 deletions(-) create mode 100644 src/uscxml/interpreter/InterpreterDraft6.cpp create mode 100644 src/uscxml/interpreter/InterpreterDraft6.h create mode 100644 src/uscxml/interpreter/InterpreterDraft7.cpp create mode 100644 src/uscxml/interpreter/InterpreterDraft7.h delete mode 100644 test/samples/w3c/Blackjack.scxml delete mode 100644 test/samples/w3c/Main.scxml delete mode 100644 test/samples/w3c/Test2Sub1.xml delete mode 100644 test/samples/w3c/TrafficReport.scxml delete mode 100644 test/samples/w3c/calc.scxml create mode 100644 test/samples/w3c/confEcma.xsl create mode 100644 test/samples/w3c/confXPath.xsl create mode 100755 test/samples/w3c/convert-tests.pl delete mode 100644 test/samples/w3c/edit-profile-config.scxml delete mode 100644 test/samples/w3c/log-on-config.scxml delete mode 100644 test/samples/w3c/microwave-01.scxml delete mode 100644 test/samples/w3c/microwave-02.scxml delete mode 100644 test/samples/w3c/simple.xml create mode 100644 test/samples/w3c/txml/test144.txml create mode 100644 test/samples/w3c/txml/test147.txml create mode 100644 test/samples/w3c/txml/test148.txml create mode 100644 test/samples/w3c/txml/test149.txml create mode 100644 test/samples/w3c/txml/test150.txml create mode 100644 test/samples/w3c/txml/test151.txml create mode 100644 test/samples/w3c/txml/test152.txml create mode 100644 test/samples/w3c/txml/test153.txml create mode 100644 test/samples/w3c/txml/test155.txml create mode 100644 test/samples/w3c/txml/test156.txml create mode 100644 test/samples/w3c/txml/test158.txml create mode 100644 test/samples/w3c/txml/test159.txml create mode 100644 test/samples/w3c/txml/test172.txml create mode 100644 test/samples/w3c/txml/test173.txml create mode 100644 test/samples/w3c/txml/test174.txml create mode 100644 test/samples/w3c/txml/test175.txml create mode 100644 test/samples/w3c/txml/test176.txml create mode 100644 test/samples/w3c/txml/test178.txml create mode 100644 test/samples/w3c/txml/test179.txml create mode 100644 test/samples/w3c/txml/test183.txml create mode 100644 test/samples/w3c/txml/test185.txml create mode 100644 test/samples/w3c/txml/test186.txml create mode 100644 test/samples/w3c/txml/test187.txml create mode 100644 test/samples/w3c/txml/test194.txml create mode 100644 test/samples/w3c/txml/test198.txml create mode 100644 test/samples/w3c/txml/test199.txml create mode 100644 test/samples/w3c/txml/test200.txml create mode 100644 test/samples/w3c/txml/test201.txml create mode 100644 test/samples/w3c/txml/test205.txml create mode 100644 test/samples/w3c/txml/test207.txml create mode 100644 test/samples/w3c/txml/test208.txml create mode 100644 test/samples/w3c/txml/test210.txml create mode 100644 test/samples/w3c/txml/test215.txml create mode 100644 test/samples/w3c/txml/test216.txml create mode 100644 test/samples/w3c/txml/test220.txml create mode 100644 test/samples/w3c/txml/test223.txml create mode 100644 test/samples/w3c/txml/test224.txml create mode 100644 test/samples/w3c/txml/test225.txml create mode 100644 test/samples/w3c/txml/test226.txml create mode 100644 test/samples/w3c/txml/test228.txml create mode 100644 test/samples/w3c/txml/test229.txml create mode 100644 test/samples/w3c/txml/test230.txml create mode 100644 test/samples/w3c/txml/test232.txml create mode 100644 test/samples/w3c/txml/test233.txml create mode 100644 test/samples/w3c/txml/test234.txml create mode 100644 test/samples/w3c/txml/test235.txml create mode 100644 test/samples/w3c/txml/test236.txml create mode 100644 test/samples/w3c/txml/test237.txml create mode 100644 test/samples/w3c/txml/test239.txml create mode 100644 test/samples/w3c/txml/test240.txml create mode 100644 test/samples/w3c/txml/test241.txml create mode 100644 test/samples/w3c/txml/test242.txml create mode 100644 test/samples/w3c/txml/test243.txml create mode 100644 test/samples/w3c/txml/test244.txml create mode 100644 test/samples/w3c/txml/test245.txml create mode 100644 test/samples/w3c/txml/test247.txml create mode 100644 test/samples/w3c/txml/test250.txml create mode 100644 test/samples/w3c/txml/test252.txml create mode 100644 test/samples/w3c/txml/test253.txml create mode 100644 test/samples/w3c/txml/test276.txml create mode 100644 test/samples/w3c/txml/test279.txml create mode 100644 test/samples/w3c/txml/test280.txml create mode 100644 test/samples/w3c/txml/test286.txml create mode 100644 test/samples/w3c/txml/test287.txml create mode 100644 test/samples/w3c/txml/test294.txml create mode 100644 test/samples/w3c/txml/test298.txml create mode 100644 test/samples/w3c/txml/test301.txml create mode 100644 test/samples/w3c/txml/test302.txml create mode 100644 test/samples/w3c/txml/test303.txml create mode 100644 test/samples/w3c/txml/test304.txml create mode 100644 test/samples/w3c/txml/test307.txml create mode 100644 test/samples/w3c/txml/test309.txml create mode 100644 test/samples/w3c/txml/test310.txml create mode 100644 test/samples/w3c/txml/test311.txml create mode 100644 test/samples/w3c/txml/test312.txml create mode 100644 test/samples/w3c/txml/test313.txml create mode 100644 test/samples/w3c/txml/test314.txml create mode 100644 test/samples/w3c/txml/test318.txml create mode 100644 test/samples/w3c/txml/test319.txml create mode 100644 test/samples/w3c/txml/test321.txml create mode 100644 test/samples/w3c/txml/test322.txml create mode 100644 test/samples/w3c/txml/test323.txml create mode 100644 test/samples/w3c/txml/test324.txml create mode 100644 test/samples/w3c/txml/test325.txml create mode 100644 test/samples/w3c/txml/test326.txml create mode 100644 test/samples/w3c/txml/test329.txml create mode 100644 test/samples/w3c/txml/test330.txml create mode 100644 test/samples/w3c/txml/test331.txml create mode 100644 test/samples/w3c/txml/test332.txml create mode 100644 test/samples/w3c/txml/test333.txml create mode 100644 test/samples/w3c/txml/test335.txml create mode 100644 test/samples/w3c/txml/test336.txml create mode 100644 test/samples/w3c/txml/test337.txml create mode 100644 test/samples/w3c/txml/test338.txml create mode 100644 test/samples/w3c/txml/test339.txml create mode 100644 test/samples/w3c/txml/test342.txml create mode 100644 test/samples/w3c/txml/test343.txml create mode 100644 test/samples/w3c/txml/test344.txml create mode 100644 test/samples/w3c/txml/test346.txml create mode 100644 test/samples/w3c/txml/test355.txml create mode 100644 test/samples/w3c/txml/test364.txml create mode 100644 test/samples/w3c/txml/test372.txml create mode 100644 test/samples/w3c/txml/test375.txml create mode 100644 test/samples/w3c/txml/test376.txml create mode 100644 test/samples/w3c/txml/test377.txml create mode 100644 test/samples/w3c/txml/test378.txml create mode 100644 test/samples/w3c/txml/test387.txml create mode 100644 test/samples/w3c/txml/test388.txml create mode 100644 test/samples/w3c/txml/test396.txml create mode 100644 test/samples/w3c/txml/test399.txml create mode 100644 test/samples/w3c/txml/test401.txml create mode 100644 test/samples/w3c/txml/test402.txml create mode 100644 test/samples/w3c/txml/test403a.txml create mode 100644 test/samples/w3c/txml/test403b.txml create mode 100644 test/samples/w3c/txml/test403c.txml create mode 100644 test/samples/w3c/txml/test404.txml create mode 100644 test/samples/w3c/txml/test405.txml create mode 100644 test/samples/w3c/txml/test406.txml create mode 100644 test/samples/w3c/txml/test407.txml create mode 100644 test/samples/w3c/txml/test409.txml create mode 100644 test/samples/w3c/txml/test411.txml create mode 100644 test/samples/w3c/txml/test412.txml create mode 100644 test/samples/w3c/txml/test413.txml create mode 100644 test/samples/w3c/txml/test416.txml create mode 100644 test/samples/w3c/txml/test417.txml create mode 100644 test/samples/w3c/txml/test419.txml create mode 100644 test/samples/w3c/txml/test421.txml create mode 100644 test/samples/w3c/txml/test422.txml create mode 100644 test/samples/w3c/txml/test423.txml create mode 100644 test/samples/w3c/txml/test487.txml create mode 100644 test/samples/w3c/txml/test488.txml create mode 100644 test/samples/w3c/txml/test503.txml create mode 100644 test/samples/w3c/txml/test504.txml create mode 100644 test/samples/w3c/txml/test505.txml create mode 100644 test/samples/w3c/txml/test506.txml create mode 100644 test/samples/w3c/txml/test521.txml create mode 100644 test/samples/w3c/txml/test525.txml create mode 100644 test/samples/w3c/txml/test527.txml create mode 100644 test/samples/w3c/txml/test528.txml create mode 100644 test/samples/w3c/txml/test529.txml create mode 100644 test/samples/w3c/txml/test530.txml create mode 100644 test/samples/w3c/txml/test533.txml create mode 100644 test/samples/w3c/txml/test550.txml create mode 100644 test/samples/w3c/txml/test551.txml create mode 100644 test/samples/w3c/txml/test552.txml create mode 100644 test/samples/w3c/txml/test553.txml create mode 100644 test/samples/w3c/txml/test554.txml create mode 100644 test/samples/w3c/txml/test570.txml create mode 100644 test/samples/w3c/txml/test576.txml create mode 100755 test/samples/w3c/update-txml.sh create mode 100644 test/scxml-test-framework/test/w3c/test144.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test144.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test147.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test147.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test148.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test148.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test149.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test149.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test150.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test150.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test151.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test151.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test152.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test152.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test153.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test153.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test155.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test155.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test156.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test156.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test158.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test158.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test159.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test159.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test172.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test172.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test173.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test173.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test174.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test174.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test175.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test175.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test176.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test176.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test178.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test178.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test179.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test179.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test183.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test183.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test185.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test185.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test186.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test186.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test187.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test187.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test194.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test194.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test198.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test198.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test199.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test199.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test200.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test200.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test201.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test201.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test205.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test205.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test207.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test207.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test208.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test208.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test210.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test210.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test215.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test215.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test216.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test216.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test220.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test220.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test223.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test223.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test224.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test224.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test225.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test225.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test226.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test226.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test228.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test228.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test229.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test229.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test230.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test230.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test232.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test232.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test233.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test233.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test234.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test234.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test235.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test235.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test236.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test236.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test237.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test237.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test239.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test239.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test240.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test240.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test241.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test241.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test242.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test242.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test243.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test243.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test244.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test244.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test245.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test245.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test247.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test247.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test250.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test250.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test252.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test252.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test253.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test253.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test276.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test276.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test279.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test279.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test280.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test280.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test286.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test286.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test287.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test287.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test294.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test294.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test298.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test298.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test301.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test301.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test302.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test302.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test303.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test303.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test304.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test304.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test307.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test307.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test309.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test309.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test310.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test310.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test311.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test311.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test312.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test312.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test313.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test313.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test314.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test314.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test318.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test318.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test319.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test319.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test321.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test321.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test322.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test322.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test323.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test323.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test324.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test324.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test325.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test325.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test326.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test326.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test329.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test329.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test330.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test330.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test331.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test331.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test332.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test332.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test333.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test333.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test335.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test335.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test336.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test336.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test337.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test337.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test338.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test338.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test339.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test339.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test342.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test342.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test343.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test343.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test344.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test344.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test346.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test346.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test355.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test355.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test364.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test364.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test372.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test372.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test375.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test375.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test376.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test376.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test377.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test377.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test378.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test378.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test387.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test387.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test388.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test388.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test396.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test396.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test399.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test399.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test401.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test401.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test402.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test402.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test403a.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test403a.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test403b.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test403b.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test403c.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test403c.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test404.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test404.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test405.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test405.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test406.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test406.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test407.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test407.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test409.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test409.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test411.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test411.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test412.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test412.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test413.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test413.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test416.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test416.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test417.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test417.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test419.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test419.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test421.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test421.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test422.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test422.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test423.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test423.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test487.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test487.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test488.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test488.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test503.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test503.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test504.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test504.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test505.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test505.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test506.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test506.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test521.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test521.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test525.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test525.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test527.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test527.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test528.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test528.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test529.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test529.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test530.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test530.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test533.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test533.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test550.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test550.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test551.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test551.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test552.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test552.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test553.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test553.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test554.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test554.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test570.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test570.txml.scxml create mode 100644 test/scxml-test-framework/test/w3c/test576.txml.json create mode 100644 test/scxml-test-framework/test/w3c/test576.txml.scxml diff --git a/CMakeLists.txt b/CMakeLists.txt index d861905..c15d948 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -401,6 +401,13 @@ file(GLOB_RECURSE USCXML_DEBUG source_group("Interpreter" FILES ${USCXML_DEBUG}) list (APPEND USCXML_FILES ${USCXML_DEBUG}) +file(GLOB_RECURSE USCXML_INTERPRETERS + src/uscxml/interpreter/*.cpp + src/uscxml/interpreter/*.h +) +source_group("Interpreter" FILES ${USCXML_INTERPRETERS}) +list (APPEND USCXML_FILES ${USCXML_INTERPRETERS}) + file(GLOB USCXML_CORE contrib/src/jsmn/jsmn.c src/uscxml/*.cpp diff --git a/apps/mmi-browser.cpp b/apps/mmi-browser.cpp index 5127d7b..b62aaee 100644 --- a/apps/mmi-browser.cpp +++ b/apps/mmi-browser.cpp @@ -10,11 +10,25 @@ #include "XGetopt.h" #endif -#ifdef HAS_SIGNAL_H -void handler(int s) { - printf("Caught SIGPIPE ############\n"); -} -#endif +class VerboseMonitor : public uscxml::InterpreterMonitor { + void onStableConfiguration(uscxml::Interpreter* interpreter) { + printConfig(interpreter->getConfiguration()); + } + + void beforeCompletion(uscxml::Interpreter* interpreter) { + printConfig(interpreter->getConfiguration()); + } + + void printConfig(const Arabica::XPath::NodeSet& config) { + std::string seperator; + std::cout << "Config: {"; + for (int i = 0; i < config.size(); i++) { + std::cout << seperator << ATTR(config[i], "id"); + seperator = ", "; + } + std::cout << "}" << std::endl; + } +}; void printUsageAndExit() { printf("mmi-browser version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n"); @@ -25,8 +39,9 @@ void printUsageAndExit() { #endif printf(" URL\n"); printf("\n"); - // printf("Options\n"); - // printf("\t-l loglevel : loglevel to use\n"); + printf("Options\n"); + printf("\t-v : be verbose\n"); + printf("\n"); exit(1); } @@ -34,35 +49,20 @@ int main(int argc, char** argv) { using namespace uscxml; #ifdef HAS_SIGNAL_H - // disable SIGPIPE -// struct sigaction act; -// act.sa_handler=SIG_IGN; -// sigemptyset(&act.sa_mask); -// act.sa_flags=0; -// sigaction(SIGPIPE, &act, NULL); - - // signal(SIGPIPE, handler); - signal(SIGPIPE, SIG_IGN); - - // struct sigaction act; - // int r; - // memset(&act, 0, sizeof(act)); - // act.sa_handler = SIG_IGN; - // act.sa_flags = SA_RESTART; - // r = sigaction(SIGPIPE, &act, NULL); - #endif if (argc < 2) { printUsageAndExit(); } + bool verbose = false; + #ifndef _WIN32 opterr = 0; #endif int option; - while ((option = getopt(argc, argv, "l:p:")) != -1) { + while ((option = getopt(argc, argv, "vl:p:")) != -1) { switch(option) { case 'l': google::InitGoogleLogging(optarg); @@ -70,6 +70,9 @@ int main(int argc, char** argv) { case 'p': uscxml::Factory::pluginPath = optarg; break; + case 'v': + verbose = true; + break; case '?': break; default: @@ -87,9 +90,14 @@ int main(int argc, char** argv) { interpreter->setCmdLineOptions(argc, argv); // interpreter->setCapabilities(Interpreter::CAN_NOTHING); // interpreter->setCapabilities(Interpreter::CAN_BASIC_HTTP | Interpreter::CAN_GENERIC_HTTP); + + if (verbose) { + VerboseMonitor* vm = new VerboseMonitor(); + interpreter->addMonitor(vm); + } + interpreter->start(); while(interpreter->runOnMainThread(25)); - // interpreter->interpret(); delete interpreter; } diff --git a/src/uscxml/Interpreter.cpp b/src/uscxml/Interpreter.cpp index 8e9165e..e59ef5f 100644 --- a/src/uscxml/Interpreter.cpp +++ b/src/uscxml/Interpreter.cpp @@ -19,6 +19,8 @@ #include #include +#include "uscxml/interpreter/InterpreterDraft6.h" + #define VERBOSE 0 namespace uscxml { @@ -31,7 +33,7 @@ const std::string Interpreter::getUUID() { return boost::lexical_cast(uuidGen()); } -Interpreter::Interpreter() : Arabica::SAX2DOM::Parser() { +Interpreter::Interpreter() { _lastRunOnMainThread = 0; _nsURL = "*"; _thread = NULL; @@ -51,11 +53,9 @@ Interpreter::Interpreter() : Arabica::SAX2DOM::Parser() { Interpreter* Interpreter::fromDOM(const Arabica::DOM::Node& node) { Arabica::DOM::DOMImplementation domFactory = Arabica::SimpleDOM::DOMImplementation::getDOMImplementation(); - Interpreter* interpreter = new Interpreter(); + Interpreter* interpreter = new InterpreterDraft6(); interpreter->_document = domFactory.createDocument("http://www.w3.org/2005/07/scxml", "scxml", 0); interpreter->_document.appendChild(node); - interpreter->init(); - return interpreter; } @@ -80,7 +80,6 @@ Interpreter* Interpreter::fromURI(const std::string& uri) { Interpreter* interpreter = NULL; - // this is required for windows filenames and does not harm on unices if (boost::iequals(absUrl.scheme(), "file")) { Arabica::SAX::InputSource inputSource; inputSource.setSystemId(absUrl.path()); @@ -107,6 +106,59 @@ Interpreter* Interpreter::fromURI(const std::string& uri) { return interpreter; } +Interpreter* Interpreter::fromInputSource(Arabica::SAX::InputSource& source) { + Interpreter* interpreter = new InterpreterDraft6(); + + SCXMLParser* parser = new SCXMLParser(interpreter); + if(!parser->parse(source) || !parser->getDocument().hasChildNodes()) { + if(parser->_errorHandler.errorsReported()) { + LOG(ERROR) << "could not parse input:"; + LOG(ERROR) << parser->_errorHandler.errors() << std::endl; + } else { + Arabica::SAX::InputSourceResolver resolver(source, Arabica::default_string_adaptor()); + if (!resolver.resolve()) { + LOG(ERROR) << source.getSystemId() << ": no such file"; + } + } + delete parser; + delete interpreter; + return NULL; + } else { + interpreter->_document = parser->getDocument(); + } + // interpreter->init(); + delete parser; + return interpreter; +} + +SCXMLParser::SCXMLParser(Interpreter* interpreter) : _interpreter(interpreter) { + Arabica::SAX::CatchErrorHandler errorHandler; + setErrorHandler(errorHandler); +} + +void SCXMLParser::startPrefixMapping(const std::string& prefix, const std::string& uri) { +#if 0 + std::cout << "starting prefix mapping " << prefix << ": " << uri << std::endl; +#endif + if (boost::iequals(uri, "http://www.w3.org/2005/07/scxml")) { + _interpreter->_nsURL = uri; + if (prefix.size() == 0) { + LOG(INFO) << "Mapped default namespace to 'scxml:'"; + _interpreter->_xpathPrefix = "scxml:"; + _interpreter->_nsContext.addNamespaceDeclaration(uri, "scxml"); + _interpreter->_nsToPrefix[uri] = "scxml"; + } else { + _interpreter->_xpathPrefix = prefix + ":"; + _interpreter->_xmlNSPrefix = _interpreter->_xpathPrefix; + _interpreter->_nsContext.addNamespaceDeclaration(uri, prefix); + _interpreter->_nsToPrefix[uri] = prefix; + } + } else { + _interpreter->_nsContext.addNamespaceDeclaration(uri, prefix); + _interpreter->_nsToPrefix[uri] = prefix; + } +} + void Interpreter::setName(const std::string& name) { if (!_running) { _name = name; @@ -147,83 +199,6 @@ bool Interpreter::toAbsoluteURI(URL& uri) { return false; } -void Interpreter::startPrefixMapping(const std::string& prefix, const std::string& uri) { -#if 0 - std::cout << "starting prefix mapping " << prefix << ": " << uri << std::endl; -#endif - if (boost::iequals(uri, "http://www.w3.org/2005/07/scxml")) { - _nsURL = uri; - if (prefix.size() == 0) { - LOG(INFO) << "Mapped default namespace to 'scxml:'"; - _xpathPrefix = "scxml:"; - _nsContext.addNamespaceDeclaration(uri, "scxml"); - _nsToPrefix[uri] = "scxml"; - } else { - _xpathPrefix = prefix + ":"; - _xmlNSPrefix = _xpathPrefix; - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; - } - } else { - _nsContext.addNamespaceDeclaration(uri, prefix); - _nsToPrefix[uri] = prefix; - } -} - -Interpreter* Interpreter::fromInputSource(Arabica::SAX::InputSource& source) { - Interpreter* interpreter = new Interpreter(); - - Arabica::SAX::CatchErrorHandler errorHandler; - interpreter->setErrorHandler(errorHandler); - if(!interpreter->parse(source) || !interpreter->Arabica::SAX2DOM::Parser::getDocument().hasChildNodes()) { - if(errorHandler.errorsReported()) { - LOG(ERROR) << "could not parse input:"; - LOG(ERROR) << errorHandler.errors() << std::endl; - } else { - Arabica::SAX::InputSourceResolver resolver(source, Arabica::default_string_adaptor()); - if (!resolver.resolve()) { - LOG(ERROR) << source.getSystemId() << ": no such file"; - } - } - delete interpreter; - return NULL; - } else { - interpreter->_document = interpreter->Arabica::SAX2DOM::Parser::getDocument(); - } -// interpreter->init(); - return interpreter; -} - -void Interpreter::init() { - if (_document) { - NodeList scxmls = _document.getElementsByTagNameNS(_nsURL, "scxml"); - if (scxmls.getLength() > 0) { - _scxml = (Arabica::DOM::Element)scxmls.item(0); - - // setup xpath and check that it works - _xpath.setNamespaceContext(_nsContext); - Arabica::XPath::NodeSet scxmls = _xpath.evaluate("/" + _xpathPrefix + "scxml", _document).asNodeSet(); - assert(scxmls.size() > 0); - assert(scxmls[0] == _scxml); - - if (_name.length() == 0) - _name = (HAS_ATTR(_scxml, "name") ? ATTR(_scxml, "name") : getUUID()); - - normalize(_document); - - if (_capabilities & CAN_GENERIC_HTTP) - _httpServlet = new InterpreterServlet(this); - - _sendQueue = new DelayedEventQueue(); - _sendQueue->start(); - - } else { - LOG(ERROR) << "Cannot find SCXML element" << std::endl; - } - } - _isInitialized = true; -} - Interpreter::~Interpreter() { if (_thread) { _running = false; @@ -280,140 +255,34 @@ bool Interpreter::runOnMainThread(int fps, bool blocking) { return (_thread != NULL); } -// see: http://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation -void Interpreter::interpret() { - if (!_isInitialized) - init(); - - if (!_scxml) - return; -// dump(); - - _sessionId = getUUID(); - - std::string datamodelName; - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) - datamodelName = ATTR(_scxml, "datamodel"); - if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "profile")) // SCION SCXML uses profile to specify datamodel - datamodelName = ATTR(_scxml, "profile"); - _dataModel = Factory::createDataModel(datamodelName, this); - if(datamodelName.length() > 0 && !_dataModel) { - LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; - } - - if (_dataModel) { - _dataModel.assign("_x.args", _cmdLineOptions); - if (_httpServlet) { - Data data; - data.compound["location"] = Data(_httpServlet->getURL(), Data::VERBATIM); - _dataModel.assign("_ioprocessors['http']", data); - } - } - - setupIOProcessors(); - - _running = true; - _binding = (HAS_ATTR(_scxml, "binding") && boost::iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); - - // @TODO: Reread http://www.w3.org/TR/scxml/#DataBinding - - if (_dataModel && _binding == EARLY) { - // initialize all data elements - NodeSet dataElems = _xpath.evaluate("//" + _xpathPrefix + "data", _document).asNodeSet(); - for (unsigned int i = 0; i < dataElems.size(); i++) { - initializeData(dataElems[i]); - } - } else if(_dataModel) { - // initialize current data elements - NodeSet topDataElems = filterChildElements(_xmlNSPrefix + "data", filterChildElements(_xmlNSPrefix + "datamodel", _scxml)); - for (unsigned int i = 0; i < topDataElems.size(); i++) { - initializeData(topDataElems[i]); - } - } - - // executeGlobalScriptElements - NodeSet globalScriptElems = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "script", _document).asNodeSet(); - for (unsigned int i = 0; i < globalScriptElems.size(); i++) { - if (_dataModel) - executeContent(globalScriptElems[i]); - } - - // initial transition might be implict - NodeSet initialTransitions = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", _document).asNodeSet(); - if (initialTransitions.size() == 0) { - Arabica::DOM::Element initialState = (Arabica::DOM::Element)getInitialState(); - Arabica::DOM::Element initialElem = _document.createElementNS(_nsURL, "initial"); - initialElem.setAttribute("generated", "true"); - Arabica::DOM::Element transitionElem = _document.createElementNS(_nsURL, "transition"); - transitionElem.setAttribute("target", initialState.getAttribute("id")); - initialElem.appendChild(transitionElem); - _scxml.appendChild(initialElem); - initialTransitions.push_back(transitionElem); - } - enterStates(initialTransitions); - -// assert(hasLegalConfiguration()); - mainEventLoop(); - - if (_parentQueue) { - // send one final event to unblock eventual listeners - Event quit; - quit.name = "done.state.scxml"; - _parentQueue->push(quit); - } - - // set datamodel to null from this thread - if(_dataModel) - _dataModel = DataModel(); - -} - -/** - * Called with a single data element from the topmost datamodel element. - */ -void Interpreter::initializeData(const Arabica::DOM::Node& data) { - if (!_dataModel) { - LOG(ERROR) << "Cannot initialize data when no datamodel is given!"; - return; - } - try { - if (!HAS_ATTR(data, "id")) { - LOG(ERROR) << "Data element has no id!"; - return; - } - - if (HAS_ATTR(data, "expr")) { - std::string value = ATTR(data, "expr"); - _dataModel.assign(ATTR(data, "id"), value); - } else if (HAS_ATTR(data, "src")) { - URL srcURL(ATTR(data, "src")); - if (!srcURL.isAbsolute()) - toAbsoluteURI(srcURL); - - std::stringstream ss; - if (_cachedURLs.find(srcURL.asString()) != _cachedURLs.end()) { - ss << _cachedURLs[srcURL.asString()]; - } else { - ss << srcURL; - _cachedURLs[srcURL.asString()] = srcURL; - } - _dataModel.assign(ATTR(data, "id"), ss.str()); - - } else if (data.hasChildNodes()) { - // search for the text node with the actual script - NodeList dataChilds = data.getChildNodes(); - for (int i = 0; i < dataChilds.getLength(); i++) { - if (dataChilds.item(i).getNodeType() == Node_base::TEXT_NODE) { - Data value = Data(dataChilds.item(i).getNodeValue()); - _dataModel.assign(ATTR(data, "id"), value); - break; - } - } +void Interpreter::init() { + if (_document) { + NodeList scxmls = _document.getElementsByTagNameNS(_nsURL, "scxml"); + if (scxmls.getLength() > 0) { + _scxml = (Arabica::DOM::Element)scxmls.item(0); + + // setup xpath and check that it works + _xpath.setNamespaceContext(_nsContext); + Arabica::XPath::NodeSet scxmls = _xpath.evaluate("/" + _xpathPrefix + "scxml", _document).asNodeSet(); + assert(scxmls.size() > 0); + assert(scxmls[0] == _scxml); + + if (_name.length() == 0) + _name = (HAS_ATTR(_scxml, "name") ? ATTR(_scxml, "name") : getUUID()); + + normalize(_document); + + if (_capabilities & CAN_GENERIC_HTTP) + _httpServlet = new InterpreterServlet(this); + + _sendQueue = new DelayedEventQueue(); + _sendQueue->start(); + + } else { + LOG(ERROR) << "Cannot find SCXML element" << std::endl; } - - } catch (Event e) { - LOG(ERROR) << "Syntax error in data element:" << std::endl << e << std::endl; } + _isInitialized = true; } void Interpreter::normalize(const Arabica::DOM::Document& node) { @@ -476,176 +345,6 @@ void Interpreter::normalize(const Arabica::DOM::Document& node) { #endif } -void Interpreter::mainEventLoop() { - std::set::iterator monIter; - - while(_running) { - NodeSet enabledTransitions; - _stable = false; - - // Here we handle eventless transitions and transitions - // triggered by internal events until machine is stable - while(_running && !_stable) { -#if 0 - std::cout << "Configuration: "; - for (int i = 0; i < _configuration.size(); i++) { - std::cout << ATTR(_configuration[i], "id") << ", "; - } - std::cout << std::endl; -#endif - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->beforeMicroStep(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling beforeMicroStep on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling beforeMicroStep on monitors"; - } - monIter++; - } - - enabledTransitions = selectEventlessTransitions(); - if (enabledTransitions.size() == 0) { - if (_internalQueue.size() == 0) { - _stable = true; - } else { - _currEvent = _internalQueue.front(); - _internalQueue.pop_front(); -#if VERBOSE - std::cout << "Received internal event " << _currEvent.name << std::endl; -#endif - if (_dataModel) - _dataModel.setEvent(_currEvent); - enabledTransitions = selectTransitions(_currEvent.name); - } - } - if (!enabledTransitions.empty()) { - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->beforeTakingTransitions(this, enabledTransitions); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling beforeTakingTransitions on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling beforeTakingTransitions on monitors"; - } - monIter++; - } - microstep(enabledTransitions); - } - } - - for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { - NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", _statesToInvoke[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - invoke(invokes[j]); - } - } - - _statesToInvoke = NodeSet(); - if (!_internalQueue.empty()) - continue; - - // assume that we have a legal configuration as soon as the internal queue is empty -// assert(hasLegalConfiguration()); - - monIter = _monitors.begin(); -// if (!_sendQueue || _sendQueue->isEmpty()) { - while(monIter != _monitors.end()) { - try { - (*monIter)->onStableConfiguration(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling onStableConfiguration on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling onStableConfiguration on monitors"; - } - monIter++; - } -// } - - // whenever we have a stable configuration, run the mainThread hooks with 200fps - while(_externalQueue.isEmpty() && _thread == NULL) { - runOnMainThread(200); - } - - _currEvent = _externalQueue.pop(); -#if VERBOSE - std::cout << "Received externalEvent event " << _currEvent.name << std::endl; -#endif - _currEvent.type = Event::EXTERNAL; // make sure it is set to external - if (!_running) - exitInterpreter(); - - if (_dataModel && boost::iequals(_currEvent.name, "cancel.invoke." + _sessionId)) - break; - - if (_dataModel) - try { - _dataModel.setEvent(_currEvent); - } catch (Event e) { - LOG(ERROR) << "Syntax error while setting external event:" << std::endl << e << std::endl; - } - for (unsigned int i = 0; i < _configuration.size(); i++) { - NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", _configuration[i]); - for (unsigned int j = 0; j < invokes.size(); j++) { - Arabica::DOM::Element invokeElem = (Arabica::DOM::Element)invokes[j]; - std::string invokeId; - if (HAS_ATTR(invokeElem, "id")) - invokeId = ATTR(invokeElem, "id"); - if (HAS_ATTR(invokeElem, "idlocation") && _dataModel) - invokeId = _dataModel.evalAsString(ATTR(invokeElem, "idlocation")); - - std::string autoForward = invokeElem.getAttribute("autoforward"); - if (boost::iequals(invokeId, _currEvent.invokeid)) { - - Arabica::XPath::NodeSet finalizes = filterChildElements(_xmlNSPrefix + "finalize", invokeElem); - for (int k = 0; k < finalizes.size(); k++) { - Arabica::DOM::Element finalizeElem = Arabica::DOM::Element(finalizes[k]); - executeContent(finalizeElem); - } - - } - if (boost::iequals(autoForward, "true")) { - try { - _invokers[invokeId].send(_currEvent); - } catch(...) { - LOG(ERROR) << "Exception caught while sending event to invoker " << invokeId; - } - } - } - } - enabledTransitions = selectTransitions(_currEvent.name); - if (!enabledTransitions.empty()) - microstep(enabledTransitions); - } - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->beforeCompletion(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling beforeCompletion on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling beforeCompletion on monitors"; - } - monIter++; - } - - exitInterpreter(); - - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->afterCompletion(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling afterCompletion on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling afterCompletion on monitors"; - } - monIter++; - } - -} void Interpreter::internalDoneSend(const Arabica::DOM::Node& state) { if (!isState(state)) @@ -1075,55 +774,6 @@ void Interpreter::cancelInvoke(const Arabica::DOM::Node& element) { } } -Arabica::XPath::NodeSet Interpreter::selectTransitions(const std::string& event) { - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet atomicStates; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(_configuration[i])) - atomicStates.push_back(_configuration[i]); - } - atomicStates.to_document_order(); - - for (unsigned int i = 0; i < atomicStates.size(); i++) { - NodeSet ancestors = getProperAncestors(atomicStates[i], Arabica::DOM::Node()); - - NodeSet sortedAncestors; - sortedAncestors.push_back(atomicStates[i]); - sortedAncestors.insert(sortedAncestors.end(), ancestors.begin(), ancestors.end()); - - for (unsigned int j = 0; j < sortedAncestors.size(); j++) { - NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", sortedAncestors[j]); - for (unsigned int k = 0; k < transitions.size(); k++) { - std::string eventName; - if (HAS_ATTR(transitions[k], "event")) { - eventName = ATTR(transitions[k], "event"); - } else if(HAS_ATTR(transitions[k], "eventexpr")) { - if (_dataModel) { - eventName = _dataModel.evalAsString(ATTR(transitions[k], "eventexpr")); - } else { - LOG(ERROR) << "Transition has eventexpr attribute with no datamodel defined"; - goto LOOP; - } - } else { - goto LOOP; - } - - if (eventName.length() > 0 && - nameMatch(eventName, event) && - hasConditionMatch(transitions[k])) { - enabledTransitions.push_back(transitions[k]); - goto LOOP; - } - } - } -LOOP: - ; - } - - enabledTransitions = filterPreempted(enabledTransitions); - return enabledTransitions; -} // see: http://www.w3.org/TR/scxml/#EventDescriptors bool Interpreter::nameMatch(const std::string& transitionEvent, const std::string& event) { @@ -1167,49 +817,10 @@ bool Interpreter::nameMatch(const std::string& transitionEvent, const std::strin return false; } -Arabica::XPath::NodeSet Interpreter::selectEventlessTransitions() { - Arabica::XPath::NodeSet enabledTransitions; - - NodeSet atomicStates; - for (unsigned int i = 0; i < _configuration.size(); i++) { - if (isAtomic(_configuration[i])) - atomicStates.push_back(_configuration[i]); - } - atomicStates.to_document_order(); - - for (unsigned int i = 0; i < atomicStates.size(); i++) { - NodeSet ancestors = getProperAncestors(atomicStates[i], Arabica::DOM::Node()); - ancestors.push_back(atomicStates[i]); - for (unsigned int j = 0; j < ancestors.size(); j++) { - NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", ancestors[j]); - for (unsigned int k = 0; k < transitions.size(); k++) { - if (!HAS_ATTR(transitions[k], "event") && hasConditionMatch(transitions[k])) { - enabledTransitions.push_back(transitions[k]); - goto LOOP; - } - } - -#if 0 - NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", ancestors[j]); - for (unsigned int k = 0; k < transitions.size(); k++) { - if (!((Arabica::DOM::Element)transitions[k]).hasAttribute("event") && hasConditionMatch(transitions[k])) { - enabledTransitions.push_back(transitions[k]); - goto LOOP; - } - } -#endif - } -LOOP: - ; - } - - enabledTransitions = filterPreempted(enabledTransitions); - return enabledTransitions; -} bool Interpreter::hasConditionMatch(const Arabica::DOM::Node& conditional) { - if (HAS_ATTR(conditional, "cond")) { + if (HAS_ATTR(conditional, "cond") && ATTR(conditional, "cond").length() > 0) { if (!_dataModel) { LOG(ERROR) << "Cannot check a condition without a datamodel"; return false; @@ -1224,135 +835,12 @@ bool Interpreter::hasConditionMatch(const Arabica::DOM::Node& condi return true; // no condition is always true } -Arabica::XPath::NodeSet Interpreter::filterPreempted(const Arabica::XPath::NodeSet& enabledTransitions) { - Arabica::XPath::NodeSet filteredTransitions; - for (unsigned int i = 0; i < enabledTransitions.size(); i++) { - Arabica::DOM::Node t = enabledTransitions[i]; - for (unsigned int j = i+1; j < enabledTransitions.size(); j++) { - Arabica::DOM::Node t2 = enabledTransitions[j]; - if (isPreemptingTransition(t2, t)) { -#if VERBOSE - std::cout << "Transition preempted!: " << std::endl << t2 << std::endl << t << std::endl; -#endif - goto LOOP; - } - } - filteredTransitions.push_back(t); -LOOP: - ; - } - return filteredTransitions; -} - -bool Interpreter::isPreemptingTransition(const Arabica::DOM::Node& t1, const Arabica::DOM::Node& t2) { - assert(t1); - assert(t2); - -#if VERBOSE - std::cout << "Checking preemption: " << std::endl << t1 << std::endl << t2 << std::endl; -#endif - -#if 1 - if (t1 == t2) - return false; - if (isWithinSameChild(t1) && (!isTargetless(t2) && !isWithinSameChild(t2))) - return true; - if (!isTargetless(t1) && !isWithinSameChild(t1)) - return true; - return false; -#endif - -#if 0 - // isPreempted from chris nuernberger - if (isTargetless(t1)) - return false; - - Arabica::DOM::Node existingRoot = getTransitionSubgraph(t1); - Arabica::DOM::Node nextRoot = getTransitionSubgraph(t2); - - if (existingRoot == nextRoot || isDescendant(existingRoot, nextRoot) || isDescendant(nextRoot, existingRoot)) - return true; - - return false; -#endif -} - -/** - * filterPreempted approach from chris nuernberger - */ -#if 0 -Arabica::DOM::Node Interpreter::getTransitionSubgraph(const Arabica::DOM::Node& transition) { - Arabica::XPath::NodeSet targets = getTargetStates(transition); - Arabica::DOM::Node source = getSourceState(transition); - - if (!targets.size() == 0) - return source; - - if (boost::iequals(ATTR(transition, "type"), "internal") && isCompound(source)) { - bool allDescendants = true; - for (int i = 0; i < targets.size(); i++) { - if (!isDescendant(targets[i], source)) { - allDescendants = false; - break; - } - } - if (allDescendants) - return source; - } - - targets.push_back(source); - return findLCCA(targets); -} -#endif - -void Interpreter::microstep(const Arabica::XPath::NodeSet& enabledTransitions) { -#if 0 - std::cout << "Transitions: "; - for (int i = 0; i < enabledTransitions.size(); i++) { - std::cout << ((Arabica::DOM::Element)getSourceState(enabledTransitions[i])).getAttribute("id") << " -> " << std::endl; - NodeSet targetSet = getTargetStates(enabledTransitions[i]); - for (int j = 0; j < targetSet.size(); j++) { - std::cout << " " << ((Arabica::DOM::Element)targetSet[j]).getAttribute("id") << std::endl; - } - } - std::cout << std::endl; -#endif - - exitStates(enabledTransitions); - executeTransitionContent(enabledTransitions); - enterStates(enabledTransitions); -} - -void Interpreter::exitInterpreter() { - NodeSet statesToExit = _configuration; - statesToExit.to_document_order(); - statesToExit.reverse(); - - for (int i = 0; i < statesToExit.size(); i++) { - Arabica::XPath::NodeSet onExitElems = filterChildElements(_xmlNSPrefix + "onexit", statesToExit[i]); - for (int j = 0; j < onExitElems.size(); j++) { - executeContent(onExitElems[j]); - } - Arabica::XPath::NodeSet invokeElems = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); - for (int j = 0; j < invokeElems.size(); j++) { - cancelInvoke(invokeElems[j]); - } - if (isFinal(statesToExit[i]) && parentIsScxmlState(statesToExit[i])) { - returnDoneEvent(statesToExit[i]); - } - } - _configuration = NodeSet(); -} - -void Interpreter::executeTransitionContent(const Arabica::XPath::NodeSet& enabledTransitions) { - executeContent(enabledTransitions); -} - -void Interpreter::executeContent(const NodeList& content) { - for (unsigned int i = 0; i < content.getLength(); i++) { - if (content.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - executeContent(content.item(i)); + +void Interpreter::executeContent(const NodeList& content) { + for (unsigned int i = 0; i < content.getLength(); i++) { + if (content.item(i).getNodeType() != Node_base::ELEMENT_NODE) + continue; + executeContent(content.item(i)); } } @@ -1392,40 +880,32 @@ void Interpreter::executeContent(const Arabica::DOM::Node& content) if (HAS_ATTR(ifElem, "cond")) std::cout << ATTR(ifElem, "cond") << std::endl; #endif - if(hasConditionMatch(ifElem)) { - // condition is true, execute all content up to an elseif, else or end - if (ifElem.hasChildNodes()) { - NodeList childs = ifElem.getChildNodes(); - for (unsigned int i = 0; i < childs.getLength(); i++) { - if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) - continue; - if (boost::iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "elseif") || - boost::iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "else")) + /** + * A block is everything up to or between elseifs and else. Those element + * determine whether the block is true and its executable content executed. + */ + if (ifElem.hasChildNodes()) { + bool blockIsTrue = hasConditionMatch(ifElem); + NodeList childs = ifElem.getChildNodes(); + for (unsigned int i = 0; i < childs.getLength(); i++) { + if (childs.item(i).getNodeType() != Node_base::ELEMENT_NODE) + continue; + if (boost::iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "elseif") || + boost::iequals(TAGNAME(childs.item(i)), _xmlNSPrefix + "else")) { + if (blockIsTrue) { + // last block was true, break here break; - executeContent(childs.item(i)); - } - } - } else { - // condition does not match - do we have an elsif? - if (ifElem.hasChildNodes()) { - NodeSet elseifElem = filterChildElements(_xmlNSPrefix + "elseif", ifElem); - for (unsigned int i = 0; i < elseifElem.size(); i++) { -#if 0 - if (HAS_ATTR(elseifElem[i], "cond")) - std::cout << ATTR(elseifElem[i], "cond") << std::endl; -#endif - if (hasConditionMatch(elseifElem[i])) { - executeContent(elseifElem[i].getChildNodes()); - goto ELSIF_ELEM_MATCH; + } else { + // is this block the one to execute? + blockIsTrue = hasConditionMatch(childs.item(i)); + } + } else { + if (blockIsTrue) { + executeContent(childs.item(i)); } } - NodeSet elseElem = filterChildElements(_xmlNSPrefix + "else", ifElem); - if (elseElem.size() > 0) - executeContent(elseElem[0].getChildNodes()); } } -ELSIF_ELEM_MATCH: - ; } else if (boost::iequals(TAGNAME(content), _xmlNSPrefix + "elseif")) { std::cerr << "Found single elsif to evaluate!" << std::endl; } else if (boost::iequals(TAGNAME(content), _xmlNSPrefix + "else")) { @@ -1578,589 +1058,6 @@ ELSIF_ELEM_MATCH: void Interpreter::returnDoneEvent(const Arabica::DOM::Node& state) { } -void Interpreter::exitStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToExit; - std::set::iterator monIter; - -#if VERBOSE - std::cout << "Enabled exit transitions: " << std::endl; - for (int i = 0; i < enabledTransitions.size(); i++) { - std::cout << enabledTransitions[i] << std::endl; - } - std::cout << std::endl; -#endif - - for (int i = 0; i < enabledTransitions.size(); i++) { - Arabica::DOM::Element transition = ((Arabica::DOM::Element)enabledTransitions[i]); - if (!isTargetless(transition)) { - std::string transitionType = (boost::iequals(transition.getAttribute("type"), "internal") ? "internal" : "external"); - NodeSet tStates = getTargetStates(transition); - Arabica::DOM::Node ancestor; - Arabica::DOM::Node source = getSourceState(transition); - - bool allDescendants = true; - for (int j = 0; j < tStates.size(); j++) { - if (!isDescendant(tStates[j], source)) { - allDescendants = false; - break; - } - } - if (boost::iequals(transitionType, "internal") && - isCompound(source) && - allDescendants) { - ancestor = source; - } else { - NodeSet tmpStates; - tmpStates.push_back(source); - tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); - -#if VERBOSE - std::cout << "tmpStates: "; - for (int i = 0; i < tmpStates.size(); i++) { - std::cout << ATTR(tmpStates[i], "id") << ", "; - } - std::cout << std::endl; -#endif - ancestor = findLCCA(tmpStates); - } - -#if VERBOSE - std::cout << "Ancestor: " << ATTR(ancestor, "id") << std::endl;; -#endif - - for (int j = 0; j < _configuration.size(); j++) { - if (isDescendant(_configuration[j], ancestor)) - statesToExit.push_back(_configuration[j]); - } - } - } - -#if VERBOSE - std::cout << "States to exit: "; - for (int i = 0; i < statesToExit.size(); i++) { - std::cout << LOCALNAME(statesToExit[i]) << ":" << ATTR(statesToExit[i], "id") << ", "; - } - std::cout << std::endl; - -#endif - - // remove statesToExit from _statesToInvoke - std::list > tmp; - for (int i = 0; i < _statesToInvoke.size(); i++) { - if (!isMember(_statesToInvoke[i], statesToExit)) { - tmp.push_back(_statesToInvoke[i]); - } - } - _statesToInvoke = NodeSet(); - _statesToInvoke.insert(_statesToInvoke.end(), tmp.begin(), tmp.end()); - - statesToExit.to_document_order(); - statesToExit.reverse(); - - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->beforeExitingStates(this, statesToExit); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling beforeExitingStates on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling beforeExitingStates on monitors"; - } - monIter++; - } - - for (int i = 0; i < statesToExit.size(); i++) { - NodeSet histories = filterChildElements(_xmlNSPrefix + "history", statesToExit[i]); - for (int j = 0; j < histories.size(); j++) { - Arabica::DOM::Element historyElem = (Arabica::DOM::Element)histories[j]; - std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); - NodeSet historyNodes; - for (int k = 0; k < _configuration.size(); k++) { - if (boost::iequals(historyType, "deep")) { - if (isAtomic(_configuration[k]) && isDescendant(_configuration[k], statesToExit[i])) - historyNodes.push_back(_configuration[k]); - } else { - if (_configuration[k].getParentNode() == statesToExit[i]) - historyNodes.push_back(_configuration[k]); - } - } - _historyValue[historyElem.getAttribute("id")] = historyNodes; -#if 0 - std::cout << "History node " << ATTR(historyElem, "id") << " contains: "; - for (int i = 0; i < historyNodes.size(); i++) { - std::cout << ATTR(historyNodes[i], "id") << ", "; - } - std::cout << std::endl; - -#endif - - } - } - - for (int i = 0; i < statesToExit.size(); i++) { - NodeSet onExits = filterChildElements(_xmlNSPrefix + "onExit", statesToExit[i]); - for (int j = 0; j < onExits.size(); j++) { - Arabica::DOM::Element onExitElem = (Arabica::DOM::Element)onExits[j]; - executeContent(onExitElem); - } - NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); - for (int j = 0; j < invokes.size(); j++) { - Arabica::DOM::Element invokeElem = (Arabica::DOM::Element)invokes[j]; - cancelInvoke(invokeElem); - } - } - - // remove statesToExit from _configuration - tmp.clear(); - for (int i = 0; i < _configuration.size(); i++) { - if (!isMember(_configuration[i], statesToExit)) { - tmp.push_back(_configuration[i]); - } - } - _configuration = NodeSet(); - _configuration.insert(_configuration.end(), tmp.begin(), tmp.end()); - - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->afterExitingStates(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling afterExitingStates on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling afterExitingStates on monitors"; - } - monIter++; - } - -} - -#ifdef ORIG_ENTERSTATES -void Interpreter::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToEnter; - NodeSet statesForDefaultEntry; - std::set::iterator monIter; - -#if VERBOSE - std::cout << "Enabled enter transitions: " << std::endl; - for (int i = 0; i < enabledTransitions.size(); i++) { - std::cout << enabledTransitions[i] << std::endl; - } - std::cout << std::endl; -#endif - - for (int i = 0; i < enabledTransitions.size(); i++) { - Arabica::DOM::Element transition = ((Arabica::DOM::Element)enabledTransitions[i]); - if (!isTargetless(transition)) { - std::string transitionType = (boost::iequals(transition.getAttribute("type"), "internal") ? "internal" : "external"); - NodeSet tStates = getTargetStates(transition); - -#if VERBOSE - std::cout << "Target States: "; - for (int i = 0; i < tStates.size(); i++) { - std::cout << ATTR(tStates[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - Arabica::DOM::Node ancestor; - Arabica::DOM::Node source = getSourceState(transition); -#if VERBOSE - std::cout << "Source States: " << ATTR(source, "id") << std::endl; -#endif - assert(source); - - bool allDescendants = true; - for (int j = 0; j < tStates.size(); j++) { - if (!isDescendant(tStates[j], source)) { - allDescendants = false; - break; - } - } - if (boost::iequals(transitionType, "internal") && - isCompound(source) && - allDescendants) { - ancestor = source; - } else { - NodeSet tmpStates; - tmpStates.push_back(source); - tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); - - ancestor = findLCCA(tmpStates); - } - -#if VERBOSE - std::cout << "Ancestor: " << ATTR(ancestor, "id") << std::endl; -#endif - - for (int j = 0; j < tStates.size(); j++) { - addStatesToEnter(tStates[j], statesToEnter, statesForDefaultEntry); - } - -#if VERBOSE - std::cout << "States to enter: "; - for (int i = 0; i < statesToEnter.size(); i++) { - std::cout << LOCALNAME(statesToEnter[i]) << ":" << ATTR(statesToEnter[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (int j = 0; j < tStates.size(); j++) { - NodeSet ancestors = getProperAncestors(tStates[j], ancestor); - -#if VERBOSE - std::cout << "Proper Ancestors of " << ATTR(tStates[j], "id") << " and " << ATTR(ancestor, "id") << ": "; - for (int i = 0; i < ancestors.size(); i++) { - std::cout << ATTR(ancestors[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (int k = 0; k < ancestors.size(); k++) { - statesToEnter.push_back(ancestors[k]); - if(isParallel(ancestors[k])) { - NodeSet childs = getChildStates(ancestors[k]); - for (int l = 0; l < childs.size(); l++) { - bool someIsDescendant = false; - for (int m = 0; m < statesToEnter.size(); m++) { - if (isDescendant(statesToEnter[m], childs[l])) { - someIsDescendant = true; - break; - } - } - if (!someIsDescendant) { - addStatesToEnter(childs[l], statesToEnter, statesForDefaultEntry); - } - } - } - } - } - } - } - statesToEnter.to_document_order(); - - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->beforeEnteringStates(this, statesToEnter); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling beforeEnteringStates on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling beforeEnteringStates on monitors"; - } - monIter++; - } - - for (int i = 0; i < statesToEnter.size(); i++) { - Arabica::DOM::Element stateElem = (Arabica::DOM::Element)statesToEnter[i]; - _configuration.push_back(stateElem); - _statesToInvoke.push_back(stateElem); - if (_binding == LATE && stateElem.getAttribute("isFirstEntry").size() > 0) { - NodeSet dataModelElems = filterChildElements(_xmlNSPrefix + "datamodel", stateElem); - if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet dataElems = filterChildElements(_xmlNSPrefix + "data", dataModelElems[0]); - for (int j = 0; j < dataElems.size(); j++) { - initializeData(dataElems[j]); - } - } - stateElem.setAttribute("isFirstEntry", ""); - } - // execute onentry executable content - NodeSet onEntryElems = filterChildElements(_xmlNSPrefix + "onEntry", stateElem); - executeContent(onEntryElems); - - if (isMember(stateElem, statesForDefaultEntry)) { - // execute initial transition content for compund states - Arabica::XPath::NodeSet transitions = _xpath.evaluate("" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", stateElem).asNodeSet(); - for (int j = 0; j < transitions.size(); j++) { - executeContent(transitions[j]); - } - } - - if (isFinal(stateElem)) { - internalDoneSend(stateElem); - Arabica::DOM::Element parent = (Arabica::DOM::Element)stateElem.getParentNode(); - - if (isParallel(parent.getParentNode())) { - Arabica::DOM::Element grandParent = (Arabica::DOM::Element)parent.getParentNode(); - - Arabica::XPath::NodeSet childs = getChildStates(grandParent); - bool inFinalState = true; - for (int j = 0; j < childs.size(); j++) { - if (!isInFinalState(childs[j])) { - inFinalState = false; - break; - } - } - if (inFinalState) { - internalDoneSend(parent); - } - } - } - } - for (int i = 0; i < _configuration.size(); i++) { - Arabica::DOM::Element stateElem = (Arabica::DOM::Element)_configuration[i]; - if (isFinal(stateElem) && parentIsScxmlState(stateElem)) { - _running = false; - _done = true; - } - } - - monIter = _monitors.begin(); - while(monIter != _monitors.end()) { - try { - (*monIter)->afterEnteringStates(this); - } catch (Event e) { - LOG(ERROR) << "Syntax error when calling afterEnteringStates on monitors: " << std::endl << e << std::endl; - } catch (...) { - LOG(ERROR) << "An exception occured when calling afterEnteringStates on monitors"; - } - monIter++; - } - -} - -void Interpreter::addStatesToEnter(const Arabica::DOM::Node& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry) { - std::string stateId = ((Arabica::DOM::Element)state).getAttribute("id"); - -#if VERBOSE - std::cout << "Adding state to enter: " << stateId << std::endl; -#endif - if (isHistory(state)) { - if (_historyValue.find(stateId) != _historyValue.end()) { - Arabica::XPath::NodeSet historyValue = _historyValue[stateId]; - -#if VERBOSE - std::cout << "History State " << ATTR(state, "id") << ": "; - for (int i = 0; i < historyValue.size(); i++) { - std::cout << ATTR(historyValue[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (int i = 0; i < historyValue.size(); i++) { - addStatesToEnter(historyValue[i], statesToEnter, statesForDefaultEntry); - NodeSet ancestors = getProperAncestors(historyValue[i], state); - -#if VERBOSE - std::cout << "Proper Ancestors: "; - for (int i = 0; i < ancestors.size(); i++) { - std::cout << ATTR(ancestors[i], "id") << ", "; - } - std::cout << std::endl; -#endif - - for (int j = 0; j < ancestors.size(); j++) { - statesToEnter.push_back(ancestors[j]); - } - } - } else { - NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", state); - for (int i = 0; i < transitions.size(); i++) { - NodeSet targets = getTargetStates(transitions[i]); - for (int j = 0; j < targets.size(); j++) { - addStatesToEnter(targets[j], statesToEnter, statesForDefaultEntry); - - // Modifications from chris nuernberger - NodeSet ancestors = getProperAncestors(targets[j], state); - for (int k = 0; k < ancestors.size(); k++) { - statesToEnter.push_back(ancestors[k]); - } - } - } - } - } else { - statesToEnter.push_back(state); - if (isCompound(state)) { - statesForDefaultEntry.push_back(state); - - addStatesToEnter(getInitialState(state), statesToEnter, statesForDefaultEntry); - -# if 0 - NodeSet tStates = getTargetStates(getInitialState(state)); - for (int i = 0; i < tStates.size(); i++) { - addStatesToEnter(tStates[i], statesToEnter, statesForDefaultEntry); - } -# endif - // addStatesToEnter(getInitialState(state), statesToEnter, statesForDefaultEntry); - // NodeSet tStates = getTargetStates(getInitialState(state)); - - } else if(isParallel(state)) { - NodeSet childStates = getChildStates(state); - for (int i = 0; i < childStates.size(); i++) { - addStatesToEnter(childStates[i], statesToEnter, statesForDefaultEntry); - } - } - } -} -#endif - -#ifdef ENTERSTATES_02_2013 -void Interpreter::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { - NodeSet statesToEnter; - NodeSet statesForDefaultEntry; - std::set::iterator monIter; - - computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry); - statesToEnter.sort(); // entry order is document order - for (int i = 0; i < statesToEnter.size(); i++) { - Arabica::DOM::Element s = (Arabica::DOM::Element)statesToEnter[i]; - _configuration.push_back(s); - _statesToInvoke.push_back(s); - - if (_binding == LATE && ATTR(s, "isFirstEntry").size() > 0) { - NodeSet dataModelElems = filterChildElements(_xmlNSPrefix + "datamodel", s); - if(dataModelElems.size() > 0 && _dataModel) { - Arabica::XPath::NodeSet dataElems = filterChildElements(_xmlNSPrefix + "data", dataModelElems[0]); - for (int j = 0; j < dataElems.size(); j++) { - initializeData(dataElems[j]); - } - } - s.setAttribute("isFirstEntry", ""); - } - executeContent(filterChildElements(_xmlNSPrefix + "onEntry", s)); - if (isMember(s, statesForDefaultEntry)) { - executeContent(getInitialState(s)); // TODO: This part is unclear - } - -#if VERBOSE - std::cout << "Is state " << ATTR(s, "id") << " final?"; -#endif - if (isFinal(s)) { - if (parentIsScxmlState(s)) { - _running = false; - _done = true; - } else { - Arabica::DOM::Element parent = (Arabica::DOM::Element)s.getParentNode(); - Arabica::DOM::Element grandParent = (Arabica::DOM::Element)parent.getParentNode(); - internalDoneSend(parent); - - if (isParallel(grandParent)) { - Arabica::XPath::NodeSet childs = getChildStates(grandParent); - bool inFinalState = true; - for (int j = 0; j < childs.size(); j++) { - if (!isInFinalState(childs[j])) { - inFinalState = false; - break; - } - } - if (inFinalState) { - internalDoneSend(grandParent); - } - } - } - } - } -} -void Interpreter::computeEntrySet(const Arabica::XPath::NodeSet& transitions, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry) { - for (int i = 0; i < transitions.size(); i++) { - NodeSet targets = getTargetStates(transitions[i]); - for (int j = 0; j < targets.size(); j++) { - statesToEnter.push_back(targets[i]); - } - } - for (int i = 0; i < transitions.size(); i++) { - Arabica::DOM::Node ancestor = getTransitionDomain(transitions[i]); - NodeSet targets = getTargetStates(transitions[i]); - for (int j = 0; j < targets.size(); j++) { - addAncestorStatesToEnter(targets[j], ancestor, statesToEnter, statesForDefaultEntry); - } - } -} -void Interpreter::addDescendentStatesToEnter(const Arabica::DOM::Node& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry) { - if (isHistory(state)) { - if (_historyValue.find(ATTR(state, "id")) != _historyValue.end()) { - Arabica::XPath::NodeSet history = _historyValue[ATTR(state, "id")]; - for (int i = 0; i < history.size(); i++) { - addDescendentStatesToEnter(history[i], statesToEnter, statesForDefaultEntry); - addAncestorStatesToEnter(history[i], state.getParentNode(), statesToEnter, statesForDefaultEntry); - } - } else { - NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", state); - for (int i = 0; i < transitions.size(); i++) { - NodeSet targets = getTargetStates(transitions[i]); - for (int j = 0; j < targets.size(); j++) { - addDescendentStatesToEnter(targets[j],statesToEnter,statesForDefaultEntry); - addAncestorStatesToEnter(targets[j], state.getParentNode(), statesToEnter, statesForDefaultEntry); - } - } - } - } else { - statesToEnter.push_back(state); - if (isCompound(state)) { - statesForDefaultEntry.push_back(state); - Node initial = getInitialState(state); - addDescendentStatesToEnter(initial, statesToEnter, statesForDefaultEntry); - addAncestorStatesToEnter(initial, state.getParentNode(), statesToEnter, statesForDefaultEntry); - } else if (isParallel(state)) { - NodeSet childs = getChildStates(state); - for (int i = 0; i < childs.size(); i++) { - bool someAreDescendants = false; - for (int j = 0; i < statesToEnter.size(); j++) { - if (isDescendant(statesToEnter[j], childs[i])) - someAreDescendants = true; - } - if (!someAreDescendants) { - addDescendentStatesToEnter(childs[i], statesToEnter, statesForDefaultEntry); - } - } - } - } -} - -void Interpreter::addAncestorStatesToEnter(const Arabica::DOM::Node& state, - const Arabica::DOM::Node& ancestor, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry) { - NodeSet properAncs = getProperAncestors(state, ancestor); - for (int k = 0; k < properAncs.size(); k++) { - statesToEnter.push_back(properAncs[k]); - if (isParallel(properAncs[k])) { - NodeSet childs = getChildStates(properAncs[k]); - for (int i = 0; i < childs.size(); i++) { - bool someAreDescendants = false; - for (int j = 0; i < statesToEnter.size(); j++) { - if (isDescendant(statesToEnter[j], childs[i])) - someAreDescendants = true; - } - if (!someAreDescendants) { - addDescendentStatesToEnter(childs[i], statesToEnter, statesForDefaultEntry); - } - } - } - } -} - -Arabica::DOM::Node Interpreter::getTransitionDomain(const Arabica::DOM::Node& transition) { - Arabica::DOM::Node source = getSourceState(transition); - if (isTargetless(transition)) { - return source; - } - - Arabica::XPath::NodeSet targets = getTargetStates(transition); - if (boost::iequals(ATTR(transition, "type"), "internal") && isCompound(source)) { - bool allDescendants = true; - for (int i = 0; i < targets.size(); i++) { - if (!isDescendant(targets[i], source)) { - allDescendants = false; - break; - } - } - if (allDescendants) - return source; - } - - targets.push_back(source); - return findLCCA(targets); -} - -#endif - bool Interpreter::parentIsScxmlState(Arabica::DOM::Node state) { Arabica::DOM::Element stateElem = (Arabica::DOM::Element)state; Arabica::DOM::Element parentElem = (Arabica::DOM::Element)state.getParentNode(); @@ -2253,6 +1150,16 @@ NEXT_ANCESTOR: return ancestor; } +Arabica::XPath::NodeSet Interpreter::getStates(const std::vector& stateIds) { + Arabica::XPath::NodeSet states; + std::vector::const_iterator tokenIter = stateIds.begin(); + while(tokenIter != stateIds.end()) { + states.push_back(getState(*tokenIter)); + tokenIter++; + } + return states; +} + Arabica::DOM::Node Interpreter::getState(const std::string& stateId) { if (_cachedStates.find(stateId) != _cachedStates.end()) { @@ -2304,7 +1211,7 @@ Arabica::DOM::Node Interpreter::getSourceState(const Arabica::DOM:: * attribute nor an element is specified, the SCXML Processor must use * the first child state in document order as the default initial state. */ -Arabica::DOM::Node Interpreter::getInitialState(Arabica::DOM::Node state) { +Arabica::XPath::NodeSet Interpreter::getInitialStates(Arabica::DOM::Node state) { if (!state) { state = _document.getFirstChild(); while(state && !isState(state)) @@ -2317,25 +1224,34 @@ Arabica::DOM::Node Interpreter::getInitialState(Arabica::DOM::Node< assert(isCompound(state) || isParallel(state)); + Arabica::XPath::NodeSet initialStates; + // initial attribute at element Arabica::DOM::Element stateElem = (Arabica::DOM::Element)state; if (stateElem.hasAttribute("initial")) { - return getState(stateElem.getAttribute("initial")); + return getStates(tokenizeIdRefs(stateElem.getAttribute("initial"))); } + Arabica::XPath::NodeSet initStates; + // initial element as child - but not the implicit generated one - NodeSet initialStates = filterChildElements(_xmlNSPrefix + "initial", state); - if(initialStates.size() == 1 && !boost::iequals(ATTR(initialStates[0], "generated"), "true")) - return initialStates[0]; + NodeSet initElems = filterChildElements(_xmlNSPrefix + "initial", state); + if(initElems.size() == 1 && !boost::iequals(ATTR(initElems[0], "generated"), "true")) { + initStates.push_back(initialStates[0]); + return initStates; + } // first child state NodeList childs = state.getChildNodes(); for (int i = 0; i < childs.getLength(); i++) { - if (isState(childs.item(i))) - return childs.item(i); + if (isState(childs.item(i))) { + initStates.push_back(childs.item(i)); + return initStates; + } + } // nothing found - return Arabica::DOM::Node(); + return Arabica::XPath::NodeSet(); } NodeSet Interpreter::getTargetStates(const Arabica::DOM::Node& transition) { @@ -2488,7 +1404,7 @@ bool Interpreter::isInitial(const Arabica::DOM::Node& state) { if (!isState(parent)) return true; // scxml element - if (getInitialState(parent) == state) + if (isMember(state, getInitialStates(parent))) return true; // every nested node return false; diff --git a/src/uscxml/Interpreter.h b/src/uscxml/Interpreter.h index 5d29eb6..353233d 100644 --- a/src/uscxml/Interpreter.h +++ b/src/uscxml/Interpreter.h @@ -26,8 +26,6 @@ #include "uscxml/server/InterpreterServlet.h" -#define ORIG_ENTERSTATES - namespace uscxml { class HTTPServletInvoker; @@ -71,7 +69,16 @@ public: std::string unit; }; -class Interpreter : protected Arabica::SAX2DOM::Parser { +class SCXMLParser : public Arabica::SAX2DOM::Parser { +public: + SCXMLParser(Interpreter* interpreter); + void startPrefixMapping(const std::string& /* prefix */, const std::string& /* uri */); + + Arabica::SAX::CatchErrorHandler _errorHandler; + Interpreter* _interpreter; +}; + +class Interpreter { public: enum Binding { EARLY = 0, @@ -91,8 +98,6 @@ public: static Interpreter* fromURI(const std::string& uri); static Interpreter* fromInputSource(Arabica::SAX::InputSource& source); - virtual void startPrefixMapping(const std::string& /* prefix */, const std::string& /* uri */); - void start(); static void run(void*); void join() { @@ -102,7 +107,7 @@ public: return _running || !_done; } - void interpret(); + virtual void interpret() = 0; void addMonitor(InterpreterMonitor* monitor) { _monitors.insert(monitor); @@ -168,7 +173,13 @@ public: Arabica::XPath::NodeSet getConfiguration() { return _configuration; } + void setConfiguration(const std::vector& states) { + _userDefinedStartConfiguration = states; + } + Arabica::DOM::Node getState(const std::string& stateId); + Arabica::XPath::NodeSet getStates(const std::vector& stateIds); + Arabica::DOM::Document& getDocument() { return _document; } @@ -203,13 +214,18 @@ public: static bool isCompound(const Arabica::DOM::Node& state); static bool isDescendant(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); + static std::vector tokenizeIdRefs(const std::string& idRefs); + bool isInitial(const Arabica::DOM::Node& state); - Arabica::DOM::Node getInitialState(Arabica::DOM::Node state = Arabica::DOM::Node()); + Arabica::XPath::NodeSet getInitialStates(Arabica::DOM::Node state = Arabica::DOM::Node()); static Arabica::XPath::NodeSet getChildStates(const Arabica::DOM::Node& state); Arabica::XPath::NodeSet getTargetStates(const Arabica::DOM::Node& transition); + Arabica::DOM::Node getSourceState(const Arabica::DOM::Node& transition); static Arabica::XPath::NodeSet filterChildElements(const std::string& tagname, const Arabica::DOM::Node& node); static Arabica::XPath::NodeSet filterChildElements(const std::string& tagName, const Arabica::XPath::NodeSet& nodeSet); + Arabica::DOM::Node findLCCA(const Arabica::XPath::NodeSet& states); + Arabica::XPath::NodeSet getProperAncestors(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); static const std::string getUUID(); protected: @@ -219,8 +235,6 @@ protected: void normalize(const Arabica::DOM::Document& node); void setupIOProcessors(); - void mainEventLoop(); - bool _stable; tthread::thread* _thread; tthread::mutex _mutex; @@ -241,7 +255,8 @@ protected: Binding _binding; Arabica::XPath::NodeSet _configuration; Arabica::XPath::NodeSet _statesToInvoke; - + std::vector _userDefinedStartConfiguration; + DataModel _dataModel; std::map > _historyValue; @@ -251,52 +266,14 @@ protected: DelayedEventQueue* _sendQueue; Event _currEvent; - InterpreterServlet* _httpServlet; - std::set _monitors; static URL toBaseURI(const URL& url); - void microstep(const Arabica::XPath::NodeSet& enabledTransitions); - void executeTransitionContent(const Arabica::XPath::NodeSet& enabledTransitions); void executeContent(const Arabica::DOM::Node& content); void executeContent(const Arabica::DOM::NodeList& content); void executeContent(const Arabica::XPath::NodeSet& content); - void initializeData(const Arabica::DOM::Node& data); - void exitInterpreter(); - -#ifdef ORIG_ENTERSTATES - void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); - void addStatesToEnter(const Arabica::DOM::Node& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry); -#endif - -#ifdef ENTERSTATES_02_2013 - void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); - void computeEntrySet(const Arabica::XPath::NodeSet& transitions, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry); - void addDescendentStatesToEnter(const Arabica::DOM::Node& state, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry); - void addAncestorStatesToEnter(const Arabica::DOM::Node& state, - const Arabica::DOM::Node& ancestor, - Arabica::XPath::NodeSet& statesToEnter, - Arabica::XPath::NodeSet& statesForDefaultEntry); - Arabica::DOM::Node getTransitionDomain(const Arabica::DOM::Node& transition); - -#endif - - void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); - - Arabica::XPath::NodeSet selectEventlessTransitions(); - Arabica::XPath::NodeSet selectTransitions(const std::string& event); - Arabica::DOM::Node getSourceState(const Arabica::DOM::Node& transition); - Arabica::DOM::Node findLCCA(const Arabica::XPath::NodeSet& states); - Arabica::XPath::NodeSet getProperAncestors(const Arabica::DOM::Node& s1, const Arabica::DOM::Node& s2); - void send(const Arabica::DOM::Node& element); void invoke(const Arabica::DOM::Node& element); @@ -306,16 +283,11 @@ protected: static void delayedSend(void* userdata, std::string eventName); static bool nameMatch(const std::string& transitionEvent, const std::string& event); - Arabica::XPath::NodeSet filterPreempted(const Arabica::XPath::NodeSet& enabledTransitions); - bool isPreemptingTransition(const Arabica::DOM::Node& t1, const Arabica::DOM::Node& t2); bool isWithinSameChild(const Arabica::DOM::Node& transition); bool hasConditionMatch(const Arabica::DOM::Node& conditional); bool isInFinalState(const Arabica::DOM::Node& state); bool parentIsScxmlState(Arabica::DOM::Node state); -// Arabica::DOM::Node getTransitionSubgraph(const Arabica::DOM::Node& transition); - - static std::vector tokenizeIdRefs(const std::string& idRefs); static boost::uuids::random_generator uuidGen; @@ -327,7 +299,6 @@ protected: Data _cmdLineOptions; IOProcessor getIOProcessor(const std::string& type); -// IOProcessor* getIOProcessorForId(const std::string& sendId); std::map _ioProcessors; std::map > _sendIds; @@ -335,9 +306,11 @@ protected: std::map _autoForwardees; std::map, ExecutableContent> _executableContent; - /// We need to remember to adapt them when the DOM is operated upon + /// TODO: We need to remember to adapt them when the DOM is operated upon std::map > _cachedStates; std::map _cachedURLs; + + friend class SCXMLParser; }; } diff --git a/src/uscxml/Message.cpp b/src/uscxml/Message.cpp index 13b0b55..845118b 100644 --- a/src/uscxml/Message.cpp +++ b/src/uscxml/Message.cpp @@ -179,6 +179,10 @@ Data Data::fromXML(const std::string& xmlString) { Data Data::fromJSON(const std::string& jsonString) { Data data; + + if (jsonString.length() == 0) + return data; + jsmn_parser p; jsmntok_t* t = NULL; diff --git a/src/uscxml/interpreter/InterpreterDraft6.cpp b/src/uscxml/interpreter/InterpreterDraft6.cpp new file mode 100644 index 0000000..d95ae4c --- /dev/null +++ b/src/uscxml/interpreter/InterpreterDraft6.cpp @@ -0,0 +1,920 @@ +#include "InterpreterDraft6.h" + +#include + +namespace uscxml { + +using namespace Arabica::XPath; +using namespace Arabica::DOM; + +// see: http://www.w3.org/TR/scxml/#AlgorithmforSCXMLInterpretation +void InterpreterDraft6::interpret() { + if (!_isInitialized) + init(); + + if (!_scxml) + return; +// dump(); + + _sessionId = getUUID(); + + std::string datamodelName; + if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) + datamodelName = ATTR(_scxml, "datamodel"); + if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "profile")) // SCION SCXML uses profile to specify datamodel + datamodelName = ATTR(_scxml, "profile"); + if(datamodelName.length() > 0) + _dataModel = Factory::createDataModel(datamodelName, this); + if(datamodelName.length() > 0 && !_dataModel) { + LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; + } + + if (_dataModel) { + _dataModel.assign("_x.args", _cmdLineOptions); + if (_httpServlet) { + Data data; + data.compound["location"] = Data(_httpServlet->getURL(), Data::VERBATIM); + _dataModel.assign("_ioprocessors['http']", data); + } + } + + setupIOProcessors(); + + _running = true; + _binding = (HAS_ATTR(_scxml, "binding") && boost::iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); + + // @TODO: Reread http://www.w3.org/TR/scxml/#DataBinding + + if (_dataModel && _binding == EARLY) { + // initialize all data elements + NodeSet dataElems = _xpath.evaluate("//" + _xpathPrefix + "data", _document).asNodeSet(); + for (unsigned int i = 0; i < dataElems.size(); i++) { + initializeData(dataElems[i]); + } + } else if(_dataModel) { + // initialize current data elements + NodeSet topDataElems = filterChildElements(_xmlNSPrefix + "data", filterChildElements(_xmlNSPrefix + "datamodel", _scxml)); + for (unsigned int i = 0; i < topDataElems.size(); i++) { + initializeData(topDataElems[i]); + } + } + + // executeGlobalScriptElements + NodeSet globalScriptElems = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "script", _document).asNodeSet(); + for (unsigned int i = 0; i < globalScriptElems.size(); i++) { + if (_dataModel) + executeContent(globalScriptElems[i]); + } + + NodeSet initialTransitions; + + if (_userDefinedStartConfiguration.size() == 0) { + // try to get initial transition form initial element + initialTransitions = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", _document).asNodeSet(); + } + + if (initialTransitions.size() == 0) { + Arabica::XPath::NodeSet initialStates; + if (_userDefinedStartConfiguration.size() > 0) { + // otherwise use user supplied config + initialTransitions = getStates(_userDefinedStartConfiguration); + } else { + // or fetch per draft + initialStates = getInitialStates(); + } + + assert(initialStates.size() > 0); + for (int i = 0; i < initialStates.size(); i++) { + Arabica::DOM::Element initialElem = _document.createElementNS(_nsURL, "initial"); + initialElem.setAttribute("generated", "true"); + Arabica::DOM::Element transitionElem = _document.createElementNS(_nsURL, "transition"); + transitionElem.setAttribute("target", ATTR(initialStates[i], "id")); + initialElem.appendChild(transitionElem); + _scxml.appendChild(initialElem); + initialTransitions.push_back(transitionElem); + } + } + + assert(initialTransitions.size() > 0); + enterStates(initialTransitions); + + assert(hasLegalConfiguration()); + mainEventLoop(); + + if (_parentQueue) { + // send one final event to unblock eventual listeners + Event quit; + quit.name = "done.state.scxml"; + _parentQueue->push(quit); + } + + // set datamodel to null from this thread + if(_dataModel) + _dataModel = DataModel(); + +} + +/** + * Called with a single data element from the topmost datamodel element. + */ +void InterpreterDraft6::initializeData(const Arabica::DOM::Node& data) { + if (!_dataModel) { + LOG(ERROR) << "Cannot initialize data when no datamodel is given!"; + return; + } + try { + if (!HAS_ATTR(data, "id")) { + LOG(ERROR) << "Data element has no id!"; + return; + } + + if (HAS_ATTR(data, "expr")) { + std::string value = ATTR(data, "expr"); + _dataModel.assign(ATTR(data, "id"), value); + } else if (HAS_ATTR(data, "src")) { + URL srcURL(ATTR(data, "src")); + if (!srcURL.isAbsolute()) + toAbsoluteURI(srcURL); + + std::stringstream ss; + if (_cachedURLs.find(srcURL.asString()) != _cachedURLs.end()) { + ss << _cachedURLs[srcURL.asString()]; + } else { + ss << srcURL; + _cachedURLs[srcURL.asString()] = srcURL; + } + _dataModel.assign(ATTR(data, "id"), ss.str()); + + } else if (data.hasChildNodes()) { + // search for the text node with the actual script + NodeList dataChilds = data.getChildNodes(); + for (int i = 0; i < dataChilds.getLength(); i++) { + if (dataChilds.item(i).getNodeType() == Node_base::TEXT_NODE) { + Data value = Data(dataChilds.item(i).getNodeValue()); + _dataModel.assign(ATTR(data, "id"), value); + break; + } + } + } + + } catch (Event e) { + LOG(ERROR) << "Syntax error in data element:" << std::endl << e << std::endl; + } +} + +void InterpreterDraft6::mainEventLoop() { + std::set::iterator monIter; + + while(_running) { + NodeSet enabledTransitions; + _stable = false; + + // Here we handle eventless transitions and transitions + // triggered by internal events until machine is stable + while(_running && !_stable) { +#if 0 + std::cout << "Configuration: "; + for (int i = 0; i < _configuration.size(); i++) { + std::cout << ATTR(_configuration[i], "id") << ", "; + } + std::cout << std::endl; +#endif + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->beforeMicroStep(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling beforeMicroStep on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling beforeMicroStep on monitors"; + } + monIter++; + } + + enabledTransitions = selectEventlessTransitions(); + if (enabledTransitions.size() == 0) { + if (_internalQueue.size() == 0) { + _stable = true; + } else { + _currEvent = _internalQueue.front(); + _internalQueue.pop_front(); +#if VERBOSE + std::cout << "Received internal event " << _currEvent.name << std::endl; +#endif + if (_dataModel) + _dataModel.setEvent(_currEvent); + enabledTransitions = selectTransitions(_currEvent.name); + } + } + if (!enabledTransitions.empty()) { + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->beforeTakingTransitions(this, enabledTransitions); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling beforeTakingTransitions on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling beforeTakingTransitions on monitors"; + } + monIter++; + } + microstep(enabledTransitions); + } + } + + for (unsigned int i = 0; i < _statesToInvoke.size(); i++) { + NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", _statesToInvoke[i]); + for (unsigned int j = 0; j < invokes.size(); j++) { + invoke(invokes[j]); + } + } + + _statesToInvoke = NodeSet(); + if (!_internalQueue.empty()) + continue; + + // assume that we have a legal configuration as soon as the internal queue is empty + assert(hasLegalConfiguration()); + + monIter = _monitors.begin(); +// if (!_sendQueue || _sendQueue->isEmpty()) { + while(monIter != _monitors.end()) { + try { + (*monIter)->onStableConfiguration(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling onStableConfiguration on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling onStableConfiguration on monitors"; + } + monIter++; + } +// } + + // whenever we have a stable configuration, run the mainThread hooks with 200fps + while(_externalQueue.isEmpty() && _thread == NULL) { + runOnMainThread(200); + } + + _currEvent = _externalQueue.pop(); +#if VERBOSE + std::cout << "Received externalEvent event " << _currEvent.name << std::endl; +#endif + _currEvent.type = Event::EXTERNAL; // make sure it is set to external + if (!_running) + exitInterpreter(); + + if (_dataModel && boost::iequals(_currEvent.name, "cancel.invoke." + _sessionId)) + break; + + if (_dataModel) + try { + _dataModel.setEvent(_currEvent); + } catch (Event e) { + LOG(ERROR) << "Syntax error while setting external event:" << std::endl << e << std::endl; + } + for (unsigned int i = 0; i < _configuration.size(); i++) { + NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", _configuration[i]); + for (unsigned int j = 0; j < invokes.size(); j++) { + Arabica::DOM::Element invokeElem = (Arabica::DOM::Element)invokes[j]; + std::string invokeId; + if (HAS_ATTR(invokeElem, "id")) + invokeId = ATTR(invokeElem, "id"); + if (HAS_ATTR(invokeElem, "idlocation") && _dataModel) + invokeId = _dataModel.evalAsString(ATTR(invokeElem, "idlocation")); + + std::string autoForward = invokeElem.getAttribute("autoforward"); + if (boost::iequals(invokeId, _currEvent.invokeid)) { + + Arabica::XPath::NodeSet finalizes = filterChildElements(_xmlNSPrefix + "finalize", invokeElem); + for (int k = 0; k < finalizes.size(); k++) { + Arabica::DOM::Element finalizeElem = Arabica::DOM::Element(finalizes[k]); + executeContent(finalizeElem); + } + + } + if (boost::iequals(autoForward, "true")) { + try { + _invokers[invokeId].send(_currEvent); + } catch(...) { + LOG(ERROR) << "Exception caught while sending event to invoker " << invokeId; + } + } + } + } + enabledTransitions = selectTransitions(_currEvent.name); + if (!enabledTransitions.empty()) + microstep(enabledTransitions); + } + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->beforeCompletion(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling beforeCompletion on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling beforeCompletion on monitors"; + } + monIter++; + } + + exitInterpreter(); + + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->afterCompletion(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling afterCompletion on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling afterCompletion on monitors"; + } + monIter++; + } + +} + +Arabica::XPath::NodeSet InterpreterDraft6::selectTransitions(const std::string& event) { + Arabica::XPath::NodeSet enabledTransitions; + + NodeSet atomicStates; + for (unsigned int i = 0; i < _configuration.size(); i++) { + if (isAtomic(_configuration[i])) + atomicStates.push_back(_configuration[i]); + } + atomicStates.to_document_order(); + + for (unsigned int i = 0; i < atomicStates.size(); i++) { + NodeSet ancestors = getProperAncestors(atomicStates[i], Arabica::DOM::Node()); + + NodeSet sortedAncestors; + sortedAncestors.push_back(atomicStates[i]); + sortedAncestors.insert(sortedAncestors.end(), ancestors.begin(), ancestors.end()); + + for (unsigned int j = 0; j < sortedAncestors.size(); j++) { + NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", sortedAncestors[j]); + for (unsigned int k = 0; k < transitions.size(); k++) { + std::string eventName; + if (HAS_ATTR(transitions[k], "event")) { + eventName = ATTR(transitions[k], "event"); + } else if(HAS_ATTR(transitions[k], "eventexpr")) { + if (_dataModel) { + eventName = _dataModel.evalAsString(ATTR(transitions[k], "eventexpr")); + } else { + LOG(ERROR) << "Transition has eventexpr attribute with no datamodel defined"; + goto LOOP; + } + } else { + goto LOOP; + } + + if (eventName.length() > 0 && + nameMatch(eventName, event) && + hasConditionMatch(transitions[k])) { + enabledTransitions.push_back(transitions[k]); + goto LOOP; + } + } + } +LOOP: + ; + } + + enabledTransitions = filterPreempted(enabledTransitions); + return enabledTransitions; +} + +Arabica::XPath::NodeSet InterpreterDraft6::selectEventlessTransitions() { + Arabica::XPath::NodeSet enabledTransitions; + + NodeSet atomicStates; + for (unsigned int i = 0; i < _configuration.size(); i++) { + if (isAtomic(_configuration[i])) + atomicStates.push_back(_configuration[i]); + } + atomicStates.to_document_order(); + + for (unsigned int i = 0; i < atomicStates.size(); i++) { + NodeSet ancestors = getProperAncestors(atomicStates[i], Arabica::DOM::Node()); + ancestors.push_back(atomicStates[i]); + for (unsigned int j = 0; j < ancestors.size(); j++) { + NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", ancestors[j]); + for (unsigned int k = 0; k < transitions.size(); k++) { + if (!HAS_ATTR(transitions[k], "event") && hasConditionMatch(transitions[k])) { + enabledTransitions.push_back(transitions[k]); + goto LOOP; + } + } + +#if 0 + NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", ancestors[j]); + for (unsigned int k = 0; k < transitions.size(); k++) { + if (!((Arabica::DOM::Element)transitions[k]).hasAttribute("event") && hasConditionMatch(transitions[k])) { + enabledTransitions.push_back(transitions[k]); + goto LOOP; + } + } +#endif + } +LOOP: + ; + } + + enabledTransitions = filterPreempted(enabledTransitions); + return enabledTransitions; +} + +Arabica::XPath::NodeSet InterpreterDraft6::filterPreempted(const Arabica::XPath::NodeSet& enabledTransitions) { + Arabica::XPath::NodeSet filteredTransitions; + for (unsigned int i = 0; i < enabledTransitions.size(); i++) { + Arabica::DOM::Node t = enabledTransitions[i]; + for (unsigned int j = i+1; j < enabledTransitions.size(); j++) { + Arabica::DOM::Node t2 = enabledTransitions[j]; + if (isPreemptingTransition(t2, t)) { +#if VERBOSE + std::cout << "Transition preempted!: " << std::endl << t2 << std::endl << t << std::endl; +#endif + goto LOOP; + } + } + filteredTransitions.push_back(t); +LOOP: + ; + } + return filteredTransitions; +} + +bool InterpreterDraft6::isPreemptingTransition(const Arabica::DOM::Node& t1, const Arabica::DOM::Node& t2) { + assert(t1); + assert(t2); + +#if VERBOSE + std::cout << "Checking preemption: " << std::endl << t1 << std::endl << t2 << std::endl; +#endif + +#if 1 + if (t1 == t2) + return false; + if (isWithinSameChild(t1) && (!isTargetless(t2) && !isWithinSameChild(t2))) + return true; + if (!isTargetless(t1) && !isWithinSameChild(t1)) + return true; + return false; +#endif + +} + +void InterpreterDraft6::microstep(const Arabica::XPath::NodeSet& enabledTransitions) { +#if 0 + std::cout << "Transitions: "; + for (int i = 0; i < enabledTransitions.size(); i++) { + std::cout << ((Arabica::DOM::Element)getSourceState(enabledTransitions[i])).getAttribute("id") << " -> " << std::endl; + NodeSet targetSet = getTargetStates(enabledTransitions[i]); + for (int j = 0; j < targetSet.size(); j++) { + std::cout << " " << ((Arabica::DOM::Element)targetSet[j]).getAttribute("id") << std::endl; + } + } + std::cout << std::endl; +#endif + + exitStates(enabledTransitions); + executeContent(enabledTransitions); + enterStates(enabledTransitions); +} + +void InterpreterDraft6::exitInterpreter() { + NodeSet statesToExit = _configuration; + statesToExit.to_document_order(); + statesToExit.reverse(); + + for (int i = 0; i < statesToExit.size(); i++) { + Arabica::XPath::NodeSet onExitElems = filterChildElements(_xmlNSPrefix + "onexit", statesToExit[i]); + for (int j = 0; j < onExitElems.size(); j++) { + executeContent(onExitElems[j]); + } + Arabica::XPath::NodeSet invokeElems = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + for (int j = 0; j < invokeElems.size(); j++) { + cancelInvoke(invokeElems[j]); + } + if (isFinal(statesToExit[i]) && parentIsScxmlState(statesToExit[i])) { + returnDoneEvent(statesToExit[i]); + } + } + _configuration = NodeSet(); +} + + +void InterpreterDraft6::exitStates(const Arabica::XPath::NodeSet& enabledTransitions) { + NodeSet statesToExit; + std::set::iterator monIter; + +#if VERBOSE + std::cout << "Enabled exit transitions: " << std::endl; + for (int i = 0; i < enabledTransitions.size(); i++) { + std::cout << enabledTransitions[i] << std::endl; + } + std::cout << std::endl; +#endif + + for (int i = 0; i < enabledTransitions.size(); i++) { + Arabica::DOM::Element transition = ((Arabica::DOM::Element)enabledTransitions[i]); + if (!isTargetless(transition)) { + std::string transitionType = (boost::iequals(transition.getAttribute("type"), "internal") ? "internal" : "external"); + NodeSet tStates = getTargetStates(transition); + Arabica::DOM::Node ancestor; + Arabica::DOM::Node source = getSourceState(transition); + + bool allDescendants = true; + for (int j = 0; j < tStates.size(); j++) { + if (!isDescendant(tStates[j], source)) { + allDescendants = false; + break; + } + } + if (boost::iequals(transitionType, "internal") && + isCompound(source) && + allDescendants) { + ancestor = source; + } else { + NodeSet tmpStates; + tmpStates.push_back(source); + tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); + +#if VERBOSE + std::cout << "tmpStates: "; + for (int i = 0; i < tmpStates.size(); i++) { + std::cout << ATTR(tmpStates[i], "id") << ", "; + } + std::cout << std::endl; +#endif + ancestor = findLCCA(tmpStates); + } + +#if VERBOSE + std::cout << "Ancestor: " << ATTR(ancestor, "id") << std::endl;; +#endif + + for (int j = 0; j < _configuration.size(); j++) { + if (isDescendant(_configuration[j], ancestor)) + statesToExit.push_back(_configuration[j]); + } + } + } + +#if VERBOSE + std::cout << "States to exit: "; + for (int i = 0; i < statesToExit.size(); i++) { + std::cout << LOCALNAME(statesToExit[i]) << ":" << ATTR(statesToExit[i], "id") << ", "; + } + std::cout << std::endl; + +#endif + + // remove statesToExit from _statesToInvoke + std::list > tmp; + for (int i = 0; i < _statesToInvoke.size(); i++) { + if (!isMember(_statesToInvoke[i], statesToExit)) { + tmp.push_back(_statesToInvoke[i]); + } + } + _statesToInvoke = NodeSet(); + _statesToInvoke.insert(_statesToInvoke.end(), tmp.begin(), tmp.end()); + + statesToExit.to_document_order(); + statesToExit.reverse(); + + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->beforeExitingStates(this, statesToExit); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling beforeExitingStates on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling beforeExitingStates on monitors"; + } + monIter++; + } + + for (int i = 0; i < statesToExit.size(); i++) { + NodeSet histories = filterChildElements(_xmlNSPrefix + "history", statesToExit[i]); + for (int j = 0; j < histories.size(); j++) { + Arabica::DOM::Element historyElem = (Arabica::DOM::Element)histories[j]; + std::string historyType = (historyElem.hasAttribute("type") ? historyElem.getAttribute("type") : "shallow"); + NodeSet historyNodes; + for (int k = 0; k < _configuration.size(); k++) { + if (boost::iequals(historyType, "deep")) { + if (isAtomic(_configuration[k]) && isDescendant(_configuration[k], statesToExit[i])) + historyNodes.push_back(_configuration[k]); + } else { + if (_configuration[k].getParentNode() == statesToExit[i]) + historyNodes.push_back(_configuration[k]); + } + } + _historyValue[historyElem.getAttribute("id")] = historyNodes; +#if 0 + std::cout << "History node " << ATTR(historyElem, "id") << " contains: "; + for (int i = 0; i < historyNodes.size(); i++) { + std::cout << ATTR(historyNodes[i], "id") << ", "; + } + std::cout << std::endl; + +#endif + + } + } + + for (int i = 0; i < statesToExit.size(); i++) { + NodeSet onExits = filterChildElements(_xmlNSPrefix + "onExit", statesToExit[i]); + for (int j = 0; j < onExits.size(); j++) { + Arabica::DOM::Element onExitElem = (Arabica::DOM::Element)onExits[j]; + executeContent(onExitElem); + } + NodeSet invokes = filterChildElements(_xmlNSPrefix + "invoke", statesToExit[i]); + for (int j = 0; j < invokes.size(); j++) { + Arabica::DOM::Element invokeElem = (Arabica::DOM::Element)invokes[j]; + cancelInvoke(invokeElem); + } + } + + // remove statesToExit from _configuration + tmp.clear(); + for (int i = 0; i < _configuration.size(); i++) { + if (!isMember(_configuration[i], statesToExit)) { + tmp.push_back(_configuration[i]); + } + } + _configuration = NodeSet(); + _configuration.insert(_configuration.end(), tmp.begin(), tmp.end()); + + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->afterExitingStates(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling afterExitingStates on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling afterExitingStates on monitors"; + } + monIter++; + } + +} + +void InterpreterDraft6::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { + NodeSet statesToEnter; + NodeSet statesForDefaultEntry; + std::set::iterator monIter; + +#if VERBOSE + std::cout << "Enabled enter transitions: " << std::endl; + for (int i = 0; i < enabledTransitions.size(); i++) { + std::cout << enabledTransitions[i] << std::endl; + } + std::cout << std::endl; +#endif + + for (int i = 0; i < enabledTransitions.size(); i++) { + Arabica::DOM::Element transition = ((Arabica::DOM::Element)enabledTransitions[i]); + if (!isTargetless(transition)) { + std::string transitionType = (boost::iequals(transition.getAttribute("type"), "internal") ? "internal" : "external"); + NodeSet tStates = getTargetStates(transition); + +#if VERBOSE + std::cout << "Target States: "; + for (int i = 0; i < tStates.size(); i++) { + std::cout << ATTR(tStates[i], "id") << ", "; + } + std::cout << std::endl; +#endif + + Arabica::DOM::Node ancestor; + Arabica::DOM::Node source = getSourceState(transition); +#if VERBOSE + std::cout << "Source States: " << ATTR(source, "id") << std::endl; +#endif + assert(source); + + bool allDescendants = true; + for (int j = 0; j < tStates.size(); j++) { + if (!isDescendant(tStates[j], source)) { + allDescendants = false; + break; + } + } + if (boost::iequals(transitionType, "internal") && + isCompound(source) && + allDescendants) { + ancestor = source; + } else { + NodeSet tmpStates; + tmpStates.push_back(source); + tmpStates.insert(tmpStates.end(), tStates.begin(), tStates.end()); + + ancestor = findLCCA(tmpStates); + } + +#if VERBOSE + std::cout << "Ancestor: " << ATTR(ancestor, "id") << std::endl; +#endif + + for (int j = 0; j < tStates.size(); j++) { + addStatesToEnter(tStates[j], statesToEnter, statesForDefaultEntry); + } + +#if VERBOSE + std::cout << "States to enter: "; + for (int i = 0; i < statesToEnter.size(); i++) { + std::cout << LOCALNAME(statesToEnter[i]) << ":" << ATTR(statesToEnter[i], "id") << ", "; + } + std::cout << std::endl; +#endif + + for (int j = 0; j < tStates.size(); j++) { + NodeSet ancestors = getProperAncestors(tStates[j], ancestor); + +#if VERBOSE + std::cout << "Proper Ancestors of " << ATTR(tStates[j], "id") << " and " << ATTR(ancestor, "id") << ": "; + for (int i = 0; i < ancestors.size(); i++) { + std::cout << ATTR(ancestors[i], "id") << ", "; + } + std::cout << std::endl; +#endif + + for (int k = 0; k < ancestors.size(); k++) { + statesToEnter.push_back(ancestors[k]); + if(isParallel(ancestors[k])) { + NodeSet childs = getChildStates(ancestors[k]); + for (int l = 0; l < childs.size(); l++) { + bool someIsDescendant = false; + for (int m = 0; m < statesToEnter.size(); m++) { + if (isDescendant(statesToEnter[m], childs[l])) { + someIsDescendant = true; + break; + } + } + if (!someIsDescendant) { + addStatesToEnter(childs[l], statesToEnter, statesForDefaultEntry); + } + } + } + } + } + } + } + statesToEnter.to_document_order(); + + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->beforeEnteringStates(this, statesToEnter); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling beforeEnteringStates on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling beforeEnteringStates on monitors"; + } + monIter++; + } + + for (int i = 0; i < statesToEnter.size(); i++) { + Arabica::DOM::Element stateElem = (Arabica::DOM::Element)statesToEnter[i]; + _configuration.push_back(stateElem); + _statesToInvoke.push_back(stateElem); + if (_binding == LATE && stateElem.getAttribute("isFirstEntry").size() > 0) { + NodeSet dataModelElems = filterChildElements(_xmlNSPrefix + "datamodel", stateElem); + if(dataModelElems.size() > 0 && _dataModel) { + Arabica::XPath::NodeSet dataElems = filterChildElements(_xmlNSPrefix + "data", dataModelElems[0]); + for (int j = 0; j < dataElems.size(); j++) { + initializeData(dataElems[j]); + } + } + stateElem.setAttribute("isFirstEntry", ""); + } + // execute onentry executable content + NodeSet onEntryElems = filterChildElements(_xmlNSPrefix + "onEntry", stateElem); + executeContent(onEntryElems); + + if (isMember(stateElem, statesForDefaultEntry)) { + // execute initial transition content for compund states + Arabica::XPath::NodeSet transitions = _xpath.evaluate("" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", stateElem).asNodeSet(); + for (int j = 0; j < transitions.size(); j++) { + executeContent(transitions[j]); + } + } + + if (isFinal(stateElem)) { + internalDoneSend(stateElem); + Arabica::DOM::Element parent = (Arabica::DOM::Element)stateElem.getParentNode(); + + if (isParallel(parent.getParentNode())) { + Arabica::DOM::Element grandParent = (Arabica::DOM::Element)parent.getParentNode(); + + Arabica::XPath::NodeSet childs = getChildStates(grandParent); + bool inFinalState = true; + for (int j = 0; j < childs.size(); j++) { + if (!isInFinalState(childs[j])) { + inFinalState = false; + break; + } + } + if (inFinalState) { + internalDoneSend(parent); + } + } + } + } + for (int i = 0; i < _configuration.size(); i++) { + Arabica::DOM::Element stateElem = (Arabica::DOM::Element)_configuration[i]; + if (isFinal(stateElem) && parentIsScxmlState(stateElem)) { + _running = false; + _done = true; + } + } + + monIter = _monitors.begin(); + while(monIter != _monitors.end()) { + try { + (*monIter)->afterEnteringStates(this); + } catch (Event e) { + LOG(ERROR) << "Syntax error when calling afterEnteringStates on monitors: " << std::endl << e << std::endl; + } catch (...) { + LOG(ERROR) << "An exception occured when calling afterEnteringStates on monitors"; + } + monIter++; + } + +} + +void InterpreterDraft6::addStatesToEnter(const Arabica::DOM::Node& state, + Arabica::XPath::NodeSet& statesToEnter, + Arabica::XPath::NodeSet& statesForDefaultEntry) { + std::string stateId = ((Arabica::DOM::Element)state).getAttribute("id"); + +#if VERBOSE + std::cout << "Adding state to enter: " << stateId << std::endl; +#endif + if (isHistory(state)) { + if (_historyValue.find(stateId) != _historyValue.end()) { + Arabica::XPath::NodeSet historyValue = _historyValue[stateId]; + +#if VERBOSE + std::cout << "History State " << ATTR(state, "id") << ": "; + for (int i = 0; i < historyValue.size(); i++) { + std::cout << ATTR(historyValue[i], "id") << ", "; + } + std::cout << std::endl; +#endif + + for (int i = 0; i < historyValue.size(); i++) { + addStatesToEnter(historyValue[i], statesToEnter, statesForDefaultEntry); + NodeSet ancestors = getProperAncestors(historyValue[i], state); + +#if VERBOSE + std::cout << "Proper Ancestors: "; + for (int i = 0; i < ancestors.size(); i++) { + std::cout << ATTR(ancestors[i], "id") << ", "; + } + std::cout << std::endl; +#endif + + for (int j = 0; j < ancestors.size(); j++) { + statesToEnter.push_back(ancestors[j]); + } + } + } else { + NodeSet transitions = filterChildElements(_xmlNSPrefix + "transition", state); + for (int i = 0; i < transitions.size(); i++) { + NodeSet targets = getTargetStates(transitions[i]); + for (int j = 0; j < targets.size(); j++) { + addStatesToEnter(targets[j], statesToEnter, statesForDefaultEntry); + + // Modifications from chris nuernberger + NodeSet ancestors = getProperAncestors(targets[j], state); + for (int k = 0; k < ancestors.size(); k++) { + statesToEnter.push_back(ancestors[k]); + } + } + } + } + } else { + statesToEnter.push_back(state); + if (isCompound(state)) { + statesForDefaultEntry.push_back(state); + + NodeSet tStates = getInitialStates(state); + for (int i = 0; i < tStates.size(); i++) { + addStatesToEnter(tStates[i], statesToEnter, statesForDefaultEntry); + } + + // addStatesToEnter(getInitialState(state), statesToEnter, statesForDefaultEntry); + // NodeSet tStates = getTargetStates(getInitialState(state)); + + } else if(isParallel(state)) { + NodeSet childStates = getChildStates(state); + for (int i = 0; i < childStates.size(); i++) { + addStatesToEnter(childStates[i], statesToEnter, statesForDefaultEntry); + } + } + } +} + + +} \ No newline at end of file diff --git a/src/uscxml/interpreter/InterpreterDraft6.h b/src/uscxml/interpreter/InterpreterDraft6.h new file mode 100644 index 0000000..10ff10a --- /dev/null +++ b/src/uscxml/interpreter/InterpreterDraft6.h @@ -0,0 +1,31 @@ +#ifndef INTERPRETERDRAFT6_H_JAXK9FE1 +#define INTERPRETERDRAFT6_H_JAXK9FE1 + +#include "uscxml/Interpreter.h" + +namespace uscxml { + +class InterpreterDraft6 : public Interpreter { + void interpret(); + void mainEventLoop(); + + void initializeData(const Arabica::DOM::Node& data); + void microstep(const Arabica::XPath::NodeSet& enabledTransitions); + void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); + void addStatesToEnter(const Arabica::DOM::Node& state, + Arabica::XPath::NodeSet& statesToEnter, + Arabica::XPath::NodeSet& statesForDefaultEntry); + + void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); + void exitInterpreter(); + + Arabica::XPath::NodeSet selectEventlessTransitions(); + Arabica::XPath::NodeSet selectTransitions(const std::string& event); + Arabica::XPath::NodeSet filterPreempted(const Arabica::XPath::NodeSet& enabledTransitions); + bool isPreemptingTransition(const Arabica::DOM::Node& t1, const Arabica::DOM::Node& t2); + +}; + +} + +#endif /* end of include guard: INTERPRETERDRAFT6_H_JAXK9FE1 */ diff --git a/src/uscxml/interpreter/InterpreterDraft7.cpp b/src/uscxml/interpreter/InterpreterDraft7.cpp new file mode 100644 index 0000000..9542146 --- /dev/null +++ b/src/uscxml/interpreter/InterpreterDraft7.cpp @@ -0,0 +1,439 @@ +#include "InterpreterDraft7.h" + +#include + +namespace uscxml { + +using namespace Arabica::XPath; +using namespace Arabica::DOM; + +/** +procedure interpret(doc): + if not valid(doc): failWithError() + expandScxmlSource(doc) + configuration = new OrderedSet() + statesToInvoke = new OrderedSet() + internalQueue = new Queue() + externalQueue = new BlockingQueue() + historyValue = new HashTable() + datamodel = new Datamodel(doc) + if doc.binding == "early": + initializeDatamodel(datamodel, doc) + running = true + executeGlobalScriptElement(doc) + enterStates([doc.initial.transition]) + mainEventLoop() + */ +void InterpreterDraft7::interpret() { + if (!_isInitialized) + init(); + + if (!_scxml) + return; + + _sessionId = getUUID(); + + std::string datamodelName; + if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "datamodel")) + datamodelName = ATTR(_scxml, "datamodel"); + if (datamodelName.length() == 0 && HAS_ATTR(_scxml, "profile")) // SCION SCXML uses profile to specify datamodel + datamodelName = ATTR(_scxml, "profile"); + if(datamodelName.length() > 0) + _dataModel = Factory::createDataModel(datamodelName, this); + if(datamodelName.length() > 0 && !_dataModel) { + LOG(ERROR) << "No datamodel for " << datamodelName << " registered"; + } + + if (_dataModel) { + _dataModel.assign("_x.args", _cmdLineOptions); + if (_httpServlet) { + Data data; + data.compound["location"] = Data(_httpServlet->getURL(), Data::VERBATIM); + _dataModel.assign("_ioprocessors['http']", data); + } + } + + setupIOProcessors(); + + _running = true; + _binding = (HAS_ATTR(_scxml, "binding") && boost::iequals(ATTR(_scxml, "binding"), "late") ? LATE : EARLY); + + // @TODO: Reread http://www.w3.org/TR/scxml/#DataBinding + + if (_dataModel && _binding == EARLY) { + // initialize all data elements + NodeSet dataElems = _xpath.evaluate("//" + _xpathPrefix + "data", _document).asNodeSet(); + for (unsigned int i = 0; i < dataElems.size(); i++) { + initializeData(dataElems[i]); + } + } else if(_dataModel) { + // initialize current data elements + NodeSet topDataElems = filterChildElements(_xmlNSPrefix + "data", filterChildElements(_xmlNSPrefix + "datamodel", _scxml)); + for (unsigned int i = 0; i < topDataElems.size(); i++) { + initializeData(topDataElems[i]); + } + } + + // executeGlobalScriptElements + NodeSet globalScriptElems = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "script", _document).asNodeSet(); + for (unsigned int i = 0; i < globalScriptElems.size(); i++) { + if (_dataModel) + executeContent(globalScriptElems[i]); + } + + // initial transition might be implict + NodeSet initialTransitions = _xpath.evaluate("/" + _xpathPrefix + "scxml/" + _xpathPrefix + "initial/" + _xpathPrefix + "transition", _document).asNodeSet(); + if (initialTransitions.size() == 0) { + Arabica::XPath::NodeSet initialStates = getInitialStates(); + + for (int i = 0; i < initialStates.size(); i++) { + Arabica::DOM::Element initialElem = _document.createElementNS(_nsURL, "initial"); + initialElem.setAttribute("generated", "true"); + Arabica::DOM::Element transitionElem = _document.createElementNS(_nsURL, "transition"); + transitionElem.setAttribute("target", ATTR(initialStates[i], "id")); + initialElem.appendChild(transitionElem); + _scxml.appendChild(initialElem); + initialTransitions.push_back(transitionElem); + } + } + enterStates(initialTransitions); + + // assert(hasLegalConfiguration()); + mainEventLoop(); + + if (_parentQueue) { + // send one final event to unblock eventual listeners + Event quit; + quit.name = "done.state.scxml"; + _parentQueue->push(quit); + } + + // set datamodel to null from this thread + if(_dataModel) + _dataModel = DataModel(); + +} + +/** + * Called with a single data element from the topmost datamodel element. + */ +void InterpreterDraft7::initializeData(const Arabica::DOM::Node& data) { + if (!_dataModel) { + LOG(ERROR) << "Cannot initialize data when no datamodel is given!"; + return; + } + try { + if (!HAS_ATTR(data, "id")) { + LOG(ERROR) << "Data element has no id!"; + return; + } + + if (HAS_ATTR(data, "expr")) { + std::string value = ATTR(data, "expr"); + _dataModel.assign(ATTR(data, "id"), value); + } else if (HAS_ATTR(data, "src")) { + URL srcURL(ATTR(data, "src")); + if (!srcURL.isAbsolute()) + toAbsoluteURI(srcURL); + + std::stringstream ss; + if (_cachedURLs.find(srcURL.asString()) != _cachedURLs.end()) { + ss << _cachedURLs[srcURL.asString()]; + } else { + ss << srcURL; + _cachedURLs[srcURL.asString()] = srcURL; + } + _dataModel.assign(ATTR(data, "id"), ss.str()); + + } else if (data.hasChildNodes()) { + // search for the text node with the actual script + NodeList dataChilds = data.getChildNodes(); + for (int i = 0; i < dataChilds.getLength(); i++) { + if (dataChilds.item(i).getNodeType() == Node_base::TEXT_NODE) { + Data value = Data(dataChilds.item(i).getNodeValue()); + _dataModel.assign(ATTR(data, "id"), value); + break; + } + } + } + + } catch (Event e) { + LOG(ERROR) << "Syntax error in data element:" << std::endl << e << std::endl; + } +} + +/** +procedure mainEventLoop(): + while running: + enabledTransitions = null + macrostepDone = false + # Here we handle eventless transitions and transitions + # triggered by internal events until macrostep is complete + while running and not macrostepDone: + enabledTransitions = selectEventlessTransitions() + if enabledTransitions.isEmpty(): + if internalQueue.isEmpty(): + macrostepDone = true + else: + internalEvent = internalQueue.dequeue() + datamodel["_event"] = internalEvent + enabledTransitions = selectTransitions(internalEvent) + if not enabledTransitions.isEmpty(): + microstep(enabledTransitions.toList()) + # either we're in a final state, and we break out of the loop + if not running: + break; + # or we've completed a macrostep, so we start a new macrostep by waiting for an external event + # Here we invoke whatever needs to be invoked. The implementation of 'invoke' is platform-specific + for state in statesToInvoke: + for inv in state.invoke: + invoke(inv) + statesToInvoke.clear() + # Invoking may have raised internal error events and we iterate to handle them + if not internalQueue.isEmpty(): + continue + # A blocking wait for an external event. Alternatively, if we have been invoked + # our parent session also might cancel us. The mechanism for this is platform specific, + # but here we assume it’s a special event we receive + externalEvent = externalQueue.dequeue() + if isCancelEvent(externalEvent): + running = false + continue + datamodel["_event"] = externalEvent + for state in configuration: + for inv in state.invoke: + if inv.invokeid == externalEvent.invokeid: + applyFinalize(inv, externalEvent) + if inv.autoforward: + send(inv.id, externalEvent) + enabledTransitions = selectTransitions(externalEvent) + if not enabledTransitions.isEmpty(): + microstep(enabledTransitions.toList()) + # End of outer while running loop. If we get here, we have reached a top-level final state or have been cancelled + exitInterpreter() + */ +void InterpreterDraft7::mainEventLoop() { +} + +/** +procedure exitInterpreter(): + statesToExit = configuration.toList().sort(exitOrder) + for s in statesToExit: + for content in s.onexit: + executeContent(content) + for inv in s.invoke: + cancelInvoke(inv) + configuration.delete(s) + if isFinalState(s) and isScxmlState(s.parent): + returnDoneEvent(s.donedata) + */ +void InterpreterDraft7::exitInterpreter() { +} + +/** +procedure microstep(enabledTransitions): + exitStates(enabledTransitions) + executeTransitionContent(enabledTransitions) + enterStates(enabledTransitions) + */ +void InterpreterDraft7::microstep(const Arabica::XPath::NodeSet& enabledTransitions) { +} + +/** +function selectEventlessTransitions(): + enabledTransitions = new OrderedSet() + atomicStates = configuration.toList().filter(isAtomicState).sort(documentOrder) + for state in atomicStates: + loop: for s in [state].append(getProperAncestors(state, null)): + for t in s.transition: + if not t.event and conditionMatch(t): + enabledTransitions.add(t) + break loop + enabledTransitions = filterPreempted(enabledTransitions) + return enabledTransitions + */ +Arabica::XPath::NodeSet InterpreterDraft7::selectEventlessTransitions() { +} + +/** +function selectTransitions(event): + enabledTransitions = new OrderedSet() + atomicStates = configuration.toList().filter(isAtomicState).sort(documentOrder) + for state in atomicStates: + loop: for s in [state].append(getProperAncestors(state, null)): + for t in s.transition: + if t.event and nameMatch(t.event, event.name) and conditionMatch(t): + enabledTransitions.add(t) + break loop + enabledTransitions = removeConflictingTransitions(enabledTransitions) + return enabledTransitions + */ +Arabica::XPath::NodeSet InterpreterDraft7::selectTransitions(const std::string& event) { +} + +/** +procedure enterStates(enabledTransitions): + statesToEnter = new OrderedSet() + statesForDefaultEntry = new OrderedSet() + computeEntrySet(enabledTransitions, statesToEnter, statesForDefaultEntry) + for s in statesToEnter.toList().sort(entryOrder): + configuration.add(s) + statesToInvoke.add(s) + if binding == "late" and s.isFirstEntry: + initializeDataModel(datamodel.s,doc.s) + s.isFirstEntry = false + for content in s.onentry: + executeContent(content) + if statesForDefaultEntry.isMember(s): + executeContent(s.initial.transition) + if isFinalState(s): + if isSCXMLElement(s.parent): + running = false + else: + parent = s.parent + grandparent = parent.parent + internalQueue.enqueue(new Event("done.state." + parent.id, s.donedata)) + if isParallelState(grandparent): + if getChildStates(grandparent).every(isInFinalState): + internalQueue.enqueue(new Event("done.state." + grandparent.id)) + */ +void InterpreterDraft7::enterStates(const Arabica::XPath::NodeSet& enabledTransitions) { +} + +/** +procedure exitStates(enabledTransitions): + statesToExit = computeExitSet(enabledTransitions) + for s in statesToExit: + statesToInvoke.delete(s) + statesToExit = statesToExit.toList().sort(exitOrder) + for s in statesToExit: + for h in s.history: + if h.type == "deep": + f = lambda s0: isAtomicState(s0) and isDescendant(s0,s) + else: + f = lambda s0: s0.parent == s + historyValue[h.id] = configuration.toList().filter(f) + for s in statesToExit: + for content in s.onexit: + executeContent(content) + for inv in s.invoke: + cancelInvoke(inv) + configuration.delete(s) + */ +void InterpreterDraft7::exitStates(const Arabica::XPath::NodeSet& enabledTransitions) { +} + +/** +function computeExitSet(transitions) + statesToExit = new OrderedSet + for t in transitions: + domain = getTransitionDomain(t) + for s in configuration: + if isDescendant(s,domain): + statesToExit.add(s) + return statesToExit + */ +Arabica::XPath::NodeSet InterpreterDraft7::computeExitSet(const Arabica::XPath::NodeSet& enabledTransitions, + const Arabica::XPath::NodeSet& statesToExit) { +} + +/** + procedure computeEntrySet(transitions, statesToEnter, statesForDefaultEntry) + for t in transitions: + statesToEnter.union(getTargetStates(t.target)) + for s in statesToEnter: + addDescendentStatesToEnter(s,statesToEnter,statesForDefaultEntry) + for t in transitions: + ancestor = getTransitionDomain(t) + for s in getTargetStates(t.target)): + addAncestorStatesToEnter(s, ancestor, statesToEnter, statesForDefaultEntry) + */ +Arabica::XPath::NodeSet InterpreterDraft7::computeEntrySet(const Arabica::XPath::NodeSet& transitions, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry) { +} + +/** +function removeConflictingTransitions(enabledTransitions): + filteredTransitions = new OrderedSet() + // toList sorts the transitions in the order of the states that selected them + for t1 in enabledTransitions.toList(): + t1Preempted = false; + transitionsToRemove = new OrderedSet() + for t2 in filteredTransitions.toList(): + if computeExitSet(t1).hasIntersection(computeExitSet(t2)): + if isDescendent(t1.source, t2.source): + transitionsToRemove.add(t2) + else: + t1Preempted = true + break + if not t1Preempted: + for t3 in transitionsToRemove.toList(): + filteredTransitions.delete(t3) + filteredTransitions.add(t1) + + return filteredTransitions + */ +Arabica::XPath::NodeSet InterpreterDraft7::removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions) { +} + +/** + function getTransitionDomain(t) + tstates = getTargetStates(t.target) + if not tstates + return t.source + elif t.type == "internal" and isCompoundState(t.source) and tstates.every(lambda s: isDescendant(s,t.source)): + return t.source + else: + return findLCCA([t.source].append(tstates)) + */ +Arabica::DOM::Node InterpreterDraft7::getTransitionDomain(const Arabica::DOM::Node& transition) { +} + +/** + procedure addDescendentStatesToEnter(state,statesToEnter,statesForDefaultEntry): + if isHistoryState(state): + if historyValue[state.id]: + for s in historyValue[state.id]: + addDescendentStatesToEnter(s,statesToEnter,statesForDefaultEntry) + addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry) + else: + for t in state.transition: + for s in getTargetStates(t.target): + addDescendentStatesToEnter(s,statesToEnter,statesForDefaultEntry) + addAncestorStatesToEnter(s, state.parent, statesToEnter, statesForDefaultEntry) + else: + statesToEnter.add(state) + if isCompoundState(state): + statesForDefaultEntry.add(state) + for s in getTargetStates(state.initial): + addDescendentStatesToEnter(s,statesToEnter,statesForDefaultEntry) + addAncestorStatesToEnter(s, state, statesToEnter, statesForDefaultEntry) + else: + if isParallelState(state): + for child in getChildStates(state): + if not statesToEnter.some(lambda s: isDescendant(s,child)): + addDescendentStatesToEnter(child,statesToEnter,statesForDefaultEntry) + */ +Arabica::XPath::NodeSet InterpreterDraft7::addDescendentStatesToEnter(const Arabica::DOM::Node& state, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry) { +} + +/** + procedure addAncestorsToEnter(state, ancestor, statesToEnter, statesForDefaultEntry) + for anc in getProperAncestors(state,ancestor): + statesToEnter.add(anc) + if isParallelState(anc): + for child in getChildStates(anc): + if not statesToEnter.some(lambda s: isDescendant(s,child)): + addStatesToEnter(child,statesToEnter,statesForDefaultEntry) + */ +Arabica::XPath::NodeSet InterpreterDraft7::addAncestorsStatesToEnter(const Arabica::DOM::Node& state, + const Arabica::DOM::Node& ancestor, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry) { +} + + +} \ No newline at end of file diff --git a/src/uscxml/interpreter/InterpreterDraft7.h b/src/uscxml/interpreter/InterpreterDraft7.h new file mode 100644 index 0000000..e784e84 --- /dev/null +++ b/src/uscxml/interpreter/InterpreterDraft7.h @@ -0,0 +1,46 @@ +#ifndef INTERPRETERDRAFT7_H_WLJEI019 +#define INTERPRETERDRAFT7_H_WLJEI019 + +#include "uscxml/Interpreter.h" + +namespace uscxml { + +class InterpreterDraft7 : public Interpreter { + void interpret(); + void mainEventLoop(); + void exitInterpreter(); + + void microstep(const Arabica::XPath::NodeSet& enabledTransitions); + + Arabica::XPath::NodeSet selectEventlessTransitions(); + Arabica::XPath::NodeSet selectTransitions(const std::string& event); + + void enterStates(const Arabica::XPath::NodeSet& enabledTransitions); + void exitStates(const Arabica::XPath::NodeSet& enabledTransitions); + + Arabica::XPath::NodeSet computeExitSet(const Arabica::XPath::NodeSet& enabledTransitions, + const Arabica::XPath::NodeSet& statesToExit); + + Arabica::XPath::NodeSet computeEntrySet(const Arabica::XPath::NodeSet& transitions, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry); + + Arabica::XPath::NodeSet removeConflictingTransitions(const Arabica::XPath::NodeSet& enabledTransitions); + Arabica::DOM::Node getTransitionDomain(const Arabica::DOM::Node& transition); + + Arabica::XPath::NodeSet addDescendentStatesToEnter(const Arabica::DOM::Node& state, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry); + + Arabica::XPath::NodeSet addAncestorsStatesToEnter(const Arabica::DOM::Node& state, + const Arabica::DOM::Node& ancestor, + const Arabica::XPath::NodeSet& statesToEnter, + const Arabica::XPath::NodeSet& statesForDefaultEntry); + + void initializeData(const Arabica::DOM::Node& data); + +}; + +} + +#endif /* end of include guard: INTERPRETERDRAFT7_H_WLJEI019 */ diff --git a/test/run-scxml-test-framework.sh b/test/run-scxml-test-framework.sh index 83cb403..804eb9f 100755 --- a/test/run-scxml-test-framework.sh +++ b/test/run-scxml-test-framework.sh @@ -157,7 +157,8 @@ TESTS="" # TESTS="${TESTS} scxml-test-framework/test/targetless-transition/test2.scxml" # passed # TESTS="${TESTS} scxml-test-framework/test/targetless-transition/test3.scxml" # failed -TESTS="${TESTS} scxml-test-framework/test/*/*.scxml" +# TESTS="${TESTS} scxml-test-framework/test/*/*.scxml" +TESTS="${TESTS} scxml-test-framework/test/w3c/*.scxml" #trap 'killall ${SCXML_TEST_FRAMEWORK_NAME}' 0 #$SCXML_TEST_FRAMEWORK_FULL & diff --git a/test/samples/w3c/Blackjack.scxml b/test/samples/w3c/Blackjack.scxml deleted file mode 100644 index 4f55e53..0000000 --- a/test/samples/w3c/Blackjack.scxml +++ /dev/null @@ -1,99 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/Main.scxml b/test/samples/w3c/Main.scxml deleted file mode 100644 index 4c03631..0000000 --- a/test/samples/w3c/Main.scxml +++ /dev/null @@ -1,204 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Hello World! - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/test/samples/w3c/Test2Sub1.xml b/test/samples/w3c/Test2Sub1.xml deleted file mode 100644 index 6ab7b98..0000000 --- a/test/samples/w3c/Test2Sub1.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - diff --git a/test/samples/w3c/TrafficReport.scxml b/test/samples/w3c/TrafficReport.scxml deleted file mode 100644 index 09e2e93..0000000 --- a/test/samples/w3c/TrafficReport.scxml +++ /dev/null @@ -1,88 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/calc.scxml b/test/samples/w3c/calc.scxml deleted file mode 100644 index e759b45..0000000 --- a/test/samples/w3c/calc.scxml +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/confEcma.xsl b/test/samples/w3c/confEcma.xsl new file mode 100644 index 0000000..0ec3d3d --- /dev/null +++ b/test/samples/w3c/confEcma.xsl @@ -0,0 +1,720 @@ + + + + + + + + + + + + + + + + + + pass + + + + + + + + + + + + + + fail + + + + + + + + + + + + + ecmascript + + + + + + Var + + + + + + Var + + + + + + Var + + + + + + + + + + + + + + + + + + Var + + + + + '' + + + + + Var + + + + + Var + + + + + + + + + + + Var.bar + + + + + + return + + + + + + Var + Var + 1 + + + + + + + Var + Var + Var + + + + + + +Var +Var + Var + + + + + + baz + + + + + #_scxml_foo + + + + + xyz + + + + + foo + + + + + 27 + + + + + 27 + + + + + 27 + + + + + + _event.name + + + + _event.type + + + + _event.sendid + + + + _event. + + + + + _event.raw + + + + + + _event.data. + + + + + _event.data. + + + + _event.data. + + + + + _ioprocessors['http://www.w3.org/TR/scxml/#SCXMLEventProcessor'].location + + + + + + + Var + + + + + Var + + + + + Var + + + + + Var + + + + + Var + + + + + Var + + + + + Var + + + + + Var + + + + + + + + + + Var + + + == + + + + + + + + + + + + + Var + + + == + + Var + + + + + + + + + + + + Var + + + === + + + + + + + + + + + + + + Var===Var + + + + + + + + + + Var==Var + + + + + + + + + +Var + +== +'' + + + + + + + + + Var/text() + + + = + + Var/text() + + + + + + + + + _event.name == '' + + + + + + + + _event.data['Var'] + + + == + + + + + + + + + + + + + + + + +Var + +== + + + + + + + + + _event.data === '' + + + + _event.data == null + + + + + _name === '' + + + + + + + + +(function(str, starts){if (starts === '') return true;if (str == null || starts == null) return false;str = String(str); starts = String(starts);return str.length >= starts.length && str.slice(0, starts.length) === starts;})(Var, Var) + + + + + + + In('') + + + + + return + + + + + Var + + + + + typeof Var === 'undefined' + + + + + + + + + + !Var + + + + + true + + + + + false + + + + + 'name' in _event && 'type' in _event && 'sendid' in _event && 'origin' in _event && 'invokeid' && 'data' in _event + + + + + in _event.data + + + + + _event. == null + + + + + _event.language == 'ecmascript' + + + + + _event.origintype == '' + + + + + + + + + + + + + + D:\W3C\SCXMLTests\test300.js + + + + D:\foo + + + + + + + _event.origin + _event.origintype + + + + + +[1,2,3] + + + + Var + + + + + Var + + + + + + 1, 2, 3] + + + + + 7 + + + + Var + + + + + 'continue' + + + + Var + + + + + + Var + [].concat(Var, [4]) + + + + + + [[,],[,]] + + + + + + Var + + item + index + + + + + + + + + + Var + +[0][0]== && [0][1] == && [1][0] == && [1][1] == + + + + + + + + + + SITE_SPECIFIC_ADDRESS + + + + + + + + + + _ioprocessors['basichttp']['location'] + + + + _ioprocessors['basichttp']['location'] + + + + + _event.raw.search('POST') !== -1 + + + + + + +Var + + + + + + + _event.type === 'external' + + + + + +_event.raw.search(/Var=/) !== -1 + + + + + + _event.raw.search(/Var=/) !== -1 + + + + _event.raw.search(//) !== -1 + + + + + + _event.raw.match(/=(\S+)$/)[1] + + + + + _event.raw.match(/Var=(\S+)$/)[1] + + + + txt.match(/\n\n(.*)/)[2].split('&')[].split('=')[0] + + + + txt.match(/\n\n(.*)/)[2].split('&')[].split('=')[1] + + + + + '<message source="' + _ioprocessors['basichttp'] + '"' ++ 'xmlns:scxml="http://www.w3.org/2005/07/scxml" version="1.0" xmlns:xsi=:http://www.w3.org/2001/XMLSchema-instance" +xsi:schemaLocation="http://www.w3.org/2005/07/scxml scxml-message.xsd" sourcetype=:scxml"' ++' 'name="name"' + '"' + + '"' + />' + + + + + + 'address=' + _ioprocessors['basichttp'] + "'" + + + + + + _event.raw.match(/\n\naddress=(.*)$/) + + \ No newline at end of file diff --git a/test/samples/w3c/confXPath.xsl b/test/samples/w3c/confXPath.xsl new file mode 100644 index 0000000..514752a --- /dev/null +++ b/test/samples/w3c/confXPath.xsl @@ -0,0 +1,630 @@ + + + + + + + + + + + + + + + + + + pass + + + + + + + + + + + + + + fail + + + + + + + + + + + + + xpath + + + + + + Var + + + + + + Var + + + + + + $Var + + + + + $ + + + + + + + + + + '' + + + + + $Var + + + + + $Var/text() + + + + + + + $Var/* + + + + + $ + + + + + + $Var.bar + + + + + + !1 + + + + + string('<scxml><final/></scxml>') + + + + + + + $Var + $Var + 1 + + + + + + + $Var + concat($Var, $Var) + + + + + + +$Var +$Var/text() + $Var/text() + + + + + + +123 + + + + + $Var/* + + + + + $Var/text() + + + + + ( + + + + Var + + + + + .. + + + + Var + + + + + + lastchild + $Var + $Var/* + + + + + xyz + + + + + foo + + + + + + + 27 + + + + + 27 + + + + + 27 + + + + + + + $Var + + + + + $Var + + + + + $Var + + + + + $Var + + + + + $Var + + + + + $Var + + + + + $Var + + + + + $Var + + + + + + $_event/name/text() + + + + $_event/type/text() + + + + $_event/sendid/text() + + + + $_event//text() + + + + + $_event/raw/text() + + + + + $_event/data/data[@id='']/text() + + + + + $_event/data/data[@id='']/text() + + + + + $_event/data/data[@id='']/data/text() + + + + + $_ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#SCXMLProcessor"]/location/text() + + + + + + + + + _ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"]/location/text() + + + + + $_ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"]/location/text() + + + + + contains($_event/raw, 'POST') + + + + + + +Var + + + + + + + _event.type == 'external' + + + + + + + + +contains($_event/raw, 'Var=') + + + + + +contains($_event/raw, '=') + + + + + contains($_event/raw, ) + + + + + + re.search('=(\S+)$', _event.raw).groups()[0] + + + + + substring-before(substring-after('Var=', $_event/raw), '&') + + + + re.search('\n\n(.*)', txt).group(1).split('&')[].split('=')[0] + + + + re.search('\n\n(.*)', txt).group(1).split('&')[].split('=')[1] + + + + + + + + $Var/text() + + + = + + + + + + + + + + + + + +$Var + += +'' + + + + + + + + + $Var/text() + + + = + + $Var/text() + + + + + + + + + + $Var/data/text() + + + = + + + + + + + + + + + + + +$Var + += +$ + + + + + + + $_event/name = '' + + + + + + $_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_event/data + + + + + + In('') + + + + + $Var and not($Var/text()) and not($Var/*) + + + + + + + $_event/data/data[@id = 'Var']/text() + + = + + + + + + + + + + + + + + $_event/data = '' + + + + not($_event/data/*) + + + + + + $_name/text() = '' + + + + + $_event/data/data[@id=] + + + + + + + +contains($Var, $Var) + + + + + + + + $Var/* or $Var/text() + + + + + not($Var/text() or $Var/*) + + + + + $/text() + + + + + not(string($_event/)) + + + + + ==!* + + + + + true() + + + + + 0>1 + + + + + + + baz + + + + + #_scxml_foo + + + + + + + $Var/text()=$Var/text() + + + + + + + + + $Var=$Var + + + + + + + $_event/origintype/text() = '' + + + + + + + + + + + + D:\W3C\SCXMLTests\test300.py + + + + D:\foo + + + + + + + $_event/origin/text() + $_event/origintype/text() + + + + \ No newline at end of file diff --git a/test/samples/w3c/convert-tests.pl b/test/samples/w3c/convert-tests.pl new file mode 100755 index 0000000..9c91e3c --- /dev/null +++ b/test/samples/w3c/convert-tests.pl @@ -0,0 +1,37 @@ +#!/opt/local/bin/perl -w + +use strict; + +use XML::LibXSLT; +use XML::LibXML; +use Data::Dumper; + +my $xslt = XML::LibXSLT->new(); +my $xsl = shift || 'confEcma.xsl'; + +opendir(my $testDir, "tests") or die($!); +opendir(my $txmlDir, "txml") or die($!); +while(readdir $txmlDir) { + next unless /txml$/; + my $baseName = $_; + my $txmlFile = 'txml/'.$_; + + my $source = XML::LibXML->load_xml(location => $txmlFile) or die($!); + my $style_doc = XML::LibXML->load_xml(location => $xsl, no_cdata=>1) or die($!); + + my $stylesheet = $xslt->parse_stylesheet($style_doc) or die($!); + my $results = $stylesheet->transform($source) or die($!); + + open(my $json, '>', "tests/".$baseName.".json") or die($!); + print $json <', "tests/".$baseName.".scxml") or die($!); + print $scxml $stylesheet->output_as_bytes($results); + close($scxml); +} diff --git a/test/samples/w3c/edit-profile-config.scxml b/test/samples/w3c/edit-profile-config.scxml deleted file mode 100644 index 2f8753e..0000000 --- a/test/samples/w3c/edit-profile-config.scxml +++ /dev/null @@ -1,70 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/log-on-config.scxml b/test/samples/w3c/log-on-config.scxml deleted file mode 100644 index 01f45d6..0000000 --- a/test/samples/w3c/log-on-config.scxml +++ /dev/null @@ -1,32 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/microwave-01.scxml b/test/samples/w3c/microwave-01.scxml deleted file mode 100644 index 71e2f98..0000000 --- a/test/samples/w3c/microwave-01.scxml +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/microwave-02.scxml b/test/samples/w3c/microwave-02.scxml deleted file mode 100644 index a96f1fd..0000000 --- a/test/samples/w3c/microwave-02.scxml +++ /dev/null @@ -1,63 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/test/samples/w3c/simple.xml b/test/samples/w3c/simple.xml deleted file mode 100644 index d3badc8..0000000 --- a/test/samples/w3c/simple.xml +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/test/samples/w3c/txml/test144.txml b/test/samples/w3c/txml/test144.txml new file mode 100644 index 0000000..73e50b0 --- /dev/null +++ b/test/samples/w3c/txml/test144.txml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test147.txml b/test/samples/w3c/txml/test147.txml new file mode 100644 index 0000000..20363a0 --- /dev/null +++ b/test/samples/w3c/txml/test147.txml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test148.txml b/test/samples/w3c/txml/test148.txml new file mode 100644 index 0000000..8d19e56 --- /dev/null +++ b/test/samples/w3c/txml/test148.txml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test149.txml b/test/samples/w3c/txml/test149.txml new file mode 100644 index 0000000..c971eea --- /dev/null +++ b/test/samples/w3c/txml/test149.txml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test150.txml b/test/samples/w3c/txml/test150.txml new file mode 100644 index 0000000..ff290dd --- /dev/null +++ b/test/samples/w3c/txml/test150.txml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test151.txml b/test/samples/w3c/txml/test151.txml new file mode 100644 index 0000000..6f95692 --- /dev/null +++ b/test/samples/w3c/txml/test151.txml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test152.txml b/test/samples/w3c/txml/test152.txml new file mode 100644 index 0000000..86b50e9 --- /dev/null +++ b/test/samples/w3c/txml/test152.txml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test153.txml b/test/samples/w3c/txml/test153.txml new file mode 100644 index 0000000..e9f8038 --- /dev/null +++ b/test/samples/w3c/txml/test153.txml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test155.txml b/test/samples/w3c/txml/test155.txml new file mode 100644 index 0000000..8444442 --- /dev/null +++ b/test/samples/w3c/txml/test155.txml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test156.txml b/test/samples/w3c/txml/test156.txml new file mode 100644 index 0000000..316f879 --- /dev/null +++ b/test/samples/w3c/txml/test156.txml @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test158.txml b/test/samples/w3c/txml/test158.txml new file mode 100644 index 0000000..cff220d --- /dev/null +++ b/test/samples/w3c/txml/test158.txml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test159.txml b/test/samples/w3c/txml/test159.txml new file mode 100644 index 0000000..abf1925 --- /dev/null +++ b/test/samples/w3c/txml/test159.txml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test172.txml b/test/samples/w3c/txml/test172.txml new file mode 100644 index 0000000..45075a0 --- /dev/null +++ b/test/samples/w3c/txml/test172.txml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test173.txml b/test/samples/w3c/txml/test173.txml new file mode 100644 index 0000000..c770856 --- /dev/null +++ b/test/samples/w3c/txml/test173.txml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test174.txml b/test/samples/w3c/txml/test174.txml new file mode 100644 index 0000000..3d33d5b --- /dev/null +++ b/test/samples/w3c/txml/test174.txml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test175.txml b/test/samples/w3c/txml/test175.txml new file mode 100644 index 0000000..aba7ac4 --- /dev/null +++ b/test/samples/w3c/txml/test175.txml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test176.txml b/test/samples/w3c/txml/test176.txml new file mode 100644 index 0000000..8d084d4 --- /dev/null +++ b/test/samples/w3c/txml/test176.txml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test178.txml b/test/samples/w3c/txml/test178.txml new file mode 100644 index 0000000..de7a334 --- /dev/null +++ b/test/samples/w3c/txml/test178.txml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test179.txml b/test/samples/w3c/txml/test179.txml new file mode 100644 index 0000000..02b74f6 --- /dev/null +++ b/test/samples/w3c/txml/test179.txml @@ -0,0 +1,21 @@ + + + + + + + + + + 123 + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test183.txml b/test/samples/w3c/txml/test183.txml new file mode 100644 index 0000000..bb6e44a --- /dev/null +++ b/test/samples/w3c/txml/test183.txml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test185.txml b/test/samples/w3c/txml/test185.txml new file mode 100644 index 0000000..c036cbf --- /dev/null +++ b/test/samples/w3c/txml/test185.txml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test186.txml b/test/samples/w3c/txml/test186.txml new file mode 100644 index 0000000..e91c290 --- /dev/null +++ b/test/samples/w3c/txml/test186.txml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test187.txml b/test/samples/w3c/txml/test187.txml new file mode 100644 index 0000000..994a489 --- /dev/null +++ b/test/samples/w3c/txml/test187.txml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test194.txml b/test/samples/w3c/txml/test194.txml new file mode 100644 index 0000000..9e660a5 --- /dev/null +++ b/test/samples/w3c/txml/test194.txml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test198.txml b/test/samples/w3c/txml/test198.txml new file mode 100644 index 0000000..706ea93 --- /dev/null +++ b/test/samples/w3c/txml/test198.txml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test199.txml b/test/samples/w3c/txml/test199.txml new file mode 100644 index 0000000..dadd5b0 --- /dev/null +++ b/test/samples/w3c/txml/test199.txml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test200.txml b/test/samples/w3c/txml/test200.txml new file mode 100644 index 0000000..4aed203 --- /dev/null +++ b/test/samples/w3c/txml/test200.txml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test201.txml b/test/samples/w3c/txml/test201.txml new file mode 100644 index 0000000..c21eb7e --- /dev/null +++ b/test/samples/w3c/txml/test201.txml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test205.txml b/test/samples/w3c/txml/test205.txml new file mode 100644 index 0000000..6cc06f4 --- /dev/null +++ b/test/samples/w3c/txml/test205.txml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test207.txml b/test/samples/w3c/txml/test207.txml new file mode 100644 index 0000000..6893dcf --- /dev/null +++ b/test/samples/w3c/txml/test207.txml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test208.txml b/test/samples/w3c/txml/test208.txml new file mode 100644 index 0000000..5a86e6d --- /dev/null +++ b/test/samples/w3c/txml/test208.txml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test210.txml b/test/samples/w3c/txml/test210.txml new file mode 100644 index 0000000..402ed36 --- /dev/null +++ b/test/samples/w3c/txml/test210.txml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test215.txml b/test/samples/w3c/txml/test215.txml new file mode 100644 index 0000000..afb8df5 --- /dev/null +++ b/test/samples/w3c/txml/test215.txml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test216.txml b/test/samples/w3c/txml/test216.txml new file mode 100644 index 0000000..e65818e --- /dev/null +++ b/test/samples/w3c/txml/test216.txml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test220.txml b/test/samples/w3c/txml/test220.txml new file mode 100644 index 0000000..4c79e4d --- /dev/null +++ b/test/samples/w3c/txml/test220.txml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test223.txml b/test/samples/w3c/txml/test223.txml new file mode 100644 index 0000000..9cdc499 --- /dev/null +++ b/test/samples/w3c/txml/test223.txml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test224.txml b/test/samples/w3c/txml/test224.txml new file mode 100644 index 0000000..0ffe8eb --- /dev/null +++ b/test/samples/w3c/txml/test224.txml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test225.txml b/test/samples/w3c/txml/test225.txml new file mode 100644 index 0000000..548ff46 --- /dev/null +++ b/test/samples/w3c/txml/test225.txml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test226.txml b/test/samples/w3c/txml/test226.txml new file mode 100644 index 0000000..843bfdc --- /dev/null +++ b/test/samples/w3c/txml/test226.txml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test228.txml b/test/samples/w3c/txml/test228.txml new file mode 100644 index 0000000..40021bb --- /dev/null +++ b/test/samples/w3c/txml/test228.txml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test229.txml b/test/samples/w3c/txml/test229.txml new file mode 100644 index 0000000..3837b69 --- /dev/null +++ b/test/samples/w3c/txml/test229.txml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test230.txml b/test/samples/w3c/txml/test230.txml new file mode 100644 index 0000000..fc27220 --- /dev/null +++ b/test/samples/w3c/txml/test230.txml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test232.txml b/test/samples/w3c/txml/test232.txml new file mode 100644 index 0000000..1cbc14f --- /dev/null +++ b/test/samples/w3c/txml/test232.txml @@ -0,0 +1,44 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test233.txml b/test/samples/w3c/txml/test233.txml new file mode 100644 index 0000000..94b219b --- /dev/null +++ b/test/samples/w3c/txml/test233.txml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test234.txml b/test/samples/w3c/txml/test234.txml new file mode 100644 index 0000000..27d4626 --- /dev/null +++ b/test/samples/w3c/txml/test234.txml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test235.txml b/test/samples/w3c/txml/test235.txml new file mode 100644 index 0000000..84b8680 --- /dev/null +++ b/test/samples/w3c/txml/test235.txml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test236.txml b/test/samples/w3c/txml/test236.txml new file mode 100644 index 0000000..5d18c2f --- /dev/null +++ b/test/samples/w3c/txml/test236.txml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test237.txml b/test/samples/w3c/txml/test237.txml new file mode 100644 index 0000000..c6097bc --- /dev/null +++ b/test/samples/w3c/txml/test237.txml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test239.txml b/test/samples/w3c/txml/test239.txml new file mode 100644 index 0000000..8fa1837 --- /dev/null +++ b/test/samples/w3c/txml/test239.txml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test240.txml b/test/samples/w3c/txml/test240.txml new file mode 100644 index 0000000..bf669d4 --- /dev/null +++ b/test/samples/w3c/txml/test240.txml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test241.txml b/test/samples/w3c/txml/test241.txml new file mode 100644 index 0000000..9587697 --- /dev/null +++ b/test/samples/w3c/txml/test241.txml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test242.txml b/test/samples/w3c/txml/test242.txml new file mode 100644 index 0000000..35fa154 --- /dev/null +++ b/test/samples/w3c/txml/test242.txml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test243.txml b/test/samples/w3c/txml/test243.txml new file mode 100644 index 0000000..a01345c --- /dev/null +++ b/test/samples/w3c/txml/test243.txml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test244.txml b/test/samples/w3c/txml/test244.txml new file mode 100644 index 0000000..c0f1a23 --- /dev/null +++ b/test/samples/w3c/txml/test244.txml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test245.txml b/test/samples/w3c/txml/test245.txml new file mode 100644 index 0000000..459bec6 --- /dev/null +++ b/test/samples/w3c/txml/test245.txml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test247.txml b/test/samples/w3c/txml/test247.txml new file mode 100644 index 0000000..7c528a3 --- /dev/null +++ b/test/samples/w3c/txml/test247.txml @@ -0,0 +1,26 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test250.txml b/test/samples/w3c/txml/test250.txml new file mode 100644 index 0000000..3455062 --- /dev/null +++ b/test/samples/w3c/txml/test250.txml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test252.txml b/test/samples/w3c/txml/test252.txml new file mode 100644 index 0000000..40c36cb --- /dev/null +++ b/test/samples/w3c/txml/test252.txml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test253.txml b/test/samples/w3c/txml/test253.txml new file mode 100644 index 0000000..041797a --- /dev/null +++ b/test/samples/w3c/txml/test253.txml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test276.txml b/test/samples/w3c/txml/test276.txml new file mode 100644 index 0000000..e4a9d9f --- /dev/null +++ b/test/samples/w3c/txml/test276.txml @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test279.txml b/test/samples/w3c/txml/test279.txml new file mode 100644 index 0000000..b3b1adc --- /dev/null +++ b/test/samples/w3c/txml/test279.txml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test280.txml b/test/samples/w3c/txml/test280.txml new file mode 100644 index 0000000..723eaa5 --- /dev/null +++ b/test/samples/w3c/txml/test280.txml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test286.txml b/test/samples/w3c/txml/test286.txml new file mode 100644 index 0000000..89b77a9 --- /dev/null +++ b/test/samples/w3c/txml/test286.txml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/samples/w3c/txml/test287.txml b/test/samples/w3c/txml/test287.txml new file mode 100644 index 0000000..8f25165 --- /dev/null +++ b/test/samples/w3c/txml/test287.txml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test294.txml b/test/samples/w3c/txml/test294.txml new file mode 100644 index 0000000..507ff3b --- /dev/null +++ b/test/samples/w3c/txml/test294.txml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/test/samples/w3c/txml/test298.txml b/test/samples/w3c/txml/test298.txml new file mode 100644 index 0000000..e1af350 --- /dev/null +++ b/test/samples/w3c/txml/test298.txml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/samples/w3c/txml/test301.txml b/test/samples/w3c/txml/test301.txml new file mode 100644 index 0000000..d3245f3 --- /dev/null +++ b/test/samples/w3c/txml/test301.txml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test303.txml.json b/test/scxml-test-framework/test/w3c/test303.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test303.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test303.txml.scxml b/test/scxml-test-framework/test/w3c/test303.txml.scxml new file mode 100644 index 0000000..2e44f18 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test303.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test304.txml.json b/test/scxml-test-framework/test/w3c/test304.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test304.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test304.txml.scxml b/test/scxml-test-framework/test/w3c/test304.txml.scxml new file mode 100644 index 0000000..8230c82 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test304.txml.scxml @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test307.txml.json b/test/scxml-test-framework/test/w3c/test307.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test307.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test307.txml.scxml b/test/scxml-test-framework/test/w3c/test307.txml.scxml new file mode 100644 index 0000000..4a38689 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test307.txml.scxml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test309.txml.json b/test/scxml-test-framework/test/w3c/test309.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test309.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test309.txml.scxml b/test/scxml-test-framework/test/w3c/test309.txml.scxml new file mode 100644 index 0000000..168c753 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test309.txml.scxml @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test310.txml.json b/test/scxml-test-framework/test/w3c/test310.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test310.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test310.txml.scxml b/test/scxml-test-framework/test/w3c/test310.txml.scxml new file mode 100644 index 0000000..d9245e8 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test310.txml.scxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test311.txml.json b/test/scxml-test-framework/test/w3c/test311.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test311.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test311.txml.scxml b/test/scxml-test-framework/test/w3c/test311.txml.scxml new file mode 100644 index 0000000..57724f5 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test311.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test312.txml.json b/test/scxml-test-framework/test/w3c/test312.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test312.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test312.txml.scxml b/test/scxml-test-framework/test/w3c/test312.txml.scxml new file mode 100644 index 0000000..f5855be --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test312.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test313.txml.json b/test/scxml-test-framework/test/w3c/test313.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test313.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test313.txml.scxml b/test/scxml-test-framework/test/w3c/test313.txml.scxml new file mode 100644 index 0000000..c697a4d --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test313.txml.scxml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test314.txml.json b/test/scxml-test-framework/test/w3c/test314.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test314.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test314.txml.scxml b/test/scxml-test-framework/test/w3c/test314.txml.scxml new file mode 100644 index 0000000..c2e69c8 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test314.txml.scxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test318.txml.json b/test/scxml-test-framework/test/w3c/test318.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test318.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test318.txml.scxml b/test/scxml-test-framework/test/w3c/test318.txml.scxml new file mode 100644 index 0000000..83a40a4 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test318.txml.scxml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test319.txml.json b/test/scxml-test-framework/test/w3c/test319.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test319.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test319.txml.scxml b/test/scxml-test-framework/test/w3c/test319.txml.scxml new file mode 100644 index 0000000..adae97c --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test319.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test321.txml.json b/test/scxml-test-framework/test/w3c/test321.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test321.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test321.txml.scxml b/test/scxml-test-framework/test/w3c/test321.txml.scxml new file mode 100644 index 0000000..c24a48f --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test321.txml.scxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test322.txml.json b/test/scxml-test-framework/test/w3c/test322.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test322.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test322.txml.scxml b/test/scxml-test-framework/test/w3c/test322.txml.scxml new file mode 100644 index 0000000..bde0843 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test322.txml.scxml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test323.txml.json b/test/scxml-test-framework/test/w3c/test323.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test323.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test323.txml.scxml b/test/scxml-test-framework/test/w3c/test323.txml.scxml new file mode 100644 index 0000000..82122c6 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test323.txml.scxml @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test324.txml.json b/test/scxml-test-framework/test/w3c/test324.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test324.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test324.txml.scxml b/test/scxml-test-framework/test/w3c/test324.txml.scxml new file mode 100644 index 0000000..9162f9b --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test324.txml.scxml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test325.txml.json b/test/scxml-test-framework/test/w3c/test325.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test325.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test325.txml.scxml b/test/scxml-test-framework/test/w3c/test325.txml.scxml new file mode 100644 index 0000000..1d3b8fc --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test325.txml.scxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test326.txml.json b/test/scxml-test-framework/test/w3c/test326.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test326.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test326.txml.scxml b/test/scxml-test-framework/test/w3c/test326.txml.scxml new file mode 100644 index 0000000..a1fe3f9 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test326.txml.scxml @@ -0,0 +1,37 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test329.txml.json b/test/scxml-test-framework/test/w3c/test329.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test329.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test329.txml.scxml b/test/scxml-test-framework/test/w3c/test329.txml.scxml new file mode 100644 index 0000000..90dd692 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test329.txml.scxml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test330.txml.json b/test/scxml-test-framework/test/w3c/test330.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test330.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test330.txml.scxml b/test/scxml-test-framework/test/w3c/test330.txml.scxml new file mode 100644 index 0000000..600e1a7 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test330.txml.scxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test331.txml.json b/test/scxml-test-framework/test/w3c/test331.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test331.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test331.txml.scxml b/test/scxml-test-framework/test/w3c/test331.txml.scxml new file mode 100644 index 0000000..8d814ea --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test331.txml.scxml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test332.txml.json b/test/scxml-test-framework/test/w3c/test332.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test332.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test332.txml.scxml b/test/scxml-test-framework/test/w3c/test332.txml.scxml new file mode 100644 index 0000000..c3bee02 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test332.txml.scxml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test333.txml.json b/test/scxml-test-framework/test/w3c/test333.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test333.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test333.txml.scxml b/test/scxml-test-framework/test/w3c/test333.txml.scxml new file mode 100644 index 0000000..9c30dd5 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test333.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test335.txml.json b/test/scxml-test-framework/test/w3c/test335.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test335.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test335.txml.scxml b/test/scxml-test-framework/test/w3c/test335.txml.scxml new file mode 100644 index 0000000..1b6e7fb --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test335.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test336.txml.json b/test/scxml-test-framework/test/w3c/test336.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test336.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test336.txml.scxml b/test/scxml-test-framework/test/w3c/test336.txml.scxml new file mode 100644 index 0000000..0829262 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test336.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test337.txml.json b/test/scxml-test-framework/test/w3c/test337.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test337.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test337.txml.scxml b/test/scxml-test-framework/test/w3c/test337.txml.scxml new file mode 100644 index 0000000..bea5121 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test337.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test338.txml.json b/test/scxml-test-framework/test/w3c/test338.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test338.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test338.txml.scxml b/test/scxml-test-framework/test/w3c/test338.txml.scxml new file mode 100644 index 0000000..429b945 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test338.txml.scxml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test339.txml.json b/test/scxml-test-framework/test/w3c/test339.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test339.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test339.txml.scxml b/test/scxml-test-framework/test/w3c/test339.txml.scxml new file mode 100644 index 0000000..70b366c --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test339.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test342.txml.json b/test/scxml-test-framework/test/w3c/test342.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test342.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test342.txml.scxml b/test/scxml-test-framework/test/w3c/test342.txml.scxml new file mode 100644 index 0000000..1ce27a4 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test342.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test343.txml.json b/test/scxml-test-framework/test/w3c/test343.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test343.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test343.txml.scxml b/test/scxml-test-framework/test/w3c/test343.txml.scxml new file mode 100644 index 0000000..68b2b6b --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test343.txml.scxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test344.txml.json b/test/scxml-test-framework/test/w3c/test344.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test344.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test344.txml.scxml b/test/scxml-test-framework/test/w3c/test344.txml.scxml new file mode 100644 index 0000000..c3983ae --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test344.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test346.txml.json b/test/scxml-test-framework/test/w3c/test346.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test346.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test346.txml.scxml b/test/scxml-test-framework/test/w3c/test346.txml.scxml new file mode 100644 index 0000000..f9c8081 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test346.txml.scxml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test355.txml.json b/test/scxml-test-framework/test/w3c/test355.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test355.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test355.txml.scxml b/test/scxml-test-framework/test/w3c/test355.txml.scxml new file mode 100644 index 0000000..03d4a09 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test355.txml.scxml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test364.txml.json b/test/scxml-test-framework/test/w3c/test364.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test364.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test364.txml.scxml b/test/scxml-test-framework/test/w3c/test364.txml.scxml new file mode 100644 index 0000000..9040887 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test364.txml.scxml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test372.txml.json b/test/scxml-test-framework/test/w3c/test372.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test372.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test372.txml.scxml b/test/scxml-test-framework/test/w3c/test372.txml.scxml new file mode 100644 index 0000000..7e2a128 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test372.txml.scxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test375.txml.json b/test/scxml-test-framework/test/w3c/test375.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test375.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test375.txml.scxml b/test/scxml-test-framework/test/w3c/test375.txml.scxml new file mode 100644 index 0000000..69a2e7f --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test375.txml.scxml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test376.txml.json b/test/scxml-test-framework/test/w3c/test376.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test376.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test376.txml.scxml b/test/scxml-test-framework/test/w3c/test376.txml.scxml new file mode 100644 index 0000000..8656795 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test376.txml.scxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test377.txml.json b/test/scxml-test-framework/test/w3c/test377.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test377.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test377.txml.scxml b/test/scxml-test-framework/test/w3c/test377.txml.scxml new file mode 100644 index 0000000..cd21f28 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test377.txml.scxml @@ -0,0 +1,33 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test378.txml.json b/test/scxml-test-framework/test/w3c/test378.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test378.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test378.txml.scxml b/test/scxml-test-framework/test/w3c/test378.txml.scxml new file mode 100644 index 0000000..4254686 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test378.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test387.txml.json b/test/scxml-test-framework/test/w3c/test387.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test387.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test387.txml.scxml b/test/scxml-test-framework/test/w3c/test387.txml.scxml new file mode 100644 index 0000000..a56d7d8 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test387.txml.scxml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test388.txml.json b/test/scxml-test-framework/test/w3c/test388.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test388.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test388.txml.scxml b/test/scxml-test-framework/test/w3c/test388.txml.scxml new file mode 100644 index 0000000..c0c2e32 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test388.txml.scxml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test396.txml.json b/test/scxml-test-framework/test/w3c/test396.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test396.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test396.txml.scxml b/test/scxml-test-framework/test/w3c/test396.txml.scxml new file mode 100644 index 0000000..dbd6997 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test396.txml.scxml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test399.txml.json b/test/scxml-test-framework/test/w3c/test399.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test399.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test399.txml.scxml b/test/scxml-test-framework/test/w3c/test399.txml.scxml new file mode 100644 index 0000000..7ebccb1 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test399.txml.scxml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test401.txml.json b/test/scxml-test-framework/test/w3c/test401.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test401.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test401.txml.scxml b/test/scxml-test-framework/test/w3c/test401.txml.scxml new file mode 100644 index 0000000..697ec0e --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test401.txml.scxml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test402.txml.json b/test/scxml-test-framework/test/w3c/test402.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test402.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test402.txml.scxml b/test/scxml-test-framework/test/w3c/test402.txml.scxml new file mode 100644 index 0000000..8527c39 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test402.txml.scxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test403a.txml.json b/test/scxml-test-framework/test/w3c/test403a.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403a.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test403a.txml.scxml b/test/scxml-test-framework/test/w3c/test403a.txml.scxml new file mode 100644 index 0000000..a40d623 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403a.txml.scxml @@ -0,0 +1,45 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test403b.txml.json b/test/scxml-test-framework/test/w3c/test403b.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403b.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test403b.txml.scxml b/test/scxml-test-framework/test/w3c/test403b.txml.scxml new file mode 100644 index 0000000..6d694b0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403b.txml.scxml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test403c.txml.json b/test/scxml-test-framework/test/w3c/test403c.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403c.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test403c.txml.scxml b/test/scxml-test-framework/test/w3c/test403c.txml.scxml new file mode 100644 index 0000000..a816904 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test403c.txml.scxml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test404.txml.json b/test/scxml-test-framework/test/w3c/test404.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test404.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test404.txml.scxml b/test/scxml-test-framework/test/w3c/test404.txml.scxml new file mode 100644 index 0000000..a37534a --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test404.txml.scxml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test405.txml.json b/test/scxml-test-framework/test/w3c/test405.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test405.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test405.txml.scxml b/test/scxml-test-framework/test/w3c/test405.txml.scxml new file mode 100644 index 0000000..48275ef --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test405.txml.scxml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test406.txml.json b/test/scxml-test-framework/test/w3c/test406.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test406.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test406.txml.scxml b/test/scxml-test-framework/test/w3c/test406.txml.scxml new file mode 100644 index 0000000..66c83fd --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test406.txml.scxml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test407.txml.json b/test/scxml-test-framework/test/w3c/test407.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test407.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test407.txml.scxml b/test/scxml-test-framework/test/w3c/test407.txml.scxml new file mode 100644 index 0000000..12a49b7 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test407.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test409.txml.json b/test/scxml-test-framework/test/w3c/test409.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test409.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test409.txml.scxml b/test/scxml-test-framework/test/w3c/test409.txml.scxml new file mode 100644 index 0000000..102c953 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test409.txml.scxml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test411.txml.json b/test/scxml-test-framework/test/w3c/test411.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test411.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test411.txml.scxml b/test/scxml-test-framework/test/w3c/test411.txml.scxml new file mode 100644 index 0000000..9ca7405 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test411.txml.scxml @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test412.txml.json b/test/scxml-test-framework/test/w3c/test412.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test412.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test412.txml.scxml b/test/scxml-test-framework/test/w3c/test412.txml.scxml new file mode 100644 index 0000000..c4cbed9 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test412.txml.scxml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test413.txml.json b/test/scxml-test-framework/test/w3c/test413.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test413.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test413.txml.scxml b/test/scxml-test-framework/test/w3c/test413.txml.scxml new file mode 100644 index 0000000..5cca2db --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test413.txml.scxml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test416.txml.json b/test/scxml-test-framework/test/w3c/test416.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test416.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test416.txml.scxml b/test/scxml-test-framework/test/w3c/test416.txml.scxml new file mode 100644 index 0000000..e72a499 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test416.txml.scxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test417.txml.json b/test/scxml-test-framework/test/w3c/test417.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test417.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test417.txml.scxml b/test/scxml-test-framework/test/w3c/test417.txml.scxml new file mode 100644 index 0000000..52a43f7 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test417.txml.scxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test419.txml.json b/test/scxml-test-framework/test/w3c/test419.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test419.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test419.txml.scxml b/test/scxml-test-framework/test/w3c/test419.txml.scxml new file mode 100644 index 0000000..b8894c3 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test419.txml.scxml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test421.txml.json b/test/scxml-test-framework/test/w3c/test421.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test421.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test421.txml.scxml b/test/scxml-test-framework/test/w3c/test421.txml.scxml new file mode 100644 index 0000000..881f650 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test421.txml.scxml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test422.txml.json b/test/scxml-test-framework/test/w3c/test422.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test422.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test422.txml.scxml b/test/scxml-test-framework/test/w3c/test422.txml.scxml new file mode 100644 index 0000000..1f296ed --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test422.txml.scxml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test423.txml.json b/test/scxml-test-framework/test/w3c/test423.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test423.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test423.txml.scxml b/test/scxml-test-framework/test/w3c/test423.txml.scxml new file mode 100644 index 0000000..b0ab886 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test423.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test487.txml.json b/test/scxml-test-framework/test/w3c/test487.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test487.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test487.txml.scxml b/test/scxml-test-framework/test/w3c/test487.txml.scxml new file mode 100644 index 0000000..84ea76d --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test487.txml.scxml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test488.txml.json b/test/scxml-test-framework/test/w3c/test488.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test488.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test488.txml.scxml b/test/scxml-test-framework/test/w3c/test488.txml.scxml new file mode 100644 index 0000000..e0d919a --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test488.txml.scxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test503.txml.json b/test/scxml-test-framework/test/w3c/test503.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test503.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test503.txml.scxml b/test/scxml-test-framework/test/w3c/test503.txml.scxml new file mode 100644 index 0000000..b747beb --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test503.txml.scxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test504.txml.json b/test/scxml-test-framework/test/w3c/test504.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test504.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test504.txml.scxml b/test/scxml-test-framework/test/w3c/test504.txml.scxml new file mode 100644 index 0000000..e2c37b6 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test504.txml.scxml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test505.txml.json b/test/scxml-test-framework/test/w3c/test505.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test505.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test505.txml.scxml b/test/scxml-test-framework/test/w3c/test505.txml.scxml new file mode 100644 index 0000000..87c63e7 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test505.txml.scxml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test506.txml.json b/test/scxml-test-framework/test/w3c/test506.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test506.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test506.txml.scxml b/test/scxml-test-framework/test/w3c/test506.txml.scxml new file mode 100644 index 0000000..39be6c9 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test506.txml.scxml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test521.txml.json b/test/scxml-test-framework/test/w3c/test521.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test521.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test521.txml.scxml b/test/scxml-test-framework/test/w3c/test521.txml.scxml new file mode 100644 index 0000000..ea55b10 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test521.txml.scxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test525.txml.json b/test/scxml-test-framework/test/w3c/test525.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test525.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test525.txml.scxml b/test/scxml-test-framework/test/w3c/test525.txml.scxml new file mode 100644 index 0000000..6e627af --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test525.txml.scxml @@ -0,0 +1,28 @@ + + + + + + [1,2,3] + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test527.txml.json b/test/scxml-test-framework/test/w3c/test527.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test527.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test527.txml.scxml b/test/scxml-test-framework/test/w3c/test527.txml.scxml new file mode 100644 index 0000000..83dd3bf --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test527.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test528.txml.json b/test/scxml-test-framework/test/w3c/test528.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test528.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test528.txml.scxml b/test/scxml-test-framework/test/w3c/test528.txml.scxml new file mode 100644 index 0000000..1b516a6 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test528.txml.scxml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test529.txml.json b/test/scxml-test-framework/test/w3c/test529.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test529.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test529.txml.scxml b/test/scxml-test-framework/test/w3c/test529.txml.scxml new file mode 100644 index 0000000..133ab93 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test529.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + 21 + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test530.txml.json b/test/scxml-test-framework/test/w3c/test530.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test530.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test530.txml.scxml b/test/scxml-test-framework/test/w3c/test530.txml.scxml new file mode 100644 index 0000000..cade191 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test530.txml.scxml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test533.txml.json b/test/scxml-test-framework/test/w3c/test533.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test533.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test533.txml.scxml b/test/scxml-test-framework/test/w3c/test533.txml.scxml new file mode 100644 index 0000000..1f2b0d7 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test533.txml.scxml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test550.txml.json b/test/scxml-test-framework/test/w3c/test550.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test550.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test550.txml.scxml b/test/scxml-test-framework/test/w3c/test550.txml.scxml new file mode 100644 index 0000000..6112db6 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test550.txml.scxml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test551.txml.json b/test/scxml-test-framework/test/w3c/test551.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test551.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test551.txml.scxml b/test/scxml-test-framework/test/w3c/test551.txml.scxml new file mode 100644 index 0000000..d0bb3fc --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test551.txml.scxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + [1,2,3] + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test552.txml.json b/test/scxml-test-framework/test/w3c/test552.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test552.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test552.txml.scxml b/test/scxml-test-framework/test/w3c/test552.txml.scxml new file mode 100644 index 0000000..e3bf668 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test552.txml.scxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test553.txml.json b/test/scxml-test-framework/test/w3c/test553.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test553.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test553.txml.scxml b/test/scxml-test-framework/test/w3c/test553.txml.scxml new file mode 100644 index 0000000..6806373 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test553.txml.scxml @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test554.txml.json b/test/scxml-test-framework/test/w3c/test554.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test554.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test554.txml.scxml b/test/scxml-test-framework/test/w3c/test554.txml.scxml new file mode 100644 index 0000000..48724ad --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test554.txml.scxml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test570.txml.json b/test/scxml-test-framework/test/w3c/test570.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test570.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test570.txml.scxml b/test/scxml-test-framework/test/w3c/test570.txml.scxml new file mode 100644 index 0000000..cbd2ce0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test570.txml.scxml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/scxml-test-framework/test/w3c/test576.txml.json b/test/scxml-test-framework/test/w3c/test576.txml.json new file mode 100644 index 0000000..2b697c0 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test576.txml.json @@ -0,0 +1,4 @@ +{ + "initialConfiguration" : ["pass"], + "events" : [] +} diff --git a/test/scxml-test-framework/test/w3c/test576.txml.scxml b/test/scxml-test-framework/test/w3c/test576.txml.scxml new file mode 100644 index 0000000..cf5d225 --- /dev/null +++ b/test/scxml-test-framework/test/w3c/test576.txml.scxml @@ -0,0 +1,39 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/src/scxml-test-framework-client.cpp b/test/src/scxml-test-framework-client.cpp index 58f1057..fefe3d9 100644 --- a/test/src/scxml-test-framework-client.cpp +++ b/test/src/scxml-test-framework-client.cpp @@ -30,10 +30,12 @@ public: TestIOProcessor() {} virtual void beforeCompletion(uscxml::Interpreter* interpreter) { - _interpreters[interpreter->getName()].second.curlReq = NULL; + onStableConfiguration(interpreter); } - virtual void afterCompletion(uscxml::Interpreter* interpreter) {} + virtual void afterCompletion(uscxml::Interpreter* interpreter) { + _interpreters[interpreter->getName()].second.curlReq = NULL; + } virtual void beforeMicroStep(uscxml::Interpreter* interpreter) {} virtual void beforeTakingTransitions(uscxml::Interpreter* interpreter, const Arabica::XPath::NodeSet& transitions) {} @@ -112,8 +114,8 @@ public: std::cout << "---- received:" << std::endl; evhttp_request_own(request.curlReq); - std::cout << request.content << std::endl; - uscxml::Data jsonReq = uscxml::Data::fromJSON(request.content); + std::cout << request.data.compound.at("content").atom << std::endl; + uscxml::Data jsonReq = uscxml::Data::fromJSON(request.data.compound.at("content").atom); std::cout << jsonReq << std::endl; -- cgit v0.12