Compartir a través de


Combination.Interaction Method

Indicates that the given variables, parameters, or expressions are in interaction, and Spec Explorer should produce the full Cartesian product space for their possible values under the constraint.

Namespace: Microsoft.Modeling
Assembly: Microsoft.Xrt.Runtime (in Microsoft.Xrt.Runtime.dll)

Usage

'Usage

Syntax

'Declaration
public static void Interaction (
    params Object[] values
)

Parameters

  • values
    The variables, parameters, or expressions that are in interaction.

Example

The following example declares a SetFlags action in Cord script, and then defines a C# rule for the action.

action abstract static void Adapter.SetFlags(bool a, bool b, bool c, bool d);
[Rule]
static void SetFlags(bool a, bool b, bool c, bool d)
{
    Combination.Interaction(a, b);
    Combination.Interaction(c, d);
    // Add model code here...
}

The generation algorithm attempts to produce the minimal set of combinations such that the Cartesian product of a and b, and of c and d is contained. More specifically, one solution could be the four following combinations.

a b c d

false

false

false

false

true

false

true

false

false

true

false

true

true

true

true

true

Remarks

Use this method to indicate that a set of values interact and that Spec Explorer should produce all possible combinations of the values. This is the default parameter interaction behavior.

If no interaction statements are provided for a set of parameters of a rule, Spec Explorer uses the full Cartesian space to expand that set of parameters.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Microsoft Windows 7, Microsoft Windows Vista, Microsoft Windows XP SP2 or later, Microsoft Windows Server 2008, Microsoft Windows Server 2003

Change History

See Also

Reference

Combination Class
Combination Members
Microsoft.Modeling Namespace
Pairwise
PairwiseDeep
NWise
NWiseDeep

Other Resources

Parameter Generation