Skip to content

Commit

Permalink
Final touchups
Browse files Browse the repository at this point in the history
  • Loading branch information
Daniil ROSSO committed Feb 6, 2022
1 parent 9a01857 commit 0a55c0c
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# FormalModeling_MiniProjet

M2 Formal Modeling project by Remy CHERKHAOUI, Quentin FELTEN and Daniil ROSSO,
students at Efrei Paris
__M2 Formal Modeling project by Remy CHERKHAOUI, Quentin FELTEN and Daniil ROSSO,
students at Efrei Paris__

In this project, we designed an application running a Computation Tree Logic (or CTL for short) algorithm to check if a given Kripke structure satisfies a given CTL formula.

Expand All @@ -21,8 +21,9 @@ Start the application (default location is localhost:8080)
```bash
npm start
```
* Due to an unexplored bug, only the present files can be used by the program. (See _parser.js l.10_ or the corresponding part of the report for more information).

You can add your own Kripke structures and CTL formulae by replacing file1.txt and file2.txt in **\documents\test_files\\**
You can add your own Kripke structures and CTL formulae by **replacing file1.txt and file2.txt** in **\documents\test_files\\** and following the specified structure.

See the example at the end of the README for the correct structure.

Expand Down
Binary file removed documents/KripkeStructureExample.png
Binary file not shown.
Binary file added documents/Report Formal Modeling.pdf
Binary file not shown.
Binary file removed documents/Report.docx
Binary file not shown.
6 changes: 4 additions & 2 deletions src/scripts/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ export function parse(fileName) {
let fs = require("fs");
let text = "";

//As discussed with you, we encountered a very peculiar bug that forbid the fileName variable to be properly used in a readfile
//This forced a hardcoded solution to allow further development.
switch (fileName) {
case "./documents/test_files/file1.txt":
text = fs.readFileSync("./documents/test_files/file1.txt", "utf-8");
Expand All @@ -26,8 +28,8 @@ export function parse(fileName) {
let textByLine = text.split("\r\n");

textByLine.forEach(function callback(value, index, object) {
if (value.match(/^S:|^L:|^T:|^I:|^CTL/)) {
object.splice(index, 1); //removes indicators
if (value.match(/^S:|^L:|^T:|^I:|^CTL/)) { //removes indicators
object.splice(index, 1);
}
});

Expand Down

0 comments on commit 0a55c0c

Please sign in to comment.