Refactor collection of header files. Refactor C++ data type modelling. Extend generator script test suite.
This rather large MR introduces a number of changes to header file collection, C++ type modelling and the lang.cpp API, and the generator script test suite.
Header file collection
This MR simplifies and clarifies the way information about required header files is modelled and collected by the SFG.
- Remove
required_headersproperties fromAugExprandSfgVar - Introduce
HeaderFiletypeclass to model header files - For variables, attach all header information to their data type; introduce
CppTypeand thecpptypeutility to simplify creating C++ type classes and specifying their associated headers - Have
DependentExpressiontrack required headers in the same way as variables; introduceincludes()query to collect header files form allExprLikealternatives - Update
ir.call_treenodes to allow dynamic tracking of headers - Update composer to transfer header information from AugExprs to the IR where required
- Update header collection to include headers for constructor and function parameters
C++ types and API Mirror
We clean up and refactor the C++ API mirror in accordance to the above changes.
- Deprecate all
std_<field type>_reffactory functions in favor of<>.from_field()static methods - Refactor C++ STL AugExpr classes to use the
cpptypeutility - Refactor exposition of STL classes through
lang.cpp.std
Generator Script Test Suite
The generator script test suite is heavily refactored and extended to become the primary testing driver for pystencils-sfg.
- Introduce a YAML index file to define and configure all generator script tests
- Remove static output checking against files in
expectedfolder in favor of regex-based checks - Introduce test harnesses that are compiled against generated code and executed to check correctness dynamically