[sc34wg3] CTM: Endless loops due to template invocations

Lars Heuer heuer at semagia.com
Sat Nov 3 13:47:25 EDT 2007


In CTM it is possible to invoke a template within a template and this
might lead into an endless loop.

Example:

        def tpl-a($x, $y)
            tpl-a($x, $y)
        end

Since we do not have conditions in CTM the "tpl-a" gets called over
and over again.

I am afraid, that we cannot avoid such problems (unless we introduce
mechanisms to break that loop), but we should make at least note in
the CTM spec. (The example above is quite simple, but things can get
more complicated if tpl-a is called by tpl-b and tpl-a calls tpl-b
etc.)

Opinions?

Best regards,
Lars
-- 
http://www.semagia.com



More information about the sc34wg3 mailing list