Hints for the Generalized Challenge:

Below, you can find another hint for the Generalized Challenge.

You should only get here after reading, digesting, and applying the .

Hint

We are looking for a program G that

That blueprint contains (in encoded form) the definition of function f(), which is read from input. The other part of the blueprint must be stored internally in G. The best way we have for doing so is to store it in encoded form, e.g., in the string variable BlueprintFixedPart.

To construct program G, we need to encode the fixed part of the blueprint of Pf. Note, however, that in this encoding, the character # does not play a special role, and should not be replaced by an insert-blueprint-here marker. Therefore, we generalize encode to take a second parameters providing the value to substitute for #.

Thus, program G has this structure:

The expression ... to define BlueprintFixedPart is obtained from the fixed part (also see the ), that is, from:

First, this fixed part is encoded, and then, in the result, # is replaced by the insert-blueprint-here marker ~@.

Can you now finish the implementation of program G?

Apply the hint [ Machine ]

It is your turn ...

Need Another Hint?

If you have no idea how to get started, or if you tried some programs and do not see how to proceed, then you are ready for the .


Valid HTML 4.01 Transitional

Copyright ©2010, Tom Verhoeff, T.Verhoeff@TUE.NL