From Reasoning Principles for Function Pointers To Logics for Self-Configuring Programs
从函数指针的推理原理到自配置程序的逻辑
基本信息
- 批准号:EP/G003173/1
- 负责人:
- 金额:$ 49.8万
- 依托单位:
- 依托单位国家:英国
- 项目类别:Research Grant
- 财政年份:2008
- 资助国家:英国
- 起止时间:2008 至 无数据
- 项目状态:已结题
- 来源:
- 关键词:
项目摘要
Pointers are an important feature of programming languages used to define dynamically growing and recursive data structures. Many languages provide pointers not just to data but also functions or procedures, i.e. to executable code. In high-level languages code pointers may manifest themselves explicitly in the form of function pointers or appear in disguises, e.g. as methods of objects carrying their own method suites. Thus, function pointers offer high flexibility of code organisation at runtime but their meaning in specification and verification has been poor due to their complexity. In order to build correct software for modern and future languages it is paramount to have logics that permit reasoning about programs including function pointers. It is important that reasoning is local and modular which means that verification can be done simply w.r.t. the part of the heap affected by a piece of code, and independently of other code that is going to be linked at a later stage, respectively.To develop such reasoning principles for code pointers and their disguised appearance as meta-programming features like run-time generation and loading of code is the objective of this project.In software production a huge amount of time goes into testing that programs are free from errors and thus do not show undesired or even harmful behaviour. While testing is only as good as the test data is, a much more rigorous approach is to verify that a program meets a certain specification, for example that it does not lead to memory faults. Programs containing pointers, however, are notoriously difficult to specify, let alone verify. As Sir Tony Hoare said back in 1973: The introduction of pointers into high-level languages has been a step backwards from which we may never recover.'' 30 years later pointers and references are still important language features and program verification is still the costly exception. But the recent development of Separation Logic (by Reynolds, O'Hearn and others) has finally presented us with a handle to tackle the complexity of pointers. It permits local reasoning on the heap, liberating the verifier from specifying and proving that most of the heap does not change when a procedure or command is executed. Alas, so far only pointers on first-order data like numbers or strings profit from this recent enhancement.Function pointers are equally useful however. They are often employed to implement event handling or automatic software configuration. Which handler is used (as callback'') depends on the content of the function pointer registered, i.e. assigned at runtime. Dynamic invocation of code, reminiscent of dynamic dispatch in object-oriented languages, can also be achieved via such pointers. Function pointers are therefore not simply a rare curiosity. In fact, they are commonplace and appear in languages like ML or C. The language C# even has a special type construct for them: delegates. In Java these can be simulated via single method interfaces. Interfaces, however, do not identify methods by type signatures alone which makes it hard to share them across libraries. Java developers address this by creating on-the-fly wrapper objects (proxies).This is a typical instance of a principle called Reflection that denotes the ability to introspect, intercede, and generate code in a programming language and thus constitutes a method of meta-programming. Another important reflection principle is dynamic loading which allows code modules (for instance software plugins for extended functionality) to be loaded at runtime. For such advanced features, some of which are not available in standard object-oriented languages yet, there are no adequate program logics. Therefore, the central objective of this project is to establish program (Hoare-) logics for languages with explicit and implicit code pointers making the benefits of Separation Logic amenable to them.
指针是用于定义动态增长和递归数据结构的编程语言的重要特性。许多语言不仅提供指向数据的指针,还提供指向函数或过程的指针,即指向可执行代码的指针。在高级语言中,代码指针可以以函数指针的形式显式地表现出来,或者伪装出来,例如作为携带自己的方法套件的对象的方法。因此,函数指针在运行时提供了代码组织的高度灵活性,但由于其复杂性,它们在规范和验证中的意义很差。为了为现代和未来的语言构建正确的软件,最重要的是拥有允许对程序进行推理的逻辑,包括函数指针。重要的是,推理是局部的和模块化的,这意味着验证可以简单地进行。堆中受一段代码影响的部分,并且独立于将在稍后阶段链接的其他代码,为了开发用于代码指针的这种推理原理,以及它们伪装成元编程特征(如运行)的外观,时间生成和加载代码是这个项目的目标。在软件生产中,大量的时间用于测试程序没有错误,不要表现出不受欢迎甚至有害的行为。虽然测试的好坏取决于测试数据,但更严格的方法是验证程序是否符合特定规范,例如它不会导致内存故障。然而,众所周知,包含指针的程序很难指定,更不用说验证了。正如Tony Hoare爵士在1973年所说的那样:将指针引入高级语言是一种倒退,我们可能永远无法恢复。30年后,指针和引用仍然是重要的语言特性,程序验证仍然是昂贵的例外。但是最近开发的分离逻辑(由Reynolds,O'Hearn和其他人)终于为我们提供了一个处理指针复杂性的方法。它允许在堆上进行局部推理,使验证者不必指定和证明当一个过程或命令被执行时堆的大部分不会改变。遗憾的是,到目前为止,只有一阶数据(如数字或字符串)上的指针从最近的增强中受益。函数指针同样有用。它们通常用于实现事件处理或自动软件配置。使用哪个处理程序(作为回调“”)取决于注册的函数指针的内容,即在运行时分配。代码的动态调用,让人想起面向对象语言中的动态分派,也可以通过这样的指针来实现。因此,函数指针不仅仅是一种罕见的好奇心。事实上,它们很常见,并出现在ML或C等语言中。C#语言甚至为它们提供了一个特殊的类型构造:委托。在Java中,这些可以通过单个方法接口来模拟。然而,接口并不单独通过类型签名来识别方法,这使得很难在库之间共享它们。Java开发人员通过创建动态包装器对象(代理)来解决这个问题。这是一个称为反射的原则的典型实例,该原则表示在编程语言中内省、调解和生成代码的能力,因此构成了元编程的一种方法。另一个重要的反射原则是动态加载,它允许在运行时加载代码模块(例如用于扩展功能的软件插件)。对于这样的高级功能,其中一些在标准的面向对象语言中还不可用,没有足够的程序逻辑。因此,这个项目的中心目标是建立程序(霍尔)逻辑的语言与显式和隐式代码指针,使分离逻辑的好处服从他们。
项目成果
期刊论文数量(10)
专著数量(0)
科研奖励数量(0)
会议论文数量(0)
专利数量(0)
Automata, Languages and Programming
自动机、语言和编程
- DOI:10.1007/978-3-540-70583-3_9
- 发表时间:2008
- 期刊:
- 影响因子:0
- 作者:Berger M
- 通讯作者:Berger M
Verifying the reflective visitor pattern
- DOI:10.1145/2318202.2318208
- 发表时间:2012-06
- 期刊:
- 影响因子:0
- 作者:B. Horsfall;Nathaniel Charlton;Bernhard Reus
- 通讯作者:B. Horsfall;Nathaniel Charlton;Bernhard Reus
Symbolic Execution Proofs for Higher Order Store Programs
高阶存储程序的符号执行证明
- DOI:10.1007/s10817-014-9319-8
- 发表时间:2014
- 期刊:
- 影响因子:0
- 作者:Reus B
- 通讯作者:Reus B
Formal reasoning about runtime code update
关于运行时代码更新的形式化推理
- DOI:10.1109/icdew.2011.5767624
- 发表时间:2011
- 期刊:
- 影响因子:0
- 作者:Charlton N
- 通讯作者:Charlton N
Step-indexed kripke models over recursive worlds
递归世界上的阶跃索引克里普克模型
- DOI:10.1145/1925844.1926401
- 发表时间:2011
- 期刊:
- 影响因子:0
- 作者:Birkedal L
- 通讯作者:Birkedal L
{{
item.title }}
{{ item.translation_title }}
- DOI:
{{ item.doi }} - 发表时间:
{{ item.publish_year }} - 期刊:
- 影响因子:{{ item.factor }}
- 作者:
{{ item.authors }} - 通讯作者:
{{ item.author }}
数据更新时间:{{ journalArticles.updateTime }}
{{ item.title }}
- 作者:
{{ item.author }}
数据更新时间:{{ monograph.updateTime }}
{{ item.title }}
- 作者:
{{ item.author }}
数据更新时间:{{ sciAawards.updateTime }}
{{ item.title }}
- 作者:
{{ item.author }}
数据更新时间:{{ conferencePapers.updateTime }}
{{ item.title }}
- 作者:
{{ item.author }}
数据更新时间:{{ patent.updateTime }}
Bernhard Reus其他文献
Self-referencing Programs
自引用程序
- DOI:
10.1007/978-3-319-27889-6_10 - 发表时间:
2016 - 期刊:
- 影响因子:2.9
- 作者:
Bernhard Reus - 通讯作者:
Bernhard Reus
Semantics and logic of object calculi
对象演算的语义和逻辑
- DOI:
- 发表时间:
2002 - 期刊:
- 影响因子:0
- 作者:
Bernhard Reus;T. Streicher - 通讯作者:
T. Streicher
Modular Semantics and Logics of Classes
类的模块化语义和逻辑
- DOI:
- 发表时间:
2003 - 期刊:
- 影响因子:0
- 作者:
Bernhard Reus - 通讯作者:
Bernhard Reus
About Hoare Logics for Higher-Order Store
关于高阶存储的 Hoare Logics
- DOI:
10.1007/11523468_108 - 发表时间:
2005 - 期刊:
- 影响因子:5.4
- 作者:
Bernhard Reus;T. Streicher - 通讯作者:
T. Streicher
Bernhard Reus的其他文献
{{
item.title }}
{{ item.translation_title }}
- DOI:
{{ item.doi }} - 发表时间:
{{ item.publish_year }} - 期刊:
- 影响因子:{{ item.factor }}
- 作者:
{{ item.authors }} - 通讯作者:
{{ item.author }}
{{ truncateString('Bernhard Reus', 18)}}的其他基金
Relative Completeness for Logics of Functional Programs
函数式程序逻辑的相对完整性
- 批准号:
EP/I01456X/1 - 财政年份:2011
- 资助金额:
$ 49.8万 - 项目类别:
Research Grant
相似国自然基金
基于First Principles的光催化降解PPCPs同步脱氮体系构建及其电子分配机制研究
- 批准号:51778175
- 批准年份:2017
- 资助金额:59.0 万元
- 项目类别:面上项目
相似海外基金
Decoding the fundamental principles of autonomous clocks: mechanism, design and function
解读自主时钟的基本原理:机制、设计和功能
- 批准号:
10685116 - 财政年份:2023
- 资助金额:
$ 49.8万 - 项目类别:
Practical normativity of the soft law (norm creating function of the application process) - Taking the Guiding Principles on Business and Human rights as an exanple
软法的实践规范性(适用过程的规范创造功能)——以《工商业与人权指导原则》为例
- 批准号:
23K01119 - 财政年份:2023
- 资助金额:
$ 49.8万 - 项目类别:
Grant-in-Aid for Scientific Research (C)
Principles of Tissue-wide and Cell-Autonomous Gene Function in Neocortex Formation
新皮质形成中的组织范围和细胞自主基因功能原理
- 批准号:
DGECR-2022-00238 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
Discovery Launch Supplement
Principles of Tissue-wide and Cell-Autonomous Gene Function in Neocortex Formation
新皮质形成中的组织范围和细胞自主基因功能原理
- 批准号:
574630-2022 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
University Undergraduate Student Research Awards
Energy-Minimal Principles in Geometric Function Theory
几何函数理论中的能量最小原理
- 批准号:
2154943 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
Standard Grant
Discovering the Fundamental Synaptic Principles of Brain Organization and Function
发现大脑组织和功能的基本突触原理
- 批准号:
RGPIN-2022-04134 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
Discovery Grants Program - Individual
Molecular principles of spindle orientation complex organization and function
纺锤体定向复杂组织与功能的分子原理
- 批准号:
2205405 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
Continuing Grant
Principles of Tissue-wide and Cell-Autonomous Gene Function in Neocortex Formation
新皮质形成中的组织范围和细胞自主基因功能原理
- 批准号:
RGPIN-2022-05273 - 财政年份:2022
- 资助金额:
$ 49.8万 - 项目类别:
Discovery Grants Program - Individual
CAREER: Elucidation of the Physical Principles the Govern Endothelial Structure and Function
职业:阐明控制内皮结构和功能的物理原理
- 批准号:
2045750 - 财政年份:2021
- 资助金额:
$ 49.8万 - 项目类别:
Standard Grant
In search of functional principles: whole-brain structure-function analysis of vertebrate visuomotor circuits at the level of synapses, cells and circuits (continuation)
寻找功能原理:突触、细胞和回路水平的脊椎动物视觉运动回路的全脑结构功能分析(续)
- 批准号:
453632629 - 财政年份:2020
- 资助金额:
$ 49.8万 - 项目类别:
Heisenberg Grants