private static bool testIfValidConfiguration(string configuration
                                                     , List <NumericOption> participatingOptions, NonBooleanConstraint constraintToTest)
        {
            Dictionary <NumericOption, double> numericSelection = new Dictionary <NumericOption, double>();

            string[] values = configuration.Split(new char[] { '$' });
            for (int i = 0; i < participatingOptions.Count; i++)
            {
                numericSelection.Add(participatingOptions.ElementAt(i), Double.Parse(values[i]));
            }
            return(constraintToTest.configIsValid(numericSelection));
        }
        private static List <string> transformToBooleanConstraints(NonBooleanConstraint constraint)
        {
            List <string> constraints            = new List <string>();
            List <ConfigurationOption> options   = constraint.ParticipatingOptions();
            List <List <double> >      allValues = options.Select(option =>
            {
                switch (option)
                {
                case BinaryOption _:
                    return(new List <double> {
                        0, 1
                    });

                case NumericOption numericOption:
                    return(numericOption.getAllValues());

                default:
                    throw new NotImplementedException();
                }
            }).ToList();

            foreach (List <double> values in CartesianProduct(allValues))
            {
                Dictionary <BinaryOption, BinaryOption.BinaryValue> binarySelection =
                    new Dictionary <BinaryOption, BinaryOption.BinaryValue>();
                Dictionary <NumericOption, double> numericSelection = new Dictionary <NumericOption, double>();
                for (int i = 0; i < options.Count; i++)
                {
                    switch (options[i])
                    {
                    case BinaryOption binaryOption:
                        binarySelection[binaryOption] = values[i] == 0
                                ? BinaryOption.BinaryValue.Deselected
                                : BinaryOption.BinaryValue.Selected;
                        break;

                    case NumericOption numericOption:
                        numericSelection[numericOption] = values[i];
                        break;

                    default:
                        throw new NotImplementedException();
                    }
                }
                if (!constraint.configIsValid(new Configuration(binarySelection, numericSelection, false)))
                {
                    List <string> terms = values.Zip(options, (value, option) =>
                    {
                        switch (option)
                        {
                        case BinaryOption _:
                            return(value == 0 ? option.Name : "!" + option.Name);

                        case NumericOption _:
                            return("!" + option.Name + "_" + value);

                        default:
                            throw new NotImplementedException();
                        }
                    }).ToList();
                    string newConstraint = String.Join(" | ", terms);
                    constraints.Add(newConstraint);
                }
            }
            return(constraints);
        }