通过反驳归一化实现JSON Schema的包含:协调效率与完备性
JSON Schema Inclusion through Refutational Normalization: Reconciling Efficiency and Completeness
AI总结:
本文提出一种协调规则方法效率与见证生成方法完备性的新方法,通过归一化技术提升JSON Schema包含检查的性能与完备性。
摘要:
JSON Schema是描述JSON文档结构的事实标准。关于JSON Schema包含性——即每个满足Schema S1的实例是否也满足Schema S2——是许多任务的关键构建块,包括版本和API兼容性检查、Schema重构工具和大规模Schema语料库分析。现有方法分为两大类:基于规则的算法高效但不完整,基于见证生成的算法完整但通常极慢。本文介绍了一种新方法,通过在后者中引入专门的归一化形式,协调规则方法的效率与见证生成技术的完备性。这种反驳归一化为当前工具难以处理的用例铺平了道路。我们的实验表明,反驳归一化显著提升了JSON Schema包含检查的state-of-the-art。
英文摘要:
JSON Schema is the de facto standard for describing the structure of JSON documents. Deciding JSON Schema inclusion - whether every instance of a schema $S$ is also an instance of a schema $S^{\prime}$ - is a building block for version and API compatibility checks, schema refactoring, and large-scale corpus analysis. The problem is EXPTIME-complete, and the two existing families of algorithms fail in practice in complementary ways: rule-based algorithms are fast but incomplete by design, while witness-generation algorithms are complete but so slow that, under any reasonable timeout, they are incomplete in practice as well. We show that this specific problem admits a way out. We redesign the normalization core of the complete algorithm, so that, on the easy cases, it mimics the behavior of the fast rule-based algorithm, without losing completeness. We prove that it is exactly as efficient as the rule-based approach on every inclusion that approach can prove, while remaining complete on all others. We validate this on a vast collection of real-world schemas and hand-crafted schemas. We show that our algorithm advances the state of the art, making tractable a range of use cases that were out of reach for existing tools.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。