@@ -13,63 +13,56 @@ class VCFunctionSubstitutionTest {
1313 void substitutesExactFunctionInvocationIntoSuffix () {
1414 VCImplication implication = vc ("f(x) == 0" , "f(y) == f(x) + 1" );
1515
16- assertSimplificationSteps (substitution ::apply , implication ,
17- chain (expect ("f(x) == 0" ), expect ("f(y) == 0 + 1" , "f(x) == 0" )));
16+ assertSimplificationSteps (substitution ::apply , implication , step ("f(x) == 0" , "f(y) == 0 + 1" ));
1817 }
1918
2019 @ Test
2120 void substitutesReverseFunctionEquality () {
2221 VCImplication implication = vc ("0 == f(x)" , "f(y) == f(x) + 1" );
2322
24- assertSimplificationSteps (substitution ::apply , implication ,
25- chain (expect ("0 == f(x)" ), expect ("f(y) == 0 + 1" , "0 == f(x)" )));
23+ assertSimplificationSteps (substitution ::apply , implication , step ("0 == f(x)" , "f(y) == 0 + 1" ));
2624 }
2725
2826 @ Test
2927 void preservesSourceNode () {
3028 VCImplication implication = vc ("f(x) == 0" , "f(x) > -1" );
3129
32- assertSimplificationSteps (substitution ::apply , implication ,
33- chain (expect ("f(x) == 0" ), expect ("0 > -1" , "f(x) == 0" )));
30+ assertSimplificationSteps (substitution ::apply , implication , step ("f(x) == 0" , "0 > -1" ));
3431 }
3532
3633 @ Test
3734 void doesNotRewriteEarlierNodesFromLaterEquality () {
3835 VCImplication implication = vc ("f(x) > 0" , "f(x) == 1" );
3936
40- assertSimplificationSteps (substitution ::apply , implication , chain ( expect ( "f(x) > 0" ), expect ( "f(x) == 1" ) ));
37+ assertSimplificationSteps (substitution ::apply , implication , step ( "f(x) > 0" , "f(x) == 1" ));
4138 }
4239
4340 @ Test
4441 void skipsUsedUpEqualityAndUsesNextAvailableEquality () {
4542 VCImplication implication = vc ("f(x) == 0" , "f(y) == f(x) + 1" , "f(y) == 1" );
4643
47- assertSimplificationSteps (substitution ::apply , implication ,
48- chain (expect ("f(x) == 0" ), expect ("f(y) == 0 + 1" , "f(x) == 0" ), expect ("f(y) == 1" )),
49- chain (expect ("f(x) == 0" ), expect ("f(y) == 0 + 1" , "f(x) == 0" ),
50- expect ("0 + 1 == 1" , "f(y) == 0 + 1" )));
44+ assertSimplificationSteps (substitution ::apply , implication , step ("f(x) == 0" , "f(y) == 0 + 1" , "f(y) == 1" ),
45+ step ("f(x) == 0" , "f(y) == 0 + 1" , "0 + 1 == 1" ));
5146 }
5247
5348 @ Test
5449 void doesNotGeneralizeAcrossDifferentArguments () {
5550 VCImplication implication = vc ("f(x) == 0" , "f(y) == 0" );
5651
57- assertSimplificationSteps (substitution ::apply , implication , chain ( expect ( "f(x) == 0" ), expect ( "f(y) == 0" ) ));
52+ assertSimplificationSteps (substitution ::apply , implication , step ( "f(x) == 0" , "f(y) == 0" ));
5853 }
5954
6055 @ Test
6156 void ignoresRecursiveFunctionEquality () {
6257 VCImplication implication = vc ("f(x) == f(x) + 1" , "f(x) > 0" );
6358
64- assertSimplificationSteps (substitution ::apply , implication ,
65- chain (expect ("f(x) == f(x) + 1" ), expect ("f(x) > 0" )));
59+ assertSimplificationSteps (substitution ::apply , implication , step ("f(x) == f(x) + 1" , "f(x) > 0" ));
6660 }
6761
6862 @ Test
6963 void extractsEqualityFromTopLevelConjunction () {
7064 VCImplication implication = vc ("ok && f(x) == 0" , "f(y) == f(x) + 1" );
7165
72- assertSimplificationSteps (substitution ::apply , implication ,
73- chain (expect ("ok && f(x) == 0" ), expect ("f(y) == 0 + 1" , "ok && f(x) == 0" )));
66+ assertSimplificationSteps (substitution ::apply , implication , step ("ok && f(x) == 0" , "f(y) == 0 + 1" ));
7467 }
7568}
0 commit comments