样本模型
磁盘分区的完整模型
#
# Create andformat a volume
# Focus on primarypartition formatted with NTFS
#
TYPE: Primary (10), Logical, Single, Span, Stripe, Mirror, RAID-5
SIZE: 10, 100, 500, 1000, 5000, 10000, 40000
FORMAT: quick, slow
FSYSTEM: FAT, FAT32, NTFS (10)
CLUSTER: 512, 1024, 2048, 4096, 8192, 16384, 32768, 65536
COMPRESSION: on,off
#
# File systemshave constraints on volume size
#
IF [FSYSTEM] ="FAT" THEN [SIZE] <= 4096;
IF [FSYSTEM] ="FAT32" THEN [SIZE] <= 32000;
#
# Compression canbe applied only for volumes
# formatted asNTFS and with cluster size <= 4K
#
IF [FSYSTEM] in{"FAT", "FAT32"} or
([FSYSTEM]= "NTFS" and [CLUSTER] >4096)
THEN [COMPRESSION]= "off";
测试硬件配置的模型
#
# Differentmachine configurations
#
PLATFORM: x86,ia64, amd64
CPUS: Single, Dual, Quad
RAM: 128MB, 1GB, 4GB, 64GB
HDD: SCSI, IDE
OS: NT4, Win2K, WinXP, Win2K3
IE: 4.0, 5.0, 5.5, 6.0
#
# Separatesub-models for hardware and software parameters make the hardware
# configurations lessvariant lowering the cost of assembling the machines
#
{ PLATFORM, CPUS,RAM, HDD } @ 2
{ OS, IE } @ 2
#
# Constraints maycross sub-model boundaries; here OS depends on PLATFORM
#
IF [PLATFORM] in{"ia64", "amd64"} THEN [OS] in {"WinXP","Win2K3"};
#
# Constraints onparameters in the same sub-model are also fine
#
IF [PLATFORM] ="x86" THEN [RAM] <> "64GB";
约束语法的例子
Constraints :: =
Constraint
| ConstraintConstraints
Constraint :: =
IFCompound THEN Compound ELSE Compound;
| Compound;
Compound :: =
Clause
|Clause LogicalOperator Compound
Clause :: =
Term
| (Compound )
| NOT Compound
Term :: =
ParameterName RelationValue
| ParameterName LIKE PatternString
| ParameterName IN { ValueSet }
| ParameterName Relation ParameterName
ValueSet :: =
Value
|Value, ValueSet
LogicalOperator : :=
AND
| OR
Relation :: =
=
| <>
| >
| >=
| <
| <=
ParameterName : :=[String]
Value :: =
"String"
| Number
String :: =whatever is typically regarded as a string of characters
Number :: =whatever is typically regarded as a number
PatternString : :=string with embedded special characters (wildcards):
* a seriesof characters of any length (can be zero)
? any onecharacter
©微软公司2006。保留所有权利。|商标使用条款
手工翻译,码字不易,转载请注明出处,不胜感激~