Skip to content

Commit

Permalink
added a document on tre2ta
Browse files Browse the repository at this point in the history
  • Loading branch information
MasWag committed Oct 9, 2019
1 parent 890e69e commit 0e6ea8b
Show file tree
Hide file tree
Showing 4 changed files with 135 additions and 0 deletions.
3 changes: 3 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
monaa.1: man_header man.md
cat $^ | sed '/# Usage Manual/ d; s/^#//;' | awk '/#/{$$0=toupper($$0)}1;'| pandoc -o $@ --standalone

tre2ta.1: man_header tre2ta_man.md
cat $^ | sed 's/% MONAA(1)/% TRE2TA(1)/;s/% May 2018/% October 2019/;' | sed '/# .* Usage Manual/ d; s/^#//;' | awk '/#/{$$0=toupper($$0)}1;'| pandoc -o $@ --standalone
33 changes: 33 additions & 0 deletions doc/related_tools.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,39 @@
Related Tool
============

TRE2TA
------

By [tre2ta](./tre2ta_man.md), you can translate a timed regular expression to a timed automaton. You can visualize the generated timed regular expression by `visualize-monaa-dot` for example.

### Installation from source

1. Build tre2ta

```
cd /path/to/monaa
mkdir -p build
cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && make tre2ta
```

2. (Optional) Install the executable and the manual

```
sudo install -m755 tre2ta /usr/local/bin
sudo install -m644 ../doc/tre2ta.1 /usr/local/share/man/man1/
```

### Docker

1. Install [docker](https://www.docker.com/)

2. pull the docker image by `docker pull maswag/tre2ta`.

3. Use the container e.g., `docker run -i maswag/tre2ta -e '(AB)$'`.

[Docker Hub page](https://cloud.docker.com/u/maswag/repository/docker/maswag/tre2ta)


visualize-monaa-dot
-------------------

Expand Down
53 changes: 53 additions & 0 deletions doc/tre2ta.1
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
.\" Automatically generated by Pandoc 2.7.3
.\"
.TH "TRE2TA" "1" "October 2019" "" ""
.hy
.SH NAME
.PP
tre2ta - Translate a timed regular expression to a timed automaton
.SH SYNOPSIS
.IP
.nf
\f[C]
tre2ta [OPTIONS] PATTERN
tre2ta [OPTIONS] -e PATTERN
\f[R]
.fi
.SH DESCRIPTION
.PP
\f[B]tre2ta\f[R] is a tool to translate a timed regular expression to a
timed automaton.
For both of them, the syntax is the same as that of MONAA.
.SH OPTIONS
.TP
.B \f[B]-h\f[R], \f[B]\[en]help\f[R]
Print a help message.
.TP
.B \f[B]-V\f[R], \f[B]\[en]version\f[R]
Print the version
.TP
.B \f[B]-e\f[R] \f[I]pattern\f[R], \f[B]\[en]expression\f[R] \f[I]pattern\f[R]
Specify a \f[I]pattern\f[R] by a timed regular expression.
.SH EXIT STATUS
.TP
.B 0
if there is no error.
.TP
.B 1
if an error on options has happened.
.TP
.B 2
if a parse error has happened.
.SH EXAMPLE
.PP
The following is an example to translate the TRE \f[C](ab)%(2,10)\f[R]
to a TA.
The result is written to the standard output.
.PP
\f[C]tre2ta -e \[aq](ab)%(2,10)\[aq]\f[R]
.PP
You can omit \f[C]-e\f[R] as follows.
.PP
\f[C]tre2ta \[aq](ab)%(2,10)\[aq]\f[R]
.SH AUTHORS
Masaki Waga.
46 changes: 46 additions & 0 deletions doc/tre2ta_man.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# TRE2TA Usage Manual

## Name

tre2ta - Translate a timed regular expression to a timed automaton

## Synopsis

tre2ta [OPTIONS] PATTERN
tre2ta [OPTIONS] -e PATTERN

## Description

**tre2ta** is a tool to translate a timed regular expression to a timed automaton. For both of them, the syntax is the same as that of MONAA.

## Options

**-h**, **--help**
: Print a help message.

**-V**, **--version**
: Print the version

**-e** *pattern*, **--expression** *pattern*
: Specify a *pattern* by a timed regular expression.

## Exit Status

0
: if there is no error.

1
: if an error on options has happened.

2
: if a parse error has happened.

## Example

The following is an example to translate the TRE `(ab)%(2,10)` to a TA. The result is written to the standard output.

`tre2ta -e '(ab)%(2,10)'`

You can omit `-e` as follows.

`tre2ta '(ab)%(2,10)'`

0 comments on commit 0e6ea8b

Please sign in to comment.