init :- retractall(benchmark(_)), print('Benchmarks: '),
setof(B,Date^Time^mc_entry(B,Date,Time),Bench),
sort(Bench,SB),
print(SB),nl,
member(B1,SB),
assertz(benchmark(B1)),fail.
init :- retractall(benchmark(_,_,_)),benchmark_group(Group,Benchmark,Name),
(benchmark(Benchmark) -> true ; print('### No entry for : '), print(Benchmark),nl,fail),
assertz(benchmark(Benchmark,Group,Name)), assert_group(Group),
fail.
init :- benchmark(Benchmark), \+ benchmark_group(_,Benchmark,_),
print('* No group for: '), print(Benchmark),nl,
assertz(benchmark(Benchmark,unknown,Benchmark)), assert_group(unknown), fail.
init :- retractall(row_identifier(_)),
use_for_row_identifier(timestamp), print('Timestamps: '),
setof(D,B^Time^mc_entry(B,D,Time),Dates),
sort(Dates,SB),
print(SB),nl,
member(D1,SB),
assertz(row_identifier(D1)),fail.
init :- use_for_row_identifier(revision), print('Revisions: '),
setof(Rev,B^D^Time^mc_entry(B,D,Time,Rev),Revs),
sort(Revs,SB),
print(SB),nl,
member(D1,SB),
assertz(row_identifier(D1)),fail.
init.