Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Spot
spot-web-app
Commits
dd5ddbd7
Commit
dd5ddbd7
authored
Dec 13, 2018
by
Alexandre Duret-Lutz
Browse files
Add safety-liveness classification
parent
d3268758
Pipeline
#5137
passed with stage
in 1 minute and 42 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
client/src/LtlApp.js
View file @
dd5ddbd7
...
@@ -197,6 +197,9 @@ const styles = theme => ({
...
@@ -197,6 +197,9 @@ const styles = theme => ({
paddingBottom
:
10
paddingBottom
:
10
},
},
stutterdiv
:
{},
stutterdiv
:
{},
livenessdiv
:
{
paddingBottom
:
10
},
wordtable
:
{
wordtable
:
{
width
:
"
auto
"
width
:
"
auto
"
},
},
...
@@ -865,6 +868,34 @@ class LtlStudy extends React.Component {
...
@@ -865,6 +868,34 @@ class LtlStudy extends React.Component {
<
/Typography
>
<
/Typography
>
)}
)}
<
/div
>
<
/div
>
<
div
className
=
{
this
.
props
.
classes
.
livenessdiv
}
>
<
Typography
variant
=
"
body2
"
color
=
"
primary
"
>
Safety
-
Liveness
classification
<
/Typography
>
{
res
[
"
safety_liveness
"
]
===
"
safety
"
&&
(
<
Typography
>
This
formula
represents
<
b
>
a
safety
property
<
/b>
.
<
/Typography
>
)}
{
res
[
"
safety_liveness
"
]
===
"
liveness
"
&&
(
<
Typography
>
This
formula
represents
<
b
>
a
liveness
property
<
/b>
.
<
/Typography
>
)}
{
res
[
"
safety_liveness
"
]
===
"
both
"
&&
(
<
Typography
>
This
formula
represents
both
<
b
>
a
safety
and
a
liveness
property
<
/b>
.
<
/Typography
>
)}
{
res
[
"
safety_liveness
"
]
===
"
none
"
&&
(
<
Typography
>
This
formula
is
neither
a
safety
nor
a
liveness
property
.
However
it
necessarily
is
the
{
'
'
}
<
b
>
intersection
<
/b> of a liveness and a safety property
.
<
/Typography
>
)}
<
/div
>
<
div
className
=
{
this
.
props
.
classes
.
satisfiabilitydiv
}
>
<
div
className
=
{
this
.
props
.
classes
.
satisfiabilitydiv
}
>
<
Typography
variant
=
"
body2
"
color
=
"
primary
"
>
<
Typography
variant
=
"
body2
"
color
=
"
primary
"
>
Satisfiability
Satisfiability
...
...
server/spotapi.py
View file @
dd5ddbd7
...
@@ -220,7 +220,8 @@ mp_class_to_english = {
...
@@ -220,7 +220,8 @@ mp_class_to_english = {
# mp_hierarchy_svg: '<svg...'
# mp_hierarchy_svg: '<svg...'
# acc_word: 'word', (an example of accepting word, or null)
# acc_word: 'word', (an example of accepting word, or null)
# rej_word: 'word', (an example of rejecting word, or null)
# rej_word: 'word', (an example of rejecting word, or null)
# stutter_invariant: False (or True, or 'no X')
# stutter_invariant: False, (or True, or 'no X')
# safety_liveness: 'safety' (or 'liveness', or 'both', or 'none')
# }
# }
@
app
.
route
(
'/api/study/<path:ltlformula>'
)
@
app
.
route
(
'/api/study/<path:ltlformula>'
)
@
cachecontrol
()
@
cachecontrol
()
...
@@ -294,6 +295,17 @@ def study(ltlformula, method='GET'):
...
@@ -294,6 +295,17 @@ def study(ltlformula, method='GET'):
else
:
else
:
result
[
'rej_word'
]
=
None
;
result
[
'rej_word'
]
=
None
;
if
spot
.
is_liveness_automaton
(
pos
):
if
mp_class
in
(
'S'
,
'B'
):
result
[
'safety_liveness'
]
=
'both'
else
:
result
[
'safety_liveness'
]
=
'liveness'
else
:
if
mp_class
in
(
'S'
,
'B'
):
result
[
'safety_liveness'
]
=
'safety'
else
:
result
[
'safety_liveness'
]
=
'none'
return
jsonify
(
result
)
return
jsonify
(
result
)
# Input parameters
# Input parameters
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment