From 0d05e93b08fab003664b3af71bb293c8ecda88e4 Mon Sep 17 00:00:00 2001 From: Jaime Arias <arias@lipn.univ-paris13.fr> Date: Sat, 19 Oct 2024 01:47:49 +0200 Subject: [PATCH] doc: update README --- README.md | 40 ++++++++++++++++++++++------------------ 1 file changed, 22 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index 53f09c7bb..89c940a96 100644 --- a/README.md +++ b/README.md @@ -11,8 +11,7 @@ optimal solution of a graph from a `.dot` file. It provides the following functionalities: 1. **Generate a Random Graph**: Users can specify the number of nodes, edges, -and labels to generate a random, deterministic, and connected graph. This is -achieved using the `generateRandomGraph` function in `Graph.cpp`. +and labels to generate a random, deterministic, and connected graph. 2. **Extract Optimal Solution from a .dot File**: Users can provide a `.dot` file to extract and optimize the graph. @@ -20,14 +19,13 @@ file to extract and optimize the graph. After generating the graph or loading it from a file, the program performs the following steps: -1. **Generate Regular Expression of the Graph**: The -`RegularExpressionGeneration` function in `graph.cpp` is used to generate the +1. **Generate Regular Expression of the Graph**: The tool generates the regular expression of the graph. 2. **Extract All Paths from the Regular Expression**: All the paths of the graph are extracted from the regular expression. -3. **Pass to the Linear Program**: +3. **Pass to the Integer Linear Program**: - **Variables**: Paths of the graph. - **Constraints**: Labels representing transitions in the graph. @@ -54,7 +52,8 @@ the selected paths. Make sure to install the necessary dependencies before running the program: - `gcc` >= 9.3.0 -- `cmake` +- `cmake` >= 3.18 +- `ninja` ## Build @@ -83,9 +82,9 @@ cd assets To generate a random graph, use the following options: ```sh -./optlp --nb-nodes <n> \ - --nb-edges <m> \ - --nb-labels <l> +./optlp random --nb-nodes <n> \ + --nb-edges <m> \ + --nb-labels <l> ``` where: @@ -97,7 +96,7 @@ where: **Example:** ```sh -./optlp --nb-nodes 200 --nb-edges 100 --nb-labels 20 +./optlp random --nb-nodes 200 --nb-edges 100 --nb-labels 20 ``` ### Extracting the Optimal Solution from a .dot File @@ -106,18 +105,18 @@ To extract the optimal solution of a graph from a `.dot` file, use the following option: ```sh -./optlp --input-file <filename.dot> --output-folder <foldername> +./optlp from-file --input-file <filename.dot> --output-folder <folder name> ``` where: - `--input-file <filename.dot>`: Specifies the .dot file containing the graph. -- `--output-folder <foldername>`: Specifies the folder containing the result. +- `--output-folder <folder name>`: Specifies the folder containing the result. **Example:** ```sh -./optlp --input-file ./toys_examples/graph3.dot --output-folder ./result/ +./optlp from-file --input-file ./toys_examples/graph3.dot --output-folder ./result/ ``` ### Help @@ -132,9 +131,14 @@ display a help message with usage instructions. The help message will display the following: ```sh -/**************************************************************/ -/******************** help ********************/ -/ -To generate a random graph: use the options --nb-nodes <n> --nb-edges <m> --nb-labels <l> - -To extract the optimal solution of a .dot file: use the option -d <filename.dot> -/**************************************************************/ +⯠./assets/optlp --help +OptLP: A tool to find the minimum number of shortest paths that cover all system actions +Usage: ./assets/optlp [OPTIONS] [SUBCOMMAND] + +Options: + -h,--help Print this help message and exit + +Subcommands: + random Generate a random LTS + from-file Load an LTS from a dot file ``` -- GitLab