2023-03-09 09:19:05 -05:00
|
|
|
|
2023-02-22 23:03:42 -05:00
|
|
|
<package xmlns="http://www.lovullo.com/rater"
|
|
|
|
xmlns:c="http://www.lovullo.com/calc"
|
|
|
|
xmlns:t="http://www.lovullo.com/rater/apply-template">
|
|
|
|
|
2023-02-28 15:31:49 -05:00
|
|
|
<template name="_empty_" />
|
2023-03-07 12:41:47 -05:00
|
|
|
|
2023-03-08 14:47:31 -05:00
|
|
|
<template name="_with-static-reachable_">
|
2023-03-08 23:49:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-08 14:47:31 -05:00
|
|
|
<rate yields="tplStaticA">
|
|
|
|
<c:sum />
|
|
|
|
</rate>
|
|
|
|
<classify as="tpl-static-b">
|
|
|
|
<any />
|
|
|
|
</classify>
|
|
|
|
</template>
|
2023-03-08 23:44:40 -05:00
|
|
|
|
|
|
|
<template name="_with-static-unreachable_">
|
2023-03-08 23:49:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-08 23:44:40 -05:00
|
|
|
<c:sum>
|
|
|
|
<c:product />
|
|
|
|
</c:sum>
|
|
|
|
|
|
|
|
<c:product>
|
|
|
|
<c:sum />
|
|
|
|
</c:product>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<template name="_with-static-mix-reachability_">
|
2023-03-08 23:49:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-08 23:44:40 -05:00
|
|
|
<c:sum>
|
|
|
|
<c:product />
|
|
|
|
</c:sum>
|
|
|
|
|
|
|
|
<c:product>
|
|
|
|
<c:sum />
|
|
|
|
</c:product>
|
|
|
|
|
2023-03-08 23:49:03 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tamer: Very basic support for template application NIR -> xmli
This this a big change that's difficult to break up, and I don't have the
energy after it.
This introduces nullary template application, short- and long-form. Note
that a body of the short form is a `@values@` argument, so that's not
supported yet.
This continues to formalize the idea of what "template application" and
"template expansion" mean in TAMER. It makes a separate `TplApply`
unnecessary, because now application is simply a reference to a
template. Expansion and application are one and the same: when a template
expands, it'll re-bind metavariables to the parent context. So in a
template context, this amounts to application.
But applying a closed template will have nothing to bind, and so is
equivalent to expansion. And since `Meta` objects are not valid outside of
a `Tpl` context, applying a non-closed template outside of another template
will be invalid.
So we get all of this with a single primitive (getting the "value" of a
template).
The expansion is conceptually like `,@` in Lisp, where we're splicing trees.
It's a mess in some spots, but I want to get this committed before I do a
little bit of cleanup.
2023-03-17 10:25:56 -04:00
|
|
|
|
|
|
|
|
2023-03-08 23:44:40 -05:00
|
|
|
<rate yields="tplStaticMix" />
|
|
|
|
|
|
|
|
<c:sum>
|
|
|
|
<c:product />
|
|
|
|
</c:sum>
|
|
|
|
</template>
|
tamer: Very basic support for template application NIR -> xmli
This this a big change that's difficult to break up, and I don't have the
energy after it.
This introduces nullary template application, short- and long-form. Note
that a body of the short form is a `@values@` argument, so that's not
supported yet.
This continues to formalize the idea of what "template application" and
"template expansion" mean in TAMER. It makes a separate `TplApply`
unnecessary, because now application is simply a reference to a
template. Expansion and application are one and the same: when a template
expands, it'll re-bind metavariables to the parent context. So in a
template context, this amounts to application.
But applying a closed template will have nothing to bind, and so is
equivalent to expansion. And since `Meta` objects are not valid outside of
a `Tpl` context, applying a non-closed template outside of another template
will be invalid.
So we get all of this with a single primitive (getting the "value" of a
template).
The expansion is conceptually like `,@` in Lisp, where we're splicing trees.
It's a mess in some spots, but I want to get this committed before I do a
little bit of cleanup.
2023-03-17 10:25:56 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<apply-template name="_short-hand-nullary_" />
|
2023-02-24 23:01:02 -05:00
|
|
|
</package>
|
2023-03-09 09:19:05 -05:00
|
|
|
|