Skip to content

Conversation

@maartenflippo
Copy link
Contributor

@maartenflippo maartenflippo commented Jul 25, 2025

We migrate to the fzn-rs package, which extracts much of the parsing of flatzinc files to a separate crate.

Todo

@maartenflippo maartenflippo force-pushed the feat/improved-fzn-parser branch from 945b37e to 438aa3b Compare August 13, 2025 20:16
@maartenflippo maartenflippo marked this pull request as ready for review August 13, 2025 21:04
@maartenflippo maartenflippo force-pushed the feat/pumpkin-use-fzn-rs branch from 898a593 to 244b353 Compare August 18, 2025 12:38
@github-actions github-actions bot dismissed stale reviews from ImkoMarijnissen and ImkoMarijnissen September 25, 2025 09:09

Review re-requested

@EmirDe
Copy link
Contributor

EmirDe commented Oct 2, 2025

let mut typed_ast
For Pumpkin, comments on the compile stages

@maartenflippo maartenflippo force-pushed the feat/improved-fzn-parser branch from cfe2685 to 1ee9455 Compare October 2, 2025 14:38
Copy link
Contributor

@ImkoMarijnissen ImkoMarijnissen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only went through the changes in pumpkin-solver

}

ast::Domain::UnboundedInt => {
return Err(FlatZincError::UnsupportedVariable(name.as_ref().into()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We now "support" this

Comment on lines +42 to +45
// A literal which is always true, can be used when using bool constants in the solver
// pub(crate) constant_bool_true: BooleanDomainId,
// A literal which is always false, can be used when using bool constants in the solver
// pub(crate) constant_bool_false: BooleanDomainId,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commented out code can be removed

instance
.resolve_array(array)
.map_err(|err| FlatZincError::UndefinedArray(err.0))?
.map(|maybe_int| maybe_int.map_err(FlatZincError::from))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me this is a bit vague; why could this be an int?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other compiler files have some documentation using //! that specifies the overall purpose of the file; would be nice to include that here as well

instance: &Instance,
context: &mut CompilationContext,
) -> Result<(), FlatZincError> {
for (name, array) in &instance.arrays {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this something that we previously did not support or did we just handle it in a different way previously?

Comment on lines +87 to +88
ast::Domain::UnboundedInt => {
return Err(FlatZincError::UnsupportedVariable(name.as_ref().into()))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not unsupported anymore

@maartenflippo maartenflippo force-pushed the feat/improved-fzn-parser branch from 1ee9455 to 7d97aaf Compare December 10, 2025 10:06
Base automatically changed from feat/improved-fzn-parser to main December 10, 2025 10:36
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.

4 participants