conjure-cp / conjure-oxide

Mozilla Public License 2.0
9 stars 16 forks source link

Make `SumGeq` `SumLeq` strongly typed (`SumGeq(Metadata,[Atom],Atom)`) #509

Open niklasdewally opened 5 days ago

ozgurakgun commented 5 days ago

I've got another idea about the typing of constraints that correspond to MinionConstraints. But it might require merging the minion ast into the conjure_core crate (hence probably removing the minion_rs crate). We can talk tomorrow.

In short, we can parameterise the Constraint type in minion_rs by what Literal and Atom types it works on. Then, remove duplication in the Essence AST, instead have a variant that carries a MinionConstraint directly. We can use the type arguments to say it can be any Expr of just Literals or just Atoms as needed.

Or maybe we can get away without merging the two crates if MinionConstraints never need to carry Exprs in them. Not sure yet.