Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Why3
why3
Commits
b408a39e
Commit
b408a39e
authored
Mar 01, 2010
by
Andrei Paskevich
Browse files
add missing cases to alpha_equal and match functions
parent
04e55786
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/core/term.ml
View file @
b408a39e
...
@@ -244,7 +244,7 @@ type binop =
...
@@ -244,7 +244,7 @@ type binop =
|
Fimplies
|
Fimplies
|
Fiff
|
Fiff
type
real_constant
=
type
real_constant
=
|
RConstDecimal
of
string
*
string
*
string
option
(* int / frac / exp *)
|
RConstDecimal
of
string
*
string
*
string
option
(* int / frac / exp *)
|
RConstHexa
of
string
*
string
*
string
|
RConstHexa
of
string
*
string
*
string
...
@@ -641,6 +641,8 @@ let rec t_equal_alpha t1 t2 =
...
@@ -641,6 +641,8 @@ let rec t_equal_alpha t1 t2 =
x1
==
x2
x1
==
x2
|
Tvar
v1
,
Tvar
v2
->
|
Tvar
v1
,
Tvar
v2
->
v1
==
v2
v1
==
v2
|
Tconst
c1
,
Tconst
c2
->
c1
=
c2
|
Tapp
(
s1
,
l1
)
,
Tapp
(
s2
,
l2
)
->
|
Tapp
(
s1
,
l1
)
,
Tapp
(
s2
,
l2
)
->
(* assert (List.length l1 == List.length l2); *)
(* assert (List.length l1 == List.length l2); *)
s1
==
s2
&&
List
.
for_all2
t_equal_alpha
l1
l2
s1
==
s2
&&
List
.
for_all2
t_equal_alpha
l1
l2
...
@@ -703,6 +705,8 @@ let rec t_match s t1 t2 =
...
@@ -703,6 +705,8 @@ let rec t_match s t1 t2 =
match
t1
.
t_node
,
t2
.
t_node
with
match
t1
.
t_node
,
t2
.
t_node
with
|
Tbvar
x1
,
Tbvar
x2
when
x1
==
x2
->
|
Tbvar
x1
,
Tbvar
x2
when
x1
==
x2
->
s
s
|
Tconst
c1
,
Tconst
c2
when
c1
=
c2
->
s
|
Tvar
v1
,
_
->
|
Tvar
v1
,
_
->
(
try
if
Mvs
.
find
v1
s
==
t2
then
s
else
raise
NoMatch
(
try
if
Mvs
.
find
v1
s
==
t2
then
s
else
raise
NoMatch
with
Not_found
->
if
t_closed
0
t2
with
Not_found
->
if
t_closed
0
t2
...
...
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