Mike Gerwitz

Activist for User Freedom

aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Summary page changes to aid in testingv2.5.0Mike Gerwitz2017-12-114-6/+62
|\
| * summary: Add param text case dfn below inputMike Gerwitz2017-12-113-3/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The idea is to provide some guidance with how YAML test cases are supposed to appear. This just adds to the massive cluster that is the `entry-form.js'. * src/current/include/entry-form.xsl (entry-form)[preproc:sym]: Add `entry-testcase-dfn' div. * src/current/scripts/entry-form.js: Invoke `updateParamTestcaseDfn' in various event listeners. (populateBucket): Invoke `updateParamTestcaseDfn'. (updateParamTestcaseDfn, getParamTestcaseDfnElement): New functions. * src/current/summary.css: Style `.entry-testcase-dfn'.
| * summary: Add "percent*" to VOIsMike Gerwitz2017-12-111-1/+1
| | | | | | | | | | * src/current/scripts/entry-form.js (updateVois): Add "percent"-prefixed values to VOI list.
| * summary: Filter internal classes from class overviewMike Gerwitz2017-12-111-1/+7
| | | | | | | | | | * src/current/scripts/entry-form.js (updateSummaryClasses): Hide "-"-prefixed classes from Classification Overview.
| * summary: Add param names and links aside desc in entry formMike Gerwitz2017-12-113-1/+14
|/ | | | | | | | | This existed in the old summary pages. Since we'll be having certain people reference ids, they need to be easily visible from somewhere. * src/current/include/entry-form.xsl (preproc:sym)[entry-form]: Add param name and link. * src/current/summary.css: Style it.
* summary.css: Fix header width in FFMike Gerwitz2017-12-111-0/+1
| | | | | | | | Long-standing bug. Didn't often see it because FF performance was relatively poor for the Summary Pages compared to Chromium until recently, so I didn't often load the page in it (despite it being my primary browser). * src/current/summary.css (legend): width:auto.
* summary: Correct rendering of nested c:let expressionsMike Gerwitz2017-12-111-2/+4
| | | | | | | | | | If nested c:let expressions contained values of the same name, they would all be rendered, rather than just the one intended. * src/current/include/display.xsl (do-gen-let-list): Pass let symbol to `_gen-let-list-item'. (_gen-let-list-item): Render only values part of context let expression. [letsym]: New parameter.
* symtable: Add @lparent to let lparam symbolsMike Gerwitz2017-12-112-6/+11
| | | | | * src/current/include/preproc/symtable.xsl (preproc:symtable)[c:let]: Add @lparam to symbol.
* expand: Continue macro expansion after @dim conversionMike Gerwitz2017-12-111-1/+1
| | | | | | | | This was recently introduced and was noticed because c:let/@name was not being generated under certain circumstances. * src/current/include/preproc/expand.xsl (preproc:expand): Continue applying templates after @dim expansion (rather than copying child nodes).
* Add template barriers for metadataMike Gerwitz2017-12-082-19/+59
| | | | | | | | | | | | | | | This (hopefully) prevents metadata from leaking outside of template expansions where they are not wanted. * src/current/include/preproc/macros.xsl (preproc:macropass): Strip cruft (new barrier nodes) on final pass. * src/current/include/preproc/template.xsl (preproc:expand-template): Enclose template expansion in preproc:tpl-barrier (which is stripped on the final pass). (preproc:apply-template)[lv:param-meta]: Document template. "Hoist" node (set attribute) if not contained within lv:param-copy. (preproc:gen-param-value)[lv:param-inherit]: Consider hoisted nodes behind barrier.
* Summary Page: Render template expansion pointsMike Gerwitz2017-12-082-3/+79
| | | | | | | | | | | | | | | This renders template expansions as part of the calculation breakdown, which goes a long way to understanding what the system is doing. This further updates the hover over the breakdown to color-code based on depth, making it easier to observe the nesting of expressions. Sub-expressions that are toplevel results of template expansions (nodes marked with templates) have a thicker border. * src/current/summary.css: Add template id styling, breakdown colors, and misc. styling. * src/current/summary.xsl (ultra-breakdown-set): Enclose label in span. Output template id, if applicable. Mark fieldset if templated.
* Mark toplevel nodes affected by template expansionMike Gerwitz2017-12-081-13/+49
| | | | | | | | | | This allows for debugging expansions, which are otherwise confusing and difficult. This will be valuable information for the Summary Pages as well (see future commit). * src/current/include/preproc/template.xsl (preproc:expand-template): Mark toplevel nodes after expansion. (preproc:mark-tpl-expansion): Add templates.
* Clean up unused JS compiler codeMike Gerwitz2017-12-081-40/+1
| | | | | | | | | Cruft left around from the symbol table refactoring long ago. * src/current/compiler/js.xsl (compile)[preproc:rate]: Remove template. [preproc:class]: Remove template. (compile-rates)[lv:package]: Remove template.
* depgen: Do not perform dependency generation within templatesMike Gerwitz2017-12-061-0/+5
| | | | | | | | | | | | | | | This makes me slightly uncomfortable because I haven't researched why exactly this was not a problem before. We encountered this issue using an inline template iterating over the symbol table yielding a `c:value-of', which is admittedly something that we haven't done before. Hopefully it's an isolated case. I diffed the offending object file and the entire linked tax calculator and they were bit-for-bit identical, so we're probably good. * src/current/include/depgen.xsl (preproc:depgen): Do not perform dependency generation within templates.
* Defer inline-templates with sym-set until symtable is availablev2.4.0Mike Gerwitz2017-12-051-0/+14
| | | | | | | | | Other code relied on expand-sequence, but this really should be implicit, since it is deceptively useless otherwise. * src/current/include/preproc/template.xsl (preproc:macros): Defer processing of inline-template with sym-set until symbol table is available.
* Allow ##other nodes in apply nodesMike Gerwitz2017-12-041-2/+8
| | | | | | | The primary motivation for this is to allow for template conditionals. * src/current/calc.xsd (applyArgs): New group. (apply,recurse): Use it in sequence.
* Add c:sum/@dimMike Gerwitz2017-12-045-6/+75
| | | | | | | | | | | | | | | | | | This allows the result of a rate block to be a matrix; there was previously no way for a named value to be assigned a matrix unless it was a parameter. This is a bit of a kluge---the compiler won't discover the proper type information and won't perform the proper safeguards. * src/current/calc.xsd (sum)[@dim]: Add attribute. * src/current/compiler/js-calc.xsl: Add xs namespace. (compile-calc): Do not perform casting when @dim > 1. * src/current/include/preproc/expand.xsl (lv:rate-each): Include @dim in c:sum expansion. * src/current/include/preproc/macros.xsl: (c:*/@generates): Use @dim to determine symbol dimensions. * src/current/include/preproc/expand.xsl: Parse @dim aliases (e.g. "vector", "matrix").
* todo: Add package-local parameter todoMike Gerwitz2017-11-301-1/+18
| | | | * doc/todo.texi (Compiler): Add package-local parameters.
* entry-form: Correct rendering of params using imported typedefsMike Gerwitz2017-11-291-14/+8
| | | | | | | | | | | | | | | If a param referenced a typedef that was imported from another package, the summary page displayed an error rather than rendering the field. This is a problem for testing using summary pages! Long-standing bug with a fairly easy fix. * src/current/include/entry-form.xsl: (entry-form-field lv:param): Consider correct symbol (was using param symbol, not typedef). [typesrc]: Modernize syntax. [typedef]: Allow for non-root-child elements. The old version of TAME required toplevel typedefs; that's no longer the case.
* depgen: Add error for rate block name conflictsMike Gerwitz2017-11-291-1/+7
| | | | | | | | | | | | | This can occur during template expansion if the user is not careful in ensuring that all generated blocks will have unique names. The error was not useful: it failed type validation, which results in an internal error in the compiler (from the user's perspective) and outputs no useful information to aid in debugging. * src/current/include/depgen.xsl (preproc:depgen preproc:sym): User-friendly error if more than one rate element. [rate]: Allow multiple rate elements.
* csvm2csv: Add support for date->ts conversionMike Gerwitz2017-11-221-16/+22
| | | | | | * src/current/tools/csvm2csv: Modify example to include date. (rangeout, parseLine): Renamed from `rangeout'. Add date->timestamp parsing.
* Remove duplicates in tools/Mike Gerwitz2017-11-226-834/+0
| | | | | | | | | | | Also exist in src/current/tools. * tools/csv2xml: remove file * tools/csvi: remove file * tools/csvm2csv: remove file * tools/gen-make: remove file * tools/tdat2xml: remove file * tools/zipre: remove file
* README.md: Add documentation sectionMike Gerwitz2017-08-221-0/+7
|
* Include package eligibility classes during linkingv2.3.0Mike Gerwitz2017-08-071-0/+5
| | | | | | | | | | This is important to include all terminating classifications, which include assertions. This is essential now that @keep support has been removed; this essentially does the same thing, but in a more sane/strict manner. * src/current/compiler/linker.xsl (l:depgen)[preproc:symtable]: Include package-level eligibility class in initial dependency list.
* todo: Add Documentation sectionMike Gerwitz2017-07-261-0/+11
| | | | * doc/todo.xsl (Project TODOs/Documentation): Add section.
* todo: Treat all nodes as short-hand template expansionsMike Gerwitz2017-07-261-0/+19
| | | | * doc/todo.texi (Project TODOs/Preprocessor): Add section.
* Remove include of now-missing defnote-attrMike Gerwitz2017-07-211-1/+0
| | | | | | This was removed recently. * src/current/dot/defnode-attr.xsl: Remove include.
* Compiler TODO for algebraic typesMike Gerwitz2017-07-191-0/+29
| | | | * doc/todo.texi (Compiler): Add section.
* tools/strip: Accept files as argumentsMike Gerwitz2017-07-181-1/+1
| | | | | | Not sure how this hard-coded one ended up getting committed. * tools/strip: Accept filenames as arguments.
* doc: Some project TODOsMike Gerwitz2017-07-183-2/+78
| | | | | | * doc/Makefile.am (tame_TEXINFOS): Add `todo.texi'. * doc/tame.texi: Add reference to todo. * doc/todo.texi: Add file.
* js-calc.xsl: Remove now-unneeded worksheet ns declarationMike Gerwitz2017-07-181-6/+5
| | | | | * src/current/compiler/js-calc.xsl: Remove `w' ns prefix from root node. Style root node.
* Remove debug collection from compiled function callsv2.2.0Mike Gerwitz2017-07-181-1/+19
| | | | | | | | | | This will hopefully provide a performance boost, and is a cheap optimization to make. The information it collected was pretty useless in practice. * src/current/compiler/js-calc.xsl (compile) [c:*]: Do not encase calculations with function ancestors in debug collection functions.
* Remove broken calc debug worksheet predicatesMike Gerwitz2017-07-181-25/+2
|
* src/current/compiler/js-calc.xsl: Strip xsl ns prefixMike Gerwitz2017-07-181-561/+560
| | | | | | * src/current/compiler/js-calc.xsl: Strip xsl namespace prefix. Update copyright year. Set XSLT version to 2.0.
* Include meta automatically in link listv2.1.1Mike Gerwitz2017-07-132-6/+5
| | | | | | | These used to be automatically added via @keep. * src/current/compiler/linker.xsl (l:depgen): Include meta symbols. * src/symtable/symbols.xsl (lv:meta): @pollute instead of @keep.
* Preprocess input map nodesv2.1.0Mike Gerwitz2017-07-131-2/+2
| | | | | | | | In particular, I want it to handle absolute import paths. It does this for the return map; I forgot to add it here. * src/current/compiler/map.xsl (lvmc:compile) [lvm:program-map]: Preprocess nodes.
* Remove @keep from linkerv2.0.0Mike Gerwitz2017-07-128-289/+23
|\
| * macros.xsl: Remove unnused param boolean class generationMike Gerwitz2017-07-121-34/+0
| | | | | | | | | | | | | | | | A classification used to be generated for each param for convenience; this has been deprecated by the progui package generation (when `q:' is used). * src/current/include/preproc/macros.xsl: Remove template.
| * Remove @keep support from linkerMike Gerwitz2017-07-128-256/+24
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | And everything else. This is a big (important) change; it addresses one of the greatest pains of the system. Keeps were added during the DSL rewrite (to support symbols and such) to work around the issue that there was no symbol-driven map; it allowed symbols to persist disjoint from the `__yield' dependency graph so that they could be mapped back and used by external systems. The problem with that is that it's both messy (coupling the concept of external dependencies with the actual code) and difficult to work with. It had a huge performance impact on the linker for two reasons: - Checking whether a package had already been seen and importing the keeps on first visit was expensive because of tree searching and manipulation; and - _every_ keep was imported and processed by the linker, even if it wouldn't end up being used by a particular program. The later especially had huge performance impacts on the entire system. The entire dependency graph is now map-driven, with the exception of the implicit `__yield' (which will eventually be moved into the map as well and the magic `lv:yield' removed in favor of a template). Performance-wise: our largest program ("dwelling") has many thousands of symbols and the largest package imported the majority of them, many of them unneeded, as the result of @keep subgraphs. Compilation of the largest package within that (for the UI) took about a minute and a half and ate up ~6GiB of RAM, for what really is a trivial task of resolving externs, some basic symbol processing, a topological sort, and ordering code fragments. After this change, it takes ~15s and less than 2GiB of RAM. Still a lot---and more improvements can be made---but much, much better. @keep and friends was left in rater.xsd so that nothing breaks while code is cleaned up; it'll be removed in the future. * src/current/compiler/linker.xsl: Remove @keep support. * src/current/dot/attr-keep.xsl: Remove now-unneeded template. * src/current/dot/defnode.xsl: Remove @keep and related. * src/current/include/preproc/eligclass.xsl: Remove @keep and related. * src/current/include/preproc/expand.xsl: Remove @keep and related. * src/current/include/preproc/macros.xsl: Remove @keep and related. * src/current/include/preproc/symtable.xsl: Remove @keep and related. * src/current/rater.xsd: Add TODO to remove @keep and friends.
* Properly resolve paths of symbols of importsMike Gerwitz2017-07-123-27/+149
| | | | | | | | | | | | | | | | This solves a long-standing problem whereby relative paths are not properly resolved, leading to incorrect symbol conflicts when relative paths to the same package vary between two imports. See doc/notes/path-processing for an illustration. * src/current/include/preproc/path.xsl (preproc:resolve-relative-import): Add function. (preproc:resolv-path, preproc:resolve-path, preproc:get-path): Add functions to invoke existing templates. * src/current/include/preproc/symtable.xsl (preproc:symimport): Use `preproc:resolve-relative-import'. * doc/notes/path-processing: Add notes.
* Return map symbol supportMike Gerwitz2017-07-121-59/+120
| | | | | | | | | This is a backwards-incompatible change that, like the input map, requires the use of symbols in the return map. This will allow us to forego the use of @keep and will have the return map be the authority of what gets linked (all of its dependencies). * src/current/compiler/map.xsl: Add symbol support to return-map.
* Allow ##any in return mapMike Gerwitz2017-07-121-0/+3
| | | | * src/current/map.xsd (return-map): Allow ##any.
* Strip `xsl' namespace prefix from path.xslMike Gerwitz2017-07-121-148/+147
| | | | | | This also sets the XSLT version to 2.0. * src/current/include/preproc/path.xsl: Strip `xsl' namespace prefix.
* Provide symtable to all map compilation stepsMike Gerwitz2017-07-111-9/+18
| | | | * src/current/compiler/map.xsl: Pass symtable to all templates.
* linker.xsl: Strip xsl ns prefixMike Gerwitz2017-07-111-966/+965
| | | | * src/current/compiler/linker.xsl: Strip xsl ns prefix.
* Recognize meta fields in mapv1.1.0Mike Gerwitz2017-07-071-21/+11
|\
| * Recognize meta fields in mapMike Gerwitz2017-07-071-1/+3
| | | | | | | | | | * src/current/compiler/map.xsl (lvmc:validate-ui) [lvm:program-map]: Recognize "meta:"-prefixed meta field ids in map.
| * Simplify unknown source field map detectionMike Gerwitz2017-07-071-21/+9
|/ | | | | | | Simple refactoring. Code still is terrible. * src/current/compiler/map.xsl (lvmc:validate-ui) [lvm:program-map]: Factor common expressions.
* tools/strip: Add utilityMike Gerwitz2017-07-053-4/+15
|
* map compiler: Use symbol tableMike Gerwitz2017-07-053-56/+90
| | | | | | This allows for the proper importing of symbols into the package generated by the map compiler, which in turn allows for processing their default values.