Commit 85f52434 authored by Anze Vavpetic's avatar Anze Vavpetic

fixed template paths

parent 3af63ebc
This diff is collapsed.
:- use_module(library(myddas)).
:- db_open(mysql, 'localhost'/'test', 'root', '').
:- db_import(cars, tmp_cars).
:- db_import(trains, tmp_trains).
:- repeat, tmp_trains(A,B), (trains(A,B), !, fail ; assertz(trains(A,B)), fail).
:- use_module(library(myddas)).
:- db_open(mysql, 'localhost'/'test', 'root', '').
:- db_import(cars, cars).
:- db_import(trains, trains).
:- modeh(1, east(+trains)).
:- modeb(*, has_cars(+trains,-cars)).
:- modeb(*, cars_position(+cars,#position)).
:- modeb(*, cars_shape(+cars,#shape)).
:- modeb(*, cars_len(+cars,#len)).
:- modeb(*, cars_sides(+cars,#sides)).
:- modeb(*, cars_roof(+cars,#roof)).
:- modeb(*, cars_wheels(+cars,#wheels)).
:- modeb(*, cars_load_shape(+cars,#load_shape)).
:- modeb(*, cars_load_num(+cars,#load_num)).
:- determination(east/1, has_cars/2).
:- determination(east/1, cars_position/2).
:- determination(east/1, cars_shape/2).
:- determination(east/1, cars_len/2).
:- determination(east/1, cars_sides/2).
:- determination(east/1, cars_roof/2).
:- determination(east/1, cars_wheels/2).
:- determination(east/1, cars_load_shape/2).
:- determination(east/1, cars_load_num/2).
trains(Id) :-
trains(Id,_).
cars(Id) :-
cars(Id,_,_,_,_,_,_,_,_,_).
position(Position) :-
cars(_,_,Position,_,_,_,_,_,_,_).
shape(Shape) :-
cars(_,_,_,Shape,_,_,_,_,_,_).
len(Len) :-
cars(_,_,_,_,Len,_,_,_,_,_).
sides(Sides) :-
cars(_,_,_,_,_,Sides,_,_,_,_).
roof(Roof) :-
cars(_,_,_,_,_,_,Roof,_,_,_).
wheels(Wheels) :-
cars(_,_,_,_,_,_,_,Wheels,_,_).
load_shape(Load_shape) :-
cars(_,_,_,_,_,_,_,_,Load_shape,_).
load_num(Load_num) :-
cars(_,_,_,_,_,_,_,_,_,Load_num).
has_cars(Trains, Cars) :-
trains(Trains,_),
cars(Cars,Trains,_,_,_,_,_,_,_,_).
cars_position(Cars, Position) :-
cars(Cars,_,Position,_,_,_,_,_,_,_).
cars_shape(Cars, Shape) :-
cars(Cars,_,_,Shape,_,_,_,_,_,_).
cars_len(Cars, Len) :-
cars(Cars,_,_,_,Len,_,_,_,_,_).
cars_sides(Cars, Sides) :-
cars(Cars,_,_,_,_,Sides,_,_,_,_).
cars_roof(Cars, Roof) :-
cars(Cars,_,_,_,_,_,Roof,_,_,_).
cars_wheels(Cars, Wheels) :-
cars(Cars,_,_,_,_,_,_,Wheels,_,_).
cars_load_shape(Cars, Load_shape) :-
cars(Cars,_,_,_,_,_,_,_,Load_shape,_).
cars_load_num(Cars, Load_num) :-
cars(Cars,_,_,_,_,_,_,_,_,Load_num).
\ No newline at end of file
east(1).
east(2).
east(3).
east(4).
east(5).
east(6).
east(7).
east(8).
east(9).
east(10).
east(11).
east(12).
east(13).
east(14).
east(15).
east(16).
east(17).
east(18).
east(19).
east(20).
trains(1).
trains(2).
trains(3).
trains(4).
trains(5).
trains(6).
trains(7).
trains(8).
trains(9).
trains(10).
trains(11).
trains(12).
trains(13).
trains(14).
trains(15).
trains(16).
trains(17).
trains(18).
trains(19).
trains(20).
cars(1).
cars(2).
cars(3).
cars(4).
cars(5).
cars(6).
cars(7).
cars(8).
cars(9).
cars(10).
cars(11).
cars(12).
cars(13).
cars(14).
cars(15).
cars(16).
cars(17).
cars(18).
cars(19).
cars(20).
cars(21).
cars(22).
cars(23).
cars(24).
cars(25).
cars(26).
cars(27).
cars(28).
cars(29).
cars(30).
cars(31).
cars(32).
cars(33).
cars(34).
cars(35).
cars(36).
cars(37).
cars(38).
cars(39).
cars(40).
cars(41).
cars(42).
cars(43).
cars(44).
cars(45).
cars(46).
cars(47).
cars(48).
cars(49).
cars(50).
cars(51).
cars(52).
cars(53).
cars(54).
cars(55).
cars(56).
cars(57).
cars(58).
cars(59).
cars(60).
cars(61).
cars(62).
cars(63).
position(1).
position(2).
position(3).
position(4).
shape(rectangle).
shape(bucket).
shape(u_shaped).
shape(hexagon).
shape(ellipse).
len(short).
len(long).
sides(not_double).
sides(double).
roof(none).
roof(peaked).
roof(flat).
roof(arc).
roof(jagged).
wheels(2).
wheels(3).
load_shape(circle).
load_shape(hexagon).
load_shape(triangle).
load_shape(rectangle).
load_shape(diamond).
load_num(1).
load_num(3).
load_num(2).
load_num(0).
has_cars(1,1).
has_cars(2,1).
has_cars(3,1).
has_cars(4,1).
has_cars(5,2).
has_cars(6,2).
has_cars(7,2).
has_cars(8,3).
has_cars(9,3).
has_cars(10,3).
has_cars(11,4).
has_cars(12,4).
has_cars(13,4).
has_cars(14,4).
has_cars(15,5).
has_cars(16,5).
has_cars(17,5).
has_cars(18,6).
has_cars(19,6).
has_cars(20,6).
has_cars(21,6).
has_cars(22,7).
has_cars(23,7).
has_cars(24,7).
has_cars(25,8).
has_cars(26,8).
has_cars(27,8).
has_cars(28,8).
has_cars(29,9).
has_cars(30,9).
has_cars(31,9).
has_cars(32,9).
has_cars(33,10).
has_cars(34,10).
has_cars(35,10).
has_cars(36,10).
has_cars(37,11).
has_cars(38,11).
has_cars(39,12).
has_cars(40,12).
has_cars(41,12).
has_cars(42,13).
has_cars(43,13).
has_cars(44,14).
has_cars(45,14).
has_cars(46,14).
has_cars(47,14).
has_cars(48,15).
has_cars(49,15).
has_cars(50,16).
has_cars(51,16).
has_cars(52,17).
has_cars(53,17).
has_cars(54,17).
has_cars(55,17).
has_cars(56,18).
has_cars(57,18).
has_cars(58,19).
has_cars(59,19).
has_cars(60,19).
has_cars(61,19).
has_cars(62,20).
has_cars(63,20).
cars_position(1, 1).
cars_position(2, 2).
cars_position(3, 3).
cars_position(4, 4).
cars_position(5, 1).
cars_position(6, 2).
cars_position(7, 3).
cars_position(8, 1).
cars_position(9, 2).
cars_position(10, 3).
cars_position(11, 1).
cars_position(12, 2).
cars_position(13, 3).
cars_position(14, 4).
cars_position(15, 1).
cars_position(16, 2).
cars_position(17, 3).
cars_position(18, 1).
cars_position(19, 2).
cars_position(20, 3).
cars_position(21, 4).
cars_position(22, 1).
cars_position(23, 2).
cars_position(24, 3).
cars_position(25, 1).
cars_position(26, 2).
cars_position(27, 3).
cars_position(28, 4).
cars_position(29, 1).
cars_position(30, 2).
cars_position(31, 3).
cars_position(32, 4).
cars_position(33, 1).
cars_position(34, 2).
cars_position(35, 3).
cars_position(36, 4).
cars_position(37, 1).
cars_position(38, 2).
cars_position(39, 1).
cars_position(40, 2).
cars_position(41, 3).
cars_position(42, 1).
cars_position(43, 2).
cars_position(44, 1).
cars_position(45, 2).
cars_position(46, 3).
cars_position(47, 4).
cars_position(48, 1).
cars_position(49, 2).
cars_position(50, 1).
cars_position(51, 2).
cars_position(52, 1).
cars_position(53, 2).
cars_position(54, 3).
cars_position(55, 4).
cars_position(56, 1).
cars_position(57, 2).
cars_position(58, 1).
cars_position(59, 2).
cars_position(60, 3).
cars_position(61, 4).
cars_position(62, 1).
cars_position(63, 2).
cars_shape(1, rectangle).
cars_shape(2, rectangle).
cars_shape(3, rectangle).
cars_shape(4, rectangle).
cars_shape(5, rectangle).
cars_shape(6, bucket).
cars_shape(7, u_shaped).
cars_shape(8, rectangle).
cars_shape(9, hexagon).
cars_shape(10, rectangle).
cars_shape(11, rectangle).
cars_shape(12, ellipse).
cars_shape(13, rectangle).
cars_shape(14, bucket).
cars_shape(15, rectangle).
cars_shape(16, rectangle).
cars_shape(17, rectangle).
cars_shape(18, rectangle).
cars_shape(19, hexagon).
cars_shape(20, rectangle).
cars_shape(21, rectangle).
cars_shape(22, rectangle).
cars_shape(23, rectangle).
cars_shape(24, rectangle).
cars_shape(25, rectangle).
cars_shape(26, bucket).
cars_shape(27, rectangle).
cars_shape(28, rectangle).
cars_shape(29, rectangle).
cars_shape(30, rectangle).
cars_shape(31, rectangle).
cars_shape(32, u_shaped).
cars_shape(33, bucket).
cars_shape(34, u_shaped).
cars_shape(35, rectangle).
cars_shape(36, rectangle).
cars_shape(37, rectangle).
cars_shape(38, rectangle).
cars_shape(39, rectangle).
cars_shape(40, u_shaped).
cars_shape(41, rectangle).
cars_shape(42, u_shaped).
cars_shape(43, rectangle).
cars_shape(44, bucket).
cars_shape(45, rectangle).
cars_shape(46, rectangle).
cars_shape(47, bucket).
cars_shape(48, rectangle).
cars_shape(49, u_shaped).
cars_shape(50, bucket).
cars_shape(51, rectangle).
cars_shape(52, rectangle).
cars_shape(53, rectangle).
cars_shape(54, rectangle).
cars_shape(55, rectangle).
cars_shape(56, u_shaped).
cars_shape(57, rectangle).
cars_shape(58, rectangle).
cars_shape(59, rectangle).
cars_shape(60, rectangle).
cars_shape(61, u_shaped).
cars_shape(62, rectangle).
cars_shape(63, u_shaped).
cars_len(1, short).
cars_len(2, long).
cars_len(3, short).
cars_len(4, long).
cars_len(5, short).
cars_len(6, short).
cars_len(7, short).
cars_len(8, long).
cars_len(9, short).
cars_len(10, short).
cars_len(11, short).
cars_len(12, short).
cars_len(13, short).
cars_len(14, short).
cars_len(15, short).
cars_len(16, long).
cars_len(17, short).
cars_len(18, long).
cars_len(19, short).
cars_len(20, short).
cars_len(21, long).
cars_len(22, long).
cars_len(23, short).
cars_len(24, short).
cars_len(25, short).
cars_len(26, short).
cars_len(27, long).
cars_len(28, short).
cars_len(29, long).
cars_len(30, short).
cars_len(31, long).
cars_len(32, short).
cars_len(33, short).
cars_len(34, short).
cars_len(35, short).
cars_len(36, short).
cars_len(37, short).
cars_len(38, long).
cars_len(39, long).
cars_len(40, short).
cars_len(41, short).
cars_len(42, short).
cars_len(43, long).
cars_len(44, short).
cars_len(45, short).
cars_len(46, long).
cars_len(47, short).
cars_len(48, long).
cars_len(49, short).
cars_len(50, short).
cars_len(51, long).
cars_len(52, long).
cars_len(53, short).
cars_len(54, short).
cars_len(55, long).
cars_len(56, short).
cars_len(57, long).
cars_len(58, long).
cars_len(59, long).
cars_len(60, long).
cars_len(61, short).
cars_len(62, long).
cars_len(63, short).
cars_sides(1, not_double).
cars_sides(2, not_double).
cars_sides(3, not_double).
cars_sides(4, not_double).
cars_sides(5, not_double).
cars_sides(6, not_double).
cars_sides(7, not_double).
cars_sides(8, not_double).
cars_sides(9, not_double).
cars_sides(10, not_double).
cars_sides(11, not_double).
cars_sides(12, not_double).
cars_sides(13, double).
cars_sides(14, not_double).
cars_sides(15, not_double).
cars_sides(16, not_double).
cars_sides(17, double).
cars_sides(18, not_double).
cars_sides(19, not_double).
cars_sides(20, not_double).
cars_sides(21, not_double).
cars_sides(22, not_double).
cars_sides(23, not_double).
cars_sides(24, not_double).
cars_sides(25, not_double).
cars_sides(26, not_double).
cars_sides(27, not_double).
cars_sides(28, not_double).
cars_sides(29, not_double).
cars_sides(30, not_double).
cars_sides(31, not_double).
cars_sides(32, not_double).
cars_sides(33, not_double).
cars_sides(34, not_double).
cars_sides(35, not_double).
cars_sides(36, not_double).
cars_sides(37, not_double).
cars_sides(38, not_double).
cars_sides(39, not_double).
cars_sides(40, not_double).
cars_sides(41, double).
cars_sides(42, not_double).
cars_sides(43, not_double).
cars_sides(44, not_double).
cars_sides(45, not_double).
cars_sides(46, not_double).
cars_sides(47, not_double).
cars_sides(48, not_double).
cars_sides(49, not_double).
cars_sides(50, not_double).
cars_sides(51, not_double).
cars_sides(52, not_double).
cars_sides(53, not_double).
cars_sides(54, double).
cars_sides(55, not_double).
cars_sides(56, not_double).
cars_sides(57, not_double).
cars_sides(58, not_double).
cars_sides(59, not_double).
cars_sides(60, not_double).
cars_sides(61, not_double).
cars_sides(62, not_double).
cars_sides(63, not_double).
cars_roof(1, none).
cars_roof(2, none).
cars_roof(3, peaked).
cars_roof(4, none).
cars_roof(5, flat).
cars_roof(6, none).
cars_roof(7, none).
cars_roof(8, flat).
cars_roof(9, flat).
cars_roof(10, none).
cars_roof(11, none).
cars_roof(12, arc).
cars_roof(13, none).
cars_roof(14, none).
cars_roof(15, flat).
cars_roof(16, flat).
cars_roof(17, none).
cars_roof(18, jagged).
cars_roof(19, flat).
cars_roof(20, none).
cars_roof(21, jagged).
cars_roof(22, none).
cars_roof(23, none).
cars_roof(24, flat).
cars_roof(25, peaked).
cars_roof(26, none).
cars_roof(27, flat).
cars_roof(28, none).
cars_roof(29, none).
cars_roof(30, none).
cars_roof(31, jagged).
cars_roof(32, none).
cars_roof(33, none).
cars_roof(34, none).
cars_roof(35, none).
cars_roof(36, none).
cars_roof(37, none).
cars_roof(38, flat).
cars_roof(39, jagged).
cars_roof(40, none).
cars_roof(41, none).
cars_roof(42, none).
cars_roof(43, flat).
cars_roof(44, none).
cars_roof(45, none).
cars_roof(46, jagged).
cars_roof(47, none).
cars_roof(48, none).
cars_roof(49, none).
cars_roof(50, none).
cars_roof(51, flat).
cars_roof(52, none).
cars_roof(53, none).
cars_roof(54, none).
cars_roof(55, none).
cars_roof(56, none).
cars_roof(57, none).
cars_roof(58, flat).
cars_roof(59, flat).
cars_roof(60, none).
cars_roof(61, none).
cars_roof(62, flat).
cars_roof(63, none).
cars_wheels(1, 2).
cars_wheels(2, 3).
cars_wheels(3, 2).
cars_wheels(4, 2).
cars_wheels(5, 2).
cars_wheels(6, 2).
cars_wheels(7, 2).
cars_wheels(8, 3).
cars_wheels(9, 2).
cars_wheels(10, 2).
cars_wheels(11, 2).
cars_wheels(12, 2).
cars_wheels(13, 2).
cars_wheels(14, 2).
cars_wheels(15, 2).
cars_wheels(16, 3).
cars_wheels(17, 2).
cars_wheels(18, 3).
cars_wheels(19, 2).
cars_wheels(20, 2).
cars_wheels(21, 2).
cars_wheels(22, 2).
cars_wheels(23, 2).
cars_wheels(24, 2).
cars_wheels(25, 2).
cars_wheels(26, 2).
cars_wheels(27, 2).
cars_wheels(28, 2).
cars_wheels(29, 2).
cars_wheels(30, 2).
cars_wheels(31, 3).
cars_wheels(32, 2).
cars_wheels(33, 2).
cars_wheels(34, 2).
cars_wheels(35, 2).
cars_wheels(36, 2).
cars_wheels(37, 2).
cars_wheels(38, 2).