本文整理汇总了Java中jkind.results.InvalidProperty类的典型用法代码示例。如果您正苦于以下问题:Java InvalidProperty类的具体用法?Java InvalidProperty怎么用?Java InvalidProperty使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
InvalidProperty类属于jkind.results包,在下文中一共展示了InvalidProperty类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: renameKind2Prop
import jkind.results.InvalidProperty; //导入依赖的package包/类
private Property renameKind2Prop(Property property){
if(property instanceof InvalidProperty){
InvalidProperty renamedInvalid = (InvalidProperty)property;
return new InvalidProperty(renamedInvalid.getName(),
renamedInvalid.getSource(),
rename(renamedInvalid.getCounterexample()),
renamedInvalid.getConflicts(),
renamedInvalid.getRuntime());
}else if(property instanceof UnknownProperty){
UnknownProperty renamedUnknown = (UnknownProperty)property;
UnknownProperty newProp = new UnknownProperty(renamedUnknown.getName(),
renamedUnknown.getTrueFor(),
rename(renamedUnknown.getInductiveCounterexample()),
renamedUnknown.getRuntime());
return newProp;
}
if(!(property instanceof ValidProperty)){
throw new AgreeException("Unexpected property type");
}
return property;
}
示例2: getCounterexample
import jkind.results.InvalidProperty; //导入依赖的package包/类
private static Counterexample getCounterexample(PropertyResult result) {
Property prop = result.getProperty();
if (prop instanceof InvalidProperty) {
return ((InvalidProperty) prop).getCounterexample();
} else if (prop instanceof UnknownProperty) {
return ((UnknownProperty) prop).getInductiveCounterexample();
} else {
return null;
}
}
示例3: testSuiteFromJKindResult
import jkind.results.InvalidProperty; //导入依赖的package包/类
public static TestSuite testSuiteFromJKindResult(JKindResult result, String implUnderTest, String name, String description) {
List<TestCase> tests = new ArrayList<>();
for (PropertyResult pr : result.getPropertyResults()) {
if (pr.getProperty() instanceof InvalidProperty) {
InvalidProperty invalidProp = (InvalidProperty)pr.getProperty();
tests.add(new TestCase(pr.getName(), "", invalidProp.getCounterexample()));
}
}
return new TestSuite(implUnderTest, name, description, tests, TestSuite.State.INSTANTIATED);
}