CADET-Specification aims at one authoritative definition of the CADET interface: parameter names, types, shapes, units and descriptions that CADET-Core, CADET-Julia, CADET-Process and the documentation all follow. Today this definition exists only implicitly in CADET-Core’s parameter readers and is restated by hand in the interface documentation and in CADET-Process, and these copies drift. For example, the Linear binding page documents a length of 1/NTOTALBND while the reader requires equal-length arrays of at least NCOMP values, and until recently the IS_KINETIC documentation described per-state arrays that the code read with inverted meaning. Beyond keeping the documentation consistent, a machine-readable specification would allow frontends and other backends to consume parameter definitions programmatically rather than maintaining their own copies.
As a first step, I would like to extract the current interface from CADET-Core instead of writing a specification from scratch. Core already declares many of its parameter readers in <codegen> blocks in the model sources. The idea is to add the public facts to each entry; for Langmuir:
{
"confName": "MCL_KA",
"dtype": "double",
"dims": ["component"],
"unit": "m_MP^3 mol^-1 s^-1",
"range": {"ge": 0},
"description": "Adsorption rate constants.",
"required": true,
"implementation": {
"descriptor": "ScalarComponentDependentParameter",
"varName": "kA"
}
}
From this, the build would generate a JSON export and the interface documentation page, while the reader code is still generated from the same entry. This first step aims to describe the existing interface without changing its behavior. Where documented requirements and accepted inputs differ, these differences should be made explicit rather than silently resolved. Deciding what the interface should be, for example whether Linear expects NCOMP or NTOTALBND values, is a separate step, and so is moving ownership to an independent, versioned CADET-Specification later.
The guiding principle is that each fact has one authoritative owner, rather than that all parameter-related information must live in one place. Fields that only Core’s code generator needs therefore stay in the entry under their own key, so the public part can later move to CADET-Specification without carrying Core’s internals along. At that point, Core could reference the public parameter definition by name and combine it with its local implementation information during code generation, rather than maintaining a separate copy.
Many inputs are not templated: some binding-model settings, and most unit operation, section and solver parameters, are read in handwritten code. They would get the same declarations without a generated reader. I suggest starting with binding and reaction models, extending coverage to solver and section settings afterwards, and addressing unit operations alongside the v6 interface changes.
I will present this at the next dev call. Feedback here is welcome beforehand, especially on four questions. Is extracting the current interface from Core an acceptable first step towards CADET-Specification? Should these declarations be the authoritative source for generated documentation and machine-readable metadata? Should the specification distinguish the configuration frontends should produce from what Core historically accepts? And is the long-term direction an independent, versioned specification, with each implementation owning its local mapping? I suggest agreeing on these principles before settling details such as unit syntax, dimension names or the generator implementation.