ibex 0.2.0 → 0.4.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +100 -272
- data/docs/architecture.md +187 -35
- data/docs/bison-import.md +103 -0
- data/docs/comparison-policy.md +127 -0
- data/docs/configuration-model.md +59 -0
- data/docs/configuration-report.md +28 -0
- data/docs/conflict-explanation-reviews/v1/records/README.md +28 -0
- data/docs/conflict-explanation-study.md +62 -0
- data/docs/construction-profiling.md +157 -0
- data/docs/cst-migration.md +3 -4
- data/docs/cst.md +24 -0
- data/docs/decisions/0000-template.md +24 -0
- data/docs/decisions/0001-separate-ir-pipeline.md +34 -0
- data/docs/decisions/0002-opaque-user-code-boundary.md +32 -0
- data/docs/decisions/0003-self-hosted-grammar-frontend.md +32 -0
- data/docs/decisions/0004-shared-semantic-and-lossless-source-model.md +33 -0
- data/docs/decisions/0005-contained-grammar-composition.md +34 -0
- data/docs/decisions/0006-bounded-structural-grammar-lowering.md +32 -0
- data/docs/decisions/0007-shared-parser-construction-pipeline.md +33 -0
- data/docs/decisions/0008-versioned-runtime-package-boundary.md +36 -0
- data/docs/decisions/0009-isolated-parser-sessions.md +34 -0
- data/docs/decisions/0010-committed-runtime-observation.md +34 -0
- data/docs/decisions/0011-versioned-semantic-action-boundary.md +37 -0
- data/docs/decisions/0012-bounded-nonexecuting-analysis.md +37 -0
- data/docs/decisions/0013-transactional-generation-publication.md +37 -0
- data/docs/decisions/0014-versioned-generated-lexer.md +35 -0
- data/docs/decisions/0015-worker-isolated-browser-analysis.md +32 -0
- data/docs/decisions/0016-red-green-concrete-syntax.md +34 -0
- data/docs/decisions/0017-persistent-syntax-artifacts.md +35 -0
- data/docs/decisions/0018-conservative-incremental-syntax-reuse.md +38 -0
- data/docs/decisions/0019-runtime-syntax-session-boundary.md +51 -0
- data/docs/decisions/0020-grammar-ir-parser-contract.md +65 -0
- data/docs/decisions/0021-data-only-parser-table-sidecar.md +50 -0
- data/docs/decisions/0022-manifest-bound-verification-report.md +77 -0
- data/docs/decisions/0023-syntax-only-repair-results.md +48 -0
- data/docs/decisions/0024-direct-ielr-construction.md +42 -0
- data/docs/decisions/README.md +74 -0
- data/docs/declarative-configuration.md +274 -0
- data/docs/development.md +196 -2
- data/docs/direct-ielr-decision.md +120 -0
- data/docs/direct-multi-entry-decision.md +82 -0
- data/docs/editor-setup.md +2 -1
- data/docs/error-ux-review-rubric-v1.md +117 -0
- data/docs/error-ux-reviews/v1/records/README.md +22 -0
- data/docs/error-ux-round2-review-status-v1.json +27 -0
- data/docs/error-ux-round2-reviews/v1/records/README.md +30 -0
- data/docs/error-ux-round2-v1.json +1617 -0
- data/docs/error-ux-round2.md +111 -0
- data/docs/error-ux.md +54 -0
- data/docs/getting-started.md +80 -0
- data/docs/grammar-reference.md +184 -13
- data/docs/ielr-design.md +43 -0
- data/docs/ielr.md +92 -0
- data/docs/impact.md +101 -0
- data/docs/ja/bison-import.md +51 -0
- data/docs/ja/stable-api.md +53 -0
- data/docs/lexer-construction-profile.md +109 -0
- data/docs/lexer-migration.md +5 -0
- data/docs/maturity.md +129 -0
- data/docs/project-site-strategy.md +54 -0
- data/docs/racc-migration-evidence.md +45 -0
- data/docs/racc-migration.md +11 -0
- data/docs/release-readiness.md +126 -68
- data/docs/repair-semantics.md +123 -0
- data/docs/runtime-abi-evolution.md +310 -0
- data/docs/stability.md +145 -34
- data/docs/status.md +43 -0
- data/docs/syntax-sessions.md +183 -0
- data/docs/table-artifact.md +125 -0
- data/docs/test-interactions.md +219 -0
- data/docs/verification-report.md +137 -0
- data/docs/verifier-trust-boundary.md +199 -0
- data/docs/workloads.md +132 -0
- data/lib/ibex/analysis/digraph.rb +128 -0
- data/lib/ibex/analysis/sets.rb +14 -0
- data/lib/ibex/analysis.rb +1 -0
- data/lib/ibex/bison_import/importer.rb +516 -0
- data/lib/ibex/bison_import/tokenizer.rb +260 -0
- data/lib/ibex/bison_import.rb +200 -0
- data/lib/ibex/bounded_subprocess.rb +171 -0
- data/lib/ibex/cli/ambiguity.rb +14 -5
- data/lib/ibex/cli/analysis.rb +134 -0
- data/lib/ibex/cli/bison_import.rb +121 -0
- data/lib/ibex/cli/config.rb +128 -0
- data/lib/ibex/cli/diagnostics.rb +31 -11
- data/lib/ibex/cli/documentation.rb +11 -8
- data/lib/ibex/cli/equiv.rb +169 -0
- data/lib/ibex/cli/error_messages.rb +11 -4
- data/lib/ibex/cli/explain.rb +14 -5
- data/lib/ibex/cli/fix.rb +203 -0
- data/lib/ibex/cli/formatting.rb +11 -10
- data/lib/ibex/cli/fuzz.rb +200 -0
- data/lib/ibex/cli/fuzz_regressions.rb +145 -0
- data/lib/ibex/cli/generation_artifacts.rb +53 -2
- data/lib/ibex/cli/generation_error_messages.rb +1 -1
- data/lib/ibex/cli/grammar_tests.rb +32 -14
- data/lib/ibex/cli/impact.rb +393 -0
- data/lib/ibex/cli/ir_tools.rb +5 -61
- data/lib/ibex/cli/outputs.rb +60 -33
- data/lib/ibex/cli/reduce.rb +202 -0
- data/lib/ibex/cli/reduce_reporting.rb +71 -0
- data/lib/ibex/cli/samples.rb +49 -23
- data/lib/ibex/cli/verify.rb +116 -0
- data/lib/ibex/cli/watch.rb +6 -5
- data/lib/ibex/cli.rb +362 -56
- data/lib/ibex/codegen/action_locations.rb +1 -1
- data/lib/ibex/codegen/action_method_source.rb +5 -6
- data/lib/ibex/codegen/action_source.rb +3 -2
- data/lib/ibex/codegen/ambiguity.rb +5 -4
- data/lib/ibex/codegen/explain.rb +123 -55
- data/lib/ibex/codegen/generated_action_abi.rb +10 -5
- data/lib/ibex/codegen/rbs.rb +15 -7
- data/lib/ibex/codegen/report.rb +25 -13
- data/lib/ibex/codegen/ruby.rb +28 -64
- data/lib/ibex/codegen/ruby_actions.rb +9 -6
- data/lib/ibex/codegen/ruby_syntax.rb +15 -9
- data/lib/ibex/configuration/analysis_grammar.rb +35 -0
- data/lib/ibex/configuration/explanation.rb +421 -0
- data/lib/ibex/configuration/inspector.rb +232 -0
- data/lib/ibex/configuration.rb +580 -0
- data/lib/ibex/coverage/collector.rb +21 -11
- data/lib/ibex/coverage/event_stream.rb +13 -7
- data/lib/ibex/coverage/report.rb +26 -18
- data/lib/ibex/coverage/runtime_event_validator.rb +30 -21
- data/lib/ibex/delta_reducer.rb +99 -0
- data/lib/ibex/diff.rb +141 -0
- data/lib/ibex/equiv/machine.rb +135 -0
- data/lib/ibex/equiv.rb +373 -0
- data/lib/ibex/fix.rb +557 -0
- data/lib/ibex/frontend/ast.rb +22 -2
- data/lib/ibex/frontend/bootstrap_parser.rb +6 -13
- data/lib/ibex/frontend/diagnostic.rb +1 -1
- data/lib/ibex/frontend/formatter.rb +72 -26
- data/lib/ibex/frontend/generated_parser.rb +147 -117
- data/lib/ibex/frontend/generated_parser_base.rb +7 -3
- data/lib/ibex/frontend/generated_parser_includes.rb +1 -11
- data/lib/ibex/frontend/generation.rb +1 -1
- data/lib/ibex/frontend/parser/declarations.rb +17 -2
- data/lib/ibex/frontend/parser_configuration_support.rb +56 -0
- data/lib/ibex/frontend/regenerator.rb +1 -0
- data/lib/ibex/frontend/resolution.rb +2 -1
- data/lib/ibex/frontend/resolver.rb +1 -1
- data/lib/ibex/frontend/rule_documentation.rb +2 -1
- data/lib/ibex/frontend/source_cursor.rb +2 -2
- data/lib/ibex/frontend/source_span.rb +9 -1
- data/lib/ibex/frontend/token_adapter/declaration_state.rb +38 -6
- data/lib/ibex/frontend/token_adapter.rb +10 -0
- data/lib/ibex/frontend.rb +1 -0
- data/lib/ibex/fuzz.rb +219 -0
- data/lib/ibex/generation_input.rb +1 -1
- data/lib/ibex/generation_manifest.rb +36 -25
- data/lib/ibex/generation_transaction.rb +1 -1
- data/lib/ibex/generation_transaction_recovery.rb +4 -4
- data/lib/ibex/generation_transaction_validation.rb +2 -2
- data/lib/ibex/grammar_tests.rb +1 -1
- data/lib/ibex/impact/action_impact.rb +148 -0
- data/lib/ibex/impact/automaton_impact.rb +57 -0
- data/lib/ibex/impact/coverage_impact.rb +53 -0
- data/lib/ibex/impact/graph.rb +132 -0
- data/lib/ibex/impact/propagation.rb +147 -0
- data/lib/ibex/impact/report.rb +273 -0
- data/lib/ibex/impact/seeds.rb +69 -0
- data/lib/ibex/impact/severity.rb +139 -0
- data/lib/ibex/impact.rb +16 -0
- data/lib/ibex/ir/automaton_ir.rb +61 -19
- data/lib/ibex/ir/grammar_ir.rb +76 -45
- data/lib/ibex/ir/lexer_ir.rb +5 -5
- data/lib/ibex/ir/parser_contract.rb +135 -0
- data/lib/ibex/ir/serialize.rb +203 -76
- data/lib/ibex/ir/validator/automaton.rb +64 -34
- data/lib/ibex/ir/validator/base.rb +51 -33
- data/lib/ibex/ir/validator/grammar.rb +113 -83
- data/lib/ibex/ir/validator/lexer.rb +2 -2
- data/lib/ibex/ir/validator.rb +2 -1
- data/lib/ibex/ir.rb +16 -3
- data/lib/ibex/lalr/build_metrics.rb +50 -2
- data/lib/ibex/lalr/builder.rb +191 -56
- data/lib/ibex/lalr/conflict_search.rb +15 -4
- data/lib/ibex/lalr/counterexample.rb +19 -14
- data/lib/ibex/lalr/direct_lookaheads.rb +110 -57
- data/lib/ibex/lalr/goto_follows.rb +229 -0
- data/lib/ibex/lalr/ielr/annotator.rb +214 -0
- data/lib/ibex/lalr/ielr/bits.rb +28 -0
- data/lib/ibex/lalr/ielr/inadequacy.rb +47 -0
- data/lib/ibex/lalr/ielr/item_lookaheads.rb +78 -0
- data/lib/ibex/lalr/ielr/pipeline.rb +75 -0
- data/lib/ibex/lalr/ielr/split_stability.rb +78 -0
- data/lib/ibex/lalr/ielr/split_state.rb +20 -0
- data/lib/ibex/lalr/ielr/state_splitter.rb +258 -0
- data/lib/ibex/lalr/ielr_partition.rb +22 -8
- data/lib/ibex/lalr/inadequacy_report.rb +50 -0
- data/lib/ibex/lalr/lookahead_propagation.rb +111 -0
- data/lib/ibex/lalr/lr0_collection.rb +121 -0
- data/lib/ibex/lalr/unreachable_states.rb +80 -0
- data/lib/ibex/lalr.rb +52 -1
- data/lib/ibex/location.rb +3 -3
- data/lib/ibex/lsp/document_handlers.rb +9 -7
- data/lib/ibex/lsp/initialization_handlers.rb +9 -7
- data/lib/ibex/lsp/navigation_handlers.rb +25 -11
- data/lib/ibex/lsp/parser_configuration_assistance.rb +149 -0
- data/lib/ibex/lsp/position_codec.rb +6 -2
- data/lib/ibex/lsp/request_handlers.rb +3 -2
- data/lib/ibex/lsp/request_support.rb +14 -7
- data/lib/ibex/lsp/server.rb +13 -11
- data/lib/ibex/lsp/symbol_index.rb +13 -13
- data/lib/ibex/lsp/symbol_index_builder.rb +30 -20
- data/lib/ibex/lsp/symbol_occurrence.rb +8 -2
- data/lib/ibex/lsp/transport.rb +13 -3
- data/lib/ibex/lsp/workspace.rb +5 -4
- data/lib/ibex/lsp/workspace_analyzer.rb +1 -1
- data/lib/ibex/lsp.rb +1 -0
- data/lib/ibex/messages/en.yml +28 -0
- data/lib/ibex/messages/ja.yml +28 -0
- data/lib/ibex/messages.rb +68 -0
- data/lib/ibex/metrics.rb +175 -0
- data/lib/ibex/normalize/declarations.rb +2 -0
- data/lib/ibex/normalize/diagnostics.rb +63 -38
- data/lib/ibex/normalize/expander.rb +5 -4
- data/lib/ibex/normalize/expression.rb +8 -6
- data/lib/ibex/normalize/grammar_builder.rb +26 -0
- data/lib/ibex/normalize/inline_expansion.rb +100 -49
- data/lib/ibex/normalize/lexer.rb +3 -3
- data/lib/ibex/normalize/parameter_ebnf_lowering.rb +11 -10
- data/lib/ibex/normalize/parameter_lowering.rb +40 -23
- data/lib/ibex/normalize/parameters.rb +31 -4
- data/lib/ibex/normalize/parser_configuration.rb +70 -0
- data/lib/ibex/normalize.rb +10 -20
- data/lib/ibex/racc_migration/report.rb +6 -3
- data/lib/ibex/rake_task.rb +1 -1
- data/lib/ibex/samples.rb +43 -13
- data/lib/ibex/table_artifact/builder.rb +266 -0
- data/lib/ibex/table_artifact/cst_projection.rb +70 -0
- data/lib/ibex/table_artifact/document.rb +39 -0
- data/lib/ibex/table_artifact/executor.rb +187 -0
- data/lib/ibex/table_artifact/serializer.rb +57 -0
- data/lib/ibex/table_artifact/validator/metadata.rb +179 -0
- data/lib/ibex/table_artifact/validator/support.rb +86 -0
- data/lib/ibex/table_artifact/validator/tables.rb +238 -0
- data/lib/ibex/table_artifact/validator.rb +253 -0
- data/lib/ibex/table_artifact.rb +88 -0
- data/lib/ibex/table_simulation/result.rb +6 -2
- data/lib/ibex/table_simulation/step.rb +3 -1
- data/lib/ibex/tables.rb +14 -0
- data/lib/ibex/verifiable_generation_bundle.rb +86 -0
- data/lib/ibex/verification_report/builder.rb +159 -0
- data/lib/ibex/verification_report/canonical_ir.rb +123 -0
- data/lib/ibex/verification_report/logical_path.rb +68 -0
- data/lib/ibex/verification_report/validator.rb +329 -0
- data/lib/ibex/verification_report.rb +69 -0
- data/lib/ibex/verify/action_correspondence.rb +138 -0
- data/lib/ibex/verify/language_witness.rb +295 -0
- data/lib/ibex/verify/reference_collection.rb +190 -0
- data/lib/ibex/verify/result.rb +73 -0
- data/lib/ibex/verify/verifier.rb +598 -0
- data/lib/ibex/verify.rb +15 -0
- data/lib/ibex/version.rb +1 -1
- data/lib/ibex/watch/runner.rb +10 -1
- data/lib/ibex/watch/source_snapshot.rb +13 -8
- data/lib/ibex.rb +11 -0
- data/schema/{automaton-ir-v1.schema.json → automaton-ir-definitions.schema.json} +6 -6
- data/schema/{automaton-ir-v2.schema.json → automaton-ir.schema.json} +14 -7
- data/schema/bison-import-v1.schema.json +106 -0
- data/schema/conflict-explanation-review-v1.schema.json +196 -0
- data/schema/conflict-explanation-study-v1.schema.json +528 -0
- data/schema/construction-profile-v1.schema.json +779 -0
- data/schema/diff-v1.schema.json +41 -0
- data/schema/direct-ielr-decision-v1.schema.json +200 -0
- data/schema/equiv-v1.schema.json +64 -0
- data/schema/error-ux-review-v1.schema.json +609 -0
- data/schema/error-ux-round2-review-v1.schema.json +191 -0
- data/schema/error-ux-round2-v1.schema.json +519 -0
- data/schema/explain-v1.schema.json +63 -1
- data/schema/fix-v1.schema.json +64 -0
- data/schema/fix-v2.schema.json +66 -0
- data/schema/fix-v3.schema.json +101 -0
- data/schema/fuzz-regression-v1.schema.json +79 -0
- data/schema/fuzz-v1.schema.json +114 -0
- data/schema/{grammar-ir-v2.schema.json → grammar-ir-extensions.schema.json} +20 -65
- data/schema/{grammar-ir-v1.schema.json → grammar-ir-foundation.schema.json} +3 -3
- data/schema/grammar-ir.schema.json +271 -0
- data/schema/ielr-benchmark-v1.schema.json +85 -0
- data/schema/impact-v1.schema.json +208 -0
- data/schema/lexer-profile-v1.schema.json +491 -0
- data/schema/metrics-v1.schema.json +60 -0
- data/schema/reduce-v1.schema.json +22 -0
- data/schema/reduce-v2.schema.json +63 -0
- data/schema/table-artifact-v1.schema.json +377 -0
- data/schema/verification-report-v1.schema.json +222 -0
- data/schema/verify-v1.schema.json +42 -0
- data/sig/ibex/analysis/digraph.rbs +19 -0
- data/sig/ibex/analysis/sets.rbs +10 -0
- data/sig/ibex/bison_import/importer.rbs +140 -0
- data/sig/ibex/bison_import/tokenizer.rbs +91 -0
- data/sig/ibex/bison_import.rbs +95 -0
- data/sig/ibex/bounded_subprocess.rbs +76 -0
- data/sig/ibex/cli/ambiguity.rbs +6 -0
- data/sig/ibex/cli/analysis.rbs +43 -0
- data/sig/ibex/cli/bison_import.rbs +32 -0
- data/sig/ibex/cli/config.rbs +35 -0
- data/sig/ibex/cli/diagnostics.rbs +16 -3
- data/sig/ibex/cli/documentation.rbs +5 -1
- data/sig/ibex/cli/equiv.rbs +49 -0
- data/sig/ibex/cli/error_messages.rbs +6 -0
- data/sig/ibex/cli/explain.rbs +6 -0
- data/sig/ibex/cli/fix.rbs +53 -0
- data/sig/ibex/cli/formatting.rbs +5 -1
- data/sig/ibex/cli/fuzz.rbs +47 -0
- data/sig/ibex/cli/fuzz_regressions.rbs +40 -0
- data/sig/ibex/cli/generation_artifacts.rbs +21 -2
- data/sig/ibex/cli/generation_error_messages.rbs +2 -2
- data/sig/ibex/cli/grammar_tests.rbs +15 -3
- data/sig/ibex/cli/impact.rbs +95 -0
- data/sig/ibex/cli/ir_tools.rbs +7 -19
- data/sig/ibex/cli/outputs.rbs +9 -3
- data/sig/ibex/cli/reduce.rbs +60 -0
- data/sig/ibex/cli/reduce_reporting.rbs +27 -0
- data/sig/ibex/cli/samples.rbs +8 -0
- data/sig/ibex/cli/verify.rbs +28 -0
- data/sig/ibex/cli/watch.rbs +2 -2
- data/sig/ibex/cli.rbs +79 -5
- data/sig/ibex/codegen/action_method_source.rbs +4 -4
- data/sig/ibex/codegen/explain.rbs +45 -25
- data/sig/ibex/codegen/generated_action_abi.rbs +14 -10
- data/sig/ibex/codegen/rbs.rbs +12 -10
- data/sig/ibex/codegen/report.rbs +12 -12
- data/sig/ibex/codegen/ruby.rbs +18 -15
- data/sig/ibex/codegen/ruby_actions.rbs +6 -6
- data/sig/ibex/codegen/ruby_syntax.rbs +10 -8
- data/sig/ibex/configuration/analysis_grammar.rbs +13 -0
- data/sig/ibex/configuration/explanation.rbs +195 -0
- data/sig/ibex/configuration/inspector.rbs +53 -0
- data/sig/ibex/configuration.rbs +242 -0
- data/sig/ibex/coverage/collector.rbs +16 -14
- data/sig/ibex/coverage/event_stream.rbs +12 -10
- data/sig/ibex/coverage/report.rbs +20 -18
- data/sig/ibex/coverage/runtime_event_validator.rbs +38 -36
- data/sig/ibex/delta_reducer.rbs +38 -0
- data/sig/ibex/diff.rbs +47 -0
- data/sig/ibex/equiv/machine.rbs +54 -0
- data/sig/ibex/equiv.rbs +129 -0
- data/sig/ibex/fix.rbs +138 -0
- data/sig/ibex/frontend/ast.rbs +33 -7
- data/sig/ibex/frontend/bootstrap_parser.rbs +2 -0
- data/sig/ibex/frontend/diagnostic.rbs +2 -2
- data/sig/ibex/frontend/formatter.rbs +38 -30
- data/sig/ibex/frontend/generated_parser.rbs +87 -77
- data/sig/ibex/frontend/generated_parser_base.rbs +4 -2
- data/sig/ibex/frontend/parser/declarations.rbs +3 -0
- data/sig/ibex/frontend/parser_configuration_support.rbs +27 -0
- data/sig/ibex/frontend/resolution.rbs +3 -2
- data/sig/ibex/frontend/source_cursor.rbs +2 -2
- data/sig/ibex/frontend/source_span.rbs +5 -2
- data/sig/ibex/frontend/token_adapter/declaration_state.rbs +13 -1
- data/sig/ibex/frontend/token_adapter.rbs +6 -0
- data/sig/ibex/fuzz.rbs +71 -0
- data/sig/ibex/generation_input.rbs +2 -2
- data/sig/ibex/generation_manifest.rbs +35 -32
- data/sig/ibex/generation_transaction_recovery.rbs +2 -2
- data/sig/ibex/generation_transaction_validation.rbs +2 -2
- data/sig/ibex/grammar_tests.rbs +2 -2
- data/sig/ibex/impact/action_impact.rbs +58 -0
- data/sig/ibex/impact/automaton_impact.rbs +37 -0
- data/sig/ibex/impact/coverage_impact.rbs +28 -0
- data/sig/ibex/impact/graph.rbs +67 -0
- data/sig/ibex/impact/propagation.rbs +56 -0
- data/sig/ibex/impact/report.rbs +107 -0
- data/sig/ibex/impact/seeds.rbs +36 -0
- data/sig/ibex/impact/severity.rbs +55 -0
- data/sig/ibex/impact.rbs +6 -0
- data/sig/ibex/ir/automaton_ir.rbs +30 -11
- data/sig/ibex/ir/grammar_ir.rbs +41 -27
- data/sig/ibex/ir/lexer_ir.rbs +8 -8
- data/sig/ibex/ir/parser_contract.rbs +69 -0
- data/sig/ibex/ir/serialize.rbs +63 -28
- data/sig/ibex/ir/validator/automaton.rbs +47 -44
- data/sig/ibex/ir/validator/base.rbs +35 -31
- data/sig/ibex/ir/validator/grammar.rbs +78 -67
- data/sig/ibex/ir/validator/lexer.rbs +4 -4
- data/sig/ibex/ir.rbs +9 -3
- data/sig/ibex/lalr/build_metrics.rbs +42 -2
- data/sig/ibex/lalr/builder.rbs +75 -24
- data/sig/ibex/lalr/conflict_search.rbs +5 -2
- data/sig/ibex/lalr/counterexample.rbs +17 -14
- data/sig/ibex/lalr/direct_lookaheads.rbs +35 -28
- data/sig/ibex/lalr/goto_follows.rbs +89 -0
- data/sig/ibex/lalr/ielr/annotator.rbs +67 -0
- data/sig/ibex/lalr/ielr/bits.rbs +14 -0
- data/sig/ibex/lalr/ielr/inadequacy.rbs +24 -0
- data/sig/ibex/lalr/ielr/item_lookaheads.rbs +35 -0
- data/sig/ibex/lalr/ielr/pipeline.rbs +17 -0
- data/sig/ibex/lalr/ielr/split_stability.rbs +27 -0
- data/sig/ibex/lalr/ielr/split_state.rbs +14 -0
- data/sig/ibex/lalr/ielr/state_splitter.rbs +76 -0
- data/sig/ibex/lalr/ielr_partition.rbs +17 -5
- data/sig/ibex/lalr/inadequacy_report.rbs +21 -0
- data/sig/ibex/lalr/lookahead_propagation.rbs +38 -0
- data/sig/ibex/lalr/lr0_collection.rbs +50 -0
- data/sig/ibex/lalr/unreachable_states.rbs +25 -0
- data/sig/ibex/lalr.rbs +11 -1
- data/sig/ibex/location.rbs +6 -6
- data/sig/ibex/lsp/document_handlers.rbs +8 -8
- data/sig/ibex/lsp/initialization_handlers.rbs +12 -12
- data/sig/ibex/lsp/navigation_handlers.rbs +15 -12
- data/sig/ibex/lsp/parser_configuration_assistance.rbs +49 -0
- data/sig/ibex/lsp/position_codec.rbs +8 -4
- data/sig/ibex/lsp/request_handlers.rbs +4 -4
- data/sig/ibex/lsp/request_support.rbs +8 -8
- data/sig/ibex/lsp/server.rbs +16 -16
- data/sig/ibex/lsp/symbol_index.rbs +20 -21
- data/sig/ibex/lsp/symbol_index_builder.rbs +9 -8
- data/sig/ibex/lsp/symbol_occurrence.rbs +11 -5
- data/sig/ibex/lsp/transport.rbs +18 -6
- data/sig/ibex/lsp/workspace.rbs +3 -2
- data/sig/ibex/lsp/workspace_analyzer.rbs +1 -1
- data/sig/ibex/messages.rbs +26 -0
- data/sig/ibex/metrics.rbs +50 -0
- data/sig/ibex/normalize/diagnostics.rbs +4 -4
- data/sig/ibex/normalize/expander.rbs +2 -2
- data/sig/ibex/normalize/expression.rbs +10 -8
- data/sig/ibex/normalize/grammar_builder.rbs +11 -0
- data/sig/ibex/normalize/inline_expansion.rbs +59 -50
- data/sig/ibex/normalize/lexer.rbs +4 -4
- data/sig/ibex/normalize/parameter_ebnf_lowering.rbs +15 -14
- data/sig/ibex/normalize/parameter_lowering.rbs +18 -18
- data/sig/ibex/normalize/parameters.rbs +13 -8
- data/sig/ibex/normalize/parser_configuration.rbs +23 -0
- data/sig/ibex/normalize.rbs +11 -5
- data/sig/ibex/racc_migration/report.rbs +8 -6
- data/sig/ibex/rake_task.rbs +1 -1
- data/sig/ibex/samples.rbs +13 -4
- data/sig/ibex/table_artifact/builder.rbs +93 -0
- data/sig/ibex/table_artifact/cst_projection.rbs +20 -0
- data/sig/ibex/table_artifact/document.rbs +27 -0
- data/sig/ibex/table_artifact/executor.rbs +66 -0
- data/sig/ibex/table_artifact/serializer.rbs +25 -0
- data/sig/ibex/table_artifact/validator/metadata.rbs +52 -0
- data/sig/ibex/table_artifact/validator/support.rbs +46 -0
- data/sig/ibex/table_artifact/validator/tables.rbs +63 -0
- data/sig/ibex/table_artifact/validator.rbs +66 -0
- data/sig/ibex/table_artifact.rbs +32 -0
- data/sig/ibex/table_simulation/result.rbs +8 -4
- data/sig/ibex/table_simulation/step.rbs +4 -2
- data/sig/ibex/tables.rbs +10 -9
- data/sig/ibex/verifiable_generation_bundle.rbs +24 -0
- data/sig/ibex/verification_report/builder.rbs +53 -0
- data/sig/ibex/verification_report/canonical_ir.rbs +41 -0
- data/sig/ibex/verification_report/logical_path.rbs +34 -0
- data/sig/ibex/verification_report/validator.rbs +114 -0
- data/sig/ibex/verification_report.rbs +44 -0
- data/sig/ibex/verify/action_correspondence.rbs +50 -0
- data/sig/ibex/verify/language_witness.rbs +112 -0
- data/sig/ibex/verify/reference_collection.rbs +63 -0
- data/sig/ibex/verify/result.rbs +52 -0
- data/sig/ibex/verify/verifier.rbs +170 -0
- data/sig/ibex/verify.rbs +6 -0
- data/sig/ibex/watch/runner.rbs +12 -2
- data/sig/ibex/watch/source_snapshot.rbs +13 -9
- metadata +254 -12
- data/lib/ibex/ir/migration.rb +0 -120
- data/sig/ibex/ir/migration.rbs +0 -34
|
@@ -0,0 +1,519 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ydah/ibex/main/schema/error-ux-round2-v1.schema.json",
|
|
4
|
+
"title": "Ibex H003 error UX repository evidence version 1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": [
|
|
7
|
+
"ibex_error_ux_round2",
|
|
8
|
+
"schema_version",
|
|
9
|
+
"repository_capture",
|
|
10
|
+
"problem",
|
|
11
|
+
"semantics",
|
|
12
|
+
"trust_boundary",
|
|
13
|
+
"external_subjective_gate",
|
|
14
|
+
"limitations",
|
|
15
|
+
"kill_conditions",
|
|
16
|
+
"cases"
|
|
17
|
+
],
|
|
18
|
+
"properties": {
|
|
19
|
+
"ibex_error_ux_round2": { "const": "repository-capture" },
|
|
20
|
+
"schema_version": { "const": 1 },
|
|
21
|
+
"repository_capture": { "$ref": "#/$defs/repository_capture" },
|
|
22
|
+
"problem": { "$ref": "#/$defs/problem" },
|
|
23
|
+
"semantics": { "$ref": "#/$defs/semantics" },
|
|
24
|
+
"trust_boundary": { "$ref": "#/$defs/trust_boundary" },
|
|
25
|
+
"external_subjective_gate": { "$ref": "#/$defs/external_gate" },
|
|
26
|
+
"limitations": {
|
|
27
|
+
"type": "array",
|
|
28
|
+
"minItems": 4,
|
|
29
|
+
"maxItems": 4,
|
|
30
|
+
"items": { "$ref": "#/$defs/limitation" }
|
|
31
|
+
},
|
|
32
|
+
"kill_conditions": {
|
|
33
|
+
"type": "array",
|
|
34
|
+
"minItems": 5,
|
|
35
|
+
"maxItems": 5,
|
|
36
|
+
"items": { "$ref": "#/$defs/kill_condition" }
|
|
37
|
+
},
|
|
38
|
+
"cases": {
|
|
39
|
+
"type": "array",
|
|
40
|
+
"minItems": 7,
|
|
41
|
+
"items": { "$ref": "#/$defs/case" }
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"additionalProperties": false,
|
|
45
|
+
"$defs": {
|
|
46
|
+
"sha256": {
|
|
47
|
+
"type": "string",
|
|
48
|
+
"pattern": "^[0-9a-f]{64}$"
|
|
49
|
+
},
|
|
50
|
+
"repository_capture": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"required": [
|
|
53
|
+
"status",
|
|
54
|
+
"generator",
|
|
55
|
+
"corpus",
|
|
56
|
+
"implementation_sources",
|
|
57
|
+
"case_count",
|
|
58
|
+
"deterministic_regeneration",
|
|
59
|
+
"r001_normative_snapshot"
|
|
60
|
+
],
|
|
61
|
+
"properties": {
|
|
62
|
+
"status": { "const": "complete" },
|
|
63
|
+
"generator": { "const": "tool/error_ux_round2.rb" },
|
|
64
|
+
"corpus": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"required": ["path", "sha256"],
|
|
67
|
+
"properties": {
|
|
68
|
+
"path": { "const": "test/fixtures/error_ux_round2/corpus-v1.json" },
|
|
69
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
70
|
+
},
|
|
71
|
+
"additionalProperties": false
|
|
72
|
+
},
|
|
73
|
+
"implementation_sources": {
|
|
74
|
+
"type": "array",
|
|
75
|
+
"minItems": 1,
|
|
76
|
+
"uniqueItems": true,
|
|
77
|
+
"items": {
|
|
78
|
+
"type": "object",
|
|
79
|
+
"required": ["path", "sha256"],
|
|
80
|
+
"properties": {
|
|
81
|
+
"path": {
|
|
82
|
+
"type": "string",
|
|
83
|
+
"pattern": "^(lib/ibex(?:/[a-z0-9_-]+)*|tool/error_ux_round2(?:/[a-z0-9_-]+)*)\\.rb$"
|
|
84
|
+
},
|
|
85
|
+
"sha256": { "$ref": "#/$defs/sha256" }
|
|
86
|
+
},
|
|
87
|
+
"additionalProperties": false
|
|
88
|
+
}
|
|
89
|
+
},
|
|
90
|
+
"case_count": { "type": "integer", "minimum": 7 },
|
|
91
|
+
"deterministic_regeneration": { "const": true },
|
|
92
|
+
"r001_normative_snapshot": {
|
|
93
|
+
"type": "object",
|
|
94
|
+
"required": ["path", "sha256", "expected_sha256", "status"],
|
|
95
|
+
"properties": {
|
|
96
|
+
"path": { "const": "test/fixtures/error_ux/json-errors-v1.json" },
|
|
97
|
+
"sha256": { "$ref": "#/$defs/sha256" },
|
|
98
|
+
"expected_sha256": { "$ref": "#/$defs/sha256" },
|
|
99
|
+
"status": { "const": "unchanged" }
|
|
100
|
+
},
|
|
101
|
+
"additionalProperties": false
|
|
102
|
+
}
|
|
103
|
+
},
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
"problem": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"required": ["statement", "required_dimensions", "excluded_dimensions"],
|
|
109
|
+
"properties": {
|
|
110
|
+
"statement": { "type": "string", "minLength": 1 },
|
|
111
|
+
"required_dimensions": {
|
|
112
|
+
"const": [
|
|
113
|
+
"delimiter-heavy",
|
|
114
|
+
"statement-language",
|
|
115
|
+
"stateful-string-lexer",
|
|
116
|
+
"eof-error",
|
|
117
|
+
"multi-error-continuation",
|
|
118
|
+
"unknown-token",
|
|
119
|
+
"lexer-failure"
|
|
120
|
+
]
|
|
121
|
+
},
|
|
122
|
+
"excluded_dimensions": {
|
|
123
|
+
"const": [
|
|
124
|
+
{
|
|
125
|
+
"dimension": "indentation-sensitive-language",
|
|
126
|
+
"status": "excluded-unimplemented",
|
|
127
|
+
"reason": "ibex-has-no-indentation-tokenization-contract"
|
|
128
|
+
}
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
"additionalProperties": false
|
|
133
|
+
},
|
|
134
|
+
"semantics": {
|
|
135
|
+
"type": "object",
|
|
136
|
+
"required": ["expected_tokens", "proposed_edit", "fresh_reparse", "semantic_value_risk"],
|
|
137
|
+
"properties": {
|
|
138
|
+
"expected_tokens": { "type": "string", "minLength": 1 },
|
|
139
|
+
"proposed_edit": { "type": "string", "minLength": 1 },
|
|
140
|
+
"fresh_reparse": { "type": "string", "minLength": 1 },
|
|
141
|
+
"semantic_value_risk": { "type": "string", "minLength": 1 }
|
|
142
|
+
},
|
|
143
|
+
"additionalProperties": false
|
|
144
|
+
},
|
|
145
|
+
"trust_boundary": {
|
|
146
|
+
"type": "object",
|
|
147
|
+
"required": [
|
|
148
|
+
"execution_trust_label",
|
|
149
|
+
"fixture_code",
|
|
150
|
+
"generated_code_execution",
|
|
151
|
+
"external_code_execution",
|
|
152
|
+
"statement"
|
|
153
|
+
],
|
|
154
|
+
"properties": {
|
|
155
|
+
"execution_trust_label": { "const": "executes-application-code" },
|
|
156
|
+
"fixture_code": { "const": "repository-owned-trusted" },
|
|
157
|
+
"generated_code_execution": { "const": "enabled-for-listed-fixtures-only" },
|
|
158
|
+
"external_code_execution": { "const": "forbidden" },
|
|
159
|
+
"statement": { "type": "string", "minLength": 1 }
|
|
160
|
+
},
|
|
161
|
+
"additionalProperties": false
|
|
162
|
+
},
|
|
163
|
+
"external_gate": {
|
|
164
|
+
"type": "object",
|
|
165
|
+
"required": ["status", "reason", "allowed_labels", "records"],
|
|
166
|
+
"properties": {
|
|
167
|
+
"status": { "const": "HOLD" },
|
|
168
|
+
"reason": { "const": "no-external-review-records" },
|
|
169
|
+
"allowed_labels": { "const": ["useful", "misleading", "unsafe", "unclear"] },
|
|
170
|
+
"records": { "type": "array", "maxItems": 0 }
|
|
171
|
+
},
|
|
172
|
+
"additionalProperties": false
|
|
173
|
+
},
|
|
174
|
+
"limitation": {
|
|
175
|
+
"type": "object",
|
|
176
|
+
"required": ["code", "statement"],
|
|
177
|
+
"properties": {
|
|
178
|
+
"code": {
|
|
179
|
+
"enum": ["repository-only", "single-selected-repair", "acceptance-not-intent", "no-indentation"]
|
|
180
|
+
},
|
|
181
|
+
"statement": { "type": "string", "minLength": 1 }
|
|
182
|
+
},
|
|
183
|
+
"additionalProperties": false
|
|
184
|
+
},
|
|
185
|
+
"kill_condition": {
|
|
186
|
+
"type": "object",
|
|
187
|
+
"required": ["code", "statement"],
|
|
188
|
+
"properties": {
|
|
189
|
+
"code": {
|
|
190
|
+
"enum": [
|
|
191
|
+
"fixture-drift",
|
|
192
|
+
"coverage-loss",
|
|
193
|
+
"r001-mutation",
|
|
194
|
+
"review-overclaim",
|
|
195
|
+
"fresh-reparse-regression"
|
|
196
|
+
]
|
|
197
|
+
},
|
|
198
|
+
"statement": { "type": "string", "minLength": 1 }
|
|
199
|
+
},
|
|
200
|
+
"additionalProperties": false
|
|
201
|
+
},
|
|
202
|
+
"case": {
|
|
203
|
+
"type": "object",
|
|
204
|
+
"required": [
|
|
205
|
+
"id",
|
|
206
|
+
"dimensions",
|
|
207
|
+
"grammar",
|
|
208
|
+
"input",
|
|
209
|
+
"input_sha256",
|
|
210
|
+
"observation",
|
|
211
|
+
"bounded_repair",
|
|
212
|
+
"proposed_edit",
|
|
213
|
+
"fresh_reparse",
|
|
214
|
+
"semantic_value_risk",
|
|
215
|
+
"external_review",
|
|
216
|
+
"grammar_sha256"
|
|
217
|
+
],
|
|
218
|
+
"properties": {
|
|
219
|
+
"id": { "type": "string", "pattern": "^H003-[A-Z]+-[0-9]{2}$" },
|
|
220
|
+
"dimensions": {
|
|
221
|
+
"type": "array",
|
|
222
|
+
"minItems": 1,
|
|
223
|
+
"uniqueItems": true,
|
|
224
|
+
"items": {
|
|
225
|
+
"enum": [
|
|
226
|
+
"delimiter-heavy",
|
|
227
|
+
"statement-language",
|
|
228
|
+
"stateful-string-lexer",
|
|
229
|
+
"eof-error",
|
|
230
|
+
"multi-error-continuation",
|
|
231
|
+
"unknown-token",
|
|
232
|
+
"lexer-failure"
|
|
233
|
+
]
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"grammar": {
|
|
237
|
+
"enum": [
|
|
238
|
+
"test/fixtures/error_ux_round2/delimiters.y",
|
|
239
|
+
"test/fixtures/error_ux_round2/statements.y",
|
|
240
|
+
"test/fixtures/error_ux_round2/stateful_strings.y",
|
|
241
|
+
"test/fixtures/error_ux_round2/unknown_token.y"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
244
|
+
"input": { "type": "string", "minLength": 1 },
|
|
245
|
+
"input_sha256": { "$ref": "#/$defs/sha256" },
|
|
246
|
+
"observation": { "$ref": "#/$defs/observation" },
|
|
247
|
+
"bounded_repair": { "$ref": "#/$defs/bounded_repair" },
|
|
248
|
+
"proposed_edit": { "$ref": "#/$defs/proposed_edit" },
|
|
249
|
+
"fresh_reparse": { "$ref": "#/$defs/fresh_reparse" },
|
|
250
|
+
"semantic_value_risk": { "$ref": "#/$defs/semantic_value_risk" },
|
|
251
|
+
"external_review": { "$ref": "#/$defs/case_review" },
|
|
252
|
+
"grammar_sha256": { "$ref": "#/$defs/sha256" }
|
|
253
|
+
},
|
|
254
|
+
"additionalProperties": false
|
|
255
|
+
},
|
|
256
|
+
"observation": {
|
|
257
|
+
"type": "object",
|
|
258
|
+
"required": ["mode", "parse_status", "diagnostics"],
|
|
259
|
+
"properties": {
|
|
260
|
+
"mode": { "enum": ["single-rejection", "synchronized-continuation"] },
|
|
261
|
+
"parse_status": { "enum": ["rejected", "lexer-failure", "accepted-after-recovery"] },
|
|
262
|
+
"diagnostics": {
|
|
263
|
+
"type": "array",
|
|
264
|
+
"minItems": 1,
|
|
265
|
+
"items": { "$ref": "#/$defs/diagnostic" }
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"additionalProperties": false,
|
|
269
|
+
"allOf": [
|
|
270
|
+
{
|
|
271
|
+
"if": { "properties": { "mode": { "const": "single-rejection" } } },
|
|
272
|
+
"then": {
|
|
273
|
+
"properties": {
|
|
274
|
+
"parse_status": { "enum": ["rejected", "lexer-failure"] },
|
|
275
|
+
"diagnostics": { "maxItems": 1 }
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
},
|
|
279
|
+
{
|
|
280
|
+
"if": { "properties": { "mode": { "const": "synchronized-continuation" } } },
|
|
281
|
+
"then": {
|
|
282
|
+
"properties": {
|
|
283
|
+
"parse_status": { "const": "accepted-after-recovery" },
|
|
284
|
+
"diagnostics": { "minItems": 2 }
|
|
285
|
+
}
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
]
|
|
289
|
+
},
|
|
290
|
+
"diagnostic": {
|
|
291
|
+
"type": "object",
|
|
292
|
+
"required": ["phase", "message", "token", "expected_tokens", "state", "location"],
|
|
293
|
+
"properties": {
|
|
294
|
+
"phase": { "enum": ["parser", "lexer"] },
|
|
295
|
+
"message": { "type": "string", "minLength": 1 },
|
|
296
|
+
"token": { "type": "string", "minLength": 1 },
|
|
297
|
+
"expected_tokens": { "$ref": "#/$defs/expected_tokens" },
|
|
298
|
+
"state": { "type": ["integer", "null"], "minimum": 0 },
|
|
299
|
+
"location": { "$ref": "#/$defs/location" }
|
|
300
|
+
},
|
|
301
|
+
"additionalProperties": false,
|
|
302
|
+
"allOf": [
|
|
303
|
+
{
|
|
304
|
+
"if": { "properties": { "phase": { "const": "lexer" } } },
|
|
305
|
+
"then": {
|
|
306
|
+
"properties": {
|
|
307
|
+
"state": { "type": "null" },
|
|
308
|
+
"expected_tokens": {
|
|
309
|
+
"properties": { "availability": { "const": "not-available" } }
|
|
310
|
+
}
|
|
311
|
+
}
|
|
312
|
+
}
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"if": { "properties": { "phase": { "const": "parser" } } },
|
|
316
|
+
"then": {
|
|
317
|
+
"properties": {
|
|
318
|
+
"state": { "type": "integer", "minimum": 0 },
|
|
319
|
+
"expected_tokens": {
|
|
320
|
+
"properties": { "availability": { "const": "available" } }
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
]
|
|
326
|
+
},
|
|
327
|
+
"expected_tokens": {
|
|
328
|
+
"type": "object",
|
|
329
|
+
"required": ["availability", "tokens", "reason"],
|
|
330
|
+
"properties": {
|
|
331
|
+
"availability": { "enum": ["available", "not-available"] },
|
|
332
|
+
"tokens": {
|
|
333
|
+
"type": "array",
|
|
334
|
+
"uniqueItems": true,
|
|
335
|
+
"items": { "type": "string", "minLength": 1 }
|
|
336
|
+
},
|
|
337
|
+
"reason": { "type": ["string", "null"] }
|
|
338
|
+
},
|
|
339
|
+
"additionalProperties": false,
|
|
340
|
+
"oneOf": [
|
|
341
|
+
{
|
|
342
|
+
"properties": {
|
|
343
|
+
"availability": { "const": "available" },
|
|
344
|
+
"tokens": { "minItems": 1 },
|
|
345
|
+
"reason": { "type": "null" }
|
|
346
|
+
}
|
|
347
|
+
},
|
|
348
|
+
{
|
|
349
|
+
"properties": {
|
|
350
|
+
"availability": { "const": "not-available" },
|
|
351
|
+
"tokens": { "maxItems": 0 },
|
|
352
|
+
"reason": { "const": "lexer-failure-precedes-parser-state" }
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
]
|
|
356
|
+
},
|
|
357
|
+
"location": {
|
|
358
|
+
"type": "object",
|
|
359
|
+
"required": ["line", "column", "start_byte", "source_line", "caret"],
|
|
360
|
+
"properties": {
|
|
361
|
+
"line": { "type": "integer", "minimum": 1 },
|
|
362
|
+
"column": { "type": "integer", "minimum": 1 },
|
|
363
|
+
"start_byte": { "type": ["integer", "null"], "minimum": 0 },
|
|
364
|
+
"source_line": { "type": "string" },
|
|
365
|
+
"caret": { "type": "string", "pattern": "^ *\\^$" }
|
|
366
|
+
},
|
|
367
|
+
"additionalProperties": false
|
|
368
|
+
},
|
|
369
|
+
"bounded_repair": {
|
|
370
|
+
"type": "object",
|
|
371
|
+
"required": ["status", "parse_status", "plan"],
|
|
372
|
+
"properties": {
|
|
373
|
+
"status": { "enum": ["selected", "not-found", "not-applicable"] },
|
|
374
|
+
"parse_status": { "enum": ["accepted", "rejected", "lexer-failure"] },
|
|
375
|
+
"plan": { "oneOf": [{ "$ref": "#/$defs/repair_plan" }, { "type": "null" }] },
|
|
376
|
+
"reason": { "const": "lexer-failure-precedes-parser-repair" }
|
|
377
|
+
},
|
|
378
|
+
"additionalProperties": false,
|
|
379
|
+
"allOf": [
|
|
380
|
+
{
|
|
381
|
+
"if": { "properties": { "status": { "const": "selected" } } },
|
|
382
|
+
"then": { "properties": { "plan": { "$ref": "#/$defs/repair_plan" } } }
|
|
383
|
+
},
|
|
384
|
+
{
|
|
385
|
+
"if": { "properties": { "status": { "enum": ["not-found", "not-applicable"] } } },
|
|
386
|
+
"then": { "properties": { "plan": { "type": "null" } } }
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"if": { "properties": { "status": { "const": "not-applicable" } } },
|
|
390
|
+
"then": {
|
|
391
|
+
"required": ["reason"],
|
|
392
|
+
"properties": { "parse_status": { "const": "lexer-failure" } }
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
]
|
|
396
|
+
},
|
|
397
|
+
"repair_plan": {
|
|
398
|
+
"type": "object",
|
|
399
|
+
"required": ["cost", "configurations", "edits"],
|
|
400
|
+
"properties": {
|
|
401
|
+
"cost": { "type": "integer", "minimum": 1 },
|
|
402
|
+
"configurations": { "type": "integer", "minimum": 1 },
|
|
403
|
+
"edits": {
|
|
404
|
+
"type": "array",
|
|
405
|
+
"minItems": 1,
|
|
406
|
+
"items": { "$ref": "#/$defs/repair_edit" }
|
|
407
|
+
}
|
|
408
|
+
},
|
|
409
|
+
"additionalProperties": false
|
|
410
|
+
},
|
|
411
|
+
"repair_edit": {
|
|
412
|
+
"type": "object",
|
|
413
|
+
"required": ["kind", "position", "token_id", "token_id_scope", "token_name", "cost"],
|
|
414
|
+
"properties": {
|
|
415
|
+
"kind": { "enum": ["insert", "delete", "replace"] },
|
|
416
|
+
"position": { "type": "integer", "minimum": 0 },
|
|
417
|
+
"token_id": { "type": ["integer", "null"] },
|
|
418
|
+
"token_id_scope": { "enum": ["grammar", "temporary-external"] },
|
|
419
|
+
"token_name": { "type": "string", "minLength": 1 },
|
|
420
|
+
"cost": { "type": "integer", "minimum": 1 }
|
|
421
|
+
},
|
|
422
|
+
"additionalProperties": false,
|
|
423
|
+
"oneOf": [
|
|
424
|
+
{
|
|
425
|
+
"properties": {
|
|
426
|
+
"token_id": { "type": "integer", "minimum": 0 },
|
|
427
|
+
"token_id_scope": { "const": "grammar" }
|
|
428
|
+
}
|
|
429
|
+
},
|
|
430
|
+
{
|
|
431
|
+
"properties": {
|
|
432
|
+
"token_id": { "type": "null" },
|
|
433
|
+
"token_id_scope": { "const": "temporary-external" }
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
]
|
|
437
|
+
},
|
|
438
|
+
"proposed_edit": {
|
|
439
|
+
"type": "object",
|
|
440
|
+
"required": ["summary", "operations", "applied_source_sha256"],
|
|
441
|
+
"properties": {
|
|
442
|
+
"summary": { "type": "string", "minLength": 1 },
|
|
443
|
+
"operations": {
|
|
444
|
+
"type": "array",
|
|
445
|
+
"minItems": 1,
|
|
446
|
+
"items": { "$ref": "#/$defs/source_edit" }
|
|
447
|
+
},
|
|
448
|
+
"applied_source_sha256": { "$ref": "#/$defs/sha256" }
|
|
449
|
+
},
|
|
450
|
+
"additionalProperties": false
|
|
451
|
+
},
|
|
452
|
+
"source_edit": {
|
|
453
|
+
"type": "object",
|
|
454
|
+
"required": ["start_byte", "end_byte", "replacement"],
|
|
455
|
+
"properties": {
|
|
456
|
+
"start_byte": { "type": "integer", "minimum": 0 },
|
|
457
|
+
"end_byte": { "type": "integer", "minimum": 0 },
|
|
458
|
+
"replacement": { "type": "string" }
|
|
459
|
+
},
|
|
460
|
+
"additionalProperties": false
|
|
461
|
+
},
|
|
462
|
+
"fresh_reparse": {
|
|
463
|
+
"type": "object",
|
|
464
|
+
"required": ["status", "diagnostic_count", "value_class"],
|
|
465
|
+
"properties": {
|
|
466
|
+
"status": { "enum": ["accepted", "progress", "rejected"] },
|
|
467
|
+
"diagnostic_count": { "type": "integer", "minimum": 0 },
|
|
468
|
+
"value_class": { "type": ["string", "null"] },
|
|
469
|
+
"diagnostic": { "$ref": "#/$defs/diagnostic" }
|
|
470
|
+
},
|
|
471
|
+
"additionalProperties": false,
|
|
472
|
+
"oneOf": [
|
|
473
|
+
{
|
|
474
|
+
"properties": {
|
|
475
|
+
"status": { "const": "accepted" },
|
|
476
|
+
"diagnostic_count": { "const": 0 },
|
|
477
|
+
"value_class": { "type": "string", "minLength": 1 }
|
|
478
|
+
},
|
|
479
|
+
"not": { "required": ["diagnostic"] }
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
"required": ["diagnostic"],
|
|
483
|
+
"properties": {
|
|
484
|
+
"status": { "enum": ["progress", "rejected"] },
|
|
485
|
+
"diagnostic_count": { "type": "integer", "minimum": 1 },
|
|
486
|
+
"value_class": { "type": "null" }
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
]
|
|
490
|
+
},
|
|
491
|
+
"semantic_value_risk": {
|
|
492
|
+
"type": "object",
|
|
493
|
+
"required": ["level", "category", "statement"],
|
|
494
|
+
"properties": {
|
|
495
|
+
"level": { "enum": ["low", "medium", "high"] },
|
|
496
|
+
"category": {
|
|
497
|
+
"enum": [
|
|
498
|
+
"structural-delimiter",
|
|
499
|
+
"invented-literal",
|
|
500
|
+
"lexer-state-closure",
|
|
501
|
+
"deleted-input",
|
|
502
|
+
"invented-lexeme"
|
|
503
|
+
]
|
|
504
|
+
},
|
|
505
|
+
"statement": { "type": "string", "minLength": 1 }
|
|
506
|
+
},
|
|
507
|
+
"additionalProperties": false
|
|
508
|
+
},
|
|
509
|
+
"case_review": {
|
|
510
|
+
"type": "object",
|
|
511
|
+
"required": ["status", "labels"],
|
|
512
|
+
"properties": {
|
|
513
|
+
"status": { "const": "pending" },
|
|
514
|
+
"labels": { "type": "array", "maxItems": 0 }
|
|
515
|
+
},
|
|
516
|
+
"additionalProperties": false
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
}
|
|
@@ -165,6 +165,10 @@
|
|
|
165
165
|
"nonunifying_witnesses": {
|
|
166
166
|
"type": "integer",
|
|
167
167
|
"minimum": 0
|
|
168
|
+
},
|
|
169
|
+
"inconclusive_searches": {
|
|
170
|
+
"type": "integer",
|
|
171
|
+
"minimum": 0
|
|
168
172
|
}
|
|
169
173
|
},
|
|
170
174
|
"additionalProperties": false
|
|
@@ -346,7 +350,8 @@
|
|
|
346
350
|
"kind": {
|
|
347
351
|
"enum": [
|
|
348
352
|
"unifying_counterexample",
|
|
349
|
-
"nonunifying_witness"
|
|
353
|
+
"nonunifying_witness",
|
|
354
|
+
"inconclusive"
|
|
350
355
|
]
|
|
351
356
|
},
|
|
352
357
|
"sentence": {
|
|
@@ -365,6 +370,9 @@
|
|
|
365
370
|
"$ref": "#/$defs/symbol_reference"
|
|
366
371
|
}
|
|
367
372
|
},
|
|
373
|
+
"search": {
|
|
374
|
+
"$ref": "#/$defs/witness_search"
|
|
375
|
+
},
|
|
368
376
|
"interpretations": {
|
|
369
377
|
"type": "array",
|
|
370
378
|
"minItems": 2,
|
|
@@ -375,6 +383,60 @@
|
|
|
375
383
|
},
|
|
376
384
|
"additionalProperties": false
|
|
377
385
|
},
|
|
386
|
+
"witness_search": {
|
|
387
|
+
"type": "object",
|
|
388
|
+
"required": [
|
|
389
|
+
"status",
|
|
390
|
+
"explored",
|
|
391
|
+
"exhausted",
|
|
392
|
+
"bounds"
|
|
393
|
+
],
|
|
394
|
+
"properties": {
|
|
395
|
+
"status": {
|
|
396
|
+
"enum": [
|
|
397
|
+
"found",
|
|
398
|
+
"not_found",
|
|
399
|
+
"exhausted"
|
|
400
|
+
]
|
|
401
|
+
},
|
|
402
|
+
"explored": {
|
|
403
|
+
"type": "integer",
|
|
404
|
+
"minimum": 0
|
|
405
|
+
},
|
|
406
|
+
"exhausted": {
|
|
407
|
+
"type": "boolean"
|
|
408
|
+
},
|
|
409
|
+
"bounds": {
|
|
410
|
+
"$ref": "#/$defs/search"
|
|
411
|
+
}
|
|
412
|
+
},
|
|
413
|
+
"allOf": [
|
|
414
|
+
{
|
|
415
|
+
"if": {
|
|
416
|
+
"properties": {
|
|
417
|
+
"status": {
|
|
418
|
+
"const": "exhausted"
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
},
|
|
422
|
+
"then": {
|
|
423
|
+
"properties": {
|
|
424
|
+
"exhausted": {
|
|
425
|
+
"const": true
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
},
|
|
429
|
+
"else": {
|
|
430
|
+
"properties": {
|
|
431
|
+
"exhausted": {
|
|
432
|
+
"const": false
|
|
433
|
+
}
|
|
434
|
+
}
|
|
435
|
+
}
|
|
436
|
+
}
|
|
437
|
+
],
|
|
438
|
+
"additionalProperties": false
|
|
439
|
+
},
|
|
378
440
|
"conflict": {
|
|
379
441
|
"type": "object",
|
|
380
442
|
"required": [
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://raw.githubusercontent.com/ydah/ibex/main/schema/fix-v1.schema.json",
|
|
4
|
+
"title": "Ibex conflict repair report v1",
|
|
5
|
+
"type": "object",
|
|
6
|
+
"required": ["ibex_report", "schema_version", "result", "bounds"],
|
|
7
|
+
"properties": {
|
|
8
|
+
"ibex_report": { "const": "fix" },
|
|
9
|
+
"schema_version": { "const": 1 },
|
|
10
|
+
"result": { "enum": ["proposals_found", "no_safe_proposal", "budget_exhausted"] },
|
|
11
|
+
"phase": { "type": "string" },
|
|
12
|
+
"target": { "type": "object" },
|
|
13
|
+
"candidate_space": {
|
|
14
|
+
"type": "object",
|
|
15
|
+
"required": ["precedence_declaration", "precedence_override", "algorithm_change", "mechanical_rewrite", "expectation_declaration", "recovery_quality"],
|
|
16
|
+
"additionalProperties": {
|
|
17
|
+
"type": "object",
|
|
18
|
+
"required": ["enumerated", "rejected", "safe"],
|
|
19
|
+
"properties": {
|
|
20
|
+
"enumerated": { "type": "integer", "minimum": 0 },
|
|
21
|
+
"rejected": { "type": "integer", "minimum": 0 },
|
|
22
|
+
"safe": { "type": "integer", "minimum": 0 }
|
|
23
|
+
},
|
|
24
|
+
"additionalProperties": false
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"proposals": { "type": "array", "items": { "$ref": "#/$defs/proposal" } },
|
|
28
|
+
"rejections": { "type": "array", "items": { "type": "object" } },
|
|
29
|
+
"applied": { "type": "string", "pattern": "^FX[0-9]{3}$" },
|
|
30
|
+
"enumerated_candidates": { "type": "integer", "minimum": 0 },
|
|
31
|
+
"bounds": {
|
|
32
|
+
"type": "object",
|
|
33
|
+
"required": ["max_candidates", "max_builds", "equiv_samples", "equiv_max_tokens", "equiv_max_configurations"],
|
|
34
|
+
"properties": {
|
|
35
|
+
"max_candidates": { "type": "integer", "minimum": 1 },
|
|
36
|
+
"max_builds": { "type": "integer", "minimum": 1 },
|
|
37
|
+
"equiv_samples": { "type": "integer", "minimum": 1 },
|
|
38
|
+
"equiv_max_tokens": { "type": "integer", "minimum": 1 },
|
|
39
|
+
"equiv_max_configurations": { "type": "integer", "minimum": 1 }
|
|
40
|
+
},
|
|
41
|
+
"additionalProperties": false
|
|
42
|
+
},
|
|
43
|
+
"statement": { "const": "Bounded search is not a proof of equivalence." }
|
|
44
|
+
},
|
|
45
|
+
"$defs": {
|
|
46
|
+
"proposal": {
|
|
47
|
+
"type": "object",
|
|
48
|
+
"required": ["id", "category", "description", "algorithm", "applyable", "unified_diff", "eliminates", "equivalence", "side_effects"],
|
|
49
|
+
"properties": {
|
|
50
|
+
"id": { "type": "string", "pattern": "^FX[0-9]{3}$" },
|
|
51
|
+
"category": { "type": "string" },
|
|
52
|
+
"description": { "type": "string" },
|
|
53
|
+
"algorithm": { "enum": ["slr", "lalr", "ielr", "lr1"] },
|
|
54
|
+
"applyable": { "type": "boolean" },
|
|
55
|
+
"unified_diff": { "type": ["string", "null"] },
|
|
56
|
+
"eliminates": { "type": "array", "items": { "type": "string" } },
|
|
57
|
+
"equivalence": { "type": "object" },
|
|
58
|
+
"side_effects": { "type": "object" }
|
|
59
|
+
},
|
|
60
|
+
"additionalProperties": false
|
|
61
|
+
}
|
|
62
|
+
},
|
|
63
|
+
"additionalProperties": false
|
|
64
|
+
}
|