Skip to content
GitLab
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
c1bc6a72
Commit
c1bc6a72
authored
Jul 07, 2014
by
Kim Nguyễn
Browse files
Do not generate any constraint (even trivial ones) for monomorphic variables.
parent
d7d6e9b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
types/types.ml
View file @
c1bc6a72
...
...
@@ -2791,12 +2791,13 @@ module Tallying = struct
with
Not_found
->
inf
,
sup
in
if
Var
.
Set
.
mem
v
delta
then
if
((
equal
inf
empty
)
&&
(
equal
sup
any
))
||
if
Var
.
Set
.
mem
v
delta
then
map
(*
if ((equal inf empty) && (equal sup any)) ||
(equal (var v) inf && equal (var v) sup) then
map
else
raise (UnSatConstr (Format.sprintf "%s is a monomorphic variable" (Utils.string_of_formatter Var.pp v)))
*)
else
VarMap
.
add
v
(
new_i
,
new_s
)
map
...
...
@@ -2945,14 +2946,14 @@ module Tallying = struct
let
singleton
delta
=
function
|
Pos
(
v
,
s
)
->
if
Var
.
Set
.
mem
v
delta
then
if
equal
s
any
||
equal
(
var
v
)
s
then
S
.
singleton
M
.
empty
else
raise
(
UnSatConstr
(
Format
.
sprintf
"%s is a monomorphic variable"
(
Utils
.
string_of_formatter
Var
.
pp
v
)))
(*
if equal s any || equal (var v) s then
*)
S
.
singleton
M
.
empty
(*
else raise (UnSatConstr (Format.sprintf "%s is a monomorphic variable" (Utils.string_of_formatter Var.pp v)))
*)
else
S
.
singleton
(
M
.
singleton
v
(
empty
,
s
))
|
Neg
(
s
,
v
)
->
if
Var
.
Set
.
mem
v
delta
then
if
equal
s
any
||
equal
(
var
v
)
s
then
S
.
singleton
M
.
empty
else
raise
(
UnSatConstr
(
Format
.
sprintf
"%s is a monomorphic variable"
(
Utils
.
string_of_formatter
Var
.
pp
v
)))
(*
if equal s any || equal (var v) s then
*)
S
.
singleton
M
.
empty
(*
else raise (UnSatConstr (Format.sprintf "%s is a monomorphic variable" (Utils.string_of_formatter Var.pp v)))
*)
else
S
.
singleton
(
M
.
singleton
v
(
s
,
any
))
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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