Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
wise-move
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
2
Issues
2
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wise-lab
wise-move
Commits
da99b1ff
Commit
da99b1ff
authored
Nov 18, 2018
by
Jae Young Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change LTL_test (independent module)
parent
2cedd22c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
13 deletions
+33
-13
model_checker/simple_intersection/LTL_test.py
model_checker/simple_intersection/LTL_test.py
+33
-13
No files found.
model_checker/simple_intersection/LTL_test.py
View file @
da99b1ff
from
.
import
LTLProperty
from
env.simple_intersection
import
APdict
from
model_checker.simple_intersection
import
LTLProperty
from
model_checker.simple_intersection.AP_dict
import
AP_dict_simple_intersection
from
model_checker
import
Parser
# TODO: Refactor LTL_test to model_checker part.
def
test_model_check
(
trace
):
def
test_model_check
(
LTL
,
trace
):
print
(
trace
)
for
i
in
range
(
0
,
len
(
trace
)):
LTL
.
check_incremental
(
trace
[
i
])
print
(
"incremental result:"
+
str
(
LTL
.
result
))
...
...
@@ -13,18 +15,36 @@ def test_model_check(trace):
print
(
"batch result:"
+
str
(
LTL
.
result
)
+
"
\n
"
)
print
(
"True: "
+
str
(
Parser
.
TRUE
))
print
(
"Undecided: "
+
str
(
Parser
.
UNDECIDED
))
print
(
"False: "
+
str
(
Parser
.
FALSE
))
LTL
=
LTLProperty
(
"G (has_entered_stop_region => (in_stop_region U has_stopped_in_stop_region) )"
,
-
100
)
trace
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
|
int
(
pow
(
2
,
AP_dict
[
'has_entered_stop_region'
]))
|
int
(
pow
(
2
,
AP_dict
[
'in_stop_region'
]))
]
print
(
trace
)
test_model_check
(
trace
)
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'has_entered_stop_region'
]))
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'in_stop_region'
]))]
test_model_check
(
LTL
,
trace
)
trace
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
|
int
(
pow
(
2
,
AP_dict
[
'has_entered_stop_region'
]))
|
int
(
pow
(
2
,
AP_dict
[
'in_stop_region'
])),
0
|
int
(
pow
(
2
,
AP_dict
[
'has_entered_stop_region'
]))
]
print
(
trace
)
test_model_check
(
trace
)
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'has_entered_stop_region'
]))
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'in_stop_region'
])),
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'has_entered_stop_region'
]))]
test_model_check
(
LTL
,
trace
)
PL
=
LTLProperty
(
"in_stop_region and stopped_now"
,
-
100
)
trace
=
[
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'stopped_now'
]))
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'in_stop_region'
])),
0
,
0
,
0
,
0
,
0
,
0
]
test_model_check
(
PL
,
trace
)
trace
=
[
0
|
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'in_stop_region'
])),
0
,
0
,
0
,
0
,
0
,
0
]
test_model_check
(
PL
,
trace
)
trace
=
[
0
|
int
(
pow
(
2
,
AP_dict_simple_intersection
[
'stopped_now'
]))
|
0
,
0
,
0
,
0
,
0
,
0
,
0
]
test_model_check
(
PL
,
trace
)
trace
=
[
0
,
0
,
0
,
0
,
0
,
0
,
0
]
test_model_check
(
PL
,
trace
)
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