Skip to main content
QUICK REVIEW

[Paper Review] Domain Theory for Modeling OOP: A Summary

Moez A. AbdelGawad|arXiv (Cornell University)|Jun 29, 2014
Reservoir Engineering and Simulation MethodsEngineering1 references6 citations
TL;DR

This paper presents a domain-theoretic foundation for modeling object-oriented programming (OOP), introducing COOP as a structural model of OOP and NOOP as a nominally-typed extension. Using recursive domain equations and continuous domain constructors (sum, product, function spaces), it constructs a least fixed point solution to model infinite, self-referential objects, proving that inheritance and subtyping are formally identifiable in mainstream OOP languages.

ABSTRACT

Domain theory is `a mathematical theory that serves as a foundation for the semantics of programming languages'. Domains form the basis of a theory of partial information, which extends the familiar notion of partial function to encompass a whole spectrum of "degrees of definedness", so as to model incremental higher-order computation (i.e., computing with infinite data values, such as functions defined over an infinite domain like the domain of integers, infinite trees, and such as objects of object-oriented programming). General considerations from recursion theory dictate that partial functions are unavoidable in any discussion of computability. Domain theory provides an appropriately abstract setting in which the notion of a partial function can be lifted and used to give meaning to higher types, recursive types, etc. NOOP is a domain-theoretic model of nominally-typed OOP. NOOP was used to prove the identification of inheritance and subtyping in mainstream nominally-typed OO programming languages and the validity of this identification. In this report we first present the definitions of basic domain theoretic notions and domain constructors used in the construction of NOOP, then we present the construction of a simple structural model of OOP called COOP as a step towards the construction of NOOP. Like the construction of NOOP, the construction of COOP uses earlier presented domain constructors.

Motivation & Objective

  • To establish a formal, domain-theoretic foundation for object-oriented programming that captures partial information and incremental computation.
  • To model recursive, self-referential objects in OOP as infinite data values using domain theory.
  • To construct COOP as a simplified, structural model of OOP to serve as a stepping stone toward building NOOP.
  • To formally prove that inheritance and subtyping are equivalent in nominally-typed OOP languages using domain-theoretic semantics.
  • To provide a rigorous mathematical framework for reasoning about higher-order, recursive, and partially-defined object values in OOP.

Proposed method

  • Uses domain theory as a foundation, modeling computational values as elements of partially ordered sets (posets) with an approximation ordering.
  • Defines domain constructors: coalesced sum (+), product (∗), function space (→), and records (↦), to build complex domains from simpler ones.
  • Constructs the COOP object domain O as the least fixed point of a recursive domain equation: O = B + L ↦ (O∗ → O), where B is a base domain and L is a label domain.
  • Applies the least fixed point (lfp) construction via an iterative approximation sequence O₀, O₁, ..., with O₀ = ∅ and Oᵢ₊₁ defined using continuous domain constructors.
  • Ensures continuity of constructors to guarantee the existence of the least upper bound (lub) of the sequence, which is the solution O = ⋃ᵢ≥₀ Oᵢ.
  • Employs standard domain-theoretic techniques, including inverse limit and fixed-point theorems, to ensure well-defined semantics for recursive object definitions.

Experimental results

Research questions

  • RQ1How can domain theory be used to formally model object-oriented programs with recursive, self-referential objects?
  • RQ2What is the role of partial information and approximation ordering in modeling object states and method invocations?
  • RQ3How can a structural OOP model (COOP) be constructed using domain constructors and recursive domain equations?
  • RQ4What is the formal relationship between inheritance and subtyping in nominally-typed OOP, and can it be proven using domain-theoretic semantics?
  • RQ5How can infinite data values (e.g., objects with self-references) be meaningfully represented and reasoned about in a formal semantics?

Key findings

  • The COOP model is constructed as the least fixed point of a recursive domain equation, ensuring well-defined semantics for objects with recursive method definitions.
  • The solution to the COOP domain equation is given by the union of all approximations: O = ⋃ᵢ≥₀ Oᵢ, which forms a complete, continuous domain.
  • The use of continuous domain constructors (sum, product, function space) ensures that the fixed point construction is valid and yields a well-defined domain.
  • The construction demonstrates that objects in OOP can be modeled as partial, incremental values, with ⊥ representing divergence or undefined state.
  • The framework provides a formal basis for proving that inheritance and subtyping are formally equivalent in nominally-typed OOP, a key result for type system theory.
  • The approach generalizes to NOOP, a domain-theoretic model of nominally-typed OOP, showing that such models can be rigorously constructed using domain-theoretic principles.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.