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
3517a2b3
Commit
3517a2b3
authored
Jun 10, 2014
by
Pietro Abate
Browse files
Compte delta in abstr-inf
parent
d8f4a2b7
Changes
2
Show whitespace changes
Inline
Side-by-side
types/types.ml
View file @
3517a2b3
...
...
@@ -3395,7 +3395,7 @@ exception FoundSquareSub of Tallying.CS.sl * bool
let
squaresubtype
delta
s
t
=
DescrHash
.
clear
Tallying
.
memo_norm
;
assert
(
Var
.
Set
.
is_empty
(
all_vars
t
));
assert
(
Var
.
Set
.
is_empty
(
Var
.
Set
.
diff
(
all_vars
t
)
delta
)
);
let
ai
=
ref
[
|
|
]
in
let
tallying
i
=
try
...
...
typing/typer.ml
View file @
3517a2b3
...
...
@@ -822,9 +822,7 @@ let require loc t s =
if
not
(
Types
.
subtype
t
s
)
then
raise_loc
loc
(
Constraint
(
t
,
s
))
let
verify
loc
t
s
=
Format
.
printf
"VERIFY %a < %a
\n
"
Types
.
Print
.
print
t
Types
.
Print
.
print
s
;
require
loc
t
s
;
Format
.
printf
"VERIFY TRUE
\n
"
;
t
let
verify_noloc
t
s
=
...
...
@@ -887,6 +885,18 @@ and type_check' loc env ed constr precise = match ed with
in
(* update \delta with all variables in t1 -> t2 *)
let
deltaintf
=
let
union
(
t1
,
t2
)
=
Var
.
Set
.
union
(
Types
.
all_vars
(
t1
))
(
Types
.
all_vars
(
t2
))
in
match
a
.
fun_iface
with
|
[]
->
Var
.
Set
.
empty
|
head
::
tail
->
List
.
fold_left
(
fun
acc
inf
->
Var
.
Set
.
inter
(
union
inf
)
acc
)
(
union
head
)
tail
in
let
env
=
{
env
with
delta
=
Var
.
Set
.
union
env
.
delta
deltaintf
}
in
(* I check the body with all possible t1 -> t2 types *)
let
sll
=
List
.
fold_left
(
fun
tacc
(
t1
,
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