/// If this domain is already ground, return a mutable reference to the underlying [GroundDomain].
/// If this domain is unresolved, return a mutable reference to the underlying [UnresolvedDomain].
let idx_doms: Vec<DomainPtr> = idx_doms_gds.iter().cloned().map(|d| d.into()).collect();
/// If this is a [GroundDomain::Matrix], get immutable references to its element and index domains
pub fn as_matrix_ground(&self) -> Option<(&Moo<GroundDomain>, &Vec<Moo<GroundDomain>>)> {
/// If this is a [GroundDomain::Matrix], get mutable references to its element and index domains
/// If this is a [GroundDomain::Set], get immutable references to its attributes and inner domain
pub fn as_set_ground_mut(&mut self) -> Option<(&mut SetAttr<Int>, &mut Moo<GroundDomain>)> {
/// If this is a [GroundDomain::MSet], get immutable references to its attributes and inner domain
/// If this is a [GroundDomain::MSet], get mutable references to its attributes and inner domain
/// If this is a [GroundDomain::Function], get mutable references to its (attrs, domain, co-domain)
/// If this is a [GroundDomain::Partition], get immutable references to its attributes and inner domain
/// If this is a [GroundDomain::Partition], get mutable references to its attributes and inner domain
pub fn as_permutation_mut(&mut self) -> Option<(&mut PermutationAttr<IntVal>, &mut DomainPtr)> {
/// If this is a [GroundDomain::Permutation], get immutable references to its attributes and inner domain
/// If this is a [GroundDomain::Permutation], get mutable references to its attributes and inner domain
/// As opposed to `Domain::length`, this function returns a signed integer (`i32`) rather than unsigned.
/// * `DomainOpError::TooLarge` - Converting to an integer my not be possible if the domain is too big
"matrix indexed by [int(1..2)] of record {before: mset (representation repetition, maxSize 6) of int(1..9)}"