selen 0.15.5

Constraint Satisfaction Problem (CSP) solver
Documentation
# Selen FlatZinc Test Status - October 2, 2025

## 🎉 Current Success Rate: **92.8%** (790/851 files)

### Progress Summary
- **Session Start**: 727/851 (85.4%)
- **After Cumulative + Quick Wins**: 761/851 (89.4%)
- **After Array Element Fix**: 790/851 (92.8%)
- **Total Improvement**: +63 files (+7.4 percentage points)

### Batch-by-Batch Results

| Batch | Before | After | Change | Rate |
|-------|--------|-------|--------|------|
| 01 | 84/86 | 85/86 | +1 | 98.8% |
| 02 | 65/86 | 76/86 | +11 | 88.4% |
| 03 | 77/86 | 79/86 | +2 | 91.9% |
| 04 | 79/86 | 80/86 | +1 | 93.0% |
| 05 | 70/86 | 77/86 | +7 | 89.5% |
| 06 | 78/86 | 82/86 | +4 | 95.3% |
| 07 | 65/86 | 74/86 | +9 | 86.0% |
| 08 | 75/86 | 81/86 | +6 | 94.2% |
| 09 | 67/86 | 77/86 | +10 | 89.5% |
| 10 | 67/81 | 79/81 | +12 | 97.5% |

### Recent Changes (Array Element Fix)
**Files Modified**: `src/flatzinc/mapper/constraints/element.rs`

**Impact**: +29 files (761 → 790)

**Changes Made**:
- Updated `array_var_int_element` to use `get_var_or_const()` for index and value
- Updated `array_int_element` to use `get_var_or_const()` for index and value  
- Updated `array_var_bool_element` to use `get_var_or_const()` for index and value
- Updated `array_bool_element` to use `get_var_or_const()` for index and value

**What this enables**:
- Support for `ArrayAccess` expressions in element constraints (e.g., `array[x[i]]`)
- Support for integer/boolean literals in index/value positions
- Simplified code by removing manual pattern matching

### Known Remaining Issues (61 failures)

#### High Priority (Quick Wins):
1. **Parse Errors** (~5 files): "Expected Int, found IntLiteral(1)"
   - Parser issue with type annotations

2. **Domain Size Exceeded** (2 files): Variables with domains > 10M
   - `arrow.fzn`: [123456789, 987654321] 
   - `contains_array.fzn`: [0, 999999999]

3. **Reified Constraint Issues** (~3 files):
   - `int_eq_reif` with unsupported argument types
   - `int_ne_reif` with unsupported argument types

4. **Set Literals in Arrays** (2 files):
   - `bus_scheduling_csplib.fzn`: SetLit in array elements
   - `combinatorial_auction.fzn`: SetLit in array elements

#### Medium Priority:
5. **global_cardinality_low_up_closed** (1 file): Not implemented

6. **IntLit in Specific Contexts** (1 file):
   - `buckets.fzn`: IntLit(0) not accepted somewhere

### Distance to Milestones
- **90%**: ✅ ACHIEVED! (target was 765/851)
- **95%**: Need +19 files (809/851)
- **96%**: Need +27 files (817/851)

### Next Steps Options
A. **Push for 95%** - Fix parse errors + domain issues + reified constraints
B. **Analyze remaining 61 failures** - Categorize and prioritize
C. **Document current state** - Create comprehensive guide

---
*Last Updated: October 2, 2025*
*Array element fix completed*