Path: news.daimi.aau.dk!jlk From: jlk@daimi.aau.dk (J|rgen Lindskov Knudsen) Newsgroups: comp.lang.beta Subject: Re: Ast overflow when compiling large files Date: 28 Feb 1996 07:23:42 GMT Organization: DAIMI, Computer Science Dept. at Aarhus University Lines: 69 Message-ID: <4h0vtu$m57@gjallar.daimi.aau.dk> References: <4gpc6n$k7u@fbi-news.Informatik.Uni-Dortmund.DE> Reply-To: jlknudsen@daimi.aau.dk (Jorgen Lindskov Knudsen) NNTP-Posting-Host: lithium.daimi.aau.dk In <4gpc6n$k7u@fbi-news.Informatik.Uni-Dortmund.DE> Thus spake truemp00@marvin.informatik.uni-dortmund.de (Andreas Truemper): >Hello! >We (students of information science at University of Dortmund, Germany), >are trying to program a CARSHARING system during our "Software-Praktikum". >We use a Tcl/TK-like tool to build our GUI which automatically generates >Beta-SourceCode with a list of Labels, Buttons etc. >This generated file is about 200KB; trying to compile the file, we got >the error-message "Ast overflow - File is to large, you'll have to split >this file into smaller parts". >Of course we have already separated the project into Beta-classes, but >the GUI has to be in one file, I don't know how we could split this >file into smaller fragments. 200 KB isn't rellay that much, because >our computers have about 24 MB of memory, so I think there has to be >another solution !? >Any help for this problem would be greatly appreciated. >Regards, >Andreas Trümper There is a definite upper limit on the size of the AST representation for a BETA program. The limit is due to limitations in the internal representation in the datastructures, representing the AST on files and in memory. The limit is not related to available RAM. The error message, you are reporting, originates from exactly this problem - your file has become too big to be compiled in one chunck. Usually this size limit is not a problem, but automatically generated code tends to 'explode'. Without knowing the details of your generated code, or the tool your are using for the generation, let me suggest, that you generate the code in two steps (on multiple files). The first file contain the API of the generated code (i.e. the patterns, and the interfaces of these patterns, but no imperatives), and then generate one (or more) files containing the imperatives for each 'method', located in a fragment, associated with a SLOT, which have been generated in the first API file. This would reduce the size of the two files, hopefully below the 'magic' limit. Please ask again, if this is not sufficient, then we might be able to find another solution. Regards, Jorgen Lindskov Knudsen, Mjolner Informatics Science Park Aarhus, Gustaw Vieds Vej 10, DK-8000 Aarhus C, DENMARK E-mail: jlknudsen@mjolner.dk, Phone: +45 86 20 20 00, Fax: +45 86 20 12 22 ************ BETA information Sources ************************ * WWW: http://www.mjolner.dk * * http://www.daimi.aau.dk/~beta/info * * News: comp.lang.beta * * FAQ: http://www.daimi.aau.dk/~beta/FAQ * * E-mail: info@mjolner.dk * * Address: Mjolner Informatics, Science Park Aarhus, * * Gustav Wieds Vej 10, DK-8000, Aarhus C, DENMARK * * Tel.: +45 86 20 20 00 * * Fax.: +45 86 20 12 22 * **************************************************************