Skip to content

Redesign allocation strategy feature hierarchy for true mutual exclusivity #107

@avrabe

Description

@avrabe

Problem Description

Current allocation strategies (static, bounded, managed, std) share capability features, preventing true mutual exclusivity and causing compilation conflicts.

Current Architecture Issues

  • Shared capability features between strategies cause circular dependencies
  • Type selection conflicts due to overlapping feature conditions
  • Mutual exclusivity not properly enforced

Proposed Solution

Implement strategy-specific capability features:

# Strategy Level (mutually exclusive)
static-allocation-core = ["static-memory-layout", "static-capacity-limits"]
bounded-allocation-core = ["bounded-runtime-checks", "bounded-capacity-limits"] 
managed-allocation-core = ["managed-monitoring"]
std-allocation-core = ["std-collections", "std-dynamic-alloc"]

Implementation Plan

  1. Create strategy-specific capability features
  2. Remove cross-strategy dependencies
  3. Implement clear capability inheritance
  4. Update prelude system for clean type selection

Acceptance Criteria

  • Each allocation strategy has independent capability features
  • No shared features between strategies
  • Clean type selection based on strategy precedence
  • All safety levels work correctly with new architecture

Dependencies

Blocked by Issue #106 (critical fix must be completed first)

Priority

P1 - High priority architecture improvement

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions