Commit Graph

44 Commits (c49d87976d8fd14ad10ce8bf1709212e5cb4de5d)

Author SHA1 Message Date
Mike Gerwitz 1ad2fb1dc8 Copyright year update 2022
RSG (Ryan Specialty Group) recently announced a rename to Ryan Specialty (no
"Group"), but I'm not sure if the legal name has been changed yet or not, so
I'll wait on that.
2022-05-03 14:14:29 -04:00
Mike Gerwitz 2ea66f4f97 tame: @encoding="{ISO-8859-1=>utf-8}" for all XML-based files
TAMER rejects this, because we shouldn't be using anything but UTF-8.  My
use of this encoding is ancient, from over a decade ago, that was apparently
just copied around.

DEV-10936
2022-05-02 12:00:42 -04:00
Mike Gerwitz 2e50af1220 Copyright year update 2021 2021-07-22 15:00:15 -04:00
Mike Gerwitz 8ce217f779 [DEV-8947] Make mrange fully tail-recursive and enable TCO
We were still having issues with this function when taking the positive
branch, when predicates cause many matches within tables.  This was causing
us to hit stack limits in certain browsers on the Summary Page.

This converts it to an iterator so that all branches are tail-recursive, and
then enables TCO on them.

I was disappointed to find that there's little performance or memory benefit
in running our test suite.
2020-12-09 09:56:43 -05:00
Mike Gerwitz 61aec5f714 [DEV-8130] core: mrange: Use experimental guided TCO
This alleviates stack exhaustion issues with large rate tables where the
predicates fail to reduce the search space to a reasonable size.
2020-07-15 10:33:05 -04:00
Mike Gerwitz 3418023269 core: mrange: Inline _mrange_cmp
This will permit the use of TCO in the following commit.
2020-07-15 10:33:05 -04:00
Mike Gerwitz bfea768f89 Copyright year 2020 update 2020-03-06 11:05:18 -05:00
Mike Gerwitz e97f7a75c9 core/test/vector (_define-vector_): Require description
We want things to require documentation when possible.
2019-10-17 09:20:15 -04:00
Mike Gerwitz 39c7161cca vector/define: New package introducing _define-vector_
This is intended to work around the issue of defining arbitrary vectors
outside of a c:let.
2019-10-17 09:16:45 -04:00
Mike Gerwitz 3e13b733c4 core/vector/cmatch.xml (_classify-vector_): New template
This is the analog of _classify-scalar_.
2019-07-29 14:51:38 -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 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 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 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 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 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 1fa833eb47 {L=>}GPL
I don't recall why I licensed under the LGPL initially.
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 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 ec379ea296 vector/cmatch: Add `_vector-to-class_'
* vector/cmatch.xml: (_vector-to-class_): Add template.
 Lines starting
2018-09-11 09:30:51 -04:00
Mike Gerwitz 088a948891 Update all copyrights from LoVullo to R-T Specialty 2018-09-11 09:30:51 -04:00
Mike Gerwitz 5000e35891 vector/arithmetic: Add _{v,m}product_
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.
2018-09-11 09:30:51 -04:00
Mike Gerwitz 24e578c7ae _cons-until-empty_: Add @index@
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.
2018-09-11 09:30:51 -04:00
Mike Gerwitz b33f8bb999 Add vector/length package
* vector/length.xml: New file.
2018-09-11 09:30:50 -04:00
Mike Gerwitz 7e1b0c6d0d Add _repeat-value_ template
* vector/common.xml (_repeat-value_): Add template.
2018-09-11 09:30:50 -04:00
Arthur Domino 49663c5779 Added missing export in table package for numeric/common 2018-09-11 09:30:50 -04:00
Mike Gerwitz 9805eaf755 Support table data definition via _table-rows_/@data@
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.
2018-09-11 09:30:49 -04:00
Mike Gerwitz 6a9b9bf2e5 _classify-scalar_ template introduced 2018-09-11 09:30:49 -04:00
Mike Gerwitz 415ab05610 Extracted vector min/max templates/functions from vector/arithmetic
BC incompatible.
2018-09-11 09:30:49 -04:00
Mike Gerwitz a3b6b45df9 LGPL license; copyright notice added to head of each file 2018-09-11 09:30:48 -04:00
Mike Gerwitz fb1416837b Package namespace/imports/decl cleanup 2018-09-11 09:30:48 -04:00
Mike Gerwitz 4ddda94a4c TAME core library extracted from Calc DSL repository
Some notes on this:  The "Calc DSL" is the name of the DSL before it
became "TAME".  This takes the entire core library and squashes its 91
commits into a single one; the reason for this is because those
commits often contain LoVullo-specific details that are either
irrelevant or should not be included.

This library has limited value to the public at the time of this
commit, since TAME has not yet been released (it requires some
additional cleanup and filtering before then).  It is also in need of
heavy refactoring and reorganization, since it has accumulated a lot
of cruft, especially since the project in which the Calc DSL was
introduced was rushed (to put it lightly).  Forgive the mess.

[LoVullo employees: the commit was extracted from dsl.git 4a3aea9;
full history can be found there.  This commit contains some additional
minor tweaks in addition to squashing.  It filters on the :/core/
directory.]
2018-09-11 09:30:48 -04:00