Commit Graph

102 Commits (7e69a0c2b61024ed12a9980fda4952dd3754f3f0)

Author SHA1 Message Date
Andrew Elbaneh bd65f433d2 numeric/convert (_endpoint_): Add @desc@ 2018-09-28 16:34:37 -04:00
Mark Goldsmith aeffcb010d insurance (_premium_): Make @generates@ optional 2018-09-24 10:46:40 -04:00
Mike Gerwitz 6dfa860e25 [BC BREAK] insurance (_premium_): Make @desc@ required
* core/insurance.xml (_premium_)[@desc@]: Make required.
2018-09-21 19:00:23 -04:00
Mike Gerwitz d9bef9d028 insurance (_premium_): Add @yields@
* core/insurance.xml (_premium_)[@yields@]: New param with validations.
    Will enforce naming conventions.
  Update TODOs.
2018-09-21 18:57:22 -04:00
Mike Gerwitz 5e51e76d7b insurance: Add _{credit,debit}_/@default@
This is potentially dangerous, but is consistent with _factor_.

* insurance.xml (_credit_, _debit_)[@default@]: New param, propagated to
  `_factor_'.
2018-09-13 15:13:58 -04:00
Mike Gerwitz 0cadf76dfd param: New package with _param_ template
* param.xml: New package
2018-09-13 15:13:51 -04:00
Mike Gerwitz 6ce3a1df67 assert: Add _assert_/@neg-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.
2018-09-13 15:13:47 -04:00
Mike Gerwitz 0abb7104b1 assert: _assert_/@neg{_=>-}* template params
* 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.
2018-09-13 15:13:41 -04:00
Mike Gerwitz 2abdefb22a insurance: Add _credit_ and _debit_
* insurance.xml (_credit_, _debit_): New templates.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 875ec7634f insurance (_factor_): Add @allow-negative
* insurance.xml (_factor_)[@allow-negative@]: New param.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 0e084c1504 insurance (_factor_): Permit @yields only
* insurance.xml (_factor_): Permit @yields only.  Otherwise, using a
  generator is required with these templates, which is not always desirable.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 6a08ad7ed3 insurance: Add missing map export
* insurance.xml: Add map import as export.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 6c4d0dae4a base: Add maybe type
* base.xml (maybe, nothing): New types.
  (boolean): Move into `maybe' as union member.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 368b50d026 state.xml: Add state-all yield stateAll
* state.xml (stateAll): New yield to state-all.
2018-09-11 09:30:54 -04:00
Mike Gerwitz 1254141c0f datetime: Assert on non-empty timestamp_current
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.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 247ade8f1a alias: Do not generate alias if name matches source
* alias.xml (_classify-alias_, _rate-alias_, _rate-each-alias_): Generate
  nothing if source matches alias name.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 92ab072fbd assert: Add assert_ignore param
Makes life a bit easier when debugging.

* assert.xml (assert_ignore): Add param.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 1b0da8c870 symbol: Add package
* symbol.xml: New package.
* test/core/suite.xml: Import new symbol package.
* test/core/symbol.xml: New test spec.
2018-09-11 09:30:53 -04:00
Mike Gerwitz b615c2be32 state{s=>}.xml
I regret the original naming.
2018-09-11 09:30:53 -04:00
Mike Gerwitz a2fc125540 ui/_match-ui-set_: Add template
* ui.xml (_match-ui-set_): New template.
2018-09-11 09:30:53 -04:00
Mike Gerwitz e7528947a4 _classify-scalar_: Fix misspelled {yeilds=>yields}
* vector/cmatch.xml (_classify-scalar_): Typo fix {yeilds=>yields}.
2018-09-11 09:30:53 -04:00
Mike Gerwitz ee179645f7 vector/arithmetic: Remove accidentally committed debug-to-console
Noticed this when running a rater in an interactive terminal.

* vector/arithmetic.xml (_mproduct): Remove `debug-to-console'.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 7dbcce3403 insurance/_factor_: Complete template
* insurance.xml (_factor_): Enforce naming conventions; allow defaults;
    assert on zero values.
2018-09-11 09:30:53 -04:00
Mike Gerwitz eb7c29bd9f convention: New package with _naming-convention_ 2018-09-11 09:30:53 -04:00
Mike Gerwitz 500fe170d4 _fold-matrix_: Add template
* vector/fold.xml (_fold-matrix_): New template.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 7123f9818a _unfold-vector-grouped_: New template.
* 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_'.
2018-09-11 09:30:53 -04:00
Mike Gerwitz a9b9286c9b vector/filter: Add vfilter_lookup
* vector/filter.xml (vfilter_lookup): New function.
2018-09-11 09:30:53 -04:00
Mike Gerwitz a8fd36176d stub: Add sequence vectors.
* vector/stub.xml: Add sequence vectors.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 46c230febb _cons-until-empty_: Add @only@
* vector/list.xml (_cons-until-empty_): Add @only@, which has the opposite
    behavior to @glance@.
  (_merge-until-empty_): Proxy @only@.
2018-09-11 09:30:53 -04:00
Mike Gerwitz 34f7c6bef1 _for-each-n_: Add current_n_dec
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).
2018-09-11 09:30:53 -04:00
Mike Gerwitz 6f891b7b15 vector/filter: Decrease value of TABLE_WHEN_MASK_VALUE
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.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 98f9b6fadb vector/table: Extract bisect functions into vector/filter
* vector/filter.xml (bisect, foremost, _mask-unless_): Add to package.
* vector/table.xml (bisect, foremost, _mask-unless_): Remove from package.
2018-09-11 09:30:52 -04:00
Mike Gerwitz cac9d22cb2 vector/filter: Formatting and minor doc 2018-09-11 09:30:52 -04:00
Mike Gerwitz ec7d1c2a24 vector/table: Extract mfilter and range into vector/filter
* vector/filter.xml: New package.
* vector/table.xml (mfilter, _mfilter, range): Extract into vector/filter.
2018-09-11 09:30:52 -04:00
Mike Gerwitz a10adcbe1c base.xml: Warning on _ignore_
* base.xml (_ignore_): Output warning.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 1fa833eb47 {L=>}GPL
I don't recall why I licensed under the LGPL initially.
2018-09-11 09:30:52 -04:00
Mike Gerwitz b36b15cdd2 todo: Copyright update 2018 2018-09-11 09:30:52 -04:00
Mike Gerwitz c2f074f269 [BC BREAK] _todo_: No value by default and output warning
* base.xml (_todo): Do not output a value by default.  Output warning with
  `@desc@'.
  [@hide@]: Remove parameter.
  [@value@, @index@]: Add parameters.
2018-09-11 09:30:52 -04:00
Mike Gerwitz b3117e7c55 when: Add package 2018-09-11 09:30:52 -04:00
Mike Gerwitz a1f2b2aad8 vector/cmatch: Deprecate @const@ on shorthand templates
* vector/cmatch: Display warning on use of @const@ with short-hand
  comparison templates.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 0390923825 assert: Add _assert_/@class@
This predicates the assertion for each class match.

* assert.xml (_assert_)[@class@]: Add parameter.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 1b4ba4c562 assert: Remove "Standard Assertions"
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.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 3f1bfc0de2 assert: @desc@=>@failure@
Param makes more sense.
2018-09-11 09:30:52 -04:00
Mike Gerwitz c7ded1d957 assert: Export vector/cmatch
* assert.xml: Export vector/cmatch.
2018-09-11 09:30:52 -04:00
Mike Gerwitz 886b1eb234 assert: _assert-nonzero_ to replace _fail-on-empty_ (alias added)
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.
2018-09-11 09:30:52 -04:00
Mike Gerwitz c74333b1ce [BC BREAK] assert: Correct behavior of _assert_
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.
2018-09-11 09:30:52 -04:00
Mike Gerwitz adbf67abf3 state: Add _for-each-state_ and state-all
* states.xml (_for-each-state_): Add template.
  (NVEC_STATE_ALL): Add vector.
  (state-all): Add class.
2018-09-11 09:30:51 -04:00
Mike Gerwitz f4b42136d0 Add aggregate package
* aggregate.xml: Add package.
* test/core/aggregate.xml: Add test case.
* test/core/suite.xml: Import new aggregate package.
2018-09-11 09:30:51 -04:00
Mike Gerwitz 5267baa0e9 vector/stub: Add package.
* test/core/vector/stub.xml: Add specification.
* vector/stub.xml: Add package.
2018-09-11 09:30:51 -04:00
Mike Gerwitz 108ada745a tplgen: Add package
* test/core/suite.xml: Import new tplgen package.
* test/core/tplgen.xml: Add test.
* tplgen.xml: Add package.
2018-09-11 09:30:51 -04:00