2 種類の検査コマンド
▪ pred
▫条件が成り立つ具体例を探索
▫ run コマンドで検査
▪ assert
▫ 条件が成り立たない反例を探索
▫ check コマンドで検査
37.
具体例を探索する
sig Subnet {}
sigSecurityGroup {}
sig Instance {
subnet : one Subnet,
securityGroup : some SecurityGroup,
}
run {}
38.
具体例を探索する
sig Subnet {}
sigSecurityGroup {}
sig Instance {
subnet : one Subnet,
securityGroup : some SecurityGroup,
}
pred subnetShouldNotBeEmpty {
all s : Subnet | some subnet.s
}
run subnetShouldNotBeEmpty
反例を探索する
sig Subnet {}
sigSecurityGroup {}
sig Instance {
subnet : one Subnet,
securityGroup : some SecurityGroup,
}
pred subnetShouldNotBeEmpty {
all s : Subnet | some subnet.s
}
run subnetShouldNotBeEmpty
41.
反例を探索する
sig Subnet {}
sigSecurityGroup {}
sig Instance {
subnet : one Subnet,
securityGroup : some SecurityGroup,
}
assert subnetShouldNotBeEmpty {
all s : Subnet | some subnet.s
}
check subnetShouldNotBeEmpty
CREDITS
Special thanks toall the people who made and released
these awesome resources for free:
▪ Presentation template by SlidesCarnival
▪ Photographs by Unsplash