计算机科学与探索 ›› 2009, Vol. 3 ›› Issue (2): 144-153.DOI: 10.3778/j.issn.1673-9418.2009.02.003

• 学术研究 • 上一篇    下一篇

程序:物理对象上的操作表达式

袁崇义1,2,黄 雨1,2,3+,赵 文1,2,3   

  1. 1. 教育部高可信软件技术重点实验室,北京 100871
    2. 北京大学 信息科学技术学院,北京 100871
    3. 北京大学 软件工程国家工程研究中心,北京 100871
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-03-15 发布日期:2009-03-15
  • 通讯作者: 袁崇义

Program: Expressions of Operations on Physical Objects

YUAN Chongyi1,2, HUANG Yu1,2,3+, ZHAO Wen1,2,3   

  1. 1. Key Laboratory of High Confidence Software Technologies of Ministry of Education, Peking University, Beijing 100871, China
    2. School of Electronics Engineering and Computer Science, Peking University, Beijing 100871, China
    3. National Engineering Research Center for Software Engineering, Peking University, Beijing 100871, China
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-03-15 Published:2009-03-15
  • Contact: YUAN Chongyi

摘要: 把赋值语句看作物理对象上的操作时,程序就呈现为物理对象上的操作构成的表达式(简称O表达式)。给出了定义O表达式语法的BNF公式,并用公理规定O表达式的语义。主动式的O表达式以计算最终结果为目的,因而相关公理给出的是施行表达式中操作以后的变量与施行之前变量之间的准确依赖关系。反应式O表达式要对外来需求作反应。描述反应的公理规定如何反应。有关通讯的公理要求正确的信息被正确的接受者收到。共享变量公理则给出有关共享变量的性质判断。例子用于说明异步顺序O表达式的性质是如何分析的。

关键词: 程序, 物理对象, 物理对象上的操作, 物理对象上的操作表达式, 语义公理

Abstract: A program turns out to be an expression of operations on physical objects (operation expression or O_expression for short) when assignments are treated as operations on physical objects. BNF formulas are given to define O_expression syntax while axioms are proposed as semantics of O_expressions. An active O_expression computes some ultimate results. As such, an axiom for active O_expressions defines how a variable after the application of operations in an O_expression is precisely related to variables before the application. A reactive O_expression responses to requests from outside. An axiom, describing responses to requests, tells how a response should be made. Axioms on communications make sure that the right messages to be received by the right receivers while axioms about shared variables depict properties concerning shared variables. Examples are given to show how to analyze properties of asynchronous sequential O_expressions.

Key words: program, physical object, operation on physical object, expression of operations on physical object, semantic axiom