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
cduce
cduce
Commits
7608d9a5
Commit
7608d9a5
authored
Aug 21, 2014
by
Pietro Abate
Browse files
Fix uppercase/lowercase variable bug
parent
0850fe98
Changes
1
Hide whitespace changes
Inline
Side-by-side
types/types.ml
View file @
7608d9a5
...
...
@@ -3189,6 +3189,14 @@ module Tallying = struct
(* check if there exists a toplevel variable : fun (pos,neg) *)
let
toplevel
delta
single
norm_rec
mem
p
n
=
let
_compare
delta
v1
v2
=
let
monov1
=
Var
.
Set
.
mem
v1
delta
in
let
monov2
=
Var
.
Set
.
mem
v2
delta
in
if
monov1
==
monov2
then
Var
.
compare
v1
v2
else
if
monov1
then
1
else
-
1
in
match
(
p
,
n
)
with
|
([]
,
(
`Var
x
)
::
neg
)
->
let
t
=
single
(
false
,
x
,
[]
,
neg
)
in
...
...
@@ -3199,7 +3207,7 @@ module Tallying = struct
CS
.
singleton
(
Pos
(
`Var
x
,
t
))
|
((
`Var
x
)
::
pos
,
(
`Var
y
)
::
neg
)
->
if
Var
.
compare
(
`Var
x
)
(
`Var
y
)
<
0
then
if
_
compare
delta
(
`Var
x
)
(
`Var
y
)
<
0
then
let
t
=
single
(
true
,
x
,
pos
,
n
)
in
CS
.
singleton
(
Pos
(
`Var
x
,
t
))
else
...
...
@@ -3223,6 +3231,7 @@ module Tallying = struct
let
rec
norm
(
t
,
delta
,
mem
)
=
(* if we already evaluated it, it is sat *)
let
res
=
if
DescrSet
.
mem
t
mem
||
is_empty
t
then
CS
.
sat
else
if
is_var
t
then
begin
(* if there is only one variable then is it A <= 0 or 1 <= A *)
...
...
@@ -3255,8 +3264,9 @@ module Tallying = struct
res
in
res
end
end
in
(* Format.printf "Normalizing %a yields %a\n%!" Print.pp_type t CS.pp_s res; *)
res
(* (t1,t2) = intersection of all (fst pos,snd pos) \in P
* (s1,s2) \in N
...
...
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