From b59479db8d6dc9d59b4788bc59084a6d3c47d528 Mon Sep 17 00:00:00 2001 From: Andrew Reynolds Date: Fri, 6 May 2011 20:38:29 +0000 Subject: [PATCH] added 10 benchmarks to regress/regress0/datatypes from paper --- test/regress/regress0/datatypes/Makefile.am | 13 +++++- .../regress0/datatypes/typed_v10l30054.cvc | 44 ++++++++++++++++++ .../regress0/datatypes/typed_v1l80005.cvc | 22 +++++++++ .../regress0/datatypes/typed_v2l30079.cvc | 20 +++++++++ .../regress0/datatypes/typed_v3l20092.cvc | 22 +++++++++ .../regress0/datatypes/typed_v5l30069.cvc | 29 ++++++++++++ test/regress/regress0/datatypes/v10l40099.cvc | 45 +++++++++++++++++++ test/regress/regress0/datatypes/v1l20009.cvc | 16 +++++++ test/regress/regress0/datatypes/v2l40025.cvc | 21 +++++++++ test/regress/regress0/datatypes/v3l60006.cvc | 26 +++++++++++ test/regress/regress0/datatypes/v5l30058.cvc | 29 ++++++++++++ 11 files changed, 286 insertions(+), 1 deletion(-) create mode 100644 test/regress/regress0/datatypes/typed_v10l30054.cvc create mode 100644 test/regress/regress0/datatypes/typed_v1l80005.cvc create mode 100644 test/regress/regress0/datatypes/typed_v2l30079.cvc create mode 100644 test/regress/regress0/datatypes/typed_v3l20092.cvc create mode 100644 test/regress/regress0/datatypes/typed_v5l30069.cvc create mode 100644 test/regress/regress0/datatypes/v10l40099.cvc create mode 100644 test/regress/regress0/datatypes/v1l20009.cvc create mode 100644 test/regress/regress0/datatypes/v2l40025.cvc create mode 100644 test/regress/regress0/datatypes/v3l60006.cvc create mode 100644 test/regress/regress0/datatypes/v5l30058.cvc diff --git a/test/regress/regress0/datatypes/Makefile.am b/test/regress/regress0/datatypes/Makefile.am index 8d6dbbf73..efc9954c2 100644 --- a/test/regress/regress0/datatypes/Makefile.am +++ b/test/regress/regress0/datatypes/Makefile.am @@ -16,7 +16,18 @@ TESTS = \ datatype13.cvc \ mutually-recursive.cvc \ rewriter.cvc \ - typed_v1l50016-simp.cvc + typed_v1l50016-simp.cvc \ + typed_v10l30054.cvc \ + typed_v1l80005.cvc \ + typed_v2l30079.cvc \ + typed_v3l20092.cvc \ + typed_v5l30069.cvc \ + v10l40099.cvc \ + v1l20009.cvc \ + v2l40025.cvc \ + v3l60006.cvc \ + v5l30058.cvc + EXTRA_DIST = $(TESTS) diff --git a/test/regress/regress0/datatypes/typed_v10l30054.cvc b/test/regress/regress0/datatypes/typed_v10l30054.cvc new file mode 100644 index 000000000..80c148863 --- /dev/null +++ b/test/regress/regress0/datatypes/typed_v10l30054.cvc @@ -0,0 +1,44 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : nat ; +x5 : nat ; +x6 : nat ; +x7 : nat ; +x8 : nat ; +x9 : nat ; +x10 : nat ; +x11 : list ; +x12 : list ; +x13 : list ; +x14 : list ; +x15 : list ; +x16 : list ; +x17 : list ; +x18 : list ; +x19 : list ; +x20 : list ; +x21 : tree ; +x22 : tree ; +x23 : tree ; +x24 : tree ; +x25 : tree ; +x26 : tree ; +x27 : tree ; +x28 : tree ; +x29 : tree ; +x30 : tree ; + +QUERY + +(NOT (((x4 = x4) + AND (NOT is_leaf((LET x81 = null IN (IF is_cons(x81) THEN car(x81) ELSE leaf(zero) ENDIF))))) + AND (NOT (x10 = x2)))); diff --git a/test/regress/regress0/datatypes/typed_v1l80005.cvc b/test/regress/regress0/datatypes/typed_v1l80005.cvc new file mode 100644 index 000000000..9a85f1b88 --- /dev/null +++ b/test/regress/regress0/datatypes/typed_v1l80005.cvc @@ -0,0 +1,22 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : list ; +x3 : tree ; + +QUERY + +(NOT ((((((((NOT is_succ((LET x90 = (LET x91 = node(cons(x3,cons((LET x92 = (LET x93 = cons(node(x2),(LET x94 = node((LET x95 = null IN (IF is_cons(x95) THEN cdr(x95) ELSE null ENDIF))) IN (IF is_node(x94) THEN children(x94) ELSE null ENDIF))) IN (IF is_cons(x93) THEN cdr(x93) ELSE null ENDIF)) IN (IF is_cons(x92) THEN car(x92) ELSE leaf(zero) ENDIF)),cons(node(cons(node((LET x96 = node(x2) IN (IF is_node(x96) THEN children(x96) ELSE null ENDIF))),cons((LET x97 = (LET x98 = leaf((LET x99 = node((LET x100 = null IN (IF is_cons(x100) THEN cdr(x100) ELSE null ENDIF))) IN (IF is_leaf(x99) THEN data(x99) ELSE zero ENDIF))) IN (IF is_node(x98) THEN children(x98) ELSE null ENDIF)) IN (IF is_cons(x97) THEN car(x97) ELSE leaf(zero) ENDIF)),(LET x101 = (LET x102 = (LET x103 = node(x2) IN (IF is_node(x103) THEN children(x103) ELSE null ENDIF)) IN (IF is_cons(x102) THEN car(x102) ELSE leaf(zero) ENDIF)) IN (IF is_node(x101) THEN children(x101) ELSE null ENDIF))))),cons(leaf(succ((LET x104 = (LET x105 = (LET x106 = null IN (IF is_cons(x106) THEN car(x106) ELSE leaf(zero) ENDIF)) IN (IF is_leaf(x105) THEN data(x105) ELSE zero ENDIF)) IN (IF is_succ(x104) THEN pred(x104) ELSE zero ENDIF)))),null))))) IN (IF is_leaf(x91) THEN data(x91) ELSE zero ENDIF)) IN (IF is_succ(x90) THEN pred(x90) ELSE zero ENDIF)))) + AND (node((LET x87 = cons((LET x88 = null IN (IF is_cons(x88) THEN car(x88) ELSE leaf(zero) ENDIF)),(LET x89 = cons(node(cons(x3,x2)),null) IN (IF is_cons(x89) THEN cdr(x89) ELSE null ENDIF))) IN (IF is_cons(x87) THEN cdr(x87) ELSE null ENDIF))) = (LET x85 = (LET x86 = x3 IN (IF is_node(x86) THEN children(x86) ELSE null ENDIF)) IN (IF is_cons(x85) THEN car(x85) ELSE leaf(zero) ENDIF)))) + AND is_null((LET x83 = cons(node(null),(LET x84 = x2 IN (IF is_cons(x84) THEN cdr(x84) ELSE null ENDIF))) IN (IF is_cons(x83) THEN cdr(x83) ELSE null ENDIF)))) + AND is_null(cons(leaf((LET x77 = succ((LET x78 = (LET x79 = zero IN (IF is_succ(x79) THEN pred(x79) ELSE zero ENDIF)) IN (IF is_succ(x78) THEN pred(x78) ELSE zero ENDIF))) IN (IF is_succ(x77) THEN pred(x77) ELSE zero ENDIF))),(LET x80 = leaf((LET x81 = succ((LET x82 = x3 IN (IF is_leaf(x82) THEN data(x82) ELSE zero ENDIF))) IN (IF is_succ(x81) THEN pred(x81) ELSE zero ENDIF))) IN (IF is_node(x80) THEN children(x80) ELSE null ENDIF))))) + AND is_node(leaf(zero))) + AND (NOT (x2 = null))) + AND (NOT is_zero((LET x76 = node(cons(leaf(succ(zero)),null)) IN (IF is_leaf(x76) THEN data(x76) ELSE zero ENDIF))))) + AND is_null((LET x74 = (LET x75 = null IN (IF is_cons(x75) THEN cdr(x75) ELSE null ENDIF)) IN (IF is_cons(x74) THEN cdr(x74) ELSE null ENDIF))))); diff --git a/test/regress/regress0/datatypes/typed_v2l30079.cvc b/test/regress/regress0/datatypes/typed_v2l30079.cvc new file mode 100644 index 000000000..990cfbb24 --- /dev/null +++ b/test/regress/regress0/datatypes/typed_v2l30079.cvc @@ -0,0 +1,20 @@ +% EXPECT: invalid +% EXIT: 10 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : list ; +x4 : list ; +x5 : tree ; +x6 : tree ; + +QUERY + +(NOT ((is_node(x6) + AND (x6 = x5)) + AND (NOT (null = cons(x6,x3))))); diff --git a/test/regress/regress0/datatypes/typed_v3l20092.cvc b/test/regress/regress0/datatypes/typed_v3l20092.cvc new file mode 100644 index 000000000..43dfa3373 --- /dev/null +++ b/test/regress/regress0/datatypes/typed_v3l20092.cvc @@ -0,0 +1,22 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : list ; +x5 : list ; +x6 : list ; +x7 : tree ; +x8 : tree ; +x9 : tree ; + +QUERY + +(NOT (((LET x137 = x1 IN (IF is_succ(x137) THEN pred(x137) ELSE zero ENDIF)) = (LET x135 = (LET x136 = null IN (IF is_cons(x136) THEN car(x136) ELSE leaf(zero) ENDIF)) IN (IF is_leaf(x135) THEN data(x135) ELSE zero ENDIF))) + AND (cons(node(x6),(LET x134 = x7 IN (IF is_node(x134) THEN children(x134) ELSE null ENDIF))) = (LET x132 = node((LET x133 = x6 IN (IF is_cons(x133) THEN cdr(x133) ELSE null ENDIF))) IN (IF is_node(x132) THEN children(x132) ELSE null ENDIF))))); diff --git a/test/regress/regress0/datatypes/typed_v5l30069.cvc b/test/regress/regress0/datatypes/typed_v5l30069.cvc new file mode 100644 index 000000000..662391b90 --- /dev/null +++ b/test/regress/regress0/datatypes/typed_v5l30069.cvc @@ -0,0 +1,29 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : nat ; +x5 : nat ; +x6 : list ; +x7 : list ; +x8 : list ; +x9 : list ; +x10 : list ; +x11 : tree ; +x12 : tree ; +x13 : tree ; +x14 : tree ; +x15 : tree ; + +QUERY + +(NOT ((is_cons((LET x121 = leaf((LET x122 = x13 IN (IF is_leaf(x122) THEN data(x122) ELSE zero ENDIF))) IN (IF is_node(x121) THEN children(x121) ELSE null ENDIF))) + AND (x15 = node(x6))) + AND (NOT is_cons(x10)))); diff --git a/test/regress/regress0/datatypes/v10l40099.cvc b/test/regress/regress0/datatypes/v10l40099.cvc new file mode 100644 index 000000000..f2cc332f3 --- /dev/null +++ b/test/regress/regress0/datatypes/v10l40099.cvc @@ -0,0 +1,45 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : nat ; +x5 : nat ; +x6 : nat ; +x7 : nat ; +x8 : nat ; +x9 : nat ; +x10 : nat ; +x11 : list ; +x12 : list ; +x13 : list ; +x14 : list ; +x15 : list ; +x16 : list ; +x17 : list ; +x18 : list ; +x19 : list ; +x20 : list ; +x21 : tree ; +x22 : tree ; +x23 : tree ; +x24 : tree ; +x25 : tree ; +x26 : tree ; +x27 : tree ; +x28 : tree ; +x29 : tree ; +x30 : tree ; + +QUERY + +(NOT ((((NOT is_zero(x3)) + AND (x8 = zero)) + AND (NOT (x25 = x28))) + AND (NOT is_zero(x8)))); diff --git a/test/regress/regress0/datatypes/v1l20009.cvc b/test/regress/regress0/datatypes/v1l20009.cvc new file mode 100644 index 000000000..9eea247a2 --- /dev/null +++ b/test/regress/regress0/datatypes/v1l20009.cvc @@ -0,0 +1,16 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : list ; +x3 : tree ; + +QUERY + +(NOT ((NOT is_zero(pred(succ(pred(zero))))) + AND (data(x3) = succ(pred(data(leaf(succ(data(car(null)))))))))); diff --git a/test/regress/regress0/datatypes/v2l40025.cvc b/test/regress/regress0/datatypes/v2l40025.cvc new file mode 100644 index 000000000..f78d5b2cf --- /dev/null +++ b/test/regress/regress0/datatypes/v2l40025.cvc @@ -0,0 +1,21 @@ +% EXPECT: valid +% EXIT: 20 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : list ; +x4 : list ; +x5 : tree ; +x6 : tree ; + +QUERY + +(NOT (((is_leaf(x5) + AND (NOT (x2 = x1))) + AND (x2 = pred(pred(zero)))) + AND (NOT is_node(node(null))))); diff --git a/test/regress/regress0/datatypes/v3l60006.cvc b/test/regress/regress0/datatypes/v3l60006.cvc new file mode 100644 index 000000000..a681599ee --- /dev/null +++ b/test/regress/regress0/datatypes/v3l60006.cvc @@ -0,0 +1,26 @@ +% EXPECT: invalid +% EXIT: 10 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : list ; +x5 : list ; +x6 : list ; +x7 : tree ; +x8 : tree ; +x9 : tree ; + +QUERY + +(NOT ((((((NOT is_succ(pred(data(leaf(x3))))) + AND (x1 = zero)) + AND (NOT is_zero(succ(succ(zero))))) + AND (NOT (x3 = x2))) + AND (x4 = cdr(x5))) + AND is_cons(cons(x8,x5)))); diff --git a/test/regress/regress0/datatypes/v5l30058.cvc b/test/regress/regress0/datatypes/v5l30058.cvc new file mode 100644 index 000000000..4159f6c70 --- /dev/null +++ b/test/regress/regress0/datatypes/v5l30058.cvc @@ -0,0 +1,29 @@ +% EXPECT: invalid +% EXIT: 10 +DATATYPE + nat = succ(pred : nat) | zero, + list = cons(car : tree, cdr : list) | null, + tree = node(children : list) | leaf(data : nat) +END; + +x1 : nat ; +x2 : nat ; +x3 : nat ; +x4 : nat ; +x5 : nat ; +x6 : list ; +x7 : list ; +x8 : list ; +x9 : list ; +x10 : list ; +x11 : tree ; +x12 : tree ; +x13 : tree ; +x14 : tree ; +x15 : tree ; + +QUERY + +(NOT (((NOT (node(x9) = car(x8))) + AND (node(x6) = x11)) + AND (NOT is_node(x15)))); -- 2.30.2