Versions Compared

Key

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

ThinKCharts User Guide

Thin Kieler

...

SyncCharts Editor

Authors:

  • Matthias Schmeling <schm at informatik.uni-kiel.de>
  • Hauke Fuhrmann <haf at informatik.uni-kiel.de>

...

Editing the diagram

Context Menu

Image Added

  • Use the context menu(right-click) to add most of the items
    • Add Successor State: Add a state with a transition following the currently selected state.
    • Add Predecessor State: Add a state with a transition with a transition to the currently selected state.
    • Upgrade State: Add a Region into a State and an initial State into that Region. Can be called either on Simple States or on Macro States.
    • Downgrade State: Remove a Region from a State.
    • Add Choice: Add a Conditional Pseudo States with two target States.
    • Add Signal: Add a Signal declaration to a State.
    • Add Action/Suspension : Add a State Action (OnEntry, OnInside (will be executed every tick), OnExit) or a Suspension Trigger. The first three may also contain a Trigger (hence a pure effect needs to start with a slash "/"), the latter is only a Trigger and may not contain an effect.
    • Connect States: Add a Transition between the two selected States.
    • Flip Transition: Change source and target of selected Transition.
    • Set Transition Target/Set Transition Source: Change either the target or the source of the currently selected transition to the currently selected State. Requires tp select exactly one Transition and one State.

...

Graphical Elements in a ThinKCharts SyncChart

 Image Added

Interface Declaration Parser

  • Signals and Variables can be declared in a textual representation for a specific state and this state's subregions.
  • If you are familiar with Xtext grammars or ENBF see following links for the complete syntax
    • Xtext: InterfaceDecl.xtext in de.cau.cs.kieler.synccharts.interfacedeclparser
    • ENBF: InterfaceDecl.htmldehtml in de.cau.cs.kieler.synccharts.interfacedeclparser.

Short Sample

  • signals can be added using the signalkeyword finished by a semicolon.
    • there can be an arbitrary number of comma separated signals
    • inputs are declared by using the keyword input (same for output and input output)
  • variables are added in a similar way like signals by using the varkeyword finished by a semicolon.
    • there can be an arbitrary number of comma separated variables just like for the signals
  • an initial value is defined by :=following directly after the signal's name (care: use quotation marks for the value, as the underlying type is EString)
    • the value type can be declared directly afterwards with a preceding colon
  • the combine operator and value type are declared by the keywords combine ... with
    • possible combine operators : NONE, +, *, max, min, or, and, host
    • possible value types : PURE, BOOL, UNSIGNED, INT, FLOAT,HOST
  • signals and variables for a state's subregions are declared starting with region's identifier followed by a colon (R0: signal... for region R0)
  • you can use single line comments and multi line comments /* */ as you like

...

  • Action and Transition labels get automatically parsed and checked for correctness by a complex parser.
  • The label language mainly follows Esterel and E-Studio label Syntax.
  • For details, see
    • full label syntax grammar in Xtext notation: de.cau.cs.kieler.synccharts.labelparser/src/de/cau/cs/kieler/synccharts/labelparser/ActionLabel.xtext
    • full label syntax grammar in EBNF notation: de.cau.cs.kieler.xtext.docgenerator/src-gen/de.cau.cs.kieler.synccharts.labelparser.ActionLabel.html

General Form

Action:
	(isImmediate?='#')? (delay=INT)? (trigger=BooleanExpression)? ("/" (effects+=Effect (',')? )*)?; 

...

  • Finally, you should regularly test if your syncChart is correct. To do this, click on Diagram->Validate. Inconsistencies in your diagram are indicated by little red icons and also an entry in the problems view. Note that the validation may still be incomplete and not be able to point out all errors.
  • Your diagram gets validated automatically whenever it is saved.
  • For details on the checks performed see the Checkfile in Xtend Check language syntax: de.cau.cs.kieler.synccharts/model/SyncchartsChecks.chk

Differences to the original SyncCharts

...