aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--generics/antireflexive-test.pd13
-rw-r--r--generics/antisymmetric-test.pd4
-rw-r--r--generics/associative-test.pd32
-rw-r--r--generics/commutative-rule.pd27
-rw-r--r--generics/commutative-test.pd39
-rw-r--r--generics/distributive-test.pd32
-rw-r--r--generics/equivalence-test.pd14
-rw-r--r--generics/invertible-test.pd31
-rw-r--r--generics/operator1-rule.pd11
-rw-r--r--generics/operator1-test.pd5
-rw-r--r--generics/operator2-rule.pd10
-rw-r--r--generics/operator2-test.pd10
-rw-r--r--generics/partialorder-test.pd14
-rw-r--r--generics/partialordereq-test.pd14
-rw-r--r--generics/reflexive-test.pd13
-rw-r--r--generics/totalorder-test.pd11
-rw-r--r--generics/totalordereq-test.pd11
-rw-r--r--generics/transitive-test.pd4
-rw-r--r--generics/trichotomy-test.pd32
19 files changed, 327 insertions, 0 deletions
diff --git a/generics/antireflexive-test.pd b/generics/antireflexive-test.pd
new file mode 100644
index 0000000..7353dc6
--- /dev/null
+++ b/generics/antireflexive-test.pd
@@ -0,0 +1,13 @@
+#N canvas 0 0 450 164 10;
+#X obj 12 18 inlet;
+#X obj 12 118 outlet;
+#X obj 12 80 \$2;
+#X msg 12 37 2 2;
+#X obj 12 56 t a a;
+#X obj 12 99 == 0;
+#X connect 0 0 3 0;
+#X connect 2 0 5 0;
+#X connect 3 0 4 0;
+#X connect 4 0 2 0;
+#X connect 4 1 2 1;
+#X connect 5 0 1 0;
diff --git a/generics/antisymmetric-test.pd b/generics/antisymmetric-test.pd
new file mode 100644
index 0000000..0788ad6
--- /dev/null
+++ b/generics/antisymmetric-test.pd
@@ -0,0 +1,4 @@
+#N canvas 0 0 450 300 10;
+#X obj 12 18 inlet;
+#X obj 12 48 outlet;
+#X connect 0 0 1 0;
diff --git a/generics/associative-test.pd b/generics/associative-test.pd
new file mode 100644
index 0000000..1994c4e
--- /dev/null
+++ b/generics/associative-test.pd
@@ -0,0 +1,32 @@
+#N canvas 736 151 452 434 10;
+#X obj 40 15 inlet bang;
+#X obj 40 150 /;
+#X obj 40 169 t a a;
+#X text 167 24 with tolerance 0;
+#X obj 40 188 <= 0;
+#X text 167 9 This test verifies that (1+2)+3=1+(2+3);
+#X msg 40 34 1 2 3;
+#X obj 40 74 unpack 0 0 0;
+#X obj 40 245 outlet;
+#X obj 40 131 * 2;
+#X obj 40 112 \$1.norm;
+#X obj 147 112 \$1.norm;
+#X obj 40 93 associator \$1 \$2;
+#X obj 40 226 list append associative \$1 \$2;
+#X obj 40 207 pack 0 0 -1;
+#X connect 0 0 6 0;
+#X connect 1 0 2 0;
+#X connect 2 0 4 0;
+#X connect 2 1 14 1;
+#X connect 4 0 14 0;
+#X connect 6 0 7 0;
+#X connect 7 0 12 0;
+#X connect 7 1 12 1;
+#X connect 7 2 12 2;
+#X connect 9 0 1 0;
+#X connect 10 0 9 0;
+#X connect 11 0 1 1;
+#X connect 12 0 10 0;
+#X connect 12 1 11 0;
+#X connect 13 0 8 0;
+#X connect 14 0 13 0;
diff --git a/generics/commutative-rule.pd b/generics/commutative-rule.pd
new file mode 100644
index 0000000..1260772
--- /dev/null
+++ b/generics/commutative-rule.pd
@@ -0,0 +1,27 @@
+#N canvas 555 5 452 322 10;
+#X obj 40 115 /;
+#X obj 40 134 t a a;
+#X obj 40 210 outlet;
+#X obj 40 153 <= 0;
+#X obj 40 96 * 2;
+#X obj 40 53 \$1.norm;
+#X obj 147 53 \$1.norm;
+#X obj 40 34 commutator \$1 \$2;
+#X obj 40 191 list append commutative \$1 \$2;
+#X obj 40 172 pack 0 0 -1;
+#X obj 113 127 f;
+#X obj 147 15 \$1.inlet;
+#X obj 40 15 \$1.inlet;
+#X connect 0 0 1 0;
+#X connect 1 0 3 0;
+#X connect 1 1 9 1;
+#X connect 3 0 9 0;
+#X connect 4 0 0 0;
+#X connect 5 0 4 0;
+#X connect 6 0 0 1;
+#X connect 7 0 5 0;
+#X connect 7 1 6 0;
+#X connect 8 0 2 0;
+#X connect 9 0 8 0;
+#X connect 11 0 7 1;
+#X connect 12 0 7 0;
diff --git a/generics/commutative-test.pd b/generics/commutative-test.pd
new file mode 100644
index 0000000..ec67417
--- /dev/null
+++ b/generics/commutative-test.pd
@@ -0,0 +1,39 @@
+#N canvas 555 5 452 322 10;
+#X obj 40 15 inlet bang;
+#X obj 101 102 unpack 0 0;
+#X obj 101 183 /;
+#X msg 40 34 1 3;
+#X text 216 9 This test verifies that 1+3=3+1;
+#X obj 101 202 t a a;
+#X obj 101 278 outlet;
+#X text 217 44 with tolerance 0;
+#X obj 101 221 <= 0;
+#X text 218 23 and 1*3=3*1 and...;
+#X obj 101 164 * 2;
+#X obj 101 145 \$1.norm;
+#X obj 208 145 \$1.norm;
+#X obj 101 126 commutator \$1 \$2;
+#X obj 41 53 t b l b;
+#X obj 43 95 rtimer;
+#X floatatom 44 125 5 0 0 0 - - -;
+#X obj 101 259 list append commutative \$1 \$2;
+#X obj 101 240 pack 0 0 -1;
+#X connect 0 0 3 0;
+#X connect 1 0 13 0;
+#X connect 1 1 13 1;
+#X connect 2 0 5 0;
+#X connect 3 0 14 0;
+#X connect 5 0 8 0;
+#X connect 5 1 18 1;
+#X connect 8 0 18 0;
+#X connect 10 0 2 0;
+#X connect 11 0 10 0;
+#X connect 12 0 2 1;
+#X connect 13 0 11 0;
+#X connect 13 1 12 0;
+#X connect 14 0 15 1;
+#X connect 14 1 1 0;
+#X connect 14 2 15 0;
+#X connect 15 0 16 0;
+#X connect 17 0 6 0;
+#X connect 18 0 17 0;
diff --git a/generics/distributive-test.pd b/generics/distributive-test.pd
new file mode 100644
index 0000000..8f6692a
--- /dev/null
+++ b/generics/distributive-test.pd
@@ -0,0 +1,32 @@
+#N canvas 665 86 471 430 10;
+#X obj 40 15 inlet bang;
+#X obj 37 160 /;
+#X obj 37 179 t a a;
+#X text 157 24 with tolerance 0;
+#X obj 37 198 <= 0;
+#X text 156 9 This test verifies that 3*(4+5)=3*4+3*5;
+#X msg 40 34 3 4 5;
+#X obj 40 82 unpack 0 0 0;
+#X obj 37 255 outlet;
+#X obj 37 141 * 2;
+#X obj 37 122 \$1.norm;
+#X obj 172 122 \$1.norm;
+#X obj 37 103 distributor \$1 \$2 \$3;
+#X obj 37 236 list append distributive \$1 \$2 \$3;
+#X obj 37 217 pack 0 0 -1;
+#X connect 0 0 6 0;
+#X connect 1 0 2 0;
+#X connect 2 0 4 0;
+#X connect 2 1 14 1;
+#X connect 4 0 14 0;
+#X connect 6 0 7 0;
+#X connect 7 0 12 0;
+#X connect 7 1 12 1;
+#X connect 7 2 12 2;
+#X connect 9 0 1 0;
+#X connect 10 0 9 0;
+#X connect 11 0 1 1;
+#X connect 12 0 10 0;
+#X connect 12 1 11 0;
+#X connect 13 0 8 0;
+#X connect 14 0 13 0;
diff --git a/generics/equivalence-test.pd b/generics/equivalence-test.pd
new file mode 100644
index 0000000..d824510
--- /dev/null
+++ b/generics/equivalence-test.pd
@@ -0,0 +1,14 @@
+#N canvas 0 0 450 161 10;
+#X obj 13 21 inlet;
+#X obj 13 121 outlet;
+#X obj 13 97 commutative-test \$1 \$2;
+#X obj 35 78 transitive-test \$1 \$2;
+#X obj 57 59 reflexive-test \$1 \$2;
+#X obj 13 40 t b b b;
+#X connect 0 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 1 0;
+#X connect 5 0 2 0;
+#X connect 5 1 3 0;
+#X connect 5 2 4 0;
diff --git a/generics/invertible-test.pd b/generics/invertible-test.pd
new file mode 100644
index 0000000..d08abe9
--- /dev/null
+++ b/generics/invertible-test.pd
@@ -0,0 +1,31 @@
+#N canvas 665 86 452 291 10;
+#X obj 40 15 inlet bang;
+#X obj 40 79 unpack 0 0;
+#X obj 33 160 /;
+#X msg 40 34 1 3;
+#X obj 33 179 t a a;
+#X text 217 24 with tolerance 0;
+#X obj 33 198 <= 0;
+#X text 215 9 This test verifies that 1+3-3=1;
+#X obj 33 255 outlet;
+#X obj 33 141 * 2;
+#X obj 33 122 \$1.norm;
+#X obj 147 123 \$1.norm;
+#X obj 33 103 invertor \$1 \$2 \$3;
+#X obj 33 236 list append invertible \$1 \$2 \$3;
+#X obj 33 217 pack 0 0 -1;
+#X connect 0 0 3 0;
+#X connect 1 0 12 0;
+#X connect 1 1 12 1;
+#X connect 2 0 4 0;
+#X connect 3 0 1 0;
+#X connect 4 0 6 0;
+#X connect 4 1 14 1;
+#X connect 6 0 14 0;
+#X connect 9 0 2 0;
+#X connect 10 0 9 0;
+#X connect 11 0 2 1;
+#X connect 12 0 10 0;
+#X connect 12 1 11 0;
+#X connect 13 0 8 0;
+#X connect 14 0 13 0;
diff --git a/generics/operator1-rule.pd b/generics/operator1-rule.pd
new file mode 100644
index 0000000..f9d91e0
--- /dev/null
+++ b/generics/operator1-rule.pd
@@ -0,0 +1,11 @@
+#N canvas 0 0 450 142 10;
+#X obj 15 16 inlet;
+#X obj 37 104 outlet;
+#X text 57 17 Test that one input gives one output;
+#X obj 37 84 \$1;
+#X obj 87 104 outlet;
+#X obj 15 55 t b a b;
+#X obj 242 63 error;
+#X connect 0 0 5 0;
+#X connect 3 0 1 0;
+#X connect 5 1 3 0;
diff --git a/generics/operator1-test.pd b/generics/operator1-test.pd
new file mode 100644
index 0000000..ed7f0fb
--- /dev/null
+++ b/generics/operator1-test.pd
@@ -0,0 +1,5 @@
+#N canvas 0 0 450 142 10;
+#X obj 15 16 inlet;
+#X obj 15 94 outlet;
+#X text 57 17 Test that one input gives one output;
+#X connect 0 0 1 0;
diff --git a/generics/operator2-rule.pd b/generics/operator2-rule.pd
new file mode 100644
index 0000000..8ef1f7f
--- /dev/null
+++ b/generics/operator2-rule.pd
@@ -0,0 +1,10 @@
+#N canvas 248 186 450 162 10;
+#X obj 15 16 inlet;
+#X obj 15 94 outlet;
+#X obj 54 35 func1-test \$1 \$2;
+#X text 74 55 And test that one right input gives zero output;
+#X obj 15 35 t a a;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 4 0 1 0;
+#X connect 4 1 2 0;
diff --git a/generics/operator2-test.pd b/generics/operator2-test.pd
new file mode 100644
index 0000000..8ef1f7f
--- /dev/null
+++ b/generics/operator2-test.pd
@@ -0,0 +1,10 @@
+#N canvas 248 186 450 162 10;
+#X obj 15 16 inlet;
+#X obj 15 94 outlet;
+#X obj 54 35 func1-test \$1 \$2;
+#X text 74 55 And test that one right input gives zero output;
+#X obj 15 35 t a a;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 4 0 1 0;
+#X connect 4 1 2 0;
diff --git a/generics/partialorder-test.pd b/generics/partialorder-test.pd
new file mode 100644
index 0000000..65aff88
--- /dev/null
+++ b/generics/partialorder-test.pd
@@ -0,0 +1,14 @@
+#N canvas 118 56 450 189 10;
+#X obj 13 21 inlet;
+#X obj 13 141 outlet;
+#X obj 35 87 transitive-test \$1 \$2;
+#X obj 13 107 antisymmetric-test \$1 \$2;
+#X obj 57 67 antireflexive-test \$1 \$2;
+#X obj 13 41 t b b b;
+#X connect 0 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 1 0;
+#X connect 5 0 3 0;
+#X connect 5 1 2 0;
+#X connect 5 2 4 0;
diff --git a/generics/partialordereq-test.pd b/generics/partialordereq-test.pd
new file mode 100644
index 0000000..39de970
--- /dev/null
+++ b/generics/partialordereq-test.pd
@@ -0,0 +1,14 @@
+#N canvas 118 56 450 182 10;
+#X obj 13 21 inlet;
+#X obj 13 131 outlet;
+#X obj 35 79 transitive-test \$1 \$2;
+#X obj 57 60 reflexive-test \$1 \$2;
+#X obj 13 98 antisymmetric-test \$1 \$2;
+#X obj 13 40 t b b b;
+#X connect 0 0 5 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 1 0;
+#X connect 5 0 4 0;
+#X connect 5 1 2 0;
+#X connect 5 2 3 0;
diff --git a/generics/reflexive-test.pd b/generics/reflexive-test.pd
new file mode 100644
index 0000000..1ae836d
--- /dev/null
+++ b/generics/reflexive-test.pd
@@ -0,0 +1,13 @@
+#N canvas 0 0 450 161 10;
+#X obj 12 18 inlet;
+#X obj 12 120 outlet;
+#X obj 12 56 t a a;
+#X msg 12 37 2 2;
+#X obj 12 82 \$2;
+#X obj 12 101 == 1;
+#X connect 0 0 3 0;
+#X connect 2 0 4 0;
+#X connect 2 1 4 1;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 5 0 1 0;
diff --git a/generics/totalorder-test.pd b/generics/totalorder-test.pd
new file mode 100644
index 0000000..9aa72fc
--- /dev/null
+++ b/generics/totalorder-test.pd
@@ -0,0 +1,11 @@
+#N canvas 118 56 418 157 10;
+#X obj 13 21 inlet;
+#X obj 13 101 outlet;
+#X obj 43 59 partialorder-test \$1 \$2;
+#X obj 13 78 trichotomy-test \$1 \$2;
+#X obj 13 40 t b b;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 3 0;
+#X connect 4 1 2 0;
diff --git a/generics/totalordereq-test.pd b/generics/totalordereq-test.pd
new file mode 100644
index 0000000..4c7372d
--- /dev/null
+++ b/generics/totalordereq-test.pd
@@ -0,0 +1,11 @@
+#N canvas 349 136 450 153 10;
+#X obj 13 21 inlet;
+#X obj 13 97 outlet;
+#X obj 13 78 trichotomy-test \$1 \$2;
+#X obj 43 59 partialordereq-test \$1 \$2;
+#X obj 13 40 t b b;
+#X connect 0 0 4 0;
+#X connect 2 0 1 0;
+#X connect 3 0 1 0;
+#X connect 4 0 2 0;
+#X connect 4 1 3 0;
diff --git a/generics/transitive-test.pd b/generics/transitive-test.pd
new file mode 100644
index 0000000..0788ad6
--- /dev/null
+++ b/generics/transitive-test.pd
@@ -0,0 +1,4 @@
+#N canvas 0 0 450 300 10;
+#X obj 12 18 inlet;
+#X obj 12 48 outlet;
+#X connect 0 0 1 0;
diff --git a/generics/trichotomy-test.pd b/generics/trichotomy-test.pd
new file mode 100644
index 0000000..49aa8e7
--- /dev/null
+++ b/generics/trichotomy-test.pd
@@ -0,0 +1,32 @@
+#N canvas 174 185 553 302 10;
+#X obj 13 21 inlet;
+#X obj 13 255 outlet;
+#X msg 13 40 1 2 \, 2 2 \, 2 1;
+#X msg 38 78 \$2 \$1;
+#X obj 13 117 +;
+#X obj 13 59 t a a a;
+#X obj 13 97 \$3;
+#X obj 38 97 \$3;
+#X obj 91 100 \$2;
+#X obj 38 117 +;
+#X obj 13 136 - 1;
+#X obj 13 155 t a a;
+#X obj 13 174 == 0;
+#X obj 13 236 list append trichotomy \$1 \$2;
+#X obj 13 217 pack 0 0 -1;
+#X connect 0 0 2 0;
+#X connect 2 0 5 0;
+#X connect 3 0 7 0;
+#X connect 4 0 10 0;
+#X connect 5 0 6 0;
+#X connect 5 1 3 0;
+#X connect 5 2 8 0;
+#X connect 6 0 4 0;
+#X connect 7 0 9 0;
+#X connect 8 0 9 1;
+#X connect 9 0 4 1;
+#X connect 11 0 12 0;
+#X connect 11 1 14 1;
+#X connect 12 0 14 0;
+#X connect 13 0 1 0;
+#X connect 14 0 13 0;