Commit Graph

1175 Commits (a1a4ad3e8ebd57666b812422a16d8ed99289dcfa)

Author SHA1 Message Date
Mike Gerwitz 43204d1dd5 build-aux/Makefile.am: Lookup table dependency fix
%.xml{=>o}: %csvo rater/core/vector/table.xmlo

That is: we'll only build an object file when we try to build another object
file.  This was causing problems with dependency generation, because it will
triggering compilation early.
2021-03-17 17:02:58 -04:00
Mike Gerwitz 6b35812405 RELEASES.md: Mention recent tame and tamed changes 2021-03-15 09:49:57 -04:00
Mike Gerwitz 6221ce5fee bin/tame (verify-runner): Add missing id param
This was referencing a global $id, which is not the value we are interested
in (and may not exist at all).  Add the missing param.
2021-03-12 14:14:42 -05:00
Mike Gerwitz 7325578624 bin/tame{,d}: Fix assignments that lose exit code
Ensure that we fail if the command in the assignment fails.
2021-03-12 14:14:40 -05:00
Mike Gerwitz e7e4a61cf4 bin/tame: read {=>-r} where missing
While these should not be necessary in practice, there's no reason _not_ to
do this.
2021-03-12 09:47:38 -05:00
Mike Gerwitz 2a56c75345 bin/tame: Remove unnecessary trailing backslashes
This was originally in a Makefile, long ago, where backslashes were
actually needed.
2021-03-12 09:47:34 -05:00
Mike Gerwitz dfce9a89d8 RELEASES.md: Update for v17.8.0 2021-02-23 10:51:59 -05:00
Mike Gerwitz 566d9f6536 build-aux/Makefile.am (suppliers.mk): Regenerate when any sources change
This should have been done many years ago.  This will determine if any of
the dependencies have changed for the included suppliers.mk and regenerate
it as needed, without the developer having to do so manually when imports
change.
2021-02-23 10:48:21 -05:00
Mike Gerwitz cda3e845b8 Remove verbose messages from suppliers.mk generation
* build-aux/Makefile.am (suppliers.mk): Invoke ant with `-q` to eliminate
"processing" messages for each and every file.  This also speeds up
operation slightly.
* build-aux/gen-make: Remove information echos for each file.

These changes will allow for suppliers.mk to be regenerated automatically
without being so invasive.
2021-02-23 10:47:40 -05:00
Mike Gerwitz c319719065 src/current/rater.xsd (yieldsNameType): Remove length checks
The intent originally was to try to keep developers to a reasonable name
length, but generated identifiers can easily exceed this, and we further do
not support namespacing.

This can be handled at a template level instead for enforcing naming
conventions.
2021-02-23 10:46:58 -05:00
Mike Gerwitz 8651f683f6 src/current/rater.xsd: Update
This had gotten quite out of date from the actual rater.xsd, which existed
outside of this repository, that is used during our build process.  That was
an unintended artifact from moving files around.

That file has been removed and symlinked to this one.
2021-02-23 10:46:03 -05:00
Mike Gerwitz 6f67a4d6fa build-aux/Makefile.am: Accommodate step-level packages from proguic
Note: this really belongs in liza-proguic, and should be moved in the near
future.

liza-proguic is being modified to generate step-level packages, which are
significantly faster to build than larger ones (XSLT TAME scales
terribly).  These changes handle those new dependencies.

One important thing to note with this change is that suppliers.mk now
requires proguic to have run before generation so that those generated
dependencies can be properly examined.  This is a quick operation, so that
is not problematic.

This also depends on the .version.xml change that was previously made: when
the timestamp changed every time, we got into an infinite build loop.
2021-02-23 10:44:50 -05:00
Mike Gerwitz 9f5517f0d9 src/current/pkg-dep.xsl: Recognize step-level imports
First thing to note: this belong in liza-proguic, not here.  But it's here
right now, so for now I'm making the change.  The relationship between TAME
and proguic is awkward and will hopefully be improved upon in the near
future.

As for this actual change: step-level fragments will be concatenated such
that the imports will appear at the step level rather than the root.
2021-02-23 10:44:03 -05:00
Mike Gerwitz 80a61986bd build-aux/m4/calcdsl.m4: Do not generate suppliers.mk
This will be generated automatically by the Makefile.  It's not appropriate
to generate in the configure script, and I do not recall why I did
so---possibly to work around the issue of delayed tab completion when it
needs regeneration?

This removes suppmk-gen in favor of more generic Makefile targets---in this
case, having `%.tdat` depend upon `rater/core/tdat.xml`, even though that's
not quite true (the %.xml file generated from it needs it).  But these files
are going away soon; a pending TAME optimization branch removes support for
the underlying pattern primitive entirely; CSVMs should be used instead.
2021-02-23 10:43:09 -05:00
Mike Gerwitz 698ddcdd06 build-aux/Makefile.am (.version.xml): Only change timestamp on hash change
The timestamp of the file will now only be updated if the hash (version)
_actually_ changes.  This allows this to be used as a target dependency
without forcing a rebuild each and every time.
2021-02-23 10:41:20 -05:00
Mike Gerwitz 3b1b894dab RELEASES.md: Update for v17.7.0 2020-12-09 09:59:09 -05:00
Mike Gerwitz e27423f909 Fully tail-recursive mrange
This solves issues of hitting stack limits, particularly in browsers, when
querying matrices that return a large number of rows for one or more
predicates.
2020-12-09 09:57:08 -05: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 cb93f4c02a [DEV-8947] Guided TCO: Reassign argument values after processing all expressions
I did say it was _experimental_ guided TRO.

This waits to perform the actual argument reassignment until after
processing the expressions associated with the new arguments, since they
will otherwise be replaced when their original values are still needed.
2020-12-09 09:56:40 -05:00
Mike Gerwitz f175042f41 RELEASES.md (v17.6.5): Add missing subheading
I also rephrased it a bit.  The original phrasing was not incorrect.
2020-12-09 09:56:32 -05:00
Corey Vollmer 3913ed9d81 RELEASES.md: Update for v17.6.5 2020-12-03 14:09:37 -05:00
Corey Vollmer eb2951d8ba [DEV-8927] Improve summary page performance with new element queries in TAME 2020-11-30 16:18:26 -05:00
Corey Vollmer 38f4d52e32 [DEV-8927] Improve summary page performance with new element queries 2020-11-30 16:06:36 -05:00
Mike Gerwitz 3df31d0ffc RELEASES.md: Update for v17.6.4 2020-11-23 15:26:54 -05:00
Mike Gerwitz 79e2583ca1 map: Tolerate non-string inputs for `uppercase` and `hash` methods
This change simply prevents failure in such situations, (e.g. on invalidated
fields in Liza).  We'll worry about proper errors and correctness, which
ought to be compile-time, in TAMER.
2020-11-23 15:24:08 -05:00
Joseph Frazer 32f0245038 RELEASES.md: Update for v17.6.3 2020-11-03 13:24:36 -05:00
Joseph Frazer c55564e076 [DEV-8571] Update the MathJax CDN
Merge branch 'jira-8571' into master

* jira-8571:
  [DEV-8571] Update the MathJax CDN
2020-11-03 13:16:01 -05:00
Joseph Frazer 18731c9c62 [DEV-8571] Update the MathJax CDN
The MathJax CDN stopped working in April 2017. I updated it to the
recommended CDN with the last version from April 2017 to ensure it works
like it used to work before the CDN stopped.

I added the checksum to ensure the content of the script.
2020-11-03 12:37:38 -05:00
Joseph Frazer a3d47321d8 RELEASES.md: Update for v17.6.2 2020-10-01 10:22:17 -04:00
Joseph Frazer cc19e0065f [DEV-8362] Include program.mk in project root
Merge branch 'jira-8362' into master

* jira-8362:
  [DEV-8362] Include program.mk in project root
2020-10-01 10:12:16 -04:00
Joseph Frazer f7968c0513 [DEV-8362] Include program.mk in project root
If a "program.mk" exists in a project's root, it should be included in
the Makefile.

Co-Authored-By: Anthony Dalfonso <anthony.dalfonso@ryansg.com>
2020-10-01 09:58:45 -04:00
Mike Gerwitz 37a8fb29f0 RELEASES.md: Update for v17.6.1 2020-09-23 16:32:19 -04:00
Mike Gerwitz fb5e7c68df Fail lv:param-class-to-yields without relying on propagation 2020-09-23 16:29:53 -04:00
Mike Gerwitz 89d3494c57 [DEV-8492] Fail lv:param-class-to-yields rather than awaiting propagation
This problem manifested when the name of the attempted classification is the
same name as another object.  For example, if we have `t:match-class
name="foo"`, and `foo` is a param instead of a class, then `@yields` will
fail, and it'd fall back to matching on the param.

This is absolutely not what we want.

The error message in this context is ugly, but it does work.

Example:

  !!! Unknown match @on (/lv:package/lv:classify/match): `error: unable to
  determine @yields for class `scheduled_ai' (has the class been imported?)'
  is unknown for classification --vis-scheduled-ai-type
2020-09-23 16:29:37 -04:00
Schaffer, Austin c02a32f22e Stop using accumulate in tdat template
See merge request floss/tame!46
2020-08-21 10:06:06 -04:00
Austin Schaffer d8651cfb95 [DEV-8081] Stop using accumulate in tdat template 2020-08-20 18:18:46 -04:00
Mike Gerwitz 6743bfff4a package{,-lock}.json additions
These were being changed every time npm was run.
2020-08-19 15:39:50 -04:00
Mike Gerwitz 9111c3373e RELEASES.md: Update for v17.6.0 2020-08-19 15:30:00 -04:00
Mike Gerwitz da7a2c71c7 tamed: TAMED_JAVA_OPTS: New environment variable
This will be passed to dslc and then to the JVM.  The intent is to permit
fine-grained heap ratio tuning.
2020-08-19 10:19:04 -04:00
Mike Gerwitz 680691c4cf bootstrap: Permit directory for hoxsl
Now I recall the reason I had -e: we clone hoxsl in the pipeline.
2020-07-27 12:51:10 -04:00
Mike Gerwitz 2627b8eef5 bootstrap: Check explicitly for hoxsl symbolic link
Using `-e` resulted in a situation where a broken symbolic link would cause
`ln` to be executed in error.
2020-07-24 15:33:17 -04:00
Mike Gerwitz 13cd372eb7 RELEASES.md: Include mention of lsimports fix 2020-07-23 14:33:06 -04:00
Mike Gerwitz 59b2b32756 build-aux/lsimports: Fix awk gensub warning
Third argument must be numeric indicating which match to replace.
This error did not exist in previous versions.
2020-07-23 14:31:54 -04:00
Mike Gerwitz 4610f5d4a4 RELEASES.md (17.4.3): Fix {product=>produce} typo 2020-07-15 14:38:07 -04:00
Mike Gerwitz d4d412f20a RELEASES.md: Update for v17.5.0 2020-07-15 11:16:14 -04:00
Mike Gerwitz 6baa88136a RELEASES.md: Remove heading underling artifact 2020-07-15 11:15:40 -04:00
Mike Gerwitz 6784090cf0 Use experimental TCO for heavily recursive portion of table lookup
This was urgently needed for a project using TAME.  Somehow, we've gone
all of these years without a table in which the first predicate is unable to
sufficiently filter out enough results that we do not hit stack limits.

Each recursive step of mrange before inlining and TCO, at the time of
writing, was adding eight stack frames.  This is because each let (and many
other things) compile into self-applying functions.  Since mrange is invoked
once for every single row for a given value, we quickly run out of stack
space.

For example, consider this table:

  1, $a, $b
  2, $a, $b
  2, $b, $c
  2, $c, $d
  3, $a, $b

If we were to filter the first column on the value 2, it would first bisect
to find the middle row, backtrack to the first, and then move forward to the
last, producing:

  2, $a, $b
  2, $b, $c
  2, $c, $d

This is at least three mrange calls, for a potential total of 8*3=24 stack
frames, depending on implementation details I don't quite recall at the
moment about the how the query system works.

We had over 1000 rows after applying the first predicate; the stack was
exhausted before it could even reach the last row.

Tail call optimization (TCO) is the process of turning recursive calls in
tail position into jumps.  So, rather than the stack growing on a recursive
call, it stays constant.  A common way to accomplish this in stack-based
languages is using a trampoline.

In our case, we enclose the entirety of the function in a `do` loop, and
clear a flag indicating that a tail call took place.  When we reach a
recursive tail call, we set that flag.  Then, instead of invoking the
function again, we _overwrite the original arguments_ with their new
values, and simply return 0.  When the function hits the end of the loop, it
will see that the flag is set, and jump back to the beginning of the
function, starting all over with the new values.

Compiling in this functionality is not difficult.  Tracking whether a given
call is in tail position, however, is a bit of a pain given how the XSLT
code is currently written.  Given that this is all being replaced with
TAMER, it's difficult to stomach making too many changes to the compiler,
when we can do it properly in the future with TAMER.  But we need the
feature now.

As a compromise, I call this implementation "guided" TCO---we rely on a
human to indicate that a call is in tail position by setting an experimental
flag manually.  That frees us from having to have the compiler do it, but
does create some nasty problems if the human is wrong.  Consequently, this
should only be used in core, and people should not use it unless they know
what they're doing.

Using this feature currently outputs a warning---that way, if there are
problems, people have some idea of where they maybe can look.  The warning
will be removed in the future after this has been in production for some
time (granted, our test suite passes).

Once again: TAMER will implement proper tail calls automatically, without
the need for a human to intervene.

For more information on tail calls:

  - https://en.wikipedia.org/wiki/Tail_call
2020-07-15 10:55:38 -04: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 26b1bdacec Experimental guided TCO
This implements TCO in the XSLT compiler by requiring a human to manually
indicate when a recursive call is in tail position.  This was somewhat
urgently needed to resolve stack exhaustion on large rate tables.

TAMER will do this properly by determining itself whether a call is in tail
position.  Until then, this will serve as a test for this type of feature.
2020-07-15 10:33:04 -04:00