STR-545: Dynamically scoped strategy definitions
Dynamically scoped strategy definitions are useful to adapt a generic strategy without having to parameterize the strategy with all modification points or to globally extend strategy definitions. The mechanism should use a scoping mechanism as in dynamic rules to automatically undefine the definitions after they are no longer needed.
nullness-start =
{| TypestateSpecific, TypestateExp, TypestateCombine, Redef-TypestateOf
: strategies(
TypestateSpecific = nullness-specific
TypestateExp = nullness-exp
TypestateCombine = nullness-combine
Redef-TypestateOf = redef-TypestateOf
)
; typestate
|}A quick implementation is by desugaring to dynamic rules:
nullness-start =
{| TypestateSpecific, TypestateExp, TypestateCombine, Redef-TypestateOf
: rules(
TypestateSpecific : _ ->
TypestateExp : _ ->
TypestateCombine : _ ->
Redef-TypestateOf : _ ->
)
; typestate
|}However, it should be possible to redefine existing `static’ strategy definitions in this way.
(or shouldn’t it be possible to do that?)(Thanks to Peter Nagel for the suggestion.)
Submitted on 29 March 2006 at 12:29
Issue Log
Log in to post comments