Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Forth > Is there a hole...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 11 Topic 3850 of 4173
Post > Topic >>

Is there a hole in the SEARCH wordset?

by Bruce McFarling <agila61@[EMAIL PROTECTED] > Mar 11, 2008 at 10:49 AM

Reading the Forth-94 draft proposal, it reads as if the SEARCH words
are supposed to provide a general foundation for building a wordlist
management system.

However, it does not seem that the capability of FORTH in SEARCH EXT
can necessarily be duplicated.

-1 SET-ORDER

and you are faced with whatever the system thinks is a minimal search-
order, with FORTH-WORDLIST and SET-ORDER is guaranteed to to be
available.

But you cannot necessarily *use* SET-ORDER to *bring* FORTH-WORDLIST
into the search order.

That is, (1) SET-ORDER needs a set of wordlists and a count.

(2) The only wordlist you can guarantee that you know about is FORTH-
WORDLIST

And (3) ``FORTH-WORDLIST 1 SET-ORDER'' is not guaranteed to work.

FORTH-WORDLIST has to provide the FORTH core when replacing the top of
the search order stack, but a system is not required to function with
nothing but FORTH-WORDLIST on the search-order stack. It is within its
rights to trap that as an error and abort.

And GET-ORDER is not guaranteed to be available, so you can't
necessarily do:

-1 SET-ORDER GET-ORDER FORTH-WORDLIST SWAP 1+ SET-ORDER

Of course, if you have FORTH from the SEARCH EXT wordset, and it
happens to be included in the minimal wordset from your
implementation ... well, then you are OK.

This is a bootstrapping trap-door, because intrinisically when you
drop down to the minimal search-order without knowledge of
implementation details, you are necessarily going to risk losing
access to everything you would normally use to boostrap around it ...
indeed, you are highly likely lose the ability to boostrap [UNDEFINED]
when in any minimal search order that is anything close to minimal.

You can't avoid the trapdoor by ticking GET-ORDER before reducing the
wordset, because EXECUTE is not guaranteed to be in the minimal search
order.

The bootstrap available is to try one thing, warning the user that it
might not work, and have alternatives available as \ comments to be
swapped around in a file editor, in case it fails as distributed.

Eliminating the trapdoor:
1. Adding FORTH to the minimal search order (gforth implements this)
2. FORTH-WORDLIST 1 SET-ORDER establishes the minimal search order
that includes FORTH-WORDLIST, even if that involves more things
underneath FORTH-WORDLIST to operate correctly
3. GET-ORDER is in the minimal search order.

If 1 or 2 is a preferable extension of the specification of SET-ORDER,
maybe that could be Forth200x.

Note that for 2, wherever ``FORTH-WORDLIST 1 SET-ORDER'' already works
and yields a functioning system with the Forth CORE, that is what it
should do ... the only change is extending SET-ORDER to convert
( forth-wordlist-wid 1 -- ) into the equivalent of that, in systems
where it presently creates an error state or error abort.
 




 11 Posts in Topic:
Is there a hole in the SEARCH wordset?
Bruce McFarling <agila  2008-03-11 10:49:25 
Re: Is there a hole in the SEARCH wordset?
Josh Grams <josh@[EMAI  2008-03-11 14:11:27 
Re: Is there a hole in the SEARCH wordset?
Bruce McFarling <agila  2008-03-11 14:32:06 
Re: Is there a hole in the SEARCH wordset?
Josh Grams <josh@[EMAI  2008-03-12 05:02:07 
Re: Is there a hole in the SEARCH wordset?
Bruce McFarling <agila  2008-03-12 08:30:09 
Re: Is there a hole in the SEARCH wordset?
anton@[EMAIL PROTECTED]   2008-03-13 11:07:21 
Re: Is there a hole in the SEARCH wordset?
Neal Bridges <quartus  2008-03-12 09:09:39 
Re: Is there a hole in the SEARCH wordset?
Bruce McFarling <agila  2008-03-12 10:07:50 
Re: Is there a hole in the SEARCH wordset?
m_l_g3@[EMAIL PROTECTED]   2008-03-12 10:30:37 
Re: Is there a hole in the SEARCH wordset?
anton@[EMAIL PROTECTED]   2008-03-13 11:10:55 
Re: Is there a hole in the SEARCH wordset?
Bruce McFarling <agila  2008-03-13 05:45:00 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Sat Jul 26 4:25:56 CDT 2008.