Browse Source

small changes

Simon Van Mierlo 9 years ago
parent
commit
fa39c551cf
2 changed files with 7 additions and 26 deletions
  1. 4 23
      README.md
  2. 3 3
      tests/test_framework.js

+ 4 - 23
README.md

@@ -1,5 +1,3 @@
-This is a fork of https://github.com/gl3nn/sccd_compiler
-
 Statecharts and Class Diagram Compiler
 ======================================
 
@@ -8,7 +6,7 @@ Usage
 Manual for the compiler written in Python :
 ```sh
 $python sccdc.py --help
-usage: sccdc.py [-h] [-o OUTPUT] [-v VERBOSE] [-p PROTOCOL] [-l LANGUAGE]
+usage: sccdc.py [-h] [-o OUTPUT] [-v VERBOSE] [-p PLATFORM] [-l LANGUAGE]
                 input
 
 positional arguments:
@@ -23,30 +21,13 @@ optional arguments:
                         2 = all output; 1 = only warnings and errors; 0 = only
                         errors; -1 = no output. Defaults to 2.
   -p PLATFORM, --platform PLATFORM
-                        Let the compiled code run on top of threads or
+                        Let the compiled code run on top of threads, eventloop or
                         gameloop. The default is threads.
   -l LANGUAGE, --language LANGUAGE
-                        Target language, "csharp", "python" or "javascript". Defaults
+                        Target language, "python" or "javascript". Defaults
                         to "python".
 ```
 
-For a detailed explanation on the formalism's syntax please consult the latest report <a href="http://msdl.cs.mcgill.ca/people/glenn/60_Downloads">here</a>.
-
 Tests
 -------------
-Executing the tests written for the Python compiler and generated Python code can be done by running `tests.py`. This file imports the test cases from the `test_files` folder.
-
-Tanks Example
--------------
-In the `tanks` folder a tanks game can be found for which both the input handling of the player-controlled tank, and the behaviour of the NPC tank are modelled using the SCCD formalism. For this specific example the commands to compile the models are as follows :
-
-```sh
-python sccdc.py tanks/player_controller.xml -o tanks/player_controller.py -p gameloop
-python sccdc.py tanks/ai_controller.xml -o tanks/ai_controller.py -p gameloop
-```
-The resulting files `player_controller.py` and `ai_controller.py` (and any other compiled code) depend on the runtime files found in `python_runtime`, so this folder should either be put in `PYTHONPATH` or directly in the `tanks` directory (you can use a symbolic link).
-
-Live demo
----------
-
-Live demo of a statechart (compiled to Javascript) simulating a bouncing ball: https://gwd.dyn.mk/public/sccd/svgdemo
+Building tests can be done by executing `make clean all' in the `tests' folder. Executing the tests written for the Python compiler and generated Python code can be done by running `run_tests.py`. This file imports the test cases from the `tests/target_py` folder. Javascript tests are run using the `run_tests.html' file.

+ 3 - 3
tests/test_framework.js

@@ -30,7 +30,7 @@ TestFramework = {
 					}
 					return;
 				} else {
-					log("initializing test \"" + name + "\"");
+					// log("initializing test \"" + name + "\"");
 				}
 				var controller = new (window[name].Controller)(new JsEventLoop());
 				var listener = controller.addOutputListener("test_output");
@@ -47,7 +47,7 @@ TestFramework = {
 				}
 				var check_output = (function(log, test_name, listener, expected, run_next_callback, results) {
 					return function() {
-						log("checking output...");
+						// log("checking output...");
 						var passed = true;
 
 						if (listener.queue.length !== expected.length) {
@@ -114,7 +114,7 @@ TestFramework = {
 					controller.addInput(new Event(ii.name, ii.port, ii.parameters), ii.time_offset);
 				}
 
-				log("starting controller...");
+				// log("starting controller...");
 				controller.finished_callback = check_output;
 				controller.start();
 			};