selen 0.15.5

Constraint Satisfaction Problem (CSP) solver
Documentation
//! View system extensions and utility traits

use super::core::View;

// View System Extension Framework
// 
// This module provides a framework for extending variable views with additional functionality.
// It defines trait structures and patterns for future modularization of the view system.
// 
// ## Framework Overview
// 
// The view system extension framework provides:
// - `ViewExt`: Extended view functionality (domain manipulation, iteration)
// - `IntegerViewExt`: Integer-specific view operations (bounds, range checks)
// - Modular patterns for future constraint propagator integration
// 
// ## Implementation Note
// 
// This is currently a framework-only module to demonstrate the modular architecture
// design without conflicting with the existing monolithic implementation. In the 
// final modularization phase, these traits would be properly implemented and integrated.

/// Extended functionality framework for View types.
/// 
/// This trait defines the interface for advanced view operations that would be
/// implemented in the final modularization phase.
pub trait ViewExt: View {
    // Framework methods - would be implemented in final modularization
    // fn remove_above(self, ctx: &mut Context, threshold: Val) -> bool;
    // fn remove_below(self, ctx: &mut Context, threshold: Val) -> bool;
    // fn assign(self, ctx: &mut Context, val: Val) -> bool;
    // fn domain_size(self, ctx: &Context) -> usize;
    // fn iter_values(&self, ctx: &Context) -> impl Iterator<Item = Val>;
}

/// Integer-specific view extensions for mathematical operations.
/// 
/// This trait defines the interface for integer domain operations that would be
/// implemented in the final modularization phase.
pub trait IntegerViewExt: ViewExt {
    // Framework methods - would be implemented in final modularization
    // fn bounds(&self, ctx: &Context) -> (i32, i32);
    // fn is_range(&self, ctx: &Context) -> bool;
}

// Framework documentation for future implementation:
// 
// impl<V: View> ViewExt for V {
//     // Actual implementations would delegate to existing Vars methods
// }
// 
// impl<V: View> IntegerViewExt for V 
// where V: View
// {
//     // Integer-specific implementations
// }

// Framework documentation for future implementation:
// 
// impl<V: View> ViewExt for V {
//     // Actual implementations would delegate to existing Vars methods
// }
// 
// impl<V: View> IntegerViewExt for V 
// where V: View
// {
//     // Integer-specific implementations
// }

// Removed duplicate IntegerViewExt trait to avoid conflicts