Searcharxiv⌕ Search

arXiv · 0707.1059

Projection semantics for rigid loops

Abstract

A rigid loop is a for-loop with a counter not accessible to the loop body or any other part of a program. Special instructions for rigid loops are introduced on top of the syntax of the program algebra PGA. Two different semantic projections are provided and proven equivalent. One of these is taken to have definitional status on the basis of two criteria: `normative semantic adequacy' and `indicative algorithmic adequacy'.

Explore related subjects

Keep this discovery

Explore connections, maps & timelines

BibTeXRIS

Jan A. Bergstra, Alban Ponse. 2007-07-06. Projection semantics for rigid loops. https://arxiv.org/abs/0707.1059

Cite the original work for its findings. Save a collection to share your selection of sources.

KEEP EXPLORING

Related papers

Dimensional Type Systems and Deterministic Memory Management

We present a dimensional type system whose annotations remain available through the stages that require them, allowing numeric representation and deterministic memory management to be resolved within a single Program Semantic Graph (PSG). Based on Andrew Kennedy's Units of Measure, dimensions constrain admissible operations and the application of domain laws, forming our Native Type Universe (NTU). Range analysis combines those constraints with values, guards, and declared boundaries. A covering representation then determines word width and memory footprint, which participate in allocation and transfer decisions alongside lifetime and target constraints. Our Dimensional Type System (DTS) extends Hindley-Milner inference with abelian-group unification. Within that algebraic fragment, inference is decidable and admits principal types. Measures form part of source-level type identity, while numeric width and storage layout are coeffects resolved from context. A known range that exceeds every available representation produces an error at representation commitment. During program elaboration, unresolved facts can remain pending while further context is supplied. Deterministic Memory Management (DMM) uses the same graph to relate escape paths to storage lifetimes. Closure capture, return, and by-reference use supply different lifetime requirements. Allocation follows the lifetime classification and the platform's declared storage capabilities. Our unique implementation of a posit quire illustrates the interaction: exact accumulation requires a suitable numeric format, adequate capacity, and storage that persists across the accumulation. We also examine how these constraints would apply to automatic differentiation. A shared graph would allow language services to present dimensional resolution and proof status alongside the reasons for representation and placement decisions.

cs.PL↗

The Program Hypergraph: Multi-Way Relational Structure for Geometric Algebra, Spatial Compute, and Physics-Aware Compilation

Source code organizes a program as expressions and declarations, which a compiler can represent as an abstract syntax tree (AST). Some compilers introduce a further abstraction of the computation as a graph. Nodes represent operations, while connections record how values pass between them and how execution proceeds. Yet these connections can leave the full scope of conditions governing a computation implicit. Developers may then need defensive checks, rely on compiler hacks, pragmas, and implementation-specific code to maintain those conditions as the program evolves. Our thesis is that a hypergraph more faithfully represents complex computation across all targets by making joint constraints inherent to its structure, with an overall less burdensome design-time API. Our Program Hypergraph (PHG) extends our Semantic Graph with relations that connect across an operation's participants, their dependencies, and the invariants they must preserve. Joint resolution in the graph guides lowering into standard Multi-Level Intermediate Representation (MLIR). Satisfiability modulo theories (SMT) checks intrinsic to the graph discharge applicable proof obligations. Supporting information remains available until the decisions that require it are complete. As a primary benefit, verification follows from the rules used to construct and transform the graph. For properties established this way before execution, the generated program needs no added runtime checks, no 'boxing' or 'tagging' or other managed runtime support. We develop this account through geometric algebra, shared-memory capacity, and spatial placement, distinguishing structural guarantees from numerical and resource obligations that require further evidence. The proposed integration makes the same information available at design-time, so engineers can inspect the consequences of a choice before it becomes an implementation constraint.

cs.PL↗

Decidable By Construction: Design-Time Verification for Truly Fearless Systems

Concurrency, parallelism and distributed execution become truly fearless when the compiler tracks wait-for edges, proves multi-threaded work is sound and preserves distributed boundary contracts. In this design, our Composer compiler preserves proofs while lowering Clef directly to native CPU, GPU, NPU and FPGA code, without translation through C or vendor APIs. Our Program Semantic Graph retains the values, relationships and premises that justify BAREWire's unboxed boundary contracts. And C & C++ interfacing is an explicit marshaling boundary, with proofs tied to actual arguments, conversions and returned values. Four verification tiers connect an account of our design. Tier 1 supplies structural inference, founded on principal dimensional types. Tier 2 generates and checks local arithmetic, representation, and computational integrity at the node level. Tier 3 instantiates reusable domain and system lemmas, including distributed proofs supported by Iris, Actris and Aneris. Tiers 1-3 require no developer annotations, with a quotation based lemma library design to extend coverage as use cases expand. Tier 4 admits computational and probabilistic relational proofs, with project annotations identifying the required relations. We extend the same library direction toward recognizing relational constructions from hypergraph structure. A formal composition rule connects arithmetic, ownership, protocol and realization evidence. Our worked distributed reduction preserves one specified result across concurrent workers, reordered arrivals and boundary mappings. Its probabilistic extension carries worker and conversion error with an explicit failure budget. With recent work by Urschel, we show bounds supply a relevant source of reusable proof terms. These constructions make verification a core engineering discipline for truly fearless programs and systems across a variety of hardware targets.

cs.PL↗