summaryrefslogtreecommitdiffstats
path: root/INSTALL
Commit message (Expand)AuthorAgeFilesLines
* minor typo fixYann Collet2017-08-301-0/+1
* fix minor markdown display issuesYann Collet2017-08-141-4/+6
* better respect GNU standard Makefile conventionsYann Collet2017-08-141-0/+13
src/uscxml/plugins/DataModel.h | 209 ++++ src/uscxml/plugins/EventHandler.h | 125 ++ src/uscxml/plugins/ExecutableContent.h | 105 ++ src/uscxml/plugins/IOProcessor.h | 71 ++ src/uscxml/plugins/Invoker.h | 76 ++ .../plugins/datamodel/null/NULLDataModel.cpp | 12 +- .../plugins/datamodel/promela/PromelaParser.cpp | 2 + src/uscxml/plugins/element/file/FileElement.cpp | 1 + .../plugins/element/respond/RespondElement.cpp | 1 + .../plugins/invoker/calendar/CalendarInvoker.cpp | 2 + .../plugins/invoker/expect/ExpectInvoker.cpp | 2 + .../plugins/invoker/ffmpeg/FFMPEGInvoker.cpp | 2 + .../plugins/invoker/heartbeat/HeartbeatInvoker.cpp | 1 + .../plugins/invoker/heartbeat/HeartbeatInvoker.h | 1 + src/uscxml/plugins/invoker/im/IMInvoker.cpp | 2 + src/uscxml/plugins/invoker/smtp/SMTPInvoker.cpp | 1 + src/uscxml/plugins/invoker/xhtml/XHTMLInvoker.h | 1 + .../plugins/ioprocessor/comet/CometIOProcessor.cpp | 1 + src/uscxml/server/InterpreterServlet.cpp | 1 + src/uscxml/server/InterpreterServlet.h | 5 +- src/uscxml/transform/ChartToFSM.cpp | 2 + test/src/test-datamodel.cpp | 1 + test/src/test-eventdelay.cpp | 1 + test/src/test-stress.cpp | 3 + test/src/test-url.cpp | 2 +- test/src/test-w3c.cpp | 4 + test/w3c/confEcma.xsl | 2 +- test/w3c/ecma/robots.txt | 4 +- test/w3c/ecma/test446.txt | 13 +- test/w3c/ecma/test513.scxml | 50 - test/w3c/ecma/test513.txt | 16 + test/w3c/ecma/test519.scxml | 2 +- test/w3c/ecma/test520.scxml | 6 +- test/w3c/ecma/test531.scxml | 2 +- test/w3c/txml/robots.txt | 4 +- test/w3c/txml/test446.txt | 13 +- test/w3c/txml/test513.txml | 54 - test/w3c/txml/test513.txt | 16 + test/w3c/txml/test520.txml | 6 +- test/w3c/txml/test531.txml | 2 +- test/w3c/xpath/robots.txt | 4 +- test/w3c/xpath/test446.txt | 13 +- test/w3c/xpath/test513.scxml | 50 - test/w3c/xpath/test513.txt | 16 + test/w3c/xpath/test520.scxml | 6 +- test/w3c/xpath/test531.scxml | 2 +- 120 files changed, 2979 insertions(+), 4230 deletions(-) create mode 100755 contrib/local/test-include-linux.sh create mode 100755 contrib/local/test-include-macosx.sh delete mode 100644 embedding/csharp/embedding/embedding.sln delete mode 100644 embedding/csharp/embedding/embedding.suo delete mode 100644 embedding/csharp/embedding/embedding.userprefs delete mode 100644 embedding/csharp/embedding/embedding/Program.cs delete mode 100644 embedding/csharp/embedding/embedding/Properties/AssemblyInfo.cs delete mode 100644 embedding/csharp/embedding/embedding/TestDataModel.cs delete mode 100644 embedding/csharp/embedding/embedding/TestExecutableContent.cs delete mode 100644 embedding/csharp/embedding/embedding/TestIOProc.cs delete mode 100644 embedding/csharp/embedding/embedding/TestInterpreterMonitor.cs delete mode 100644 embedding/csharp/embedding/embedding/TestInvoker.cs delete mode 100644 embedding/csharp/embedding/embedding/embedding.csproj create mode 100644 embedding/csharp/uSCXMLEmbedding.sln create mode 100644 embedding/csharp/uSCXMLEmbedding/Examples.csproj create mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/SampleDataModel.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/SampleExecutableContent.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/SampleIOProc.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/SampleInterpreterMonitor.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Extensions/SampleInvoker.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Program.cs create mode 100644 embedding/csharp/uSCXMLEmbedding/Properties/AssemblyInfo.cs delete mode 100644 src/bindings/swig/php/CMakeLists.txt delete mode 100644 src/bindings/swig/php/test.php delete mode 100644 src/bindings/swig/php/uscxml.i delete mode 100644 src/bindings/swig/php/uscxmlNativePHP.php create mode 100644 src/uscxml/messages/Blob.cpp create mode 100644 src/uscxml/messages/Blob.h create mode 100644 src/uscxml/messages/Data.cpp create mode 100644 src/uscxml/messages/Data.h create mode 100644 src/uscxml/messages/Event.cpp create mode 100644 src/uscxml/messages/Event.h create mode 100644 src/uscxml/messages/InvokeRequest.cpp create mode 100644 src/uscxml/messages/InvokeRequest.h create mode 100644 src/uscxml/messages/SendRequest.cpp create mode 100644 src/uscxml/messages/SendRequest.h create mode 100644 src/uscxml/plugins/DataModel.h create mode 100644 src/uscxml/plugins/EventHandler.h create mode 100644 src/uscxml/plugins/ExecutableContent.h create mode 100644 src/uscxml/plugins/IOProcessor.h create mode 100644 src/uscxml/plugins/Invoker.h delete mode 100644 test/w3c/ecma/test513.scxml create mode 100644 test/w3c/ecma/test513.txt delete mode 100644 test/w3c/txml/test513.txml create mode 100644 test/w3c/txml/test513.txt delete mode 100644 test/w3c/xpath/test513.scxml create mode 100644 test/w3c/xpath/test513.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 90e5316..6a26928 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -358,6 +358,8 @@ if(${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") if(GCC_VERSION VERSION_EQUAL 4.7 OR GCC_VERSION VERSION_GREATER 4.7) # when compiling as C++11, narrowing is a warning but older compilers complain about the option add_definitions(-Wno-narrowing) + # recent gcc started to complain about unused globals + add_definitions(-Wno-unused-variable) endif() if(GCC_VERSION VERSION_EQUAL 4.8 OR GCC_VERSION VERSION_GREATER 4.8) @@ -946,6 +948,8 @@ foreach( FILE ${USCXML_FILES} ) elseif (${FILE} MATCHES ".*\\/debug\\/.*") source_group("Interpreter\\debug" FILES ${FILE}) + elseif (${FILE} MATCHES ".*\\/plugins\\/.*") + source_group("Interpreter\\plugins" FILES ${FILE}) elseif (${FILE} MATCHES ".*\\/transform\\/.*") source_group("Interpreter\\transform" FILES ${FILE}) elseif (${FILE} MATCHES ".*\\/util\\/.*") @@ -954,6 +958,8 @@ foreach( FILE ${USCXML_FILES} ) source_group("Interpreter\\concurrency" FILES ${FILE}) elseif (${FILE} MATCHES ".*\\/server\\/.*") source_group("Interpreter\\server" FILES ${FILE}) + elseif (${FILE} MATCHES ".*\\/messages\\/.*") + source_group("Interpreter\\messages" FILES ${FILE}) else () source_group(Interpreter FILES ${FILE}) diff --git a/README.md b/README.md index 9a2d7e3..1e18c5f 100644 --- a/README.md +++ b/README.md @@ -47,29 +47,10 @@ uSCXML still fails the following ecmascript tests: - + - - - - - - - - - - - - - - + +
Test#StatusDescriptionComment
329579 Failed"test that none of the system variables can be modified"uSCXML allows writing to _event. This is very useful to have a scope - that vanishes when processing an event is finished. I raised the issue on the ML and it might make it into a later draft
346Failed"test that any attempt to change the value of a system variable causes error.execution to be raised"Same issue as above: we allow writing to _event.
- - 519 - 520 - 531 - 534 - FailedTests contain non-standard ECMAScript."Before the parent state has been visited for the first time, if a transition is executed that takes the history state as its target, the SCXML processor MUST execute any executable content in the transition after the parent state's onentry content and any content in a possible initial transition."Functionality was recently added and is not yet supported.
@@ -91,7 +72,7 @@ objects of uscxml::Interpreter. ### Non-Blocking Interpretation with SCXML from URL Interpreter scxml = Interpreter::fromURL("http://www.example.com/fancy.scxml"); - scxml.start(); // non-blocking + scxml.start(); // non-blocking in own thread There are some cases, i.e. with graphical invokers, where the main thread is required in order to react to UI events. You will have to deligate control flow from the main thread into the interpreter @@ -126,15 +107,15 @@ You can register an InterpreterMonitor prior to start in order to recei control-flow upon various events in the Interpreter. class StatusMonitor : public uscxml::InterpreterMonitor { - void onStableConfiguration(Interpreter) {} - void beforeCompletion(Interpreter) {} - void afterCompletion(Interpreter) {} - void beforeMicroStep(Interpreter) {} - void beforeTakingTransitions(Interpreter, const Arabica::XPath::NodeSet&) {} - void beforeEnteringStates(Interpreter, const Arabica::XPath::NodeSet&) {} - void afterEnteringStates(Interpreter) {} - void beforeExitingStates(Interpreter, const Arabica::XPath::NodeSet&) {} - void afterExitingStates(Interpreter) {} + void onStableConfiguration(...) + void beforeCompletion(...) + void afterCompletion(...) + void beforeMicroStep(...) + void beforeTakingTransitions(...) + void beforeEnteringStates(...) + void afterEnteringStates(...) + void beforeExitingStates(...) + void afterExitingStates(...) }; StatusMonitor statMon; diff --git a/apps/uscxml-browser.cpp b/apps/uscxml-browser.cpp index a3ba8c8..7efacf5 100644 --- a/apps/uscxml-browser.cpp +++ b/apps/uscxml-browser.cpp @@ -4,6 +4,9 @@ #include "uscxml/debug/DebuggerServlet.h" #include +#include "uscxml/Factory.h" +#include "uscxml/server/HTTPServer.h" + #ifdef HAS_SIGNAL_H #include #endif diff --git a/apps/uscxml-transform.cpp b/apps/uscxml-transform.cpp index 1d03b98..3ee1f50 100644 --- a/apps/uscxml-transform.cpp +++ b/apps/uscxml-transform.cpp @@ -5,6 +5,11 @@ #include "uscxml/DOMUtils.h" #include #include +#include + +#include "uscxml/Factory.h" +#include "uscxml/server/HTTPServer.h" +#include "getopt.h" #ifdef HAS_SIGNAL_H #include diff --git a/contrib/iwyu-g++ b/contrib/iwyu-g++ index b3b66da..27b98be 100755 --- a/contrib/iwyu-g++ +++ b/contrib/iwyu-g++ @@ -1,4 +1,7 @@ #!/bin/sh + +# call as cmake CC=[..]/iwyu-gcc CXX=[..]/iwyu-g++ + IWYU_COMMAND=/usr/bin/iwyu COMPILER_COMMAND=/usr/bin/g++ $IWYU_COMMAND $@ diff --git a/contrib/local/test-include-linux.sh b/contrib/local/test-include-linux.sh new file mode 100755 index 0000000..19d0bd2 --- /dev/null +++ b/contrib/local/test-include-linux.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +ME=`basename $0` +DIR="$( cd "$( dirname "$0" )" && pwd )" +IWYU="/usr/bin/iwyu" +CLANG="/usr/bin/clang++" + +cd $DIR + +mkdir uscxml +touch uscxml/config.h + +#set -e + +SOURCES=`find ../../src -name "*.cpp"` + +for SOURCE in ${SOURCES}; do + if [[ "$SOURCE" == *plugins* ]]; then + continue + fi + echo ${SOURCE} + + ${IWYU} -c \ + -I /usr/include \ + -I ${DIR}/../prebuilt/include \ + -I ${DIR}/../prebuilt/linux-i686/gnu/include/arabica \ + -I ${DIR}/../prebuilt/linux-i686/gnu/include \ + -I ${DIR}/../src/evws \ + -I /usr/include/libxml2 \ + -I ${DIR} \ + -I ${DIR}/../../src ${SOURCE} +done \ No newline at end of file diff --git a/contrib/local/test-include-macosx.sh b/contrib/local/test-include-macosx.sh new file mode 100755 index 0000000..b71103a --- /dev/null +++ b/contrib/local/test-include-macosx.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +set -e + +ME=`basename $0` +DIR="$( cd "$( dirname "$0" )" && pwd )" + +cd $DIR + +HEADERS=`find ../../src -name *.h` + +for HEADER in ${HEADERS}; do + if [[ "$HEADER" == *inttypes.h* ]]; then + continue + fi + if [[ "$HEADER" == *bindings* ]]; then + continue + fi + if [[ "$HEADER" == *plugins* ]]; then + continue + fi + echo ${HEADER} + + echo "\ +#include \"${HEADER}\" +int main() {} " > test.cpp + + g++ \ + -I ${DIR}/../prebuilt/include \ + -I ${DIR}/../prebuilt/darwin-i386/10.9/clang/include/arabica \ + -I ${DIR}/../prebuilt/darwin-i386/10.9/clang/include \ + -I ${DIR}/../src/evws \ + -I /opt/local/include/libxml2 \ + -I /opt/local/lib/swipl-7.1.4/include \ + -I ${DIR}/../../src test.cpp +done \ No newline at end of file diff --git a/embedding/csharp/embedding/embedding.sln b/embedding/csharp/embedding/embedding.sln deleted file mode 100644 index 0f9a49e..0000000 --- a/embedding/csharp/embedding/embedding.sln +++ /dev/null @@ -1,20 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 11.00 -# Visual Studio 2010 -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "embedding", "embedding\embedding.csproj", "{75E5EE93-513B-45DA-AD50-64C570AAD0C0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|x86 = Debug|x86 - Release|x86 = Release|x86 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {75E5EE93-513B-45DA-AD50-64C570AAD0C0}.Debug|x86.ActiveCfg = Debug|x86 - {75E5EE93-513B-45DA-AD50-64C570AAD0C0}.Debug|x86.Build.0 = Debug|x86 - {75E5EE93-513B-45DA-AD50-64C570AAD0C0}.Release|x86.ActiveCfg = Release|x86 - {75E5EE93-513B-45DA-AD50-64C570AAD0C0}.Release|x86.Build.0 = Release|x86 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/embedding/csharp/embedding/embedding.suo b/embedding/csharp/embedding/embedding.suo deleted file mode 100644 index 3c8cd31..0000000 Binary files a/embedding/csharp/embedding/embedding.suo and /dev/null differ diff --git a/embedding/csharp/embedding/embedding.userprefs b/embedding/csharp/embedding/embedding.userprefs deleted file mode 100644 index 681be08..0000000 --- a/embedding/csharp/embedding/embedding.userprefs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - \ No newline at end of file diff --git a/embedding/csharp/embedding/embedding/Program.cs b/embedding/csharp/embedding/embedding/Program.cs deleted file mode 100644 index 3b5a28c..0000000 --- a/embedding/csharp/embedding/embedding/Program.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using System.Runtime.InteropServices; - -namespace embedding -{ - using org.uscxml; - - class Program - { - [DllImport("kernel32.dll", CharSet = CharSet.Auto)] - private static extern void SetDllDirectory(string lpPathName); - - static void Main(string[] args) - { - - /* - * Make sure this path contains the uscxmlNativeCSharp.dll! - */ - if (System.Environment.Is64BitProcess) - { - SetDllDirectory("C:\\Users\\sradomski\\Desktop\\build\\uscxml64\\lib\\csharp"); - } - else - { - SetDllDirectory("C:\\Users\\sradomski\\Desktop\\build\\uscxml\\lib\\csharp"); - } - - Interpreter interpreter = Interpreter.fromXML(""); - interpreter.addMonitor(new TestInterpreterMonitor()); - interpreter.interpret(); - } - } -} diff --git a/embedding/csharp/embedding/embedding/Properties/AssemblyInfo.cs b/embedding/csharp/embedding/embedding/Properties/AssemblyInfo.cs deleted file mode 100644 index bd9015e..0000000 --- a/embedding/csharp/embedding/embedding/Properties/AssemblyInfo.cs +++ /dev/null @@ -1,36 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; -using System.Runtime.InteropServices; - -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -[assembly: AssemblyTitle("embedding")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("embedding")] -[assembly: AssemblyCopyright("Copyright © 2014")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from -// COM, set the ComVisible attribute to true on that type. -[assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("0d270ead-e8cf-4cc1-a2c8-fa123e71812c")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Build and Revision Numbers -// by using the '*' as shown below: -// [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.0.0")] -[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/embedding/csharp/embedding/embedding/TestDataModel.cs b/embedding/csharp/embedding/embedding/TestDataModel.cs deleted file mode 100644 index bfcfd30..0000000 --- a/embedding/csharp/embedding/embedding/TestDataModel.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace EmbeddedDataModel -{ - class TestDataModel : DataModel - { - public override DataModel create(Interpreter interpreter) - { - return new TestDataModel(); - } - - public override void eval(string scriptElem, string expr) - { - // evaluate expr on the datamodel - } - - public override bool evalAsBool(string elem, string content) - { - return evalAsBool(content); - } - - public override bool evalAsBool(string expr) - { - // evaluate expr as bool - return false; - } - - public override void assign(string assignElem, string location, string content) - { - // set variable at location to content - } - - public override string evalAsString(string expr) - { - // evaluate given expr as a string (e.g. for ) - return ""; - } - - public override uint getLength(string expr) - { - // return the length of an expression for foreach - return 0; - } - - public override StringList getNames() - { - // name of this datamodel to be used in scxml element - StringList names = new StringList(); - names.add("simple"); - return names; - } - - public override DataNative getStringAsData(string content) - { - // DataNative ought to be wrapped by a Data.cs class - used to carry JSONesque structures - DataNative data = new DataNative(); - return data; - } - - public override void init(string dataElem, string location, string content) - { - // initialize variable at location to evaluated content - used for scxml data elements - } - - public override void setEvent(Event arg0) - { - // represent given event as _event in datamodel - } - - public override bool isDeclared(string expr) - { - // using an undeclared variable is an error.execution with some scxml constructs - - // determine whether the given expression is defined - return true; - } - - public override void setForeach(string item, string array, string index, uint iteration) - { - // called per foreach iteration, set datamodel variables accordingly - } - - public override bool validate(string location, string schema) - { - // primarily intended for xpath datamodel - return true; - } - } -} diff --git a/embedding/csharp/embedding/embedding/TestExecutableContent.cs b/embedding/csharp/embedding/embedding/TestExecutableContent.cs deleted file mode 100644 index 199445b..0000000 --- a/embedding/csharp/embedding/embedding/TestExecutableContent.cs +++ /dev/null @@ -1,33 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace embedding -{ - class TestExecutableContent : ExecutableContent - { - public override string getLocalName() - { - return "custom"; - } - - public override void enterElement(string node) - { - - } - - public override void exitElement(string node) - { - - } - - public override ExecutableContent create(Interpreter interpreter) - { - return new TestExecutableContent(); - } - - - } -} diff --git a/embedding/csharp/embedding/embedding/TestIOProc.cs b/embedding/csharp/embedding/embedding/TestIOProc.cs deleted file mode 100644 index 1c00034..0000000 --- a/embedding/csharp/embedding/embedding/TestIOProc.cs +++ /dev/null @@ -1,28 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; -using org.uscxml; - -namespace embedding -{ - class TestIOProc : IOProcessor - { - public override DataNative getDataModelVariables() - { - DataNative data = new DataNative(); - return data; - } - - public override StringList getNames() - { - StringList names = new StringList(); - names.add("simpl