Welcome to XWizard: The Online Informatics Toolbox

No PDF files created due to cached mode. Click DRAW! to create PDFs.
Conversion
methods
For teachers Create exercise from this script...
X

### Create an exercise script from this script. Please enter parameters:

 arg0: (String: Provide a short description or title for the exercise.)arg0 arg1: (String: Enter a description for the exercise. You can use HTML.)arg1 arg2: (String: Optional string to be entered by the user as a solution to this exercise.)arg2 arg3: (String: Optional code string the user can earn by entering the correct solution.)arg3 arg4: (String: Optional → Regular expression (Java) to constrain displayed conversion methods - constrain by method name.)arg4 arg5: (String: Optional → Regular expression (Java) to constrain displayed conversion methods - constrain by full script class name.)arg5 arg6: (String: Optional → Regular expression (Java) to constrain displayed conversion methods - constrain by full target class name.)arg6 arg7: (String: Optional explanation to be displayed with the solution.)arg7 arg8: (boolean: Set this to true if the code of the exercise - not the complete script code - should be encrypted.)arg8 arg9: (boolean: Set this to true if the complete script code should be encrypted.)arg9

Debugging Stepwise script expansion...
X

### Shows the stepwise expansion of the current script for debugging. Please enter parameters:

 arg0: (Boolean: Set to true to show in each step the currently available preprocessors.)arg0

## Examples

Textbook mode

### Short introduction

• Enter a script and hit Draw! The result is shown as a graph in the output area. Feel free to play around!
• Click on one of the examples to get the general idea.
• Use the conversion methods to apply algorithms to the script.
• Or solve the exercise if there is one shown above the script.

Overwhelmed...? Bored...? → Join discussions group or tell us what you like and dislike by taking a → 3-minute survey.

Finite-State Machine

Define transition 'from s0 to s1 reading input symbol a' as: (s0, a) => s1;

Define initial state s0, final states F and input word in declarations.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'FSM'...

Pushdown Automaton

Define transition 'from s0 reading input symbol a and stack symbol k to s1 putting ak onto the stack' as: (s0, a, k) => (s1, ak);

or 'from s0 reading nothing...' as: (s0, lambda, k) => (s1, abck);

Define initial state s0, final states F, stack symbol kSymb and input word(s) in declarations.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'PDA'...

Turing machine

Define transitions 'from s0 reading input symbol * to s1, writing a and shifting to the left' as: (s0, *) => (s1, a, L);

Define initial state s0, final states F, blank tape symbol and input word(s) in declarations.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'Turing'...

Grammars can have two modes (grammar tree or parse tree).

Grammar tree

Define a production rule as: S => a, S, b; or S => epsilon; Define N (nonterminals), T (terminals) and S (start symbol) in declarations. Each branch of the grammar tree shows the derivation sequence of a terminal word by the grammar.

Parse tree (context-free Grammars)

You can create a parse tree by clicking   parse single word   or adding parse(w, o, r, d)--0 before the colon in the beginning. A parse tree shows for a single word how it can be derived by the grammar. Toggle parse trees by clicking the   toggle...   button.

Note that the empty word is called epsilon, not lambda, in grammars.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'Grammar'...

Regular expression

Type a regular expression which may be abbreviated in the usual ways. All lowercase letters (a, b, c, ...) and numbers (0, 1, 2, ...) are in the terminal alphabet. Union is given by +, concatenation by . (but omissible), Kleene's star by *. O (the uppercase letter, not the number) is the empty set , O* is (accordingly) the empty word λ.

Example: (((((a+b).b)*.c).d)+O)
which is equivalent to: ((a+b)b)*cd

The output is automatically simplified in some basic ways. To simplify the script, click   simplify (a little)  .

→ More help for 'RegularExpression'...

2-3-4 tree

Type a sequence of integers separated by spaces.The order of these elements written from left to right defines their insertion order in the tree.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'Tree234'...

Red-black tree

Type a sequence of integers separated by spaces.The order of these elements written from left to right defines their insertion order in the tree.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'RedBlackTree'...

Pat tree

Type a text as a basis for a pat tree. White spaces count as symbols, however, line breaks are not permitted.

Binary decision diagram

Just write a series of 0s and 1s in the order as given in a standard truth table of the desired function to define the BDD. If the length is not 2n for some n, 0s are filled in at the end.

Give the variable names in the beginning as a,b,c,...

→ More help for 'BDD'...

Huffman tree

Write an arbitrary text as a base for the huffman tree. Note that white spaces count as symbols, too.

→ More help for 'Huffman'...

Logic circuit

A logic circuit is given by a list of connections, each either
• from a logic gate X to an input n of another logic gate Y as:
X => Y.n;
• or from an input I to an input n of a logic gate Y as:
I => Y.n;
• or from a logic gate X to an output O as:
X => O;
Undefined elements I,O are treated as inputs or outputs, respectively. The remaining elements, i.e., logic gates, are defined in the declarations, e.g.:
components = A:NOT, B:XOR-nnin, C:XOR, D:AND, E:AND, F:OR;
More than two inputs are defined by a series of n and i (cf. B in the example) for 'normal' and 'inverted' inputs, respectively.

Hint: Combine rules on left side, right side or both:

 A => B | C; A | B => C; A | B => C | D;

→ More help for 'LogicCircuit'...

Number representations

A number representation is given by a representation name followed by a list of parameters, e.g.:
complement[code=111100, complementType=2];
Give a decimal value to calculate the according code.
Give a code in the syntax of the representation to calculate the according value.
Where available, a radix between 2 and 36 determines the base of the representation.
Currently available representations: excessq, complement, fixedpoint, floatingpoint.

→ More help for 'Numbers'...

Latex processor

Type an arbitrary (complete) Latex document and hit   draw!   to compile it. Cf. → Wikipedia to get started with Latex.

If formulaMode=true is set in the declarations, assume being in Latex math mode, and avoid all the stuff around it.

Latex code can be generated from all Latex-based scripts by clicking the   plain generator code   button.

Plain Graphviz DOT code

This is raw graphviz code. It can be generated from all other graphviz-based scripts by clicking on   plain generator code  . It can be modified as desired according to the documentation given in → http://www.graphviz.org/Documentation.php

Note that, so far, only the 'dot' processor can be used.

Dear programmer, you have not provided a help text so far. Please consider adding one to the HashMap in class 'HelpTexts' or implementing the 'requestHelpText' method of your 'RepresentableAsPDF'.
A Moore Automaton for Robot Behavior (MARB) is represented by this script type. See → [Lukas König: Complex Behavior in Evolutionary Robotics, DeGruyter (Munich), 2015] for details."

Calculator

Type an arithmetic expression using the usual syntax, such as: (3+4)^2, meaning: (3+4)2. The output is the result of the expression. Using x and/or y, such as: x^2+2^y, meaning x2+2y, will produce a table of all results in a certain range of these variables. Define this range in the declarations area.

This object type can be used to retrieve certain kinds of meta properties about XWizard. So far it lists all the objects available and shows how they can be transformed into one another. 