论文标题
JSON模式的证人一代
Witness Generation for JSON Schema
论文作者
论文摘要
JSON Schema是JSON文档家庭的重要,不断发展的标准架构语言。它基于结构和布尔主张的复杂组合,并具有否定和递归。 JSON模式文档的静态分析包括实际上相关的问题,包括架构可满足,包容性和等效性。这三个问题可以简化为见证人的生成:鉴于模式,如果存在模式,则产生一个元素,并报告失败。模式的满意度,包容性和等价性已被证明是可决定的,通过降低到交替的树自动机中的可及性。但是,尚未正式描述任何证人产生算法。我们为JSON Schema证人的一代贡献了第一个直接的算法。我们研究了它的有效性和效率,这是在包括数千种现实世界模式在内的几个模式集合的实验中。我们的重点是语言的完整性,在该语言的完整性上,我们只排除了唯一启动的操作员,以及算法在合理时间内在大量实际示例上运行的能力,尽管基本问题具有指数的复杂性。
JSON Schema is an important, evolving standard schema language for families of JSON documents. It is based on a complex combination of structural and Boolean assertions, and features negation and recursion. The static analysis of JSON Schema documents comprises practically relevant problems, including schema satisfiability, inclusion, and equivalence. These three problems can be reduced to witness generation: given a schema, generate an element of the schema, if it exists, and report failure otherwise. Schema satisfiability, inclusion, and equivalence have been shown to be decidable, by reduction to reachability in alternating tree automata. However, no witness generation algorithm has yet been formally described. We contribute a first, direct algorithm for JSON Schema witness generation. We study its effectiveness and efficiency, in experiments over several schema collections, including thousands of real-world schemas. Our focus is on the completeness of the language, where we only exclude the uniqueItems operator, and on the ability of the algorithm to run in a reasonable time on a large set of real-world examples, despite the exponential complexity of the underlying problem.