Commit Graph

139 Commits (e07887f8b5e3bd52ad28207151b028d65eba75c3)

Author SHA1 Message Date
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
Mike Gerwitz 2e453ee703 test/core/round: Fix _let-round_ expectations
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.
2018-09-11 09:30:51 -04:00
Mike Gerwitz 8d46b38f25 Add _match-result_/@eq@
* test/spec.xml (_match-result_)[@eq@]: Add param.
2018-09-11 09:30:51 -04:00
Mike Gerwitz c5a6ddf111 base: _todo_ description prefix with "TODO: "
* base.xml (_todo_): Prefix description with "TODO: ".

 Lines starting
2018-09-11 09:30:51 -04:00
Mike Gerwitz 9a7e1711b7 alias: Inherit descriptions from source symbols
* alias.xml (_classify-alias_, _rate-alias_): Inherit symbol desc.
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 90f70df8cf Add alias and extern packages
Long-needed abstractions.

* alias.xml: New package.
* extern.xml: New package.
2018-09-11 09:30:51 -04:00
Mark Goldsmith 228404248a Fixed description of MA and ME states 2018-09-11 09:30:51 -04:00
Mike Gerwitz ab66ea7cbf states: {0=>1}-index
Nothing is referencing these values without use of the constants right
now, so we're just going to make this change real quick... :)
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 7287783e3a Disable broken ui package tests
* test/core/suite.xml: Disable ui package tests.
2018-09-11 09:30:50 -04:00
Mike Gerwitz 7d426c7fc3 test/core/suite: Add yield
This is required since keep support was removed in TAME some time ago.

* test/core/suite.xml: Add yield.
2018-09-11 09:30:50 -04:00
Mike Gerwitz 08e5e4a127 Add states package
* states.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
Mike Gerwitz 2b72a21b84 Remove @external from assertion classes
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.
2018-09-11 09:30:50 -04:00
Mike Gerwitz 99d52f9559 Add timestamp parameters
* base.xml: Modify documentation to discourage DATE_TIME.
* datetime.xml (timestamp_*): Add params.
2018-09-11 09:30:50 -04:00
Mike Gerwitz 18fe43b38f Add up/down _premium_/@round@ support
* insurance.xml (_premium_): Added up/down support for @round@
* test/core/insurance.xml: Associated test cases
2018-09-11 09:30:50 -04:00
Mike Gerwitz 44be881050 Initial insurance package
This will evolve as needed and is currently very primitive.
2018-09-11 09:30:50 -04:00
Mike Gerwitz dbc5a74948 Add dummy package
* dummy.xml: Added
2018-09-11 09:30:50 -04:00
Mike Gerwitz 9e023c7238 UI integration package
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
2018-09-11 09:30:50 -04:00
Mike Gerwitz 35dd49301e .gitignore *.html
.gitignore: Ignore *.html files
2018-09-11 09:30:50 -04:00
Mike Gerwitz 88ebfba9f3 Allow for arbitrary name for BDD given clause
* 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.
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 40fd487249 Implement _rtop_/@negate@ 2018-09-11 09:30:50 -04:00
Mike Gerwitz af0862f1f1 Percent package formatting 2018-09-11 09:30:50 -04:00
Mike Gerwitz 3a9ef76bea Extract percent templates from convert.xml 2018-09-11 09:30:49 -04:00
Mike Gerwitz d2d595a3d7 Add _rtop_ template 2018-09-11 09:30:49 -04:00
Mike Gerwitz ff59f1502f Update spec to work with new system
`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.
2018-09-11 09:30:49 -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 0989895ea6 _map-else_ error when _map_/@default@ already provided 2018-09-11 09:30:49 -04:00
Mike Gerwitz 08d6c812d1 Map set package documentation 2018-09-11 09:30:49 -04:00
Mike Gerwitz 8758274685 Add missing _map-else_/@desc@ 2018-09-11 09:30:49 -04:00
Mike Gerwitz 9ce6324a23 Remove now unneeded const type from map templates 2018-09-11 09:30:49 -04:00
Mike Gerwitz 286e7242ab Add _map{,-else}_/@to-index@ 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 a696f63711 Introduce _ptor{-each}_/@negate@ 2018-09-11 09:30:49 -04:00
Mike Gerwitz 01503bbd0f Corrected `never' definition
Yes, I screwed up "never".
2018-09-11 09:30:49 -04:00
Mike Gerwitz 3c2eedf95f BC break warning added to README.md 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 b256744c32 NEGATE moved into `numeric/common' with _negate_
Together with documentation.
2018-09-11 09:30:49 -04:00
Mike Gerwitz 0094a3b94a Standard _assert_ added with package documentation 2018-09-11 09:30:49 -04:00
Mike Gerwitz cab144394d _fail-on-empty_ extracted into `assert' package 2018-09-11 09:30:48 -04:00
Mike Gerwitz 45200baedd `base' package documentation 2018-09-11 09:30:48 -04:00
Mike Gerwitz 06f85aeca2 xmle and js extensions added to ignore
Both output from TAME linking.
2018-09-11 09:30:48 -04:00
Mike Gerwitz 02a4e256ac Handful of test cases
This uses the BDD specification package `test/spec`.

[LoVullo employees: this was extracted from the same point as the first
commit, and includes some minor cleanup and moving around.]
2018-09-11 09:30:48 -04:00
Mike Gerwitz fbd1abb49b README with description of TAME and Core features 2018-09-11 09:30:48 -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 2bcf7f611b .gitignore added for build-generated files 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