30 Commits
Author SHA1 Message Date
Clifford Yapp 5b0085612f Add structural metadata profile for API v2
Keep full descriptor metadata as the default and add an opt-in
structural profile for conversion-oriented late-bound API v2 users.
Strip descriptive and constraint text while retaining the complete
runtime descriptor graph.  Pass the profile through CMake and correct
the scanner's compact late-bound file lists.

AP242e4 full-to-structural measurements:

Generated output falls from 54,839 lines and 3,304,007 bytes to
29,993 lines and 1,525,897 bytes.  The packed schema source shrinks
68.1%.  The schema DSO falls from 2,178,296 to 720,120 bytes, and peak
compile RSS drops 6.8%.  File count and 49 ELF relocations are
unchanged.

The NIST AP242e4 sample still creates and validates all 10,609
instances with no errors or warnings and writes the same 949,685-byte
semantic result.  Twenty read/write runs improve from 4.76 to 4.71
seconds and peak RSS falls from 82,276 to 78,900 KiB.
2026-08-02 07:27:08 -04:00
Clifford Yapp 05c6adb716 Complete compact schema modules for API v2
Add stable entity, type, and attribute IDs through SchemaModule.  Make
late-bound compatibility names opt-in, table-drive rules and complex
metadata, and emit entity metadata directly into bounded chunks.

AP242e4 late-bound output changed as follows:

* generated files: 5,719 to 905 (-84.2%)
* generated lines: 254,220 to 123,552 (-51.4%)
* generated bytes: 13,942,523 to 9,804,680 (-29.7%)
* generation wall time: 2.74s to 0.56s (-79.6%)
* compile/link wall time: 157.68s to 37.02s (-76.5%)
* compile/link peak RSS: 593,320 KiB to 199,156 KiB (-66.4%)
* shared library size: 9,956,640 to 7,716,096 bytes (-22.5%)
* read/write wall time: 0.26s to 0.25s

ELF relocations increased from 28,843 to 39,719 due to descriptor-slot
tables.  The packed schema image stage is intended to remove this cost.

The real AP242 sample created and validated 10,609 instances with zero
errors and warnings.  Rewritten output matched except for its timestamp.
2026-08-02 06:15:25 -04:00
Clifford Yapp 6040858231 exp2cxx: tune entity and type chunk limits independently
Schemas commonly contain many more entity implementations than type
implementations. Accept N:N chunk limits and use smaller defaults so
both kinds of generated unity files stay manageable.
2026-08-01 22:27:46 -04:00
Clifford Yapp 3113afd2a4 exp2cxx: generate bounded schema unity chunks
Generate schema source manifests and bounded unity translation
units, then make schema targets depend on the generated absolute
paths. This avoids oversized compiler inputs while retaining
unity-build performance.
2026-08-01 22:27:46 -04:00
Clifford Yapp 7dbda20be0 Remove base library from stepcode
Move specific pieces of logic still in use next to the individual parts
of the code that use them, and eliminate base from the code.
2022-09-26 20:52:17 +01:00
Clifford Yapp 0fd354cb39 Make sure BUFSIZ buffers have room for NULL
In case we do end up with buffers with contents at the BUFSIZ limit,
make sure we leave room to set a null termination char.  Not always
clear where these buffers might get used or re-used, so just bump their
size across the board.
2022-06-11 17:33:24 +01:00
Chris HORLER 85b76db65a use _WIN32 for Windows and _MSC_VER for compiler checks 2019-08-26 17:38:09 +01:00
Chris HORLER e934fa246c drop the Generic typedef 2019-08-07 20:30:32 +01:00
Cliff Yapp e649757417 Install schema headers in locations that match the build tree hierarchy, so include directives will work both with in-build-tree and installed stepcode layouts. 2014-07-31 21:26:57 -04:00
Mark Pictor cd0d8b496b cannot treat the schema scanner source as a config file, so add /*WARNING*/ 2014-03-01 11:53:31 -05:00
Mark Pictor 38467bdca3 add build logic for unity builds (mostly in generated CMLists) 2014-03-01 11:53:30 -05:00
Mark Pictor 78d99f2f4e change generated CMLists ws to better match starseeker's ws 2014-03-01 11:53:30 -05:00
Mark Pictor a7579f0bc9 remove helper function header - code moved to headers for individual types/entities 2014-02-28 22:02:07 -05:00
davyw 492f455598 allow schema scanner to build on windows 2014-02-28 22:02:07 -05:00
Mark Pictor 2ccc5ce360 add underscore to schema shortname for readability - Sdai -> Sdai_ 2014-02-28 22:02:07 -05:00
Mark Pictor 5043c035a3 renamed enums, selects don't get their own files 2014-02-28 22:02:07 -05:00
starseeker c6f0c44a02 print file count, not list of all files, when generating. 2014-02-28 22:02:07 -05:00
starseeker 6533032fd9 workaround makefile corruption by changing how file lists are handled 2014-02-28 22:02:07 -05:00
Mark Pictor b320bfe3f7 generate a short schema name in the schema scanner
this name is one of:
* the schema file name without extension,
* the schema dir name if in sc/data/ and 3+ chars
* or the official schema name on the SCHEMA line.
2014-02-28 22:02:06 -05:00
Mark Pictor 34d917fb19 update scanner to match renamed schema macros file 2014-02-28 22:02:06 -05:00
Mark Pictor 86bae779b0 inching forward on schema scanner 2014-02-28 22:02:06 -05:00
Mark Pictor a035292cf0 another TODO 2014-02-28 22:02:05 -05:00
Mark Pictor c4fde8c96f comment, formatting 2014-02-28 22:02:04 -05:00
Mark Pictor 3088d3d63f check for errors in 2 places 2014-02-28 22:02:04 -05:00
Mark Pictor 99fbadcdfd print path to the dir containing the generated CMakeLists for CMake 2014-02-28 22:02:04 -05:00
Mark Pictor b8d35ce517 improve formatting of generated CMakeLists 2014-02-28 22:02:04 -05:00
Mark Pictor d1f57453dd print ss contents not address 2014-02-28 22:02:04 -05:00
Mark Pictor 86302fb0f3 take a stab at writing a CMakeLists.txt for the schema 2014-02-28 22:02:04 -05:00
Mark Pictor a01fa5708a start on creating cmakelists within the schema scanner 2014-02-28 22:02:04 -05:00
Mark Pictor ec4eed7367 rename schemaScanner to .cpp 2014-02-28 22:02:04 -05:00