Spoofax is a language workbench. A Spoofax language specification generally includes name resolution: the analysis of bindings between definitions and references. When browsing code in the specified language using Spoofax, the bindings appear as hyperlinks, supporting precise name-based code navigation. However, Spoofax cannot be used for browsing code in online repositories. This paper is about a toolchain that uses Spoofax to generate hyperlinked twins of code repositories. These generated artefacts support the same precise code navigation as Spoofax, and can be browsed online. The technique has been prototyped on the CBS (Component-Based Semantics) specification language developed by the PLanCompS project, but could be used on any language after specifying its name resolution in Spoofax.
翻译:Spoofax是一种语言工作台。Spoofax语言规范通常包含名称解析:即对定义与引用之间绑定关系的分析。当使用Spoofax浏览指定语言编写的代码时,绑定关系会以超链接形式呈现,支持基于名称的精确代码导航。然而,Spoofax无法用于浏览在线仓库中的代码。本文介绍一种工具链,该工具链利用Spoofax为代码仓库生成带有超链接的孪生体。这些生成的工件支持与Spoofax相同的精确代码导航功能,并可在线上浏览。该技术已在PLanCompS项目开发的CBS(基于组件的语义)规范语言中实现原型,但经过在Spoofax中指定其名称解析后,该技术可用于任何语言。