In this paper, we study the usage of negation in JSON Schema data modeling. Negation is a logical operator that is rarely present in type systems and schema description languages, since it complicates decision problems. As a consequence, many software tools, but also formal frameworks for working with JSON Schema, do not fully support negation. As of today, the question whether covering negation is practically relevant, or a mainly theoretical exercise (albeit challenging), is open. This motivates us to study whether negation is really used in practice, for which aims, and whether it could be - in principle - replaced by simpler operators. We have collected the most diverse corpus of JSON Schema documents analyzed so far, based on a crawl of 90k open source schemas hosted on GitHub. We perform a systematic analysis, quantify usage patterns of negation, and also qualitatively analyze schemas. We show that negation is indeed used, following a stable set of patterns, with the potential to mature into design patterns.
翻译:在本文中,我们研究了JSON Schema数据模型中否定的用法。 否定是一个逻辑操作器,很少存在于类型系统和计划描述语言中,因为它使决策问题复杂化。 因此,许多软件工具,但也包括与JSON Schema合作的正式框架,并不完全支持否定。 从今天起,涵盖否定实际上是否相关,还是主要属于理论操作(尽管具有挑战性)的问题是公开的。这促使我们研究否定是否真正用于实践,目的是什么,以及它是否原则上可以被更简单的操作器所取代。我们收集了迄今为止经过分析的最多样化的JSON Schema文件集,其基础是GitHub的90公里开放源系统图。我们进行了系统分析,量化否定的使用模式,并定性分析其设计模式。我们表明,否定确实被采用,遵循了稳定的模式,有可能成熟成设计模式。