Next: Implementation of the Up: Benchmark Sources Previous: dnf Benchmark

### NET Benchmark

The run-time for finding the first solution of the predicate call toolselection(X,Y) is given in the benchmark results.

```

t-isa(X, X).
t-isa(X, Y) :- tt-isa(X, Y).

tt-isa(X, Y) :- isa(X, Y).
tt-isa(X, Y) :- isa(X, Z), tt-isa(Z, Y).

isa(90, rechter).
is-leaf(90).
isa(0, spitz).
is-leaf(0).
isa(10, spitz).
is-leaf(10).
isa(20, spitz).
is-leaf(20).
isa(30, spitz).
is-leaf(30).
isa(60, spitz).
is-leaf(60).
isa(80, spitz).
is-leaf(80).
isa(180, stumpf).
is-leaf(180).
isa(150, stumpf).
is-leaf(150).
isa(140, stumpf).
is-leaf(140).
isa(130, stumpf).
is-leaf(130).
isa(100, stumpf).
is-leaf(100).
isa(stumpf, winkel).
isa(spitz, winkel).
isa(rechter, winkel).
isa(rund, nicht-eckig).
is-leaf(rund).
isa(viereck, eckig).
isa(dreieck, eckig).
is-leaf(dreieck).
isa(rhomb, eckig).
is-leaf(rhomb).
isa(eckig, geometrie).
isa(nicht-eckig, geometrie).
isa(s1, stahl).
is-leaf(s1).
isa(s2, stahl).
is-leaf(s2).
isa(s3, stahl).
is-leaf(s3).
isa(s4, stahl).
is-leaf(s4).
isa(s5, stahl).
is-leaf(s5).
isa(s6, stahl).
is-leaf(s6).
isa(k741, k74).
is-leaf(k741).
isa(k742, k74).
is-leaf(k742).
isa(k743, k74).
is-leaf(k743).
isa(k71, k7).
is-leaf(k71).
isa(k72, k7).
is-leaf(k72).
isa(k73, k7).
is-leaf(k73).
isa(k74, k7).
isa(k75, k7).
is-leaf(k75).
isa(k76, k7).
is-leaf(k76).
isa(k77, k7).
is-leaf(k77).
isa(k78, k7).
is-leaf(k78).
isa(k79, k7).
is-leaf(k79).
isa(k710, k7).
is-leaf(k710).
isa(k21, k2).
is-leaf(k21).
isa(k22, k2).
is-leaf(k22).
isa(k23, k2).
is-leaf(k23).
isa(k24, k2).
is-leaf(k24).
isa(k11, k1).
is-leaf(k11).
isa(k12, k1).
is-leaf(k12).
isa(k13, k1).
is-leaf(k13).
isa(k1, keramik).
isa(k2, keramik).
isa(k3, keramik).
is-leaf(k3).
isa(k4, keramik).
is-leaf(k4).
isa(k5, keramik).
is-leaf(k5).
isa(k6, keramik).
is-leaf(k6).
isa(k7, keramik).
isa(k8, keramik).
is-leaf(k8).
isa(k9, keramik).
is-leaf(k9).
isa(k10, keramik).
is-leaf(k10).
isa(stahl, material).
isa(keramik, material).
isa(hss, material).
is-leaf(hss).

tool-num(Wkl, Mat) :-
s-tool(Mat, Down-geo-1),
s-angle(Down-geo-1, Wkl),
s-position(Wkl, Mat),
numeric-test(Wkl, Mat).

mixed-selection(Wkl, Mat) :-
s-tool(Mat, Down-down-geo-1-1),
s-angle(Down-down-geo-1-1, Wkl),
s-position(Wkl, Mat),
s-wrk(Mat, Down-down-geo-2-1),
s-angle(Down-down-geo-2-1, Wkl),
s-position(Wkl, Mat),
s-lager(Mat, Geo).

h-selection(Wkl, Mat) :-
s-tool(Mat, Down-geo-1),
s-angle(Down-geo-1, Wkl),
s-position(Wkl, Mat),
s-wrk(Mat, Down-geo-2),
s-angle(Down-geo-2, Wkl),
s-position(Wkl, Mat).

tool-selection2(Wkl, Mat) :-
s-wrk(Mat, Geo),
s-angle(Geo, Wkl),
s-position(Wkl, Mat).

s-wrk(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, s1),
t-isa(B, rund).
s-wrk(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, s2),
t-isa(B, nicht-eckig).
s-wrk(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, k12),
t-isa(B, rund).

10-tool-selection(Wkl1, Wkl2) :-
s-tool(Mat1, Down-geo1-1),
s-angle(Down-geo1-1, Wkl1),
s-position(Wkl1, Mat1),
s-tool(Mat2, Down-geo2-1),
s-angle(Down-geo2-1, Wkl2),
s-position(Wkl2, Mat2),
s-tool(Mat3, Down-geo3-1),
s-angle(Down-geo3-1, Wkl3),
s-position(Wkl3, Mat3),
s-tool(Mat4, Down-geo4-1),
s-angle(Down-geo4-1, Wkl4),
s-position(Wkl4, Mat4),
s-tool(Mat5, Down-geo5-1),
s-angle(Down-geo5-1, Wkl5),
s-position(Wkl5, Mat5),
s-tool(Mat1, Down-geo1-2),
s-angle(Down-geo1-2, Wkl1),
s-position(Wkl1, Mat1),
s-tool(Mat2, Down-geo2-2),
s-angle(Down-geo2-2, Wkl2),
s-position(Wkl2, Mat2),
s-tool(Mat3, Down-geo3-2),
s-angle(Down-geo3-2, Wkl3),
s-position(Wkl3, Mat3),
s-tool(Mat4, Down-geo4-2),
s-angle(Down-geo4-2, Wkl4),
s-position(Wkl4, Mat4),
s-tool(Mat5, Down-geo5-2),
s-angle(Down-geo5-2, Wkl5),
s-position(Wkl5, Mat5).

5-tool-selection(Wkl1, Wkl2) :-
s-tool(Mat1, Geo1),
s-angle(Geo1, Wkl1),
s-position(Wkl1, Mat1),
s-tool(Mat2, Geo2),
s-angle(Geo2, Wkl2),
s-position(Wkl2, Mat2),
s-tool(Mat3, Geo3),
s-angle(Geo3, Wkl3),
s-position(Wkl3, Mat3),
s-tool(Mat4, Geo4),
s-angle(Geo4, Wkl4),
s-position(Wkl4, Mat4),
s-tool(Mat5, Geo5),
s-angle(Geo5, Wkl5),
s-position(Wkl5, Mat5).

tool-selection(Wkl, Mat) :-
s-tool(Mat, Geo),
s-angle(Geo, Wkl),
s-position(Wkl, Mat).

s-lager(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, stahl),
t-isa(B, 100).
s-lager(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, keramik),
t-isa(B, 150).
s-lager(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, hss),
t-isa(B, 90).
s-position(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, stumpf),
t-isa(B, stahl).
s-position(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, rechter),
t-isa(B, keramik).
s-position(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, 10),
t-isa(B, k1).
s-angle(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, viereck),
t-isa(B, 150).
s-angle(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, viereck),
t-isa(B, 100).
s-angle(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, dreieck),
t-isa(B, 180).
s-angle(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, rund),
t-isa(B, spitz).
s-tool(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, s2),
t-isa(B, eckig).
s-tool(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, s5),
t-isa(B, eckig).
s-tool(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, k1),
t-isa(B, nicht-eckig).
s-tool(A, B) :- is-leaf(A),
is-leaf(B),
t-isa(A, k12),
t-isa(B, rund).```

Michael Sintek - sintek@dfki.uni-kl.de