README.md 1.92 KB
Newer Older
1
2
3
# Automates [![pipeline status](https://gitlab.insa-rouen.fr/epierre01/determinisationautomate/badges/master/pipeline.svg)](https://gitlab.insa-rouen.fr/epierre01/determinisationautomate/-/commits/master)

## Installation
4
Pull the jar file from [here](http://vps-10849bef.vps.ovh.net/repository/org/insa/automaton/Automate/1.0/Automate-1.0-shadow.jar).
5

Pierre-Chanteloup Edwin's avatar
Typo    
Pierre-Chanteloup Edwin committed
6
You may also want [GraphViz](https://graphviz.org/download/) if you don't have it already to be able to draw
7
8
9
10
11
12
the output from the program.

## How to use
The syntax is as follows:

```
13
java -jar Automate-1.0-shadow.jar [-g|-o <output>] <operation> [input] 
14
```
15
If no input is specified, the program will try to read from `stdin`.
16
17
18
19

### Operations
* ```pass``` Doesn't modify the automaton.
* ```determine``` Transforms the input into a deterministic automaton.
20
21
* ```complete``` Completes the given automaton by adding a "trash" state.
* ```minimize``` Minimizes the given automaton (This task runs ```complete``` first).
22
* ```cleanup``` Removes unreachable states.
23
* ```language``` Extracts a regular language from the given automaton.
24
25
26

### Options
* ```-g``` Outputs a string in the [dot](https://graphviz.org/doc/info/lang.html) format to be used with GraphViz
EdwinMindcraft's avatar
++Doc    
EdwinMindcraft committed
27
28
29
30
31
32
33
34
* ```-o <output>``` Write the resulting automaton to a file instead of writing it to the console.

## Syntax

The standard syntax ignores blank lines and comments (lines starting with `#`).

The first line must be the alphabet: `a <alphabet>`

35
After that you need to keep in mind that you need to declare a state before using it in a link.
EdwinMindcraft's avatar
++Doc    
EdwinMindcraft committed
36
37
38
39
40
41
42

### Nodes
```
n[it] <id>
```

Where `<id>` is a unique integer.
43
44
* Using `i` marks the state as an entry state.
* Using `t` marks the state as a terminal state.
EdwinMindcraft's avatar
++Doc    
EdwinMindcraft committed
45
46
47
48
49
50

### Transitions
```
l <from> <to> <chars>
```
Where:
51
52
* `<from>` is the state the link will start from.
* `<to>` is the state the link will go to.
EdwinMindcraft's avatar
++Doc    
EdwinMindcraft committed
53
* `<chars>` is a subset of the alphabet which represents which characters are valid for this transition.