🤖 AI Summary
Traditional linear type systems enforce strict resource exclusivity, limiting their applicability to realistic programming scenarios. To address this, we propose a *weak linear type system*—the first formalization of weak linear semantics that safely permits controlled, bounded aliasing without explicit coercion mechanisms. Our approach reconstructs typing rules based on linear logic, defines an operational semantics, and establishes a static resource analysis model. We rigorously prove that the system satisfies type safety, memory safety, strong normalization, and absence of memory leaks. Compared to classical linear types, our system preserves conceptual simplicity and elegance while substantially enhancing expressiveness and practical utility. It thus provides a novel paradigm for resource-sensitive programming that reconciles strong safety guarantees with pragmatic flexibility.
📝 Abstract
Computational interpretations of linear logic allow static control of memory resources: the data produced by the program are endowed through its type with attributes that determine its life cycle, and guarantee safe deallocation. The use of linear types encounters limitations in practice, since linear data, in the traditional sense, do not so often appear in actual programs. Several alternatives have been proposed in the attempt to relax the condition of linearity, adding coercions to the language to allow linear objects to be temporarily aliased. In this work we propose a new alternative, whose virtue is to preserve the simplicity and elegance of the original system.