Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.forth > #58553

Re: typical actual time for implementing kernel in a new architecture?

From Cecil Bayona <cbayona@cbayona.com>
Newsgroups comp.lang.forth
Subject Re: typical actual time for implementing kernel in a new architecture?
Date 2017-05-03 01:12 -0500
Organization A noiseless patient Spider
Message-ID <oebs6c$ot5$1@dont-email.me> (permalink)
References (1 earlier) <d263efb0-07c3-46f0-a5da-9598a7c7b66c@googlegroups.com> <oeah7i$247$1@dont-email.me> <fZKdnRO8BrafepXEnZ2dnUU7-SnNnZ2d@supernews.com> <oeaqj7$5l6$1@dont-email.me> <64267dbe-5934-433a-956a-8e554ef24f20@googlegroups.com>

Show all headers | View raw


On 5/3/2017 12:29 AM, minforth@arcor.de wrote:
> Am Dienstag, 2. Mai 2017 22:39:08 UTC+2 schrieb Cecil - k5nwa:

>> I have worked on text based optimizers in the past and was able to
>> generate extremely good code but the optimizer was very complex and not
>> very fast as I would have liked, but it was extremely flexible and quite
>> capable. Using a template file to control the conversion of the
>> generated code. It used a Balanced Tree + to store and manipulate the
>> code. Being highly recursive is what made it slower but also gave it the
>> capacity to generate code that looked like a decent programmer wrote it
>> by hand. A negative was that once the final code was generated it was
>> difficult to link it back to the original source as the final product
>> often bore no resemblance to the original code. But all of that was
>> controlled by the user and how many interacting rules one had.
>>
>> -- 
>> Cecil - k5nwa
> 
> Non-interactive Forth code can be stored in a simple linear database of lists, names being the list headers, code the list body as sequence of symbols or literal parameters. Once you have the database of a Forth kernel, pattern recognistion, peephole optimization, target code reduction are rather easy jobs. F.ex. recursion from the entry word (e.g. MAIN) is perfect to minimize the optimized target database.
> 
> Thereafter, to generate code from the target database, it is a more or less linear translation of the target database from top to bottom to assembler. Other backends could spill out direct machine code or whatever is needed.
> 
> Prolog is an excellent language to do this efficiently and with very compact program code. Adding/changing new optimizer rules is easy.
> 
> In the 80s I did all this with Turbo Prolog, but then had to move to other jobs. Perhaps I should revitalize it when I'm retired...
> 

I like Turbo Prolog, Borland did not write that software but marketed 
it, the originators had their enhanced version called PDC Prolog, now 
they have Visual Prolog, I have a copy of all three versions but my 
Visual Prolog is rather an old version its V5.3 , I believe the current 
version is 7.6, PDC and Turbo Prolog are DOS based so the will not even 
run in Windows 10.

Prolog is an interesting language that requires a different way of 
thinking but its very effective at certain kinds of problems, smart text 
processing being one of them. My funky translator/macro processor was 
written in C, unfortunately the code is lost, the original was written 
under CDOS an enhanced version of CPM for Z80 processors using my own 
homemade version of a C compiler, but with minor changes it was able to 
compile later under Turbo C.

-- 
Cecil - k5nwa

Back to comp.lang.forth | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

typical actual time for implementing kernel in a new architecture? Joel Rees <joel.rees@gmail.com> - 2017-05-01 02:24 -0700
  Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-01 17:40 +0200
    Re: typical actual time for implementing kernel in a new architecture? Ron Aaron <rambamist@gmail.com> - 2017-05-01 19:35 +0300
      Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-02 08:13 +0200
    Re: typical actual time for implementing kernel in a new architecture? Joel Rees <joel.rees@gmail.com> - 2017-05-01 15:17 -0700
      Re: typical actual time for implementing kernel in a new architecture? hughaguilar96@gmail.com - 2017-05-01 20:11 -0700
      Re: typical actual time for implementing kernel in a new architecture? Lars Brinkhoff <lars.spam@nocrew.org> - 2017-05-02 09:07 +0200
  Re: typical actual time for implementing kernel in a new architecture? Rod Pemberton <NeedNotReplyHere@xrsevnneqk.cem> - 2017-05-01 18:34 -0400
  Re: typical actual time for implementing kernel in a new architecture? "Elizabeth D. Rather" <erather@forth.com> - 2017-05-01 12:41 -1000
  Re: typical actual time for implementing kernel in a new architecture? hughaguilar96@gmail.com - 2017-05-01 19:33 -0700
  Re: typical actual time for implementing kernel in a new architecture? Mark Wills <markwills1970@gmail.com> - 2017-05-02 01:51 -0700
  Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-02 06:17 -0700
    Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 12:59 -0500
      Re: typical actual time for implementing kernel in a new architecture? "Elizabeth D. Rather" <erather@forth.com> - 2017-05-02 10:07 -1000
        Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 15:39 -0500
          Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-02 22:29 -0700
            Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-03 01:12 -0500
              Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-03 02:06 -0700
                Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-03 13:52 -0500
                Re: typical actual time for implementing kernel in a new architecture? minforth@arcor.de - 2017-05-03 22:23 -0700
                Re: typical actual time for implementing kernel in a new architecture? Ilya Tarasov <ilya74.tarasov@gmail.com> - 2017-05-04 04:59 -0700
    Re: typical actual time for implementing kernel in a new architecture? Rob Sciuk <rob@controlq.com> - 2017-05-08 15:38 -0400
  Re: typical actual time for implementing kernel in a new architecture? stephen@mpeforth.com (Stephen Pelc) - 2017-05-02 19:41 +0000
    Re: typical actual time for implementing kernel in a new architecture? Cecil Bayona <cbayona@cbayona.com> - 2017-05-02 15:25 -0500

csiph-web