ZIL是一个基于Google Zanzibar论文的Lean4关系型语言和领域特定语言(DSL),用于在项目中描述对象、它们之间的关系以及衍生规则[1]。该工具为开发者、审查工具、CI流程、文档工具和AI助手提供统一的项目关系图查询接口[1]。
ZIL采用Google Zanzibar论文中的授权元组模型(object#relation@user)来表示关系[1]。通过使用Horn规则进行关系推导并支持传递性推导[1],该工具能够支持包括需求追踪、依赖分析和变更影响评估在内的多种功能[1]。具体的关系查询能力包括确定哪个声明实现了特定需求、哪个定理验证了某个组件、哪些模块依赖于某个声明,以及哪个任务在等待某个结果[1]。
ZIL包含原生可执行文件,支持编译、查询、追踪和影响分析等多种操作[1]。该项目将Lean版本钉在leanprover/lean4:v4.31.0[1],并支持导出到Soufflé Datalog或Prolog格式[1]。
ZIL, a new relational language and domain-specific language built on Lean4, has been introduced to help developers model and query relationships within software projects [1]. Drawing from Google Zanzibar's authorization tuple model, the system uses the object#relation@user format to represent project entities and their interconnections [1].
The tool enables developers, code review systems, continuous integration pipelines, documentation generators, and AI assistants to access a unified query interface for project relationship graphs [1]. This capability supports multiple analytical tasks, including requirement traceability, dependency analysis, change impact assessment, and tracking which tasks await specific results and which theorems verify specific components [1]. The implementation leverages Horn rules for relationship derivation with support for transitive inference [1].
The project is built with Lean version pinned to leanprover/lean4:v4.31.0 and includes a native zil executable that supports compilation, querying, tracing, and impact analysis operations [1]. Additionally, the system can export relationship data to Soufflé Datalog or Prolog formats for broader compatibility [1].