caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* how to upset the ocaml type system....
@ 2007-08-28 13:18 Pietro Abate
  2007-08-28 21:21 ` [Caml-list] " David Allsopp
  2007-08-29  0:56 ` Daniel de Rauglaudre
  0 siblings, 2 replies; 7+ messages in thread
From: Pietro Abate @ 2007-08-28 13:18 UTC (permalink / raw)
  To: ocaml ml

hi all,

the other day I was looking for a fringe case to show me the worst
complexity of the type inference algorithm...

I think I found what I was looking for:

let x1 = fun x -> (x,x) in
let x2 = fun y -> x1 ( x1 y ) in
let x3 = fun y -> x2 ( x2 y ) in 
let x4 = fun y -> x3 ( x3 y ) in
let x5 = fun y -> x4 ( x4 y ) in
let x6 = fun y -> x5 ( x5 y ) in
let x7 = fun y -> x6 ( x6 y ) in
x7 ( fun z -> z ) ;;

are there any other examples that exhibit worst-case complexity ?

pietro

ps: the example is from the paper "polymorphic unification and ML
typing" from kannellakis

-- 
++ Blog: http://blog.rsise.anu.edu.au/?q=pietro
++ 
++ "All great truths begin as blasphemies." -George Bernard Shaw
++ Please avoid sending me Word or PowerPoint attachments.
   See http://www.fsf.org/philosophy/no-word-attachments.html


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2007-08-29 16:15 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-08-28 13:18 how to upset the ocaml type system Pietro Abate
2007-08-28 21:21 ` [Caml-list] " David Allsopp
2007-08-29  0:56 ` Daniel de Rauglaudre
2007-08-29 10:57   ` Christophe Raffalli
2007-08-29 14:58     ` Oliver Bandel
2007-08-29 15:48       ` Daniel de Rauglaudre
2007-08-29 16:15     ` Christophe Raffalli

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).