Skip to content

Expose missing native propagators through MiniZinc and FlatZinc - #253

Open
zayenz wants to merge 22 commits into
mainfrom
feature/minizinc-registry
Open

zayenz wants to merge 22 commits into
mainfrom
feature/minizinc-registry

Conversation

@zayenz

@zayenz zayenz commented Oct 10, 2026 •

Copy link
Copy Markdown
Member

The Gecode MiniZinc library exposes missing native propagators through standard fzn_ hooks and additional modelling predicates in gecode.mzn.

The standard hooks cover count inequalities, conditionals, nondeterministic regular constraints, optional distinctness and scheduling, and set intersection. MiniZinc retains responsibility for public overloads, assertions, index handling and optional values. Builtin expressions also use native implementations for extrema, supported float powers, set matrix element and scalar implication.

The Gecode-specific predicates provide inter-distance and minimum distance, arithmetic constraints including array-wide and modular products, offset distinctness and matching counts, optional rectangle non-overlap, and additional array, channeling and set relations. These interfaces reach native propagators that standard MiniZinc formulations do not reach, or avoid auxiliary variables through views.

Public predicates lower to typed bindings in gecode_fzn.mzn, with documented semantics and reification support. Propagation strength is selected through annotations. Fixed-base floating-point powers and inverse logarithms use explicit MPFR rounding.

Validation includes all 135 FlatZinc regressions, 131 MiniZinc integration cases, and predicate documentation generation.

Fixed-value conditional hooks delegate to their variable-value counterparts. The regular posters use concrete integer arguments, Boolean extrema preserve shared inputs directly, and the annotation test checks the exact propagation flags. The conditional library files follow modern upstream MiniZinc formatting.

The simplifications passed a release build, all 135 FlatZinc regressions and 16 shared-Boolean extrema tests with five iterations, 16 conditional compilation comparisons and executions, and four direct shared-Boolean registry cases.

@zayenz
zayenz added this pull request to stack #254 October 10, 2026 18:20
@zayenz
zayenz force-pushed the feature/minizinc-registry branch from 7ff1853 to f1cea6c Compare October 12, 2026 16:22
Base automatically changed from feature/inter-distance to main October 13, 2026 21:12
@zayenz
zayenz force-pushed the feature/minizinc-registry branch from e7d9334 to f70f5f9 Compare October 13, 2026 21:12
@zayenz
zayenz marked this pull request as ready for review October 14, 2026 03:01

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant