These provide a more pleasent abstraction than having to reference CMP_OP_*
constants.
* core/test/core/vector/interpolate.xml: {t:when=>t:where-eq}.
* core/test/core/vector/table.xml: Likewise, but using the other variants
where appropriate given the value of `@op'.
* core/vector/interpolate.xml: Likewise.
* core/vector/table.xml (_when_, _where_): Rename former to latter and
provide deprecation warning.
(_when-lt_, _when-lte_, _when-gt_, _when-gte_): Add abstractions.
* src/current/rater.xsd: Permit template variable as tenplate name.
This is fairly primitive support and it completely sidesteps the bisect
algorithm for now. The next commit will abstract this a little bit further
to make it less awkward to use.
* core/test/core/vector/table.xml: New test cases.
* core/vector/filter.xml (CmpOp): New typedef.
(mfilter): Document that bisecting will not happen unless `CMP_OP_EQ'
is used. Implement that restriction.
[op]: New parameter. Provide it to `mrange'.
(_mfilter, _mrange_cmp): Rename from `_mfilter'. Implement new comparison
check based on `op'
[op]: New argument.
* core/vector/table.xml (_when_)[@op@]: New param. Add it to the produced
vector.
(_mquery): Unpack op (from `_when_') in call to `mfilter'.
Just trying to clean up a little as I go to start to make it easier
to understand.
* core/vector/filter.xml: Use _when-*_ templates and c:recurse.
* core/vector/table.xml: Likewise.
* core/test/spec.xml (_describe_): Enclose aggregate classification in a
series of nested expand-sequence to work around bug (described in
comment), which was causing test cases to not be compiled.
This is a BC break since this generates assertions by default. To maintain
BC, set `@allow-zero@' and `@allow-negative@' to `true' in existing template
applications.
* core/insurance.xml
(assert_ignore_premium_zero, assert_ignore_premium_negative): New params.
(_premium_): Generate assertions.
[@allow-zero@, @allow-negative@]: New params.
This is the start of a working build for core.
* .gitignore: Ignore generated files from configuration and build.
* build.xml: Copy from rater repo. This is the last remaining ant-based
dependency and can be gotten rid of; see comments.
* configure.ac: New file.
* rater/build-aux, rater/src: New symlinks.
This was broken by a previous commit, but was not noticed because
the test cases aren't being compiled as part of the build yet!
Now that we have tamed, that is an option.
* test/core/insurance.xml: Add missing @desc@.
* assert.xml (_assert_)[@neg-desc@]: New param to allow setting the
description of the negative classification. This is especially useful
when humans are going to be reading the assertion classifications; it can
otherwise be very confusing.
* assert.xml (_assert_)[@neg-as@, @neg-yields@]: Rename from `@neg_as@' and
`@neg_yields' respectively.
This renames these params to be consistent with modern standards.
We want to do this before they're actually in use.
This won't be a problem in practice if nothing imports the
package, so existing systems won't be affected.
* datetime.xml: New assertion for timestamp_current.
* test/core/suite.xml: Import new fold test package.
* test/core/vector/fold.xml: New test package.
* vector/fold.xml: New package. Adds `_unfold-vector-grouped_'.
This would be better handled by better template arithmetic features, but
that's for another time.
* tplgen.xml (_for-each-n_): Add `current_n_dec' for caller body, which
decrements `current_n` by 1 (for 0-indexed values).
This makes it more unlikely to actually occur in a table lookup;
the previous value worried me.
* vector/filter.xml (TABLE_WHEN_MASK_VALUE): Decrease value.
These need to be re-thought, as they are now just confusing. For now,
things should just use the _assert_ primitive.
* assert.xml (_assert-nonzero_, _fail-on-empty_): Remove templates.
Keep things consistent. A deprecation warning will be displayed for
`_fail-on-empty_'.
* assert.xml (_assert-nonzero_): Rename from `_fail-on-empty'.
(_fail-on-empty_): Alias to `_assert-nonzero'. Display deprecation
warning.
This completely breaks BC by completely reversing existing behavior.
I'm not sure what I was thinking to begin with.
Assertions are supposed to state an _expected_ condition and fail if they
yield _false_; this is the opposite of what `_assert_' was doing before this
change!
To keep things simple, the template now requires a body and the extra
`@when@' and `@class@' params have been removed (but are still available on
`_fail-on-empty_').
* assert.xml (_assert_): Negate behavior.
[@when@, @class@]: Remove params.
This technically worked because the compiler produced correct JS code, but
it shouldn't have (there's just no validation here).
Recent changes to the summary page caused this to blow up when building the
suite.
Products of vectors and matrices respectively. It's surprising that this
was unneeded until now based on the requirements of the projects we have
done thusfar---dot products and other features have been sufficient.
* vector/arithmetic.xml (_vproduct_, _mproduct_): New templates.
(_vproduct, _mproduct): New functions.
This is much more general-purpose and is necessary when operating on more
than one list.
* vector/list.xml: Add numeric/common import, exported.
(_cons-until-empty_): Add @index@, incremented at each recursion.
Otherwise, they're not included in package eligibility classes.
@external will be removed at some point in the future anyway; it's no
longer needed.
* assert.xml (_assert_): Remove @external.
Information about the UI (generated for use with Liza) isn't public yet, but
it will be in the future; this provides some integration with it.
* test/core/sute.xml: Add ui test case.
* test/core/ui.xml: Added
* ui.xml: Added
* test/spec.xml (_given_): Honor new `@name' parameter instead of generating
a value.
(_it_): Modify docblock to indicate that arbitrary children are allowed
for definitions.
`join` was removed due to fundamental incompatibilities with how the new
compiler works. Instead, symbols are exposed via the template system and
are used to perform the equivalent of a join.
This uses the GNU Octave or MATLAB-style matrix definitions for tables,
which produces a single node instead of a node per field and row, which
results in a significantly smaller tree and drastically improves processing
time.