concretizer bugfix: require at least one value for multi-value variants

We didn't have a cardinality constraint for multi-valued variants, so the
solver wasn't filling them in.

- [x] add a requirement for at least one value for multi-valued variants
This commit is contained in:
Todd Gamblin 2020-01-03 17:32:30 -08:00
parent 309ae856ab
commit 71726a9b33

View file

@ -78,6 +78,10 @@ node(D) :- node(P), depends_on(P, D).
1 { variant_value(P, V, X) : variant_possible_value(P, V, X) } 1
:- node(P), variant(P, V), variant_single_value(P, V).
% at least one variant value for multi-valued variants.
1 { variant_value(P, V, X) : variant_possible_value(P, V, X) }
:- node(P), variant(P, V), not variant_single_value(P, V).
% if a variant is set to anything, it is considered 'set'.
variant_set(P, V) :- variant_set(P, V, _).