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
429bfc9a
Commit
429bfc9a
authored
Jun 09, 2014
by
Julien Lopez
Browse files
Fix decompose_rec
parent
5fc1b0db
Changes
1
Hide whitespace changes
Inline
Side-by-side
types/types.ml
View file @
429bfc9a
...
...
@@ -2451,16 +2451,22 @@ struct
(
decompose_type
y
)
)
(
Pair
.
get
bdd
)
[]
))
dnf
acc
and
aux2
acc
=
function
|
(
l
,
(
b
,
t
))
::
rest
->
aux2
(
acc
@
[
b
,
l
,
t
])
rest
|
(
l
,
(
b
,
t
))
::
rest
->
aux2
(
acc
@
[
b
,
l
,
decompose_type
t
])
rest
|
_
->
assert
false
and
aux
acc
make
=
function
|
(
l
,
_
(*???*)
,
b
)
::
rest
->
aux
(
acc
@
[
make
b
(
aux2
[]
l
)])
make
rest
|
[]
->
acc
and
_format_dnf
acc
=
function
|
(
`Atm
a
)
::
rest
->
_format_dnf
(
acc
@
[
`Atm
a
])
rest
|
(
`Var
x
)
::
rest
->
_format_dnf
(
acc
@
[
`Var
x
])
rest
|
[]
->
acc
and
format_dnf
acc
=
function
|
(
l1
,
l2
)
::
rest
->
format_dnf
acc
[
_format_dnf
[]
l1
,
_format_dnf
[]
l2
]
|
[]
->
acc
and
decompose_rec
any
make
dnf
acc
=
let
dnf
=
format_dnf
[]
dnf
in
decompose_kind
any
(
fun
bdd
->
cup
(
aux
[]
make
(
Record
.
get
bdd
)))
dnf
acc
(* ignore(decompose_kind any (fun bdd ->
cup (decompose_dnf (ty any) (aux [] make) (Record.get bdd) [])) dnf acc); [{def=`Type(empty); node=None}]*)
and
decompose_type
t
=
try
DescrHash
.
find
memo
t
...
...
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