Commit Graph

118 Commits (c54a87e3e3689f082b855cbc8f9458265d0af4b9)

Author SHA1 Message Date
Mike Gerwitz 3d07597f7c core/insurance (_credit_, _debit_)[@allow-zero@]: Add 2019-03-19 13:19:33 -04:00
Mike Gerwitz 26249f8dbb core: Add _vfilter-mask_
* core/test/core/suite.xml: Import `vector/filter'.
* core/test/core/vector/filter.xml: New package.
* core/vector/filter.xml (_vfilter-mask_, _vfilter_mask): New template, function.
2019-02-14 15:05:49 -05:00
Mike Gerwitz 279245d168 core: Add missing _minreduce_ @isvector@ test
core/test/core/vector/minmax.xml: Add missing @isvector@ test.
2019-02-13 16:10:26 -05:00
Mike Gerwitz 46b7c234dd core: vector/minmax/_minreduce_: New template
* test/core/suite.xml: Import `test/core/vector/minmax'.
* test/core/vector/minmax.xml: New package.
* vector/minmax.xml (_minreduce_, _minreduce): New template, function.
2019-02-13 14:38:08 -05:00
Mike Gerwitz e022a3133d Copyright year simplification and update to Ryan Specialty Group
This now uses year ranges, which I'll update annually.

This also renames "R-T Specialty" to "Ryan Specialty Group".  The latter is
the parent company of the former.  I was originally employed under the
former when LoVullo Associates was purchased, by I now work for the parent
company.
2019-02-07 13:23:09 -05:00
Mike Gerwitz 11109d4361 core: Add _where-*_ query predicate templates
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.
2019-02-04 10:22:46 -05:00
Mike Gerwitz 36a3e348b6 core: Add comparison operators for table query predicates
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'.
2019-02-04 10:22:46 -05:00
Mike Gerwitz 74f8b56fcc Use some modern shorthands for core/vector/{table,filter}
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.
2019-02-04 10:22:46 -05:00
Mike Gerwitz c68c2f41d5 core/vector/table: Add specification for main templates
* core/test/core/suite.xml: Import core/test/core/vector/table.
* core/test/core/vector/table.xml: New specification.
2019-02-04 10:22:46 -05:00
Mike Gerwitz 73d691273e core: Replace all occurrences of c:{set=>vector}
The former is deprecated and never made any sense at all.
2019-02-01 16:01:56 -05:00
Mike Gerwitz e4ccf3e90a test/spec: Work around expand-sequence bug
* 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.
2019-02-01 16:01:56 -05:00
Mike Gerwitz a7f186beff [BC BREAK] rater/core/insurance (_premium_): Add zero and negative assertions
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.
2019-01-02 16:58:56 -05:00
Mike Gerwitz dec3f2ef35 rater/core/insurance (_factor_): gt{=>e} for negative assertions 2019-01-02 16:56:57 -05:00
Mike Gerwitz 98494edee5 core build
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.
2018-11-08 11:15:12 -05:00
Mike Gerwitz 970c3531c5 core/COPYING: Remove duplicate
This is no longer necessary since tame-core was merged
with this repo.
2018-11-07 23:27:18 -05:00
Mike Gerwitz 1fb87106b0 core/test/core/insurance: Add missing descriptions
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@.
2018-10-29 11:55:34 -04:00
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