This invention relates to the field of control model
library management technology, specifically disclosing a combinatorial compilation method and
system for control model
library reuse. Addressing the shortcomings of existing technologies, such as reliance on manual
verification, numerous implicit modifications, high mismatch risks, and untraceable reuse processes, this invention establishes encapsulation contracts for reusable units within the
library, including input hypotheses, output commitments, timing windows, resource usage, and security levels. It constructs a combinatorial
dependency graph based on the reuse requirements of the target project, performs multi-dimensional compatibility solving for interfaces, timing, resources, and security levels, and completes unit hierarchical labeling. For conditionally compatible units, it automatically generates wrapper layer code to match differences. After combinatorial compilation, it outputs target code, version seal records, and reuse evidence files, and provides replacement recommendations and enhancement suggestions for incompatible units. This effectively reduces reuse mismatch risks, eliminates implicit code modifications, and achieves full-process
traceability and auditability for reuse, making it suitable for high-
safety control scenarios such as flight control and
rail transit signaling.