diff --git a/Benchmarks/benchmarks(2610).csv b/Benchmarks/benchmarks(2610).csv new file mode 100644 index 000000000..76e69303c --- /dev/null +++ b/Benchmarks/benchmarks(2610).csv @@ -0,0 +1,66 @@ +Test-Name,Graph-Bwd,Graph-BwdAll,Graph-BwdDual,Graph-Eval,Graph-Fwd,Graph-FwdAsDeMorgan,Graph-FwdDual,Graph-Nodes,Trace-Bwd,Trace-Eval,Trace-Fwd +arithmetic,0.2799999998882413,0.6500000000465661,0.030000000027939677,0.8900000000838191,0.03999999999068678,2.2800000000279397,0.019999999972060322,244.0,3.190000000037253,2.8999999999068677,0.38999999994412066 +array,0.27000000011175873,0.3599999999627471,0.03999999999068678,1.8299999999348073,0.039999999944120644,2.8100000000558794,0.0,262.0,3.2100000001024456,2.6199999999254944,1.4499999999534339 +compose,0.3499999999534339,0.5800000000279397,0.03999999999068678,1.3100000000093133,0.029999999981373548,3.6299999999813735,0.030000000027939677,232.0,4.500000000093133,4.189999999990687,0.3499999999534339 +dicts,0.36999999997206034,0.8399999998975545,0.0800000000745058,1.3499999999534338,0.21000000000931324,2.1,0.010000000009313226,280.0,2.98000000002794,2.3,0.47999999998137355 +div-mod-quot-rem,0.39000000013038516,2.7100000001024456,0.12000000006519258,3.0799999999813736,1.0199999999720604,2.7999999999068677,0.010000000009313226,372.0,2.809999999916181,2.360000000149012,0.6599999998696149 +factorial,0.2599999999627471,20.27999999993481,0.010000000009313226,4.009999999962747,0.030000000027939677,92.12999999998138,0.010000000009313226,318.0,3.5700000000186263,3.7800000000279397,2.1399999999906867 +filter,0.32000000001862644,0.5300000000279397,0.03999999999068678,2.26999999997206,0.03999999999068678,1.7200000001117588,0.019999999925494193,269.0,3.0,2.959999999916181,1.1699999999720603 +first-class-constr,0.2899999999441206,0.7300000000745058,0.029999999981373548,2.290000000037253,0.02999999993480742,1.85,0.019999999972060322,282.0,2.7100000000093134,2.9,1.1800000000279396 +flatten,0.31000000005587935,1.4699999999720603,0.029999999981373548,4.839999999944121,0.22999999998137355,3.189999999990687,0.02000000001862645,308.0,4.0100000000558795,4.619999999925494,2.75 +foldr_sumSquares,0.19000000008381904,0.29999999990686776,0.0400000000372529,2.5700000000651926,0.019999999972060322,2.1300000000745056,0.0,276.0,2.8899999999906867,2.660000000009313,1.2100000000558793 +lexicalScoping,0.2900000000372529,0.2700000000651926,0.010000000009313226,0.7800000000279397,0.0,1.7199999999254942,0.0,231.0,2.439999999990687,2.3200000000186263,0.40000000009313225 +length,0.3199999999720603,0.3699999999254942,0.02000000001862645,1.1299999999348074,0.010000000009313226,2.200000000046566,0.0,245.0,2.6200000000186265,2.4799999999348072,0.590000000037253 +lookup,0.2599999999627471,0.49000000008381905,0.039999999944120644,3.339999999990687,0.030000000027939677,2.809999999916181,0.010000000009313226,310.0,2.820000000111759,3.139999999944121,1.709999999962747 +map,0.4200000000186265,0.9499999999068678,0.06000000000931323,3.0,0.13999999994412066,2.680000000074506,0.030000000027939677,290.0,3.6200000000651924,3.599999999953434,1.2399999998509883 +mergeSort,0.2600000000093132,1.2299999999348075,0.05000000004656613,10.720000000065193,0.029999999981373548,4.690000000037253,0.0,380.0,5.259999999962747,9.549999999953434,7.139999999850988 +normalise,0.18000000002793967,0.4399999998975545,0.029999999981373548,0.9500000000931322,0.030000000027939677,2.0100000000093132,0.0,249.0,2.5800000000279395,2.0700000000186263,0.4399999998975545 +pattern-match,0.2299999999348074,0.9100000000558793,0.03999999999068678,4.070000000018626,0.0,4.059999999962747,0.0,305.0,2.7299999999813735,3.65,2.2899999998975544 +range,0.2300000000279397,1.3199999999720604,0.039999999944120644,10.760000000102446,0.08000000002793968,5.840000000037253,0.010000000009313226,423.0,7.6,8.429999999934807,6.579999999981373 +records,0.2600000001490116,0.6200000000651926,0.06000000000931323,4.089999999897555,0.17999999998137356,2.5799999999348073,0.0,329.0,3.3299999999813736,3.530000000074506,2.0899999998975547 +reverse,0.38000000002793966,0.41000000000931325,0.02000000001862645,1.6299999999813735,0.009999999962747096,2.409999999916181,0.010000000009313226,253.0,2.5799999999348073,2.790000000083819,0.8299999999813735 +slicing/dtw/average-series,1.4699999999254942,90.04000000008382,0.03999999999068678,365.65,0.27000000001862645,70975.43999999994,0.030000000027939677,7053.0,192.0,239.1699999999255,195.27999999998138 +desugar/list-comp-1,0.2900000000372529,1.6200000000651926,0.019999999972060322,17.55999999996275,0.1599999999627471,5.459999999962747,0.010000000009313226,482.0,10.75,12.609999999962747,11.149999999906868 +desugar/list-comp-2,0.3299999999813735,5.840000000083819,0.0800000000745058,53.990000000037256,1.3099999999161809,17.829999999934806,0.009999999962747096,1049.0,24.48999999994412,33.00000000004657,30.429999999888242 +desugar/list-comp-3,0.3700000001117587,0.9799999999348075,0.02000000001862645,14.21999999997206,0.029999999981373548,5.520000000065193,0.019999999925494193,474.0,8.58000000002794,9.580000000074506,8.599999999953434 +desugar/list-comp-4,0.30000000004656613,0.6,0.03999999999068678,5.749999999953434,0.030000000027939677,3.849999999953434,0.010000000009313226,325.0,4.910000000009314,5.7600000000558795,2.7399999999906868 +desugar/list-comp-5,0.24000000003725291,0.55,0.05,4.220000000065193,0.009999999962747096,3.0100000000093132,0.019999999972060322,294.0,4.7600000000558795,3.9999999999534337,1.9899999999441207 +desugar/list-comp-6,0.22999999998137355,0.31000000005587935,0.010000000009313226,0.6200000000186264,0.030000000027939677,2.2799999999813734,0.010000000009313226,230.0,2.959999999916181,2.2700000001117586,0.3500000000465661 +desugar/list-comp-7,0.35,0.30000000004656613,0.02999999993480742,4.600000000046566,0.030000000027939677,2.7299999999813735,0.02000000001862645,305.0,4.320000000018626,4.170000000065192,2.6000000000931323 +desugar/list-enum,0.24000000003725291,4.489999999990687,0.010000000009313226,3.149999999953434,0.060000000055879354,6.869999999972061,0.010000000009313226,284.0,3.6200000000186265,3.560000000009313,2.099999999906868 +slicing/add,0.26999999992549417,0.5199999999720604,0.08000000002793968,0.42000000006519256,0.15000000009313225,1.9999999999068678,0.0400000000372529,233.0,3.0200000001117586,1.749999999953434,0.30000000004656613 +slicing/array/lookup,0.4199999999254942,0.5099999999627471,0.05,19.36000000014901,0.06000000000931323,11.040000000037253,0.02000000001862645,639.0,9.829999999981373,13.049999999953434,11.870000000018626 +slicing/array/dims,0.2599999998230487,0.2699999998789281,0.08000000002793968,1.0800000000745058,0.18000000012107192,2.85,0.08000000002793968,245.0,4.560000000009313,2.3,1.1299999999813735 +slicing/convolution/edgeDetect,5.1800000000745055,12.359999999962747,0.4700000000651926,1352.1599999999162,4.240000000037253,2333.179999999935,186.67999999998136,29141.0,517.2299999999814,767.6800000000279,728.3200000000652 +slicing/convolution/emboss,4.3900000000372525,9.93000000002794,0.20999999991618096,1075.6999999999534,1.6299999999813735,2019.989999999944,179.18000000002795,23565.0,408.88999999999066,638.9599999999161,604.2900000000839 +slicing/convolution/gaussian,4.25,9.449999999953434,0.19000000008381904,1073.1500000000465,1.490000000083819,2009.6400000000372,178.66000000000932,23565.0,396.07000000001864,617.9700000000652,578.3499999999069 +slicing/dict/create,0.33000000002793967,0.3400000000372529,0.06999999987892806,0.2900000000372529,0.08999999994412064,1.359999999916181,0.05000000004656613,237.0,2.669999999925494,1.7200000000186264,0.03999999999068678 +slicing/dict/difference,0.29000000008381904,0.29999999990686776,0.030000000027939677,0.5599999999627471,0.08999999999068678,1.55,0.0400000000372529,246.0,2.450000000046566,2.009999999962747,0.49000000008381905 +slicing/dict/disjointUnion,0.25,0.29999999990686776,0.060000000055879354,0.3500000000465661,0.12000000006519258,1.3500000000931323,0.02000000001862645,241.0,2.7399999999441205,1.5700000000651926,0.05 +slicing/dict/foldl,0.2899999998509884,0.26000000005587937,0.1,4.110000000009313,0.11000000010244548,2.0100000000093132,0.039999999944120644,328.0,4.910000000009314,4.200000000093132,2.940000000037253 +slicing/dict/intersectionWith,0.4799999999348074,0.5299999999348074,0.1700000001117587,1.6000000000931323,0.17999999998137356,2.1999999999068676,0.1400000000372529,269.0,3.1800000000279396,2.8299999999813736,0.4399999999906868 +slicing/dict/fromRecord,0.2699999999720603,0.33000000002793967,0.03999999999068678,0.27999999998137354,0.12999999993480743,1.75,0.06000000000931323,231.0,2.959999999962747,1.5699999999720604,0.19999999995343387 +slicing/dict/get,0.24999999995343386,0.2300000000279397,0.03999999999068678,0.6800000000279397,0.059999999962747096,1.9299999999348074,0.05000000004656613,251.0,2.8,2.0300000000279397,0.19000000008381904 +slicing/dict/map,0.32000000001862644,0.3299999999813735,0.09000000008381903,1.659999999916181,0.11999999992549419,1.8800000000279398,0.05,290.0,2.929999999888241,2.3899999999906867,0.9800000000279396 +slicing/divide,0.2600000000093132,0.24000000003725291,0.019999999972060322,0.23999999999068677,0.06999999992549419,1.3800000000279398,0.019999999972060322,229.0,2.559999999916181,1.640000000037253,0.03999999999068678 +slicing/filter,0.41000000005587933,0.3599999999627471,0.1900000000372529,2.1699999999720605,0.25999999986961486,1.4300000000279396,0.24000000003725291,271.0,2.940000000130385,3.0,1.8 +slicing/intersperse,0.4300000001210719,1.2199999999720603,0.08000000002793968,1.8899999999441206,0.3199999999720603,2.100000000046566,0.5099999999627471,261.0,2.7100000000093134,2.9500000000931323,0.8600000000558794 +slicing/intersperse,0.41000000000931325,0.8300000000279397,0.03999999999068678,1.609999999962747,0.32000000015832486,1.5200000001117586,0.3999999999534339,261.0,2.799999999953434,2.730000000121072,0.7399999999906868 +slicing/length,0.4300000000745058,0.5000000000465661,0.19999999990686773,1.5300000000279397,0.34999999990686775,1.290000000083819,0.2899999999441206,269.0,2.5699999999720604,2.2399999999906868,0.6 +slicing/list-comp,0.5399999998975545,0.9099999998230487,0.14000000013038516,19.350000000139698,1.2400000000372529,3.929999999888241,1.9100000001024455,593.0,11.559999999962747,14.170000000065192,12.790000000037253 +slicing/list-comp,0.45000000004656615,0.8399999999441207,0.14000000008381902,18.83000000002794,1.0,3.6199999999720602,1.6900000000838191,593.0,10.090000000037254,12.889999999990687,12.08000000002794 +slicing/lookup,0.5100000000093132,0.6100000000558794,0.2300000000279397,3.3399999999441206,0.5899999999906868,1.75,0.6799999999813735,310.0,3.309999999916181,3.3700000000651924,2.349999999906868 +slicing/map,0.35000000009313226,0.33999999989755453,0.11000000005587936,1.0799999999348073,0.1899999998975545,1.799999999953434,0.12000000006519258,250.0,3.2499999999534337,1.8300000000745058,0.740000000083819 +slicing/multiply,0.25999999986961486,0.21999999997206032,0.05,0.2800000000745058,0.0400000000372529,1.5300000000745058,0.039999999944120644,233.0,2.4999999999534337,1.8100000000093133,0.0400000000372529 +slicing/nth,0.2099999999627471,0.2699999999720603,0.05,0.95,0.05000000004656613,2.030000000074506,0.019999999972060322,258.0,3.190000000037253,2.009999999916181,0.590000000037253 +slicing/section-5-example,0.6600000000093132,1.040000000037253,0.23999999994412063,21.429999999981373,1.2400000001303852,4.279999999981373,2.5,629.0,11.68000000002794,14.85999999991618,12.769999999972061 +slicing/section-5-example,0.5399999999906868,1.0799999999348073,0.1400000000372529,20.729999999934808,0.5600000000093133,5.510000000009313,1.0999999999534338,629.0,11.089999999944121,13.78000000002794,12.840000000083819 +slicing/section-5-example,0.3999999999534339,1.0100000000558793,0.14999999995343388,19.760000000009313,0.6300000000279397,4.750000000093133,1.4699999999254942,629.0,11.480000000027939,14.040000000037253,12.379999999981374 +slicing/zeros,0.36000000005587934,0.4900000000372529,0.07999999993480741,1.0299999999348075,0.2599999999627471,1.7800000000745058,0.17999999988824128,245.0,3.1700000000186264,2.1899999999441206,0.44999999995343387 +slicing/zeros,0.3899999999906868,0.4600000000558794,0.07999999998137355,0.9399999999906867,0.17999999993480742,2.0100000000093132,0.14999999995343388,245.0,3.7300000000745057,1.9600000000093132,0.46000000000931324 +slicing/zipWith,0.45000000004656615,0.7299999998416752,0.1400000000372529,2.7899999999441207,0.41999999997206033,1.7000000000931323,0.5600000000093133,311.0,3.1199999999254944,3.3600000000093133,1.9600000000558793 +slicing/matrix-update,0.5799999998882412,1.000000000046566,0.12999999998137354,62.44000000013038,0.3599999999627471,59.59000000003725,0.03999999999068678,1773.0,30.670000000018625,39.02000000001863,36.31999999997206 +graphics/background,0.8000000000465661,1.8899999998975545,0.05000000004656613,1.9400000000372528,0.5999999999534339,7.340000000037253,0.010000000009313226,1081.0,3.0500000000931324,2.2299999999813735,0.9199999999720603 +graphics/grouped-bar-chart,1.759999999916181,472.8500000000466,0.49999999995343386,122.6300000000745,123.13000000002793,1455.980000000028,0.1400000000372529,3470.0,65.95,88.56000000000931,76.66000000000932 +graphics/line-chart,2.680000000074506,1009.4199999999721,0.8799999999348074,195.0699999999255,417.6600000000093,2123.069999999972,0.2600000001024455,4886.0,92.75999999991618,124.81000000005588,107.65999999996275 +graphics/stacked-bar-chart,1.6799999999348074,121.05999999991619,0.37999999998137357,69.38999999999069,73.97000000001863,104.84000000008382,0.1,2530.0,36.77000000001863,46.81000000005588,43.09999999995343 \ No newline at end of file diff --git a/Benchmarks/benchmarks.csv b/Benchmarks/benchmarks.csv index 85d3a348d..380ea96e2 100644 --- a/Benchmarks/benchmarks.csv +++ b/Benchmarks/benchmarks.csv @@ -1,66 +1,66 @@ Test-Name,Graph-Bwd,Graph-BwdAll,Graph-BwdDual,Graph-Eval,Graph-Fwd,Graph-FwdAsDeMorgan,Graph-FwdDual,Graph-Nodes,Trace-Bwd,Trace-Eval,Trace-Fwd -arithmetic,0.8000000007450581,1.200000001117587,0.0,1.599999999627471,0.30000000074505806,5.5,0.09999999962747097,244.0,8.799999998882413,8.099999999627471,0.6999999992549419 -array,0.40000000037252903,0.40000000037252903,0.2000000011175871,2.5,0.0,6.299999998882413,0.0,262.0,4.300000000745058,4.900000000372529,2.099999999627471 -compose,0.19999999925494194,0.40000000037252903,0.0,0.599999999627471,0.0,2.5,0.0,232.0,2.5,2.199999999254942,0.2000000011175871 -dicts,0.40000000037252903,1.0,0.19999999925494194,1.900000000372529,0.19999999925494194,2.099999999627471,0.0,280.0,4.0,3.300000000745058,0.599999999627471 -div-mod-quot-rem,0.5,3.0,0.09999999962747097,4.400000000372529,0.900000000372529,3.599999999627471,0.0,372.0,5.699999999254942,6.800000000745058,1.099999999627471 -factorial,0.30000000074505806,36.69999999925494,0.0,4.5,0.09999999962747097,100.90000000037253,0.0,318.0,4.900000000372529,7.799999998882413,3.5 -filter,0.30000000074505806,0.2999999988824129,0.09999999962747097,2.899999998509884,0.0,2.100000001490116,0.0,269.0,3.199999999254942,3.5,1.199999999254942 -first-class-constr,0.30000000074505806,0.599999999627471,0.09999999962747097,3.599999999627471,0.09999999962747097,1.6000000014901161,0.0,282.0,3.300000000745058,2.899999998509884,1.0 -flatten,0.8000000007450581,0.7999999988824129,0.0,3.800000000745058,0.09999999962747097,2.200000001117587,0.0,308.0,3.299999998882413,4.599999999627471,3.699999999254942 -foldr_sumSquares,0.19999999925494194,1.099999999627471,0.0,2.0,0.0,1.5,0.0,276.0,5.300000000745058,4.399999998509884,1.099999999627471 -lexicalScoping,0.19999999925494194,0.19999999925494194,0.0,0.8000000007450581,0.0,1.799999998882413,0.10000000149011612,231.0,2.400000000372529,2.099999999627471,0.40000000037252903 -length,0.2000000011175871,0.40000000037252903,0.0,1.0,0.0,2.5,0.0,245.0,3.100000001490116,4.099999999627471,0.5 -lookup,0.40000000037252903,0.8000000007450581,0.09999999962747097,3.599999999627471,0.30000000074505806,3.0,0.0,310.0,4.599999999627471,4.300000000745058,4.900000000372529 -map,0.30000000074505806,0.599999999627471,0.09999999962747097,2.0,0.09999999962747097,2.099999999627471,0.0,290.0,3.099999999627471,3.099999999627471,1.300000000745058 -mergeSort,0.2999999988824129,0.900000000372529,0.0,13.400000000372529,0.0,3.599999999627471,0.0,380.0,7.0,8.399999998509884,7.400000000372529 -normalise,0.2000000011175871,0.19999999925494194,0.09999999962747097,1.5,0.09999999962747097,1.200000001117587,0.09999999962747097,249.0,2.5,2.0,0.30000000074505806 -pattern-match,0.5,1.599999999627471,0.19999999925494194,6.400000000372529,0.0,7.300000000745058,0.0,305.0,3.5,4.199999999254942,6.700000001117587 -range,0.2000000011175871,2.699999999254942,0.19999999925494194,14.199999999254942,0.09999999962747097,8.900000000372529,0.0,423.0,9.400000000372529,12.400000000372529,7.900000000372529 -records,0.900000000372529,0.7000000011175871,0.0,3.900000000372529,0.09999999962747097,2.899999998509884,0.0,329.0,3.5,5.099999999627471,3.200000001117587 -reverse,0.30000000074505806,0.40000000037252903,0.09999999962747097,1.5,0.09999999962747097,2.800000000745058,0.0,253.0,4.099999999627471,5.0,2.799999998882413 -slicing/dtw/average-series,1.200000001117587,67.29999999888241,0.10000000149011612,276.7999999988824,0.09999999962747097,59706.90000000037,0.09999999962747097,7062.0,147.80000000074506,166.0,145.09999999962747 -desugar/list-comp-1,0.2999999988824129,1.300000000745058,0.09999999962747097,19.200000001117587,0.09999999962747097,7.099999999627471,0.0,482.0,14.800000000745058,17.199999999254942,13.5 -desugar/list-comp-2,0.5,7.100000001490116,0.09999999962747097,61.09999999962747,0.8000000007450581,19.199999999254942,0.0,1049.0,32.30000000074506,45.90000000037253,39.90000000037253 -desugar/list-comp-3,1.699999999254942,0.6000000014901161,0.0,16.699999999254942,0.0,5.900000000372529,0.09999999962747097,474.0,13.0,10.100000001490116,8.800000000745058 -desugar/list-comp-4,0.19999999925494194,0.6000000014901161,0.0,7.300000000745058,0.10000000149011612,3.899999998509884,0.0,325.0,6.5,7.799999998882413,2.400000000372529 -desugar/list-comp-5,0.2000000011175871,0.3999999985098839,0.10000000149011612,5.0,0.09999999962747097,4.0,0.0,294.0,5.699999999254942,5.300000000745058,1.599999999627471 -desugar/list-comp-6,0.30000000074505806,0.30000000074505806,0.0,0.2999999988824129,0.0,2.800000000745058,0.0,230.0,1.800000000745058,3.599999999627471,0.09999999962747097 -desugar/list-comp-7,0.30000000074505806,0.30000000074505806,0.0,4.699999999254942,0.0,3.199999999254942,0.0,305.0,5.0,3.100000001490116,1.599999999627471 -desugar/list-enum,0.19999999925494194,5.599999999627471,0.0,4.599999999627471,0.09999999962747097,7.0,0.0,284.0,5.700000001117587,4.099999999627471,1.5 -slicing/add,0.40000000037252903,0.30000000074505806,0.09999999962747097,0.2999999988824129,0.30000000074505806,3.599999999627471,0.09999999962747097,233.0,4.099999999627471,1.5,0.0 -slicing/array/lookup,0.2999999988824129,0.30000000074505806,0.0,22.09999999962747,0.0,11.599999999627471,0.0,639.0,13.5,16.0,14.400000000372529 -slicing/array/dims,0.30000000074505806,0.2000000011175871,0.19999999925494194,1.400000000372529,0.09999999962747097,3.800000000745058,0.09999999962747097,245.0,5.699999999254942,2.199999999254942,0.8000000007450581 -slicing/convolution/edgeDetect,5.900000000372529,13.800000000745058,0.2999999988824129,1623.2000000011176,3.5,2772.5999999996275,219.90000000037253,29141.0,660.0,897.5,834.5 -slicing/convolution/emboss,3.599999999627471,11.200000001117587,0.19999999925494194,1374.300000000745,3.200000001117587,2720.2000000011176,245.89999999850988,23565.0,490.59999999962747,727.5,727.8000000007451 -slicing/convolution/gaussian,3.700000001117587,11.700000001117587,0.19999999925494194,1400.699999999255,3.0,3021.2999999988824,249.5,23565.0,494.59999999962747,731.3000000007451,757.8999999985099 -slicing/dict/create,0.30000000074505806,0.30000000074505806,0.09999999962747097,0.40000000037252903,0.19999999925494194,1.299999998882413,0.0,237.0,6.599999999627471,1.800000000745058,0.0 -slicing/dict/difference,0.30000000074505806,0.30000000074505806,0.0,0.7999999988824129,0.09999999962747097,1.5,0.0,246.0,2.399999998509884,3.5,0.2000000011175871 -slicing/dict/disjointUnion,0.30000000074505806,0.19999999925494194,0.09999999962747097,0.5,0.09999999962747097,4.0,0.09999999962747097,241.0,2.099999999627471,3.900000000372529,0.09999999962747097 -slicing/dict/foldl,0.40000000037252903,0.19999999925494194,0.09999999962747097,6.400000000372529,0.0,4.0,0.0,328.0,6.900000000372529,8.0,1.799999998882413 -slicing/dict/intersectionWith,0.40000000037252903,0.5,0.09999999962747097,1.599999999627471,0.10000000149011612,3.5,0.0,269.0,5.599999999627471,2.099999999627471,0.2999999988824129 -slicing/dict/fromRecord,0.2000000011175871,0.6999999992549419,0.10000000149011612,0.5,0.09999999962747097,4.800000000745058,0.09999999962747097,231.0,2.599999999627471,3.800000000745058,0.0 -slicing/dict/get,0.30000000074505806,0.40000000037252903,0.0,0.599999999627471,0.09999999962747097,4.099999999627471,0.0,251.0,5.200000001117587,2.0,0.09999999962747097 -slicing/dict/map,0.40000000037252903,0.2999999988824129,0.09999999962747097,3.799999998882413,0.0,1.699999999254942,0.10000000149011612,290.0,5.399999998509884,2.700000001117587,1.299999998882413 -slicing/divide,0.2000000011175871,0.2000000011175871,0.09999999962747097,0.2999999988824129,0.0,1.699999999254942,0.09999999962747097,229.0,4.900000000372529,1.800000000745058,0.09999999962747097 -slicing/filter,0.30000000074505806,0.5,0.09999999962747097,4.300000000745058,0.19999999925494194,3.399999998509884,0.10000000149011612,271.0,6.099999999627471,2.800000000745058,1.199999999254942 -slicing/intersperse,1.0,0.7999999988824129,0.0,3.799999998882413,0.19999999925494194,3.5,0.2000000011175871,261.0,3.300000000745058,5.599999999627471,0.5 -slicing/intersperse,0.30000000074505806,0.7999999988824129,0.0,3.599999999627471,0.19999999925494194,3.299999998882413,0.30000000074505806,261.0,2.0,5.0,0.599999999627471 -slicing/length,0.5,0.7000000011175871,0.09999999962747097,4.300000000745058,0.2999999988824129,1.5,1.0,269.0,2.600000001490116,4.599999999627471,0.3999999985098839 -slicing/list-comp,0.5,0.8000000007450581,0.09999999962747097,23.800000000745058,1.099999999627471,5.300000000745058,1.799999998882413,593.0,13.599999999627471,18.90000000037253,14.200000001117587 -slicing/list-comp,0.5,0.900000000372529,0.09999999962747097,24.59999999962747,0.900000000372529,5.400000000372529,1.699999999254942,593.0,12.5,16.0,14.199999999254942 -slicing/lookup,0.40000000037252903,0.5,0.19999999925494194,2.799999998882413,0.40000000037252903,1.599999999627471,0.5,310.0,2.600000001490116,6.5,1.099999999627471 -slicing/map,0.30000000074505806,2.400000000372529,0.09999999962747097,0.8999999985098839,0.09999999962747097,1.599999999627471,0.19999999925494194,250.0,3.199999999254942,5.5,0.40000000037252903 -slicing/multiply,2.199999999254942,0.30000000074505806,0.0,0.30000000074505806,0.10000000149011612,1.299999998882413,0.0,233.0,2.099999999627471,1.5,0.0 -slicing/nth,0.2000000011175871,0.2000000011175871,0.0,1.0,0.0,4.0,0.0,258.0,6.900000000372529,2.5,0.7000000011175871 -slicing/section-5-example,0.5,2.699999999254942,0.19999999925494194,27.59999999962747,1.099999999627471,5.699999999254942,2.100000001490116,629.0,13.700000001117587,19.399999998509884,14.900000000372529 -slicing/section-5-example,0.40000000037252903,1.099999999627471,0.09999999962747097,27.800000000745058,0.599999999627471,7.0,2.600000001490116,629.0,13.699999999254942,19.300000000745058,14.399999998509884 -slicing/section-5-example,0.5,1.0,0.09999999962747097,25.799999998882413,0.7000000011175871,8.200000001117587,1.599999999627471,629.0,12.900000000372529,16.799999998882413,17.09999999962747 -slicing/zeros,0.2999999988824129,0.2999999988824129,0.2000000011175871,3.200000001117587,0.2000000011175871,1.299999998882413,0.10000000149011612,245.0,2.300000000745058,2.099999999627471,0.30000000074505806 -slicing/zeros,0.19999999925494194,0.2999999988824129,0.2000000011175871,0.8000000007450581,2.200000001117587,1.5,0.0,245.0,2.0,4.400000000372529,0.30000000074505806 -slicing/zipWith,0.40000000037252903,0.6999999992549419,0.10000000149011612,5.299999998882413,0.30000000074505806,1.700000001117587,2.599999999627471,311.0,5.299999998882413,3.5,1.199999999254942 -slicing/matrix-update,0.599999999627471,1.0,0.09999999962747097,74.5,0.30000000074505806,86.0,0.09999999962747097,1773.0,29.5,45.20000000111759,43.5 -graphics/background,3.400000000372529,1.700000001117587,0.09999999962747097,1.8999999985098839,0.6000000014901161,11.899999998509884,0.0,1081.0,2.300000000745058,2.300000000745058,3.699999999254942 -graphics/grouped-bar-chart,1.599999999627471,689.0,0.6000000014901161,152.30000000074506,181.2000000011176,2124.5999999996275,0.19999999925494194,3470.0,69.59999999962747,104.10000000149012,93.30000000074506 -graphics/line-chart,3.900000000372529,1499.4000000003725,2.800000000745058,234.09999999962747,615.0999999996275,3178.7999999988824,0.19999999925494194,4886.0,96.80000000074506,135.19999999925494,126.20000000111759 -graphics/stacked-bar-chart,1.5,183.89999999850988,0.40000000037252903,87.80000000074506,112.30000000074506,156.7999999988824,0.10000000149011612,2530.0,42.0,58.40000000037253,50.20000000111759 \ No newline at end of file +arithmetic,0.4200000000186265,0.5399999999906868,0.0,1.0600000000093133,0.1300000000046566,1.5600000000093133,0.01999999999534339,244.0,3.25999999998603,0.600000000023283,0.6799999999580905 +array,0.3700000000419095,0.39000000001396984,0.0,1.850000000023283,0.04999999997671693,1.659999999962747,0.0,262.0,2.8300000000279395,1.0300000000046565,1.100000000023283 +compose,0.14000000001396984,0.3399999999674037,0.0,0.5400000000139699,0.030000000004656614,1.2400000000372529,0.0,232.0,2.3100000000558794,0.18999999996740372,0.15000000002328306 +dicts,0.3500000000232831,0.6900000000372529,0.009999999986030161,1.6899999999906867,0.2899999999674037,1.4100000000093131,0.0,280.0,2.960000000032596,0.5600000000093133,0.5399999999906868 +div-mod-quot-rem,0.37999999998137357,0.8799999999813736,0.030000000027939677,2.3300000000279395,0.659999999962747,1.350000000023283,0.0,372.0,2.619999999948777,0.600000000023283,0.5699999999720603 +factorial,0.2,20.189999999967405,0.009999999986030161,4.039999999990687,0.0,91.24000000001396,0.02000000001862645,318.0,3.4300000000046564,2.4,2.3199999999953436 +filter,0.1900000000372529,0.55,0.009999999986030161,2.450000000023283,0.030000000004656614,1.4800000000046567,0.01999999999534339,269.0,3.1600000000325963,1.3699999999720602,1.3199999999953433 +first-class-constr,0.16999999997206033,0.6800000000279397,0.01999999999534339,2.5199999999953433,0.0900000000372529,1.25,0.02000000001862645,282.0,2.3600000000093133,1.1100000000093133,1.0599999999860301 +flatten,0.2700000000419095,0.9899999999906868,0.009999999986030161,4.249999999976717,0.12000000001862646,1.8600000000093133,0.0,308.0,3.109999999962747,2.1100000000325965,2.2399999999906868 +foldr_sumSquares,0.28000000000465664,0.3600000000325963,0.01999999999534339,2.160000000009313,0.030000000027939677,1.00999999998603,0.0,276.0,2.6100000000093133,0.95,1.0799999999580905 +lexicalScoping,0.21999999997206032,0.3000000000232831,0.009999999986030161,1.1600000000093131,0.030000000004656614,1.299999999976717,0.0,231.0,2.6199999999953434,0.3600000000093132,0.2900000000372529 +length,0.19999999997671694,0.45000000002328305,0.01999999999534339,0.7600000000093132,0.0,1.0900000000139698,0.0,245.0,2.150000000023283,0.4399999999906868,0.3099999999860302 +lookup,0.27000000001862645,0.4800000000046566,0.010000000009313226,3.6399999999674035,0.030000000004656614,1.8300000000279397,0.0,310.0,3.0,2.0100000000325964,1.9700000000419096 +map,0.20999999998603017,0.8700000000419095,0.0,3.099999999976717,0.11000000005587936,1.7399999999906868,0.010000000009313226,290.0,2.9600000000093134,1.3800000000046566,1.6099999999860302 +mergeSort,0.20000000002328305,1.1200000000186265,0.010000000009313226,10.799999999976716,0.08000000000465661,3.2500000000465663,0.009999999986030161,380.0,4.84000000001397,6.660000000032596,6.970000000041909 +normalise,0.28000000000465664,0.6,0.01999999999534339,1.1299999999813735,0.0,1.8199999999953433,0.0,249.0,2.7100000000093134,0.3999999999767169,0.44999999995343387 +pattern-match,0.3100000000093132,2.4,0.01999999999534339,6.849999999976717,0.030000000004656614,6.570000000018626,0.010000000009313226,305.0,4.79000000001397,3.85999999998603,3.4999999999534337 +range,0.4,1.7400000000372529,0.029999999981373548,18.350000000023282,0.16999999994877726,7.379999999934808,0.01999999999534339,423.0,10.219999999948778,9.720000000018626,9.679999999934807 +records,0.3999999999767169,1.0300000000279397,0.029999999981373548,6.45999999998603,0.06000000003259629,3.00999999998603,0.010000000009313226,329.0,5.410000000032596,2.950000000046566,2.9799999999813735 +reverse,0.3500000000465661,0.5300000000046566,0.0,1.7399999999906868,0.03999999999068678,1.6600000000093131,0.0,253.0,2.6399999999906867,0.9,0.8700000000186264 +desugar/list-comp-1,0.4199999999953434,2.250000000023283,0.01999999999534339,15.22000000004191,0.27000000001862645,6.330000000004657,0.010000000009313226,482.0,8.739999999990687,12.380000000074507,7.860000000055879 +desugar/list-comp-2,0.2699999999720603,3.809999999962747,0.009999999986030161,43.550000000046566,0.9399999999674037,11.060000000032597,0.010000000009313226,1049.0,20.85999999998603,23.060000000009314,22.55999999996275 +desugar/list-comp-3,0.25,0.6800000000046567,0.01999999999534339,12.420000000018627,0.010000000009313226,3.939999999990687,0.0,474.0,7.2400000000139695,6.3900000000372525,6.19000000001397 +desugar/list-comp-4,0.25,0.6699999999720603,0.010000000009313226,5.019999999995344,0.04999999997671693,1.7899999999674037,0.0,325.0,3.8700000000651924,2.6499999999767168,2.5100000000558795 +desugar/list-comp-5,0.25000000004656614,0.5799999999580905,0.02000000001862645,3.7900000000139697,0.03999999996740371,1.609999999962747,0.010000000009313226,294.0,3.2900000000139697,1.8799999999580905,1.8200000000186265 +desugar/list-comp-6,0.16999999997206033,0.25000000002328304,0.009999999986030161,0.9400000000139699,0.06000000000931323,0.9100000000093132,0.0,230.0,2.3100000000558794,0.07999999998137355,0.08000000000465661 +desugar/list-comp-7,0.3099999999860302,0.41999999994877724,0.010000000009313226,4.37000000004191,0.009999999986030161,1.8100000000093133,0.0,305.0,3.4299999999813737,2.2,2.34000000001397 +desugar/list-enum,0.3000000000232831,3.7700000000186265,0.0,2.6299999999580903,0.02000000001862645,4.21999999997206,0.0,284.0,2.7,1.3800000000046566,1.3900000000139698 +slicing/add,0.4900000000372529,0.33000000002793967,0.08000000002793968,0.34999999997671694,0.2199999999953434,0.6799999999580905,0.01999999999534339,233.0,2.2900000000139697,0.05,0.15000000002328306 +slicing/array/lookup,0.3000000000232831,0.3500000000232831,0.04999999997671693,16.57999999995809,0.08000000002793968,9.349999999953434,0.0,639.0,8.94000000001397,10.299999999976716,9.730000000004656 +slicing/array/dims,0.41000000000931325,0.3999999999534339,0.09000000001396984,1.3200000000186265,0.18999999994412065,1.2899999999906868,0.06999999997206033,245.0,2.4800000000046567,0.7600000000325963,0.9400000000372529 +slicing/convolution/edgeDetect,8.19000000001397,12.510000000032596,0.41000000000931325,1327.0800000000047,7.089999999990686,2047.8,133.35000000004658,29141.0,534.6399999999907,756.7899999999674,684.7200000000187 +slicing/convolution/emboss,4.15999999998603,9.27999999995809,0.10000000006984919,1113.7999999999768,1.650000000023283,1912.390000000014,149.45999999998602,23565.0,435.53000000000463,646.3399999999674,607.3399999999674 +slicing/convolution/gaussian,3.85999999998603,9.549999999976716,0.1399999999674037,1031.6899999999673,1.7299999999813735,1841.4500000000467,152.4899999999907,23565.0,410.46999999994875,603.3799999999814,577.6100000000326 +slicing/dict/create,0.25,0.5799999999813735,0.030000000004656614,0.2699999999720603,0.05,0.6600000000093132,0.009999999986030161,237.0,1.800000000023283,0.050000000023283066,0.059999999962747096 +slicing/dict/difference,0.28000000000465664,0.2200000000419095,0.05,0.659999999939464,0.08000000000465661,0.8699999999720603,0.009999999986030161,246.0,2.100000000069849,0.19999999997671694,0.17999999993480742 +slicing/dict/disjointUnion,0.2199999999953434,0.3099999999860302,0.01999999999534339,0.3600000000325963,0.16999999994877726,0.8100000000558794,0.009999999986030161,241.0,2.050000000046566,0.1,0.16999999999534338 +slicing/dict/foldl,0.2700000000419095,0.34999999997671694,0.08000000002793968,4.519999999995344,0.06999999992549419,1.6700000000186264,0.030000000004656614,328.0,4.159999999916181,2.5100000000558795,2.49000000001397 +slicing/dict/intersectionWith,0.4000000000465661,0.5000000000465661,0.08000000000465661,1.0100000000093132,0.14999999995343388,1.1100000000093133,0.04999999997671693,269.0,2.449999999953434,0.540000000060536,0.35999999998603016 +slicing/dict/fromRecord,0.2699999999720603,0.4399999999906868,0.10999999998603016,0.3499999999301508,0.18000000005122274,1.1900000000139699,0.030000000004656614,231.0,1.759999999939464,0.030000000027939677,0.030000000027939677 +slicing/dict/get,0.35999999998603016,0.4200000000186265,0.04000000001396984,0.8399999999906868,0.050000000023283066,1.4100000000325963,0.03999999996740371,251.0,2.2299999999580904,0.18000000002793967,0.2900000000372529 +slicing/dict/map,0.5600000000325963,0.4200000000186265,0.09000000001396984,2.1199999999953434,0.16000000000931322,1.5600000000093133,0.08999999999068678,290.0,3.1399999999674035,0.8399999999906868,0.790000000083819 +slicing/divide,0.2599999999860302,0.2599999999627471,0.050000000023283066,0.25000000002328304,0.11999999999534339,1.3300000000046566,0.02000000001862645,229.0,2.35999999998603,0.009999999986030161,0.030000000027939677 +slicing/filter,0.3199999999953434,0.38000000002793966,0.08000000000465661,2.6700000000419095,0.25000000002328304,1.0300000000046565,0.21000000000931324,271.0,2.149999999953434,1.650000000023283,1.1299999999813735 +slicing/intersperse,0.33999999999068675,0.9,0.030000000004656614,1.5899999999674037,0.3199999999720603,1.1299999999813735,0.3600000000325963,261.0,2.1000000000232832,1.00999999998603,0.7799999999813736 +slicing/intersperse,0.37000000006519257,0.899999999976717,0.030000000004656614,1.6499999999534338,0.35999999998603016,1.049999999976717,0.49000000006053596,261.0,2.1600000000558794,0.9299999999813735,0.8699999999720603 +slicing/length,0.5100000000558793,0.600000000023283,0.21999999997206032,1.559999999939464,0.3199999999953434,1.00999999998603,0.3199999999720603,269.0,2.3299999999813736,0.5700000000186265,0.6800000000046567 +slicing/list-comp,0.4900000000372529,0.8699999999953434,0.15000000004656613,18.670000000018625,1.1599999999394641,2.7299999999813735,1.7800000000279397,593.0,10.660000000009314,11.10000000006985,10.630000000004657 +slicing/list-comp,0.3699999999953434,0.7699999999953434,0.0800000000745058,16.220000000018626,0.9199999999953434,2.0699999999720604,1.2299999999580904,593.0,10.129999999981374,10.41999999997206,8.739999999944121 +slicing/lookup,0.5400000000139699,0.44999999995343387,0.16000000000931322,3.049999999953434,0.5300000000279397,1.0000000000232832,0.5000000000465661,310.0,2.9200000000186264,1.399999999976717,1.7699999999953433 +slicing/map,0.25000000004656614,0.359999999939464,0.08999999999068678,1.3399999999208376,0.18999999996740372,0.9499999999767169,0.10000000004656613,250.0,1.8999999999534338,0.590000000037253,0.39000000001396984 +slicing/multiply,0.2700000000419095,0.3999999999767169,0.02000000001862645,0.29000000001396986,0.06999999992549419,1.1699999999720603,0.0400000000372529,233.0,1.7299999999813735,0.0900000000372529,0.030000000004656614 +slicing/nth,0.24000000001396984,0.25000000004656614,0.019999999972060322,1.5699999999720604,0.05000000004656613,1.050000000023283,0.009999999986030161,258.0,2.249999999930151,0.7700000000419095,0.49999999997671696 +slicing/section-5-example,0.5299999999580904,1.1200000000419095,0.17000000001862645,20.420000000018625,1.15,2.9,2.109999999962747,629.0,11.15999999998603,12.060000000009314,12.320000000018627 +slicing/section-5-example,0.42999999998137356,1.040000000037253,0.06999999999534338,19.610000000009315,0.5,4.0,0.8700000000186264,629.0,10.16999999997206,11.19000000001397,10.9 +slicing/section-5-example,0.4399999999674037,1.0299999999813736,0.03999999999068678,20.16000000005588,0.5900000000139698,3.3400000000372527,1.3899999999906867,629.0,10.160000000009314,11.159999999939464,10.900000000023283 +slicing/zeros,0.34999999997671694,0.37999999998137357,0.07000000001862645,1.0199999999953433,0.17000000001862645,1.2800000000279397,0.07999999998137355,245.0,2.150000000023283,0.4299999999348074,0.5799999999580905 +slicing/zeros,0.25,0.4800000000046566,0.030000000004656614,0.8200000000419095,0.16000000000931322,1.3300000000512227,0.1599999999627471,245.0,2.169999999995343,0.38000000002793966,0.45999999998603014 +slicing/zipWith,0.37999999998137357,0.8300000000512228,0.13999999994412066,3.2800000000046565,0.4300000000046566,1.3599999999860302,0.5799999999813735,311.0,2.9300000000279396,1.4399999999906867,1.5300000000046565 +slicing/matrix-update,0.40999999998603015,0.5900000000139698,0.06000000003259629,55.48000000002794,0.3500000000232831,50.66999999999534,0.010000000009313226,1773.0,24.480000000004658,32.8,31.70999999998603 +slicing/dtw/compute-dtw,16.83999999994412,464.15999999996274,0.03999999999068678,287.0900000000605,16.689999999967405,152.60000000002327,28184.06000000001,6514.0,132.66000000000932,155.4200000000419,143.39000000006052 +graphics/background,1.0300000000279397,1.8699999999720602,0.010000000009313226,3.01999999997206,1.0399999999906868,4.790000000083819,0.02000000001862645,1081.0,3.3400000000372527,0.5999999998603016,0.6 +graphics/grouped-bar-chart,2.189999999990687,465.6599999999162,0.019999999972060322,153.35000000004658,168.5,1931.0700000000186,0.019999999972060322,3470.0,63.51000000005588,86.89999999995344,83.93999999994412 +graphics/line-chart,1.3999999999068677,612.7900000000373,0.0,195.83999999989754,425.85000000009313,2179.089999999944,0.019999999972060322,4886.0,90.26000000005588,120.71000000005589,105.08999999999068 +graphics/stacked-bar-chart,1.1899999999906867,47.890000000037254,0.02000000001862645,69.79999999995343,82.17999999993481,93.72000000001863,0.0400000000372529,2530.0,32.71000000005588,40.65,38.81000000005588 \ No newline at end of file diff --git a/karma.conf.benches.js b/karma.conf.benches.js index 5085036e4..b540e3dca 100644 --- a/karma.conf.benches.js +++ b/karma.conf.benches.js @@ -15,7 +15,7 @@ module.exports = function (config) { }, client: { mocha: { - timeout: 60000 + timeout: 1000000 } }, colors: true, diff --git a/plot_bench.py b/plot_bench.py index dbbe94917..fff57de7c 100644 --- a/plot_bench.py +++ b/plot_bench.py @@ -5,9 +5,9 @@ test_sets = { - 'expensive': ['convolution/edgeDetect', 'convolution/emboss', 'convolution/gaussian', 'graphics/grouped-bar-chart', 'graphics/line-chart', 'graphics/stacked-bar-chart', 'slicing/dtw/compute-dtw'], + 'expensive': ['slicing/convolution/edgeDetect', 'slicing/convolution/emboss', 'slicing/convolution/gaussian', 'graphics/grouped-bar-chart', 'graphics/line-chart', 'graphics/stacked-bar-chart', 'slicing/dtw/compute-dtw'], 'graphics': ['graphics/grouped-bar-chart', 'graphics/line-chart', 'graphics/stacked-bar-chart'], - 'convolution': ['convolution/edgeDetect', 'convolution/emboss', 'convolution/gaussian'], + 'convolution': ['slicing/convolution/edgeDetect', 'slicing/convolution/emboss', 'slicing/convolution/gaussian'], } bench_sets = { diff --git a/src/Graph/Slice.purs b/src/Graph/Slice.purs index 0ed959026..9cc08f655 100644 --- a/src/Graph/Slice.purs +++ b/src/Graph/Slice.purs @@ -51,8 +51,11 @@ fwdSlice αs0 g0 = fst $ runWithGraph $ tailRecM go (M.empty × inEdges g0 αs0) pure $ Loop (M.insert α βs h × es) -- | De Morgan dual of forward slicing (▷_G)° ≡ Backward slicing on the opposite graph (◁_{G_op}) -fwdSliceDual :: forall g. Graph g => Set Vertex -> g -> g -fwdSliceDual αs0 g0 = bwdSlice αs0 (op g0) +fwdDualAsBwdOp :: forall g. Graph g => Set Vertex -> g -> g +fwdDualAsBwdOp αs0 g0 = bwdSlice αs0 (op g0) + +fwdDual :: forall g. Graph g => Set Vertex -> g -> g +fwdDual αs0 g0 = fwdSlice (sinks g0 `difference` αs0) g0 -- | Forward slicing (▷_G) ≡ De Morgan dual of backward slicing on the opposite graph (◁_{G_op})° fwdSliceAsDeMorgan :: forall g. Graph g => Set Vertex -> g -> g diff --git a/test/Benchmark/Main.purs b/test/Benchmark/Main.purs index 12311676c..39e95d47e 100644 --- a/test/Benchmark/Main.purs +++ b/test/Benchmark/Main.purs @@ -15,7 +15,7 @@ import Util (type (×), definitely, (×)) main :: Effect Unit main = launchAff_ do let - iter = 1 + iter = 10 arr = concat ([ bench_misc, bench_desugaring, bench_bwd, bench_graphics ] <#> ((#) (iter × true))) outs <- sequence $ (\(str × row) -> (str × _) <$> row) <$> arr logShow $ BenchAcc $ definitely "More than one benchmark" $ fromArray outs diff --git a/test/Specs.purs b/test/Specs.purs index 40aa44fd2..ca692259f 100644 --- a/test/Specs.purs +++ b/test/Specs.purs @@ -41,10 +41,10 @@ misc_cases = , { file: "records", fwd_expect: "{a : 2, b : 6, c : 7, d : (5 : []), e : 7}" } , { file: "reverse", fwd_expect: "(2 : (1 : []))" } -- TODO: move to slicing tests once we fix matrix-update - , { file: "slicing/dtw/average-series" - , fwd_expect: - "(2.5 : (0.5 : (0.5 : (2.5 : (2.5 : (1.0 : (0.5 : [])))))))" - } + -- , { file: "slicing/dtw/average-series" + -- , fwd_expect: + -- "(2.5 : (0.5 : (0.5 : (2.5 : (2.5 : (1.0 : (0.5 : [])))))))" + -- } ] desugar_cases :: Array TestSpec diff --git a/test/Util.purs b/test/Util.purs index 721cf5505..d3169a5eb 100644 --- a/test/Util.purs +++ b/test/Util.purs @@ -24,7 +24,7 @@ import Expr (ProgCxt) import GaloisConnection (GaloisConnection(..)) import Graph (Vertex, selectαs, select𝔹s, sinks, vertices) import Graph.GraphImpl (GraphImpl) -import Graph.Slice (bwdSliceDual, fwdSliceDual, fwdSliceDeMorgan) as G +import Graph.Slice (bwdSliceDual, fwdDualAsBwdOp, fwdSliceDeMorgan) as G import Lattice (Raw, 𝔹, botOf, erase, topOf) import Module (File, initialConfig, open, parse) import Parse (program) @@ -153,9 +153,10 @@ testGraph s gconfig spec@{ δv } benchmarking = do when logging (logAs "BwdAll/input slice" (prettyP $ select𝔹s eα αs')) do - g' <- benchmark (method <> "-FwdDual") $ \_ -> pure (G.fwdSliceDual αs_in g) + g' <- benchmark (method <> "-FwdDual") $ \_ -> pure (G.fwdDualAsBwdOp αs_in g) + -- g'' <- benchmark (method <> "-FwdDual2") $ \_ -> pure (G.fwdDual αs_in g) when logging (logAs "FwdDual/output slice" (prettyP $ select𝔹s vα (vertices g'))) - + -- when logging (logAs "FwdDual2/output slice" (prettyP $ select𝔹s vα (vertices g'') <#> not)) do g' <- benchmark (method <> "-FwdAsDeMorgan") $ \_ -> pure (G.fwdSliceDeMorgan αs_in g) when logging (logAs "FwdAsDeMorgan/output slice" (prettyP $ select𝔹s vα (vertices g') <#> not))