Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spot-web-app
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
3
Issues
3
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spot
spot-web-app
Commits
6a0453ab
Commit
6a0453ab
authored
May 24, 2019
by
Alexandre Duret-Lutz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix
spot#388
parent
518a9608
Pipeline
#9413
passed with stage
in 1 minute and 51 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
1 deletion
+12
-1
server/spotapi.py
server/spotapi.py
+12
-1
No files found.
server/spotapi.py
View file @
6a0453ab
...
...
@@ -35,6 +35,7 @@ CORS(app)
os
.
environ
[
'SPOT_DOTEXTRA'
]
=
'size="6,12" edge[arrowhead=vee, arrowsize=.7]'
import
spot
import
buddy
from
spot.aux
import
str_to_svg
from
functools
import
wraps
...
...
@@ -210,6 +211,13 @@ mp_class_to_english = {
'T'
:
"a reactivity property"
,
}
# Until Spot supports this feature, we reimplement it.
def
refine_word
(
word
,
ap
):
for
idx
,
letter
in
enumerate
(
word
.
prefix
):
word
.
prefix
[
idx
]
=
buddy
.
bdd_satoneset
(
letter
,
ap
,
buddy
.
bddfalse
)
for
idx
,
letter
in
enumerate
(
word
.
cycle
):
word
.
cycle
[
idx
]
=
buddy
.
bdd_satoneset
(
letter
,
ap
,
buddy
.
bddfalse
)
# Output
#
# on syntax error: { parse_error: "text" }
...
...
@@ -228,7 +236,6 @@ mp_class_to_english = {
# stutter_invariant_eq is only given if stutter_invariant=true (not 'no X'),
# and simplifying the input ltlformula gives a syntactically stutter-invariant
# formula.
@
app
.
route
(
'/api/study/<path:ltlformula>'
)
@
cachecontrol
()
def
study
(
ltlformula
,
method
=
'GET'
):
...
...
@@ -310,6 +317,10 @@ def study(ltlformula, method='GET'):
else
:
result
[
'stutter_invariant'
]
=
False
word
.
simplify
()
# make sure this words uses all atomic propositions, otherwise
# word2 might use more propositions and the diagnostic will be
# confusing.
refine_word
(
word
,
pos
.
ap_vars
())
waut
=
word
.
as_automaton
()
if
waut
.
intersects
(
pos
):
word2
=
spot
.
sl2
(
waut
).
intersecting_word
(
neg
)
...
...
Write
Preview
Markdown
is supported
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