{ "compiled_from": { "compiler_id": "TCS-STAGE0-IGNITION-0001", "compiler_state": "FOREIGN_HOST_BOOTSTRAP_SEED_NOT_SELF_HOSTED", "source_sha256": "d375adb7a715c93320c14f3e38a3fa10bc764493d62cfa671e5dfd2d4d3b049f" }, "compiler_definition": { "canonicalization": { "comments_in_semantic_digest": false, "final_newline": true, "integers": "MINIMAL_DECIMAL", "line_end": "LF", "list_order": "PRESERVE_SOURCE_SEMANTICS", "object_keys": "UTF8_BYTE_ORDER", "semantic_digest": "SHA256", "strings": "JSON_ESCAPE_NO_OPTIONAL_ESCAPE" }, "header": { "bootstrap_seed": "TCS-STAGE0-IGNITION-0001", "lifecycle": "STABLE_COMPILER_SOURCE_CANDIDATE", "name_zh": "TCS 第一代自举编译器", "output": "GIR/1", "profile": "HLDP-NP/1", "schema": "tcs.compiler/v1", "version": "0.1.0" }, "lexer_rules": { "L001": { "emit_error": "TCS-E0001", "when": "BOM_AT_START" }, "L002": { "action": "SKIP_WITH_SOURCE_POSITION", "when": "WHITESPACE_OR_COMMENT" }, "L003": { "action": "READ_JSON_ESCAPED_TEXT", "on_unterminated": "TCS-E0002", "when": "DOUBLE_QUOTE" }, "L004": { "action": "READ_SIGNED_DECIMAL_INT", "on_overflow": "TCS-E2001", "when": "MINUS_OR_ASCII_DIGIT" }, "L005": { "action": "READ_IDENTIFIER_OR_KEYWORD", "when": "UNICODE_LETTER_OR_UNDERSCORE" }, "L006": { "action": "EMIT_PUNCTUATION_TOKEN", "when": "REGISTERED_PUNCTUATION" }, "L007": { "emit_error": "TCS-E1001", "when": "OTHER_CHARACTER" } }, "lowering_to_gir": { "G001": { "from": "header", "to": "identity", "transform": "COPY_ID_VERSION_PROFILE_AND_LOCK_PROTOCOLS" }, "G002": { "from": "source", "to": "compiled_from", "transform": "VERIFY_AND_BIND_SOURCE_SHA256" }, "G003": { "from": "subject", "to": "subject", "transform": "RESOLVE_VERIFIED_SUBJECT" }, "G004": { "from": "target", "to": "exact_target", "transform": "RESOLVE_PATH_STATE_AND_FINGERPRINT" }, "G005": { "from": "actions", "to": "deterministic_action_graph", "transform": "SORT_ACTION_IDS_AND_RESOLVE_ALL_EDGES" }, "G006": { "from": "authority", "to": "authority_proof", "transform": "BIND_PROOF_WITHOUT_EXPANDING_SCOPE" }, "G007": { "from": "resources", "to": "resource_plan", "transform": "NORMALIZE_INTEGER_LIMITS" }, "G008": { "from": "stop", "to": "timeout_and_stop", "transform": "COPY_EXPLICIT_STOP_SEMANTICS" }, "G009": { "from": "cleanup", "to": "cleanup_plan", "transform": "COPY_EXACT_BOUNDARY" }, "G010": { "from": "rollback", "to": "rollback_plan", "transform": "COPY_ACTIONS_AND_VERIFICATION" }, "G011": { "from": "receipt", "to": "receipt_plan", "transform": "BIND_MACHINE_AND_HUMAN_OUTPUTS" }, "G012": { "from": "all", "to": "unresolved_natural_language", "transform": "MUST_BE_FALSE" } }, "output_contract": { "compiler_provenance_required": true, "drifting_dependency": false, "schema": "guanghu.gir/v1", "target_must_be_exact": true, "unresolved_authority": false, "unresolved_natural_language": false }, "parser_rules": { "P001": { "nonterminal": "document", "sequence": [ "prologue", "declaration", "EOF" ] }, "P002": { "nonterminal": "prologue", "sequence": [ "TCS", "version", "SEMICOLON" ] }, "P003": { "nonterminal": "declaration", "sequence": [ "declaration_kind", "identifier", "block" ] }, "P004": { "nonterminal": "block", "sequence": [ "LBRACE", "member_zero_or_more", "RBRACE" ] }, "P005": { "alternatives": [ "identifier_assignment", "identifier_typed_assignment", "identifier_block" ], "nonterminal": "member" }, "P006": { "alternatives": [ "TEXT", "INT", "BOOL", "NULL", "IDENTIFIER", "array", "inline_object" ], "nonterminal": "value" }, "P007": { "emit_error": "TCS-E1002", "when": "DUPLICATE_MEMBER_IN_SAME_BLOCK" }, "P008": { "emit_error": "TCS-E1001", "when": "TOKEN_AFTER_TOP_LEVEL_DECLARATION" } }, "program_validation": { "V001": { "error_missing": "TCS-E1004", "error_unknown": "TCS-E1003", "rule": "EXACT_REQUIRED_SECTIONS", "standard": "TCS-FIELD-STANDARD-0001" }, "V002": { "error": "TCS-E1003", "rule": "CLOSED_FIELDS_PER_SECTION" }, "V003": { "error": "TCS-E2002", "rule": "ALL_INPUT_OUTPUT_AND_ACTION_REFS_RESOLVE" }, "V004": { "error": "TCS-E2101", "rule": "ALL_OPERATIONS_REGISTERED_AT_LOCKED_VERSION" }, "V005": { "errors": [ "TCS-E3001", "TCS-E3002" ], "rule": "SOURCE_ID_URI_HASH_AND_ROLE_RESOLVE" }, "V006": { "errors": [ "TCS-E4001", "TCS-E4002", "TCS-E4003" ], "rule": "SUBJECT_TARGET_AND_AUTHORITY_EXACT" }, "V007": { "error": "TCS-E2001", "rule": "ACTION_GRAPH_REACHABLE_AND_TERMINATING" }, "V008": { "error": "TCS-E1004", "rule": "FAILURE_STOP_CLEANUP_ROLLBACK_AND_RECEIPT_PRESENT" }, "V009": { "error": "TCS-E3002", "rule": "NO_FORBIDDEN_RUNTIME_PLACEHOLDER" }, "V010": { "error": "TCS-E4001", "rule": "RELATION_AND_EMOTION_DO_NOT_GRANT_AUTHORITY" } }, "self_host": { "compiler_A_compiles_stage1_to": "compiler-B.gir", "current_state": "READ_EXTERNAL_SELF_HOST_ACCEPTANCE_RECEIPT", "fixed_point": "SEMANTIC_SHA256_A_EQUALS_B", "minimum_runnable_module_test": "REQUIRED", "negative_corpus_test": "REQUIRED", "stage0_compiles_stage1_to": "compiler-A.gir", "stage0_disabled_test": "REQUIRED", "standard_library_test": "REQUIRED" }, "semantic_types": { "containers": [ "List", "Set", "Map", "Option", "Ref", "Evidence", "Record" ], "domains": [ "Subject", "ExactTarget", "AuthorityProof", "ActionGraph", "ReceiptPlan", "RelationEvent" ], "floating_point": "FORBIDDEN_V0_1", "implicit_conversion": "FORBIDDEN", "scalars": [ "Text", "Bool", "Int", "UInt", "DecimalText", "Bytes", "DurationMs", "Timestamp", "Sha256", "NumberId", "Path", "Uri", "ErrorCode" ] }, "source_language": { "comments": [ "LINE_COMMENT", "BLOCK_COMMENT" ], "declaration_kinds": [ "PROGRAM", "MODULE", "PROTOCOL", "COMPILER", "EVENT", "RECEIPT" ], "encoding": "UTF8_LF_NO_BOM", "prologue": [ "TCS", "VERSION", "SEMICOLON" ], "punctuation": [ "LBRACE", "RBRACE", "LBRACKET", "RBRACKET", "LESS", "GREATER", "COLON", "EQUAL", "COMMA", "SEMICOLON", "DOT" ], "scalar_tokens": [ "IDENTIFIER", "TEXT", "INT", "BOOL", "NULL" ] } }, "execution_abi": "TCS-COMPILER-GIR-EXEC/1", "identity": { "compiler_id": "TCS-COMPILER-STAGE1-0001", "definition_sha256": "c2bf0e4e93f9952daf661628aa7b17891718c53b9fbb5e77636f5f40812ff9f6", "language_version": "0.1" }, "native_self_hosted": false, "schema": "guanghu.compiler-gir/v1" }