首页    期刊浏览 2025年01月21日 星期二
登录注册

文章基本信息

  • 标题:Type Checking Semantic Functions in ASDF
  • 本地全文:下载
  • 作者:Jørgen Iversen
  • 期刊名称:BRICS Report Series
  • 印刷版ISSN:0909-0878
  • 出版年度:2004
  • 卷号:11
  • 期号:35
  • 出版社:Aarhus University
  • 摘要:When writing semantic descriptions of programming languages, it is convenient to have tools for checking the descriptions. With frameworks that use inductively defined semantic functions to map programs to their denotations, we would like to check that the semantic functions result in denotations with certain properties. In this paper we present a type system for a modular style of the action semantic framework that, given signatures of all the semantic functions used in a semantic equation defining a semantic function, performs a soft type check on the action in the semantic equation. We introduce types for actions that describe different properties of the actions, like the type of data they expect and produce, whether they can fail or have side effects, etc. A type system for actions which uses these new action types is presented. Using the new action types in the signatures of semantic functions, the language describer can assert properties of semantic functions and have the assertions checked by an implementation of the type system. The type system has been implemented for use in connection with the recently developed formalism ASDF. The formalism supports writing language definitions by combining modules that describe single language constructs. This is possible due to the inherent modularity in ASDF. We show how we manage to preserve the modularity and still perform specialised type checks for each module.
国家哲学社会科学文献中心版权所有