Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
tiamo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
4
Issues
4
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Maximilien COLANGE
tiamo
Commits
bc9ea5d3
Commit
bc9ea5d3
authored
Dec 15, 2015
by
Maximilien Colange
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Store M bounds per discrete state.
parent
bbf37934
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
3 deletions
+24
-3
src/reachability.ml
src/reachability.ml
+1
-2
src/timedAutomaton.ml
src/timedAutomaton.ml
+23
-1
No files found.
src/reachability.ml
View file @
bc9ea5d3
...
...
@@ -91,8 +91,7 @@ struct
type
arg_t
=
TA
.
timed_automaton
*
TA
.
discrete_state
let
inclusion
(
ta
,
loc
)
z1
z2
=
let
bounds
=
TA
.
global_m_bounds
ta
in
let
mbounds
=
Udbml
.
Carray
.
to_c
bounds
(
Array
.
length
bounds
)
in
let
mbounds
=
TA
.
m_bounds
ta
loc
in
Udbml_priced
.
PDbm
.
square_inclusion_exp
z1
z2
mbounds
end
...
...
src/timedAutomaton.ml
View file @
bc9ea5d3
...
...
@@ -28,6 +28,7 @@ sig
val
is_urgent_or_committed
:
timed_automaton
->
discrete_state
->
bool
val
is_target
:
timed_automaton
->
discrete_state
->
bool
val
lu_bounds
:
timed_automaton
->
discrete_state
->
Udbml
.
Carray
.
t
*
Udbml
.
Carray
.
t
val
m_bounds
:
timed_automaton
->
discrete_state
->
Udbml
.
Carray
.
t
val
global_m_bounds
:
timed_automaton
->
int
array
val
global_m_invariant
:
timed_automaton
->
UDbm
.
Dbm
.
t
(** print functions *)
...
...
@@ -283,6 +284,7 @@ struct
query
:
query
;
lubounds_tbl
:
(
int
array
*
int
array
)
DSHashtbl
.
t
;
lubounds_tbl_c
:
(
Udbml
.
Carray
.
t
*
Udbml
.
Carray
.
t
)
DSHashtbl
.
t
;
mbounds_tbl_c
:
Udbml
.
Carray
.
t
DSHashtbl
.
t
;
guards_tbl
:
UDbm
.
Dbm
.
t
GuardHashtbl
.
t
;
invars_tbl
:
UDbm
.
Dbm
.
t
DSHashtbl
.
t
;
global_mbounds
:
int
array
;
...
...
@@ -717,6 +719,20 @@ struct
DSHashtbl
.
add
ta
.
lubounds_tbl_c
state
(
lar
,
uar
);
(
lar
,
uar
)
let
m_bounds
ta
state
=
try
DSHashtbl
.
find
ta
.
mbounds_tbl_c
state
with
Not_found
->
let
nclocks
=
VarContext
.
size
ta
.
clocks
in
let
lower
,
upper
=
DSHashtbl
.
find
ta
.
lubounds_tbl
state
in
let
mbound
=
Array
.
make
nclocks
0
in
for
cl
=
0
to
nclocks
-
1
do
mbound
.
(
cl
)
<-
max
lower
.
(
cl
)
upper
.
(
cl
)
done
;
let
res
=
Udbml
.
Carray
.
to_c
mbound
nclocks
in
DSHashtbl
.
add
ta
.
mbounds_tbl_c
state
res
;
res
let
global_m_bounds
ta
=
if
(
ta
.
global_mbounds
.
(
0
)
<>
0
)
then
(
let
nclocks
=
VarContext
.
size
(
clocks
ta
)
in
...
...
@@ -885,7 +901,12 @@ struct
Stack
.
push
(
succ
,
succ_edges
)
trace
end
end
done
done
;
DSHashtbl
.
iter
(
fun
_
->
fun
(
lbound
,
ubound
)
->
for
cl
=
0
to
nclocks
-
1
do
if
(
lbound
.
(
cl
)
<
0
)
then
lbound
.
(
cl
)
<-
0
;
if
(
ubound
.
(
cl
)
<
0
)
then
ubound
.
(
cl
)
<-
0
done
)
ta
.
lubounds_tbl
(** Constructs a timed_automaton from the C data structure produced by the
* library utap.
...
...
@@ -945,6 +966,7 @@ struct
query
=
query
;
lubounds_tbl
=
DSHashtbl
.
create
1024
;
lubounds_tbl_c
=
DSHashtbl
.
create
1024
;
mbounds_tbl_c
=
DSHashtbl
.
create
1024
;
guards_tbl
=
GuardHashtbl
.
create
1024
;
invars_tbl
=
DSHashtbl
.
create
1024
;
global_mbounds
=
Array
.
make
(
VarContext
.
size
clocks
)
(
-
Dbm
.
infty
)
...
...
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