BAM
Abstract Machine for Bottom-Up Evaluation with the Push Method
Main Page
Related Pages
Classes
Files
File List
File Members
base
ver.h
Go to the documentation of this file.
1
// ============================================================================
2
// Project: Deductive Database
3
// Filename: ver.h
4
// Purpose: Version Settings
5
// Last Change: 19.09.2017
6
// Language: C++
7
// EMail: brass@informatik.uni-halle.de
8
// WWW: http://www.informatik.uni-halle.de/~brass/
9
// Address: Feldschloesschen 15, D-06120 Halle (Saale), GERMANY
10
// Copyright: (c) 2001-2017 by Stefan Brass
11
// License: See file "LICENSE" for copying conditions.
12
// Note: There is no warranty at all - this code may contain bugs.
13
// ============================================================================
14
15
26
//=============================================================================
27
// Include File Frame:
28
//=============================================================================
29
30
#ifndef VER_INCLUDED
31
#define VER_INCLUDED
32
33
//=============================================================================
34
// For use in Feature Switch Macros:
35
//=============================================================================
36
41
#define YES 1
42
47
#define NO 0
48
49
//=============================================================================
50
// Basic Parameters:
51
//=============================================================================
52
53
//-----------------------------------------------------------------------------
54
// VER_PROG_NAME:
55
//-----------------------------------------------------------------------------
56
61
#define VER_PROG_NAME "ydb"
62
63
//-----------------------------------------------------------------------------
64
// VER_PROMPT:
65
//-----------------------------------------------------------------------------
66
71
#define VER_PROMPT "ydb> "
72
73
//-----------------------------------------------------------------------------
74
// VER_CGI:
75
//-----------------------------------------------------------------------------
76
81
#define VER_CGI NO
82
83
//-----------------------------------------------------------------------------
84
// VER_ALERT_FILE:
85
//-----------------------------------------------------------------------------
86
91
#define VER_ALERT_FILE "alert"
92
93
94
//=============================================================================
95
// Settings for Debugging:
96
//=============================================================================
97
98
//-----------------------------------------------------------------------------
99
// VER_DEBUG:
100
//-----------------------------------------------------------------------------
101
106
// If VER_DEBUG is defined, it should be defined as YES:
107
// Note that VER_DEBUG cannot be set to NO (0) on the command line.
108
// It can only be defined, which means YES.
109
// Undefined usually means NO, but see automatic choice for Visual C++ below!
110
#ifdef VER_DEBUG
111
#undef VER_DEBUG
112
#define VER_DEBUG YES
113
#endif
114
115
// Normally, it will be defined on the command line.
116
// If one wants to set it here, this would be the place:
117
#define VER_DEBUG NO
118
//#define VER_DEBUG YES
119
120
// Automatic choice for Visual C++:
121
#ifndef VER_DEBUG
122
#ifdef _DEBUG
123
#define VER_DEBUG YES
124
#endif
125
#endif
126
127
// If VER_DEBUG is not defined, it should be defined as NO:
128
#ifndef VER_DEBUG
129
#define VER_DEBUG NO
130
#endif
131
132
//-----------------------------------------------------------------------------
133
// VER_FULLCHECK:
134
//-----------------------------------------------------------------------------
135
143
#define VER_FULLCHECK NO
144
145
146
//-----------------------------------------------------------------------------
147
// VER_DUMP:
148
//-----------------------------------------------------------------------------
149
154
#define VER_DUMP YES
155
156
//-----------------------------------------------------------------------------
157
// VER_DEBUG_OUT_ENABLED:
158
//-----------------------------------------------------------------------------
159
170
#define VER_DEBUG_OUT_ENABLED NO
171
172
173
//=============================================================================
174
// Further Sizes and Limits:
175
//=============================================================================
176
177
178
//-----------------------------------------------------------------------------
179
// VER_PAGESIZE:
180
//-----------------------------------------------------------------------------
181
186
#define VER_PAGESIZE 4096
187
// #define VER_PAGESIZE 8192
188
189
190
//-----------------------------------------------------------------------------
191
// VER_MAX_TIMERS:
192
//-----------------------------------------------------------------------------
193
198
#define VER_MAX_TIMERS 5
199
200
201
//-----------------------------------------------------------------------------
202
// VER_MAX_ATOMSIZE:
203
//-----------------------------------------------------------------------------
204
209
#define VER_MAX_ATOMSIZE 20
210
211
212
//-----------------------------------------------------------------------------
213
// VER_MAX_PRED_ARGS:
214
//-----------------------------------------------------------------------------
215
220
#define VER_MAX_PRED_ARGS 10
221
222
223
//=============================================================================
224
// List of Benchmarks to be Compiled into the Program:
225
//=============================================================================
226
227
// Please note that this distribution comes only with the TCFF benchmarks.
228
// Older versions of the other benchmarks can be downloaded from
229
// http://www.informatik.uni-halle.de/~brass/push/
230
// Some may require old data structures for relations,
231
// which were also eliminated from this distribution.
232
233
234
//-----------------------------------------------------------------------------
235
// Benchmarks of Loaders:
236
//-----------------------------------------------------------------------------
237
238
243
#define VER_BENCH_DBLP_LOAD NO
244
245
250
#define VER_BENCH_TCFF_LOAD_1 YES
251
252
257
#define VER_BENCH_TCFF_LOAD_2 YES
258
259
260
//-----------------------------------------------------------------------------
261
// DBLP Benchmark:
262
//-----------------------------------------------------------------------------
263
268
#define VER_BENCH_DBLP_1 NO
269
274
#define VER_BENCH_DBLP_2 NO
275
276
281
#define VER_BENCH_DBLP_3 NO
282
283
284
//-----------------------------------------------------------------------------
285
// Join 1 Benchmark with Query a(X,Y):
286
//-----------------------------------------------------------------------------
287
288
293
#define VER_BENCH_J1AXY_1 YES
294
295
300
#define VER_BENCH_J1AXY_2 YES
301
302
307
#define VER_BENCH_J1AXY_3 YES
308
309
314
#define VER_BENCH_J1AXY_4 YES
315
316
321
#define VER_BENCH_J1AXY_5 YES
322
323
328
#define VER_BENCH_J1AXY_6 YES
329
330
331
//-----------------------------------------------------------------------------
332
// Transitive Closure Benchmark called with both arguments free (TCFF):
333
//-----------------------------------------------------------------------------
334
339
#define VER_BENCH_TCFF_1 YES
340
341
346
#define VER_BENCH_TCFF_2 YES
347
348
353
#define VER_BENCH_TCFF_3 YES
354
355
360
#define VER_BENCH_TCFF_4 YES
361
366
#define VER_BENCH_TCFF_5 YES
367
368
369
//-----------------------------------------------------------------------------
370
// Transitive Closure Benchmark called with given Value for first arg. (TCBF):
371
//-----------------------------------------------------------------------------
372
377
#define VER_BENCH_TCBF_1 NO
378
379
384
#define VER_BENCH_TCBF_2 NO
385
386
391
#define VER_BENCH_TCBF_4 NO
392
393
394
//-----------------------------------------------------------------------------
395
// Wine Ontology Benchmark:
396
//-----------------------------------------------------------------------------
397
409
#define VER_BENCH_WINE NO
410
411
412
//-----------------------------------------------------------------------------
413
// Which Handcrafted Loaders are Needed (Old Technology, Only for Comparison)?
414
//-----------------------------------------------------------------------------
415
422
#if VER_BENCH_TCFF_LOAD_1 || VER_BENCH_TCFF_1
423
#define VER_TCFF_LOAD YES
424
#else
425
#define VER_TCFF_LOAD NO
426
#endif
427
428
429
//=============================================================================
430
// Data Files For Benchmarks:
431
//=============================================================================
432
433
434
//-----------------------------------------------------------------------------
435
// Data File for the DBLP Benchmark:
436
//-----------------------------------------------------------------------------
437
442
#define VER_FILE_DBLP_TEST "../data/dblp_test.data"
443
444
454
#define VER_FILE_DBLP "../data/dblp.data"
455
456
461
#define VER_FILE_DBLP_BIG "../data/dblp_big.data"
462
463
//-----------------------------------------------------------------------------
464
// Data Files for the Join1 Benchmarks:
465
//-----------------------------------------------------------------------------
466
471
#define VER_FILE_JOIN1_TEST "../data/d1000_test.P"
472
473
478
#define VER_FILE_JOIN1_10K "../data/d1000_relsize10000_xsb_cyc.P"
479
480
485
#define VER_FILE_JOIN1_50K "../data/d1000_relsize50000_xsb_cyc.P"
486
487
488
493
#define VER_FILE_JOIN1_250K "../data/d1000_relsize250000_xsb_cyc.P"
494
495
496
//-----------------------------------------------------------------------------
497
// Data Files for the Transitive Closure Benchmarks:
498
//-----------------------------------------------------------------------------
499
504
#define VER_FILE_TC_TEST "../data/tc_test.P"
505
506
511
#define VER_FILE_TC_50K "../data/tc_d1000_parsize50000_xsb_nocyc.P"
512
513
518
#define VER_FILE_TC_50K_CYC "../data/tc_d1000_parsize50000_xsb_cyc.P"
519
520
525
#define VER_FILE_TC_250K "../data/tc_d1000_parsize250000_xsb_nocyc.P"
526
527
532
#define VER_FILE_TC_250K_CYC "../data/tc_d1000_parsize250000_xsb_cyc.P"
533
534
539
#define VER_FILE_TC_500K "../data/tc_d1000_parsize500000_xsb_nocyc.P"
540
541
546
#define VER_FILE_TC_500K_CYC "../data/tc_d1000_parsize500000_xsb_cyc.P"
547
548
553
#define VER_FILE_TC_500K_D2 "../data/tc_d2000_parsize500000_xsb_nocyc.P"
554
555
560
#define VER_FILE_TC_500K_D2_CYC "../data/tc_d2000_parsize500000_xsb_cyc.P"
561
562
567
#define VER_FILE_TC_1M_D2 "../data/tc_d2000_parsize1000000_xsb_nocyc.P"
568
569
574
#define VER_FILE_TC_1M_D2_CYC "../data/tc_d2000_parsize1000000_xsb_cyc.P"
575
576
577
//-----------------------------------------------------------------------------
578
// Data File for the Wine Ontology Benchmark:
579
//-----------------------------------------------------------------------------
580
585
#define VER_FILE_WINE "../data/wine_data.P"
586
587
588
//=============================================================================
589
// Select an Operating System:
590
//=============================================================================
591
592
//-----------------------------------------------------------------------------
593
// VER_UNIX/VER_WINDOWS: Select operating system
594
//-----------------------------------------------------------------------------
595
605
// Make sure that if VER_UNIX is defined on the commandline, it is YES:
606
#ifdef VER_UNIX
607
#undef VER_UNIX
608
#define VER_UNIX YES
609
#endif
610
611
// Make sure that if VER_WINDOWS is defined on the commandline, it is YES:
612
#ifdef VER_WINDOWS
613
#undef VER_WINDOWS
614
#define VER_WINDOWS YES
615
#endif
616
617
618
// Select here which version you want if the makefile does not define it:
619
#ifndef VER_UNIX
620
#ifndef VER_WINDOWS
621
// #define VER_WINDOWS YES
622
// #define VER_UNIX YES
623
// If none defined, we choose automatically below.
624
#endif // VER_WINDOWS
625
#endif // VER_UNIX
626
627
628
// Still not defined? Check for typical Microsoft Symbols, else choose UNIX:
629
#ifndef VER_UNIX
630
#ifndef VER_WINDOWS
631
632
#if defined(_MSC_VER) || defined(_WINDOWS_) || defined(WIN32)
633
#define VER_WINDOWS YES
634
#else
635
#define VER_UNIX YES
636
#endif
637
638
#endif // VER_WINDOWS
639
#endif // VER_UNIX
640
641
642
//=============================================================================
643
// Portability Definitions:
644
//=============================================================================
645
646
//-----------------------------------------------------------------------------
647
// VER_CS_ISO:
648
//-----------------------------------------------------------------------------
649
654
#if VER_UNIX
655
#define VER_CS_ISO YES
656
#else
657
#define VER_CS_ISO NO
658
#endif
659
660
//-----------------------------------------------------------------------------
661
// VER_CS_MSDOS:
662
//-----------------------------------------------------------------------------
663
671
#if VER_WINDOWS
672
#define VER_CS_MSDOS YES
673
#else
674
#define VER_CS_MSDOS NO
675
#endif
676
677
678
//-----------------------------------------------------------------------------
679
// VER_IOSTREAM:
680
//-----------------------------------------------------------------------------
681
686
#if VER_UNIX
687
#define VER_IOSTREAM NO
688
#else
689
#define VER_IOSTREAM YES
690
#endif
691
692
//-----------------------------------------------------------------------------
693
// Switch off Warning C4514: unreferenced inline function has been removed
694
//-----------------------------------------------------------------------------
695
696
// Microsoft Visual C++ 6.0 generates this warning in the highest warning
697
// level 4 when an include file defines an inline function not used in this
698
// source file. However, it might be used in a different source file which
699
// includes the same include file.
700
701
// #if VER_WINDOWS
702
// #pragma warning (disable: 4514)
703
// #endif
704
705
//-----------------------------------------------------------------------------
706
// VER_UNUSED:
707
//-----------------------------------------------------------------------------
708
713
#ifdef __GNUC__
714
#define VER_UNUSED(ARG) ARG __attribute__((unused))
715
#else
716
#define VER_UNUSED(ARG) ARG
717
#endif
718
719
//-----------------------------------------------------------------------------
720
// VER_PRESS_RETURN:
721
//-----------------------------------------------------------------------------
722
727
#if VER_WINDOWS
728
#define VER_PRESS_RETURN YES
729
#else
730
#define VER_PRESS_RETURN NO
731
#endif
732
733
734
//-----------------------------------------------------------------------------
735
// VER_SIGNAL:
736
//-----------------------------------------------------------------------------
737
742
#if VER_UNIX
743
#define VER_SIGNAL YES
744
#else
745
#define VER_SIGNAL NO
746
#endif
747
748
749
//-----------------------------------------------------------------------------
750
// VER_BYTE:
751
//-----------------------------------------------------------------------------
752
758
typedef
char
VER_BYTE
;
759
760
//-----------------------------------------------------------------------------
761
// VER_USHORT:
762
//-----------------------------------------------------------------------------
763
768
typedef
unsigned
short
VER_USHORT
;
769
770
//-----------------------------------------------------------------------------
771
// VER_INT:
772
//-----------------------------------------------------------------------------
773
778
typedef
int
VER_INT
;
779
780
//-----------------------------------------------------------------------------
781
// VER_UINT:
782
//-----------------------------------------------------------------------------
783
788
typedef
unsigned
int
VER_UINT
;
789
790
//-----------------------------------------------------------------------------
791
// VER_UINT_BITS:
792
//-----------------------------------------------------------------------------
793
798
#define VER_UINT_BITS 32
799
800
//-----------------------------------------------------------------------------
801
// VER_INT64:
802
//-----------------------------------------------------------------------------
803
811
// gcc -pedantic complains:
812
// ver.h:240:14: warning: ISO C++ 1998 does not support "long long"
813
814
#ifdef __GNUC__
815
#include <stdint.h>
816
typedef
int64_t
VER_INT64
;
817
#else
818
typedef
long
long
VER_INT64
;
819
#endif
820
821
//-----------------------------------------------------------------------------
822
// VER_UINT64:
823
//-----------------------------------------------------------------------------
824
831
//typedef unsigned long long VER_UINT64;
832
833
//-----------------------------------------------------------------------------
834
// VER_SHORTOFFSET: How many shorts are n ints? Answer must be 2*n.
835
//-----------------------------------------------------------------------------
836
837
//#define VER_SHORTOFFSET(N) ((N)*2)
838
// The Data part of a block is a union of VER_BYTE, VER_USHORT, VER_INT
839
// arrays. Sometimes different types are used in a block, but one must
840
// make sure that the same memory location is not used with different
841
// types.
842
843
844
//=============================================================================
845
// End of Include File:
846
//=============================================================================
847
848
#endif
849
VER_INT
int VER_INT
Definition:
ver.h:778
VER_USHORT
unsigned short VER_USHORT
Definition:
ver.h:768
VER_INT64
long long VER_INT64
Definition:
ver.h:818
VER_BYTE
char VER_BYTE
Definition:
ver.h:758
VER_UINT
unsigned int VER_UINT
Definition:
ver.h:788
Generated by
1.8.10