Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Enable the HTTP Server

Before you can use the KielerCompilerKLighD.jar from the console, you need to start the KIELER RCA and activate the KLighD HTTP Server. This is done using the button at 1. shown in the screenshot below. When pressing it the windows shown at 2. is displayed and allows to enable or disable the server and also to modify the default port of 55554444. Whenever the server was enabled and is started, you will see its job running at 3. in the lower region of the KIELER RCA. When you enabled the server in previous runs of the KIELER RCA it will automatically started when you run KIELER again.

Image RemovedImage Added

Non-GUI HTTP Server

Alternatively (after you configured the port) you can start the KiCo KLighD HTTP Server via command line:

kieler -application de.cau.cs.kieler.kicoklighd.server.headless -noExit [-p <port>] [-d]

This will start a background process with the KIELER Compiler KLighD HTTP Server. Optionally you can specify a (new) listening port for the HTTP server using "-p <port>" or  "–port <port>",e.g. "-p 55554444". The option -d or --debug enables the debug mode with verbose debug output messages.

 

...

Using  KLighD.jar from Console

Download the KielerCompilerConsole (alternative the  KLighD (alternative Download) as a runnable Java JAR archive and start it using java:

java -jar KielerCompilerKLighD.jar <host>:<port> [Options] <transformationID_1> .. <transformationID_n>

In the above screenshot you see the KielerCompiler KLighD options when calling with no/too few parameters. The host or the port are mandatory parameters. By default the port 5555 4444 is used and the default host is localhost. If you secify specify the port you do not need to specify localhost, if you specify the host you do not need to specify 55554444. The following options are available:

  • -f <filename> : Use a specific input file for the main model (and not the console)
  • -i <filename> : Include additional input files that are referenced by the main model, note that the order for using multiple -i options is important: Use the order -i file1 -i file2 if file1 has references to file2 but file2 has NO references to file1!
  • -o <filename> : Use a specific output file (and not the console)
  • -v r <svg or png> : Use verbose compilation, more error messagesa specific output rendering, png or svg, default is png
  • -s : Use strict mode compilation (only apply selected transformations)

 

Transformation IDs

In order to use the KIELER Compiler from the command line you need to know the ID of the transformations you would like to apply.

Common Transformation IDsMore Transformation IDs

Here are the most common ones:

Transformation IDDescription
REFERENCEExpand reference states
EXTENDEDAll extended SCCharts transformations resulting in a Core SCChart
COREAll core SCCharts transformations resulting in a Normalized SCChart
SCGRAPHTransform to an SCG
CODEGENERATIONGenerate C code

In order to get other transformation IDs you can use the KIELER Compiler Selection View. It will show the transformation ID for each transformation or transformation group as a tooltip text that will show up if you place and hold the mouse over the transformation node as shown below:

Image Removed

 

 

Example Calls

Example 1

Image Removed

When calling the KielerCompiler with the ABORT transformation and console output.

 

Example 2
Image Removed

Using the KielerCompiler with CODEGENERATION transformation and a specific output file.

 

Example 3
Image Removed

...

  • <1 - 5>: Use a specific scale factor, e.g. 1, default is 1