Repository navigation
Deep SSOT reflect-cpp adoption: --standard-json-schema, shared CLI/JSON enum tables, and symmetric Yul AST JSON - #3
Open
clockblocker wants to merge 2 commits into
Conversation
This was referenced Nov 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Stacked on
adopt-rfl-nlohmann-json, this PR deepensreflect-cppSSOT adoption across two commits:Commit 1 (
2ff4b2b) — Official--standard-json-schema& shared CLI/Standard-JSON enum SSOTconstexproption/enum tables with zero<rfl/...>leakage into public headers:libsolidity/interface/DebugSettings.h:c_revertStringsTable+allRevertStringsNames()libsolidity/interface/CompilerStack.h:StopAfterParsing+stopAfterFromString(std::string_view)libsolidity/formal/ModelCheckerSettings.h&libsmtutil/SolverInterface.h:validNames()onModelCheckerEngine,ModelCheckerExtCalls,ModelCheckerInvariants,ModelCheckerTargets, andsmtutil::SMTSolverChoicesolc/CommandLineParser.cpphelp descriptions and--stop-afterparsing to the shared tables (keeping CLI--metadata-hash=swarmdistinct from Standard JSON"bzzr1").standard_json::StandardInputDTO fields to typedrfl::Literal<...>enums (LanguageLiteral,StopAfterLiteral,EvmVersionLiteral,RevertStringsLiteral,ModelChecker{Engine,ExtCalls,Invariant,Solver,Target}Literal) withstatic_assertsize checks against the SSOT tables, and typedsourcesasstd::optional<std::map<std::string, Json>>.rfl::ErrorKind::invalid_value(literal value rejection) vs!= invalid_value(type mismatch fromrfl::nlohmann::Reader::to_basic_type) informatRflError()to preserve 100% of golden Standard JSON error messages.StandardCompiler::inputSchema(util::JsonFormat const&)viarfl::json::to_schema<StandardInput, rfl::NoExtraFields>()and wiredsolc --standard-json-schema(supporting--pretty-jsonand--json-indent).Commit 2 (
9d85bf3) — Symmetric Yul AST JSON export, import, and schema SSOT (libyul)libyul/AsmJsonSchema.hdefining the 16 Yul AST JSON DTO structs plus named recursive tagged unionsYulExpression(YulIdentifier,YulLiteral,YulFunctionCall) andYulStatement(11 statements) with inlinerfl::Literal<"Yul..."> nodeType{}discriminators (zero synthetic__taggedwrappers in$defs).ast_json::Nullable<T>(rfl::Reflector->std::optional<T>) combined withrfl::DefaultValforYulVariableDeclaration::valueandYulAssignment::valueso export always emits"value": null, import accepts omitted/null/expression, and schema emits a valid Draft 2020-12 nullable property with"default": null.libyul/AsmJsonConverter.{h,cpp}(rfl::nlohmann::write+AsmJsonConverter::astJsonSchema()withrfl::NoExtraFields, rfl::VariantsAsOneOf) andlibyul/AsmJsonImporter.{h,cpp}(rfl::nlohmann::read<YulBlock>) on the singleAsmJsonSchema.hdefinition while keeping public headers free of<rfl/...>and preserving all semantic Yul assertions.test/libyul/AsmJson.cpp(YulAsmJsonsuite) covering all 15 Yul AST node types, wire-format quirks,astJsonSchema()structure/recursion, and negative import assertions.Verification
soltest --run_test=StandardCompiler -- --no-semantic-tests: 66/66 passed (1,877 assertions)soltest --run_test=CommandLineParserTest -- --no-semantic-tests: 21/21 passed (195 assertions)soltest --run_test=CommandLineInterfaceTest -- --no-semantic-tests: 39/39 passed (372 assertions)soltest --run_test=YulAsmJson -- --no-semantic-tests: 4/4 passed (103 assertions)soltest --run_test=YulParser,YulObjectParser,SolidityInlineAssembly -- --no-semantic-tests: 89/89 passed (465 assertions)soltest --run_test="ASTJSON/*" -- --no-semantic-tests: 71/71 passed (71 assertions — byte-for-byte Yul inline assembly compatibility)solc --standard-json-schema --pretty-jsonvalidated againsttest/cmdlineTests/standard_*/input.json: 145/145 valid JSON inputs pass (0 unexpected failures); 24 expected-JSONErrorinputs rejected directly by schema.