summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2016-10-25 11:59:18 (GMT)
committerStefan Radomski <github@mintwerk.de>2016-10-25 11:59:18 (GMT)
commit954a1eb75f2abc81da1e09701d700674f0baddfb (patch)
tree873eb6412e958ecd53214ddbd6a3e17465da5100 /apps
parent1a1513c6497e8818eb2a92a8fbf77d4c60bc911e (diff)
downloaduscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.zip
uscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.tar.gz
uscxml-954a1eb75f2abc81da1e09701d700674f0baddfb.tar.bz2
Worked on PROMELA transformation
Diffstat (limited to 'apps')
-rw-r--r--apps/uscxml-transform.cpp27
1 files changed, 13 insertions, 14 deletions
diff --git a/apps/uscxml-transform.cpp b/apps/uscxml-transform.cpp
index de0c594..649b61b 100644
--- a/apps/uscxml-transform.cpp
+++ b/apps/uscxml-transform.cpp
@@ -3,6 +3,7 @@
#include "uscxml/util/String.h"
#include "uscxml/transform/ChartToC.h"
#include "uscxml/transform/ChartToVHDL.h"
+#include "uscxml/transform/ChartToPROMELA.h"
#include <boost/algorithm/string.hpp>
@@ -29,7 +30,7 @@ void printUsageAndExit(const char* progName) {
printf("%s version " USCXML_VERSION " (" CMAKE_BUILD_TYPE " build - " CMAKE_COMPILER_STRING ")\n", progStr.c_str());
printf("Usage\n");
printf("\t%s", progStr.c_str());
- printf(" [-t c|pml|flat|min|tex] [-a {OPTIONS}] [-v] [-lN]");
+ printf(" [-t c|pml|flat|min] [-a {OPTIONS}] [-v] [-lN]");
#ifdef BUILD_AS_PLUGINS
printf(" [-p pluginPath]");
#endif
@@ -41,7 +42,6 @@ void printUsageAndExit(const char* progName) {
printf("\t-t vhdl : convert to VHDL hardware description\n");
printf("\t-t flat : flatten to SCXML state-machine\n");
printf("\t-t min : minimize SCXML state-chart\n");
- printf("\t-t tex : write global state transition table as tex file\n");
printf("\t-a {OPTIONS} : annotate SCXML elements with comma seperated options\n");
printf("\t priority - transitions with their priority for transition selection\n");
printf("\t exitset - annotate all transitions with their exit sets\n");
@@ -201,7 +201,6 @@ int main(int argc, char** argv) {
outType != "c" &&
outType != "vhdl" &&
outType != "min" &&
- outType != "tex" &&
std::find(options.begin(), options.end(), "priority") == options.end() &&
std::find(options.begin(), options.end(), "domain") == options.end() &&
std::find(options.begin(), options.end(), "conflicts") == options.end() &&
@@ -303,17 +302,17 @@ int main(int argc, char** argv) {
exit(EXIT_SUCCESS);
}
-// if (outType == "pml") {
-// if (outputFile.size() == 0 || outputFile == "-") {
-// ChartToPromela::transform(interpreter).writeTo(std::cout);
-// } else {
-// std::ofstream outStream;
-// outStream.open(outputFile.c_str());
-// ChartToPromela::transform(interpreter).writeTo(outStream);
-// outStream.close();
-// }
-// exit(EXIT_SUCCESS);
-// }
+ if (outType == "pml") {
+ if (outputFile.size() == 0 || outputFile == "-") {
+ ChartToPromela::transform(interpreter).writeTo(std::cout);
+ } else {
+ std::ofstream outStream;
+ outStream.open(outputFile.c_str());
+ ChartToPromela::transform(interpreter).writeTo(outStream);
+ outStream.close();
+ }
+ exit(EXIT_SUCCESS);
+ }
// if (outType == "tex") {
// if (outputFile.size() == 0 || outputFile == "-") {