When developing complex software and systems, contracts provide a means for controlling the complexity by dividing the responsibilities among the components of the system in a hierarchical fashion. In specific application areas, dedicated contract theories formalise the notion of contract and the operations on contracts in a manner that supports best the development of systems in that area. At the other end, contract meta-theories attempt to provide a systematic view on the various contract theories by axiomatising their desired properties. However, there exists a noticeable gap between the most well-known contract meta-theory of Benveniste et al., which focuses on the design of embedded and cyber-physical systems, and the established way of using contracts when developing general software, following Meyer's design-by-contract methodology. At the core of this gap appears to be the notion of procedure: while it is a central unit of composition in software development, the meta-theory does not suggest an obvious way of treating procedures as components. In this paper, we provide a first step towards a contract theory that takes procedures as the basic building block, and is at the same time an instantiation of the meta-theory. To this end, we propose an abstract contract theory for sequential programming languages with procedures, based on denotational semantics. We show that, on the one hand, the specification of contracts of procedures in Hoare logic, and their procedure-modular verification, can be cast naturally in the framework of our abstract contract theory. On the other hand, we also show our contract theory to fulfil the axioms of the meta-theory. In this way, we give further evidence for the utility of the meta-theory, and prepare the ground for combining our instantiation with other, already existing instantiations.
翻译:在开发复杂的软件和系统时,合同为控制复杂性提供了一种手段,通过分层次地划分系统各组成部分的责任来控制复杂性。在具体应用领域,专门的合同理论以最有利于该领域系统发展的方式正式确定合同概念和合同操作。在另一方面,合同元理论试图通过分解其预期特性,对各种合同理论提供系统观点。然而,在最著名的Benveniste等合同元理论之间存在明显差距,该理论的重点是设计嵌入式和网络物理系统,以及按照Myer的逐项设计方法,在开发一般软件时使用合同的既定方法。这一差距的核心似乎是程序的概念:虽然合同元理论是软件开发的核心组成单位,但并不表明将程序作为组成部分处理的明显方法。在本文中,我们提供了将程序作为基本建筑基础的抽象理论迈出了第一步,同时,我们在开发一般软件时,也采用了在开发一般软件时使用使用合同的既定方法。在程序上,我们用一个直接的理论来展示了一种抽象的理论,我们用这个理论来展示了一种抽象的逻辑,在最后的理论中,我们用一种抽象的理论来展示了一种抽象的逻辑,我们用一种理论来解释。