From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id GAA05134; Thu, 10 Apr 2003 06:08:31 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id GAA05135 for ; Thu, 10 Apr 2003 06:08:29 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mail.fltrp.com ([211.101.185.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id h3A48O922831 for ; Thu, 10 Apr 2003 06:08:27 +0200 (MET DST) Received: from delbian [129.0.5.6] by mail.fltrp.com with ESMTP (SMTPD32-7.13) id ADE9AF00CE; Thu, 10 Apr 2003 12:07:05 +0800 From: Yang Shouxun Organization: FLTRP To: caml-list@inria.fr Subject: Parallel CPS? (was Re: [Caml-list] stack overflow) Date: Thu, 10 Apr 2003 12:12:25 +0800 User-Agent: KMail/1.5.1 References: <200304091723.30890.yangsx@fltrp.com> <20030409113404.GB21649@mail4.ai.univie.ac.at> In-Reply-To: <20030409113404.GB21649@mail4.ai.univie.ac.at> MIME-Version: 1.0 Content-Type: text/plain; charset="gb2312" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200304101213.02268.yangsx@fltrp.com> X-Spam: no; 0.00; shouxun:01 yangsx:01 fltrp:01 caml-list:01 isomorphism:01 context-free:99 annotated:01 computed:01 closure:01 int:01 overflow:02 continuation:02 binary:02 mottl:02 tree:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wednesday 09 April 2003 19:34, Markus Mottl wrote: > Funny, I am currently also applying my tool to NLP (natural language > processing): because of the isomorphism between context-free grammars and > algebraic datatyes, it is possible to learn propositions about derivation > trees (or even more general: learn non-recursive functions). The problem > there is rather the size of CFG extracted from a large, annotated > corpus for German (many, many thousands of productions), which really > looks messy. I was a linguistics students before switching to NLP. I can understand the situation. I guess you need simplify a little bit, just like pruning the decision tree. Your grammar need not 100% coverage of the corpus. > > I've learned this style in Scheme. Yet I feel paralyzed when trying to > > write in it to build trees. The type declaration may make my point > > clearer. --8<-- > > type dtree = Dnode of dnode | Dtree of (dnode * int * dtree list) > > --8<-- > > The problems are that unless the next call returns, the tree is not > > complete yet and it may have several calls on itself. > > But that's what the closure is for: it abstracts away the subtree that > still needs to be computed. What if the continuation is not sequential, but parallel? If the tree is uniformly binary branching, I guess it would be easier. > Given that you already run into problems for comparatively small sizes, > I suppose that you are using the byte-code interpreter? Its builtin > stack space is 256KB, i.e. 64K-words. Would you consider tens of thousands small size? > That would be great! - Thanks! Then I'll send a copy to you in private. Thanks for other listers as well. The major problem is what if the continuation is not singular (sequential) but parallel? Best! shouxun ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners