Global choice is useful. Find out why the CPL does not work anymore.

Submitted on 21 May 2004 at 11:04

On 27 May 2004 at 22:31 Jira commented:

STR-94, martin:
The problem seems to be rather trivial: autoxt.m4 doesn’t contain a flag for the CPL! The ++ and bagof operators work fine if the C code is compiled by hand.

There is another issue: if the ++ and bagof are not supported in StrategoXT by default, then we basically cannot really start using it in our code (and I want that!!).

Is it an option to start using the CPL by default?


On 25 June 2004 at 18:38 Jira commented:

STR-94, martin:
The global choice is back!

Relevant commit messages:
————————————————————————
r6568 | mbravenboer | 2004-06-25 16:32:12 +0000 (Fri, 25 Jun 2004) | 5 lines

     * spec/strc/strc-options.str: added "--choice-lib file" option for
     specifying the the choice point library to use. The "--cpl"
     options is also available if there is a libcpl-stratego.la
     available in the XTC repository. Thus, tools that require the CPL
     can now compiled at the command-line with strc.

r6553 | mbravenboer | 2004-06-25 12:20:34 +0000 (Fri, 25 Jun 2004) | 9 lines

     * Makefile.xt: Added the new stratego-choice library to LDADD and
     and STRATEGORUNLIBS. This library is the default choice point
     implementation, which is now separate from the runtime.

     * Makefile.xt: Added the 'relname' command to facilitate
     meta-package tools (buildfarm). 'make relname' writes the basename
     of distribution files (tarballs, rpms) to a file relname. This
     file can then read if a tool needs to now the name of the
     distribution.

r6552 | mbravenboer | 2004-06-25 12:17:52 +0000 (Fri, 25 Jun 2004) | 15 lines

     * srts/Makefile.am: build the choice point implementation in a
     separate library stratego-choice. Choice point implementations
     must implements the functions in srts/stratego-choice.h. The
     implementation of choice points is now completely separated from
     the runtime itself. Therefore it is now possible to plugin a
     difference choice point implementation without recompiling the
     entire runtime. The choice for a specific choice implementation is
     delayed until link time.

     Using the ++ with a choice point implementation that does not
     support the global choice (the standard implementation does not)
     will result in link error. The same holds for the bagof operator.

     * configure.in: removed configuration stuff for cpl-stratego.

r6551 | mbravenboer | 2004-06-25 10:56:17 +0000 (Fri, 25 Jun 2004) | 13 lines

     * src/stratego: added a binding of the CPL to the new choice point
     implementation interface of the SRTS.

     This moves the the choice between the CPL or the standard choice
     implementation in the SRTS to *link* time instead of *compile*
     time of the SRTS and your program. The result is that there you
     can use both choice point implementations with the same runtime,
     by just linking a program with the stratego-choice or the
     cpl-stratego library.

     A manual for linking with cpl-stratego will be at the Stratego
     Wiki. Strc will have a flag for stand-alone mode that links with
     the cpl-stratego library instead of stratego-choice.

The configuration in Makefile.xt can be improved somewhat more with a variable CHOICELIB that can be assigned. Will do this when I’m going to write a tutorial on how to use the CPL.

Log in to post comments