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
0f62b2aa
Commit
0f62b2aa
authored
Jul 10, 2007
by
Pietro Abate
Browse files
[r2005-06-13 15:25:20 by afrisch] Simplifications
Original author: afrisch Date: 2005-06-13 15:25:20+00:00
parent
f84d5b39
Changes
1
Hide whitespace changes
Inline
Side-by-side
types/patterns.ml
View file @
0f62b2aa
...
...
@@ -918,10 +918,10 @@ module Normal = struct
let
vs_nil
=
facto
Factorize
.
nil
t0
xs
pl
in
(
vs_var
,
vs_nil
,
(
pl
,
t
,
xs
))
let
normal
f
l
t
pl
xs
=
let
normal
l
t
pl
xs
=
let
a
=
nconstr
l
t
in
let
vs_var
=
facto
Factorize
.
var
t
xs
pl
in
(*
let vs_var = facto Factorize.var t xs pl in
let xs = IdSet.diff xs vs_var in
let vs_var,a =
if f then vs_var,a
...
...
@@ -937,16 +937,13 @@ module Normal = struct
IdSet.empty,
List.fold_left
(fun a x -> ncap a (nconstant l x Sequence.nil_cst)) a vs_nil in
*)
vs_var
,
vs_nil
,
List
.
fold_left
(
fun
a
p
->
ncap
a
(
nnormal
l
(
descr
p
)
xs
))
a
pl
let
nnf
facto
lab
t0
(
pl
,
t
,
xs
)
=
let
t
=
if
Types
.
subtype
t
t0
then
t
else
Types
.
cap
t
t0
in
(* let ppf = Format.std_formatter in
Format.fprintf ppf "normal nnf=%a@." Nnf.print (pl,t,xs); *)
normal
facto
lab
t
(
NodeSet
.
get
pl
)
xs
let
nnf
lab
t0
(
pl
,
t
,
xs
)
=
let
t
=
if
Types
.
subtype
t
t0
then
t
else
Types
.
cap
t
t0
in
normal
lab
t
(
NodeSet
.
get
pl
)
xs
(*
...
...
@@ -1416,10 +1413,7 @@ struct
match
disp
.
actions
with
|
Some
a
->
a
|
None
->
let
pl
=
Array
.
map
(
fun
n
->
let
_
,_,
p
=
Normal
.
nnf
false
disp
.
label
disp
.
t
n
in
p
)
disp
.
pl
in
let
pl
=
Array
.
map
(
Normal
.
nnf
disp
.
label
disp
.
t
)
disp
.
pl
in
let
a
=
combine_kind
(
dispatch_basic
disp
pl
)
...
...
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