Skip to content

Commit cd99013

Browse files
committed
Merge branch 'carlo-dev_OU' into OU-master
2 parents 300aa98 + e441a33 commit cd99013

13 files changed

+1781
-155
lines changed

.idea/.name

-1
This file was deleted.

CMakeLists.txt

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
cmake_minimum_required(VERSION 3.14)
1+
# this makefile is intended to be used on a full Ubuntu 18.04 VM and CLION IDE.
2+
# with SPOT pre-installed.
3+
cmake_minimum_required(VERSION 3.10)
24
project(spot_checker)
35

46
set(CMAKE_CXX_STANDARD 17)
@@ -8,7 +10,10 @@ set(CMAKE_CXX_STANDARD 17)
810
include_directories(/home/css/spot-2.7.2) # for spot header files. when installed via config+make
911
include_directories(/home/css/usr/include) #for bddx.h file
1012
link_directories(/home/css/usr/lib)
11-
add_executable(spot_checker spot_checker.cpp)
12-
target_link_libraries(spot_checker libspot.so libbddx.so libstdc++fs.a) #libstdc++fs.a for filesystem exeprimental
1313

14+
add_executable(spot_checker spot_checker.cpp )
15+
target_link_libraries(spot_checker libspot.so libbddx.so libstdc++fs.a) #libstdc++fs.a for filesystem exeprimental
16+
17+
#add_executable(spot_formula_to_dot spot_formula_to_dot.cpp)
18+
#target_link_libraries( spot_formula_to_dot libspot.so libbddx.so libstdc++fs.a) #libstdc++fs.a for filesystem exeprimental
1419

CMakeListsCross.txt

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# still experimental: this makefile is intended to be used on a Win10 machine with CLION IDE and Ubuntu 18.04 WSL configured.
2+
# with SPOT pre-installed on the WSL distro.
3+
cmake_minimum_required(VERSION 3.14)
4+
project(spot_checker)
5+
set(CMAKE_SYSTEM_NAME Linux)
6+
set(CMAKE_CXX_STANDARD 17)
7+
#set(CMAKE_MODULE_PATH "/home/css/usr/lib/;${CMAKE_MODULE_PATH}")
8+
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++1y -O2 -std=c++11 -I/usr/local/include -L/usr/local/lib -lboost_system -lboost_filesystem -fopenmp -lpthread -lz")
9+
#set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++fs -std=c++17")
10+
include_directories(C:\spot-2.8.7\spot) # for spot header files. when installed via config+make
11+
include_directories(C:\spot-2.8.7\buddy\src) #for bddx.h file
12+
link_directories(C:\spot-2.8.7\lib)
13+
add_executable(spot_checker spot_checker.cpp)
14+
target_link_libraries(spot_checker libspot.so libbddx.so libstdc++fs.a) #libstdc++fs.a for filesystem exeprimental
15+
16+

README.md

+35-63
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,47 @@
1-
# spot_checker
21

3-
4-
- This utility program is a wrapper around SPOT for usage with TESTAR.
5-
- The code of the model checker is from the SPOT library (https://spot.lrde.epita.fr/).
6-
- The wrapper takes in a file with an automaton and (a file with) formulas
7-
- and returns the results in a format that TESTAR is able to parse.
8-
- The command is developed on Ubuntu 18.04 and is intended to run on Windows Subsystem for Linux (WSL).
9-
- WSL v1903 or higher is recommended.
2+
# spot\_checker
3+
This utility program is a wrapper around SPOT library (https://spot.lrde.epita.fr/) for usage with TESTAR.
4+
The main purpose is to convert LTL formulas to finite LTL (LTLF) variants before they are model checked.
5+
LTLF can be use full for models with terminal states.
6+
7+
The application weaves an atomic proposition (AP) into the formula to label the 'alive' part of the model. E.g. '\--ltlf !dead or \--ltlf alive'.
8+
The wrapper takes in a file with an automaton and (a file with) formulas and returns the results in a format that TESTAR is able to parse.
9+
The command is developed on Ubuntu 18.04 and is intended to run on Windows Subsystem for Linux (WSL). WSL v1903 or higher is recommended
10+
11+
Note:
12+
- This 'terminal' AP MUST exist in the automaton as well!!
13+
- Terminal states in the model shall have a self-loop with 'dead' or '!alive' as the only property that holds
14+
- or Terminal states always transition to an artificial terminal state with such a self-loop.
15+
16+
LTLF variant | use case
17+
------------ | --------
18+
LTLf (G&V-2013) | for plain traces or a DAG.
19+
LTLfs | for safety properties on models with terminal states.
20+
LTLfl | for liveness properties* on models with terminal states.
21+
*<i>Checked in non-trivial SCC's only and <u>NOT</u> in the finite suffix towards a terminal
22+
state</i>
1023

11-
12-
Program version : 20200823
24+
Program version : 20201024
1325

1426
---
1527
#### Usage:
16-
spot_checker &nbsp;&nbsp; \--stdin --a *file* \--sf *formula* \--ff *file* \--fonly --ltlf *str* \--ltlxf *str* \--witness *file*
17-
Help is displyed when the spot_checker is invoked without options.
28+
spot_checker &nbsp;&nbsp; \--stdin --a *file* \--sf *formula* \--ff *file* \--fonly --ltlf *str* \--ltlxf *str* \--witness
29+
Help is displayed when the spot_checker is invoked without options.
30+
All output is send to stdout.
1831

1932
#### Commandline options:
20-
21-
##### \--stdin
22-
optional.
23-
* all input is via standard input stream:
24-
* at first an automaton [HOA format](http://adl.github.io/hoaf/) . 'EOF_HOA' + newline marks the end of the automaton.
25-
* followed by formulas.
26-
* all other arguments are ignored and output is via stdout.
27-
28-
##### \--a
29-
mandatory.
30-
unless --stdin is the argument. filename containing the automaton (HOA format).
31-
32-
33-
##### \--sf
34-
optional.
35-
the single LTL formula/property to check.
36-
37-
38-
##### \--ff
39-
optional.
40-
filename containing multiple formulas/properties.
41-
42-
43-
##### \--fonly
44-
optional.
45-
Does not check against a model, but only verifies the formulas --sf or --ff syntactically and provides LTLF versions.
46-
(the alive property is taken from --ltlf or --ltlxf and by absence the program uses '!dead').
47-
This option ignores --a, --witness.
48-
49-
##### \--ltlf
50-
optional.
51-
usable for finite LTL (if the automaton contains terminal states):
52-
Weaves an atomic proposition(AP) into the formula to label the 'alive' part. E.g. '--ltlf !dead or --ltlf alive'.
53-
Note: this AP MUST exist in the automaton as well!!
54-
Terminal states in the model shall have a self-loop with 'dead' or '!alive'
55-
as the only property or always transition to an artificial terminal state with such a self-loop. Variants:
56-
LTLf (G&V-2013) : for traces or a DAG.
57-
LTLfs : for safety properties on models with terminal states.
58-
LTLfl : for liveness properties (in SCC's) on models with terminal states.
59-
60-
##### \--ltlxf
61-
optional.
62-
checks **both** the original formula and **all** the ltlf variants
63-
64-
##### \--witness
65-
optional.
66-
generates a trace: counterexample (for FAIL) or witness (for PASS)
33+
Option | mandatory | Usage
34+
-------- | --------- | -----
35+
\--stdin | optional | All input is via console: <br> first a single automaton in [HOA format](http://adl.github.io/hoaf/) (http://adl.github.io/hoaf/) followed by formulas. <br> When completed, the system will ask for a new formula to model check. <br>A blank line will stop the program and all other arguments are ignored.
36+
\--a | mandatory unless <br>\--stdin is used | filename containing the automaton (HOA format) <br> Without \--sf or \--ff, the formula/property is via stdin.
37+
\--sf | optional | the single LTL formula/property to check. Add quotes if the formula contains spaces
38+
\--ff | optional | filename containing multiple formulas/properties.
39+
\--fonly | optional | Does not check against a model, but only verifies the formulas syntactically and provides LTLF versions. <br>The alive property to be provided by \--ltlf or \--ltlxf. By absence the program uses '!dead'. This option ignores \--a, \--witness.
40+
\--ltlf | optional | the alive property: E.g. '!dead' or 'alive'.
41+
\--ltlx | optional | without \--fonly: model check both the original formula and all the ltlf variants
42+
\--witness| optional | generates a trace: counterexample (for FAIL) or witness (for PASS)
6743

6844
---
69-
#### Use-case when only option --a is supplied (without --sf or --ff):
70-
71-
The user can supply via stdin a formula/property. Results are returned via stdout.
72-
The system will ask for a new formula. A blank line will stop the program.
7345

7446
#### Note:
7547

doxygen/Testar_LTL_Doxyfile

+67-29
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Doxyfile 1.8.17
1+
# Doxyfile 1.8.20
22

33
# This file describes the settings to be used by the documentation system
44
# doxygen (www.doxygen.org) for a project.
@@ -38,7 +38,7 @@ PROJECT_NAME = "Testar Wrapper for SPOT Modelchecker"
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v0.82
41+
PROJECT_NUMBER = v0.87
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO = C:/Users/cseng/git/testar_LTL/doxygen/testar_logo.png
5858
# entered, it will be relative to the location where doxygen was started. If
5959
# left blank the current directory will be used.
6060

61-
OUTPUT_DIRECTORY = .
61+
OUTPUT_DIRECTORY =
6262

6363
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
6464
# directories (in 2 levels) under the output directory of each output format and
@@ -227,6 +227,14 @@ QT_AUTOBRIEF = NO
227227

228228
MULTILINE_CPP_IS_BRIEF = NO
229229

230+
# By default Python docstrings are displayed as preformatted text and doxygen's
231+
# special commands cannot be used. By setting PYTHON_DOCSTRING to NO the
232+
# doxygen's special commands can be used and the contents of the docstring
233+
# documentation blocks is shown as doxygen documentation.
234+
# The default value is: YES.
235+
236+
PYTHON_DOCSTRING = YES
237+
230238
# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the
231239
# documentation from any documented member that it re-implements.
232240
# The default value is: YES.
@@ -263,12 +271,6 @@ TAB_SIZE = 4
263271

264272
ALIASES =
265273

266-
# This tag can be used to specify a number of word-keyword mappings (TCL only).
267-
# A mapping has the form "name=value". For example adding "class=itcl::class"
268-
# will allow you to use the command class in the itcl::class meaning.
269-
270-
TCL_SUBST =
271-
272274
# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources
273275
# only. Doxygen will then generate output that is more tailored for C. For
274276
# instance, some of the names that are used will be different. The list of all
@@ -310,13 +312,13 @@ OPTIMIZE_OUTPUT_SLICE = NO
310312
# extension. Doxygen has a built-in mapping, but you can override or extend it
311313
# using this tag. The format is ext=language, where ext is a file extension, and
312314
# language is one of the parsers supported by doxygen: IDL, Java, JavaScript,
313-
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice,
315+
# Csharp (C#), C, C++, D, PHP, md (Markdown), Objective-C, Python, Slice, VHDL,
314316
# Fortran (fixed format Fortran: FortranFixed, free formatted Fortran:
315317
# FortranFree, unknown formatted Fortran: Fortran. In the later case the parser
316318
# tries to guess whether the code is fixed or free formatted code, this is the
317-
# default for Fortran type files), VHDL, tcl. For instance to make doxygen treat
318-
# .inc files as Fortran files (default is PHP), and .f files as C (default is
319-
# Fortran), use: inc=Fortran f=C.
319+
# default for Fortran type files). For instance to make doxygen treat .inc files
320+
# as Fortran files (default is PHP), and .f files as C (default is Fortran),
321+
# use: inc=Fortran f=C.
320322
#
321323
# Note: For files without extension you can use no_extension as a placeholder.
322324
#
@@ -366,7 +368,7 @@ BUILTIN_STL_SUPPORT = NO
366368
# enable parsing support.
367369
# The default value is: NO.
368370

369-
CPP_CLI_SUPPORT = YES
371+
CPP_CLI_SUPPORT = NO
370372

371373
# Set the SIP_SUPPORT tag to YES if your project consists of sip (see:
372374
# https://www.riverbankcomputing.com/software/sip/intro) sources only. Doxygen
@@ -455,6 +457,19 @@ TYPEDEF_HIDES_STRUCT = NO
455457

456458
LOOKUP_CACHE_SIZE = 0
457459

460+
# The NUM_PROC_THREADS specifies the number threads doxygen is allowed to use
461+
# during processing. When set to 0 doxygen will based this on the number of
462+
# cores available in the system. You can set it explicitly to a value larger
463+
# than 0 to get more control over the balance between CPU load and processing
464+
# speed. At this moment only the input processing can be done using multiple
465+
# threads. Since this is still an experimental feature the default is set to 1,
466+
# which efficively disables parallel processing. Please report any issues you
467+
# encounter. Generating dot graphs in parallel is controlled by the
468+
# DOT_NUM_THREADS setting.
469+
# Minimum value: 0, maximum value: 32, default value: 1.
470+
471+
NUM_PROC_THREADS = 1
472+
458473
#---------------------------------------------------------------------------
459474
# Build related configuration options
460475
#---------------------------------------------------------------------------
@@ -559,7 +574,7 @@ INTERNAL_DOCS = NO
559574
# names in lower-case letters. If set to YES, upper-case letters are also
560575
# allowed. This is useful if you have classes or files whose names only differ
561576
# in case and if your file system supports case sensitive file names. Windows
562-
# (including Cygwin) ands Mac users are advised to set this option to NO.
577+
# (including Cygwin) and Mac users are advised to set this option to NO.
563578
# The default value is: system dependent.
564579

565580
CASE_SENSE_NAMES = NO
@@ -829,7 +844,11 @@ WARN_LOGFILE =
829844
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
830845
# Note: If this tag is empty the current directory is searched.
831846

832-
INPUT = ..
847+
INPUT = ../spot_formula_to_dot.cpp \
848+
../spot_checker.cpp \
849+
../README.md \
850+
spot_formula_to_dot.md \
851+
spot_formula_to_dot.txt
833852

834853
# This tag can be used to specify the character encoding of the source files
835854
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses
@@ -853,11 +872,10 @@ INPUT_ENCODING = UTF-8
853872
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
854873
# *.m, *.markdown, *.md, *.mm, *.dox (to be provided as doxygen C comment),
855874
# *.doc (to be provided as doxygen C comment), *.txt (to be provided as doxygen
856-
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f, *.for, *.tcl, *.vhd,
875+
# C comment), *.py, *.pyw, *.f90, *.f95, *.f03, *.f08, *.f18, *.f, *.for, *.vhd,
857876
# *.vhdl, *.ucf, *.qsf and *.ice.
858877

859-
FILE_PATTERNS = spot_checker.cpp \
860-
README.md
878+
FILE_PATTERNS =
861879

862880
# The RECURSIVE tag can be used to specify whether or not subdirectories should
863881
# be searched for input files as well.
@@ -981,7 +999,7 @@ FILTER_SOURCE_PATTERNS =
981999
# (index.html). This can be useful if you have a project on for instance GitHub
9821000
# and want to reuse the introduction page also for the doxygen output.
9831001

984-
USE_MDFILE_AS_MAINPAGE = README.md
1002+
USE_MDFILE_AS_MAINPAGE = ../README.md
9851003

9861004
#---------------------------------------------------------------------------
9871005
# Configuration options related to source browsing
@@ -1089,10 +1107,13 @@ CLANG_ASSISTED_PARSING = NO
10891107
CLANG_OPTIONS =
10901108

10911109
# If clang assisted parsing is enabled you can provide the clang parser with the
1092-
# path to the compilation database (see:
1093-
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) used when the files
1094-
# were built. This is equivalent to specifying the "-p" option to a clang tool,
1095-
# such as clang-check. These options will then be passed to the parser.
1110+
# path to the directory containing a file called compile_commands.json. This
1111+
# file is the compilation database (see:
1112+
# http://clang.llvm.org/docs/HowToSetupToolingForLLVM.html) containing the
1113+
# options used when the source files were built. This is equivalent to
1114+
# specifying the "-p" option to a clang tool, such as clang-check. These options
1115+
# will then be passed to the parser. Any options specified with CLANG_OPTIONS
1116+
# will be added as well.
10961117
# Note: The availability of this option depends on whether or not doxygen was
10971118
# generated with the -Duse_libclang=ON option for CMake.
10981119

@@ -1362,7 +1383,7 @@ CHM_FILE =
13621383
HHC_LOCATION =
13631384

13641385
# The GENERATE_CHI flag controls if a separate .chi index file is generated
1365-
# (YES) or that it should be included in the master .chm file (NO).
1386+
# (YES) or that it should be included in the main .chm file (NO).
13661387
# The default value is: NO.
13671388
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
13681389

@@ -1524,6 +1545,17 @@ TREEVIEW_WIDTH = 250
15241545

15251546
EXT_LINKS_IN_WINDOW = NO
15261547

1548+
# If the HTML_FORMULA_FORMAT option is set to svg, doxygen will use the pdf2svg
1549+
# tool (see https://github.com/dawbarton/pdf2svg) or inkscape (see
1550+
# https://inkscape.org) to generate formulas as SVG images instead of PNGs for
1551+
# the HTML output. These images will generally look nicer at scaled resolutions.
1552+
# Possible values are: png (the default) and svg (looks nicer but requires the
1553+
# pdf2svg or inkscape tool).
1554+
# The default value is: png.
1555+
# This tag requires that the tag GENERATE_HTML is set to YES.
1556+
1557+
HTML_FORMULA_FORMAT = png
1558+
15271559
# Use this tag to change the font size of LaTeX formulas included as images in
15281560
# the HTML documentation. When you change the font size after a successful
15291561
# doxygen run you need to manually remove any form_*.png images from the HTML
@@ -1579,7 +1611,7 @@ MATHJAX_FORMAT = HTML-CSS
15791611
# Content Delivery Network so you can quickly see the result without installing
15801612
# MathJax. However, it is strongly recommended to install a local copy of
15811613
# MathJax from https://www.mathjax.org before deployment.
1582-
# The default value is: https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/.
1614+
# The default value is: https://cdn.jsdelivr.net/npm/mathjax@2.
15831615
# This tag requires that the tag USE_MATHJAX is set to YES.
15841616

15851617
MATHJAX_RELPATH = https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.5/
@@ -1818,9 +1850,11 @@ LATEX_EXTRA_FILES =
18181850

18191851
PDF_HYPERLINKS = YES
18201852

1821-
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
1822-
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
1823-
# higher quality PDF documentation.
1853+
# If the USE_PDFLATEX tag is set to YES, doxygen will use the engine as
1854+
# specified with LATEX_CMD_NAME to generate the PDF file directly from the LaTeX
1855+
# files. Set this option to YES, to get a higher quality PDF documentation.
1856+
#
1857+
# See also section LATEX_CMD_NAME for selecting the engine.
18241858
# The default value is: YES.
18251859
# This tag requires that the tag GENERATE_LATEX is set to YES.
18261860

@@ -2059,6 +2093,10 @@ DOCBOOK_PROGRAMLISTING = NO
20592093

20602094
GENERATE_AUTOGEN_DEF = NO
20612095

2096+
#---------------------------------------------------------------------------
2097+
# Configuration options related to Sqlite3 output
2098+
#---------------------------------------------------------------------------
2099+
20622100
#---------------------------------------------------------------------------
20632101
# Configuration options related to the Perl module output
20642102
#---------------------------------------------------------------------------

0 commit comments

Comments
 (0)