-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathtamgu.h
executable file
·5399 lines (4324 loc) · 121 KB
/
tamgu.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*
* Tamgu (탐구)
*
* Copyright 2019-present NAVER Corp.
* under BSD 3-clause
*/
/* --- CONTENTS ---
Project : Tamgu (탐구)
Version : See tamgu.cxx for the version number
filename : tamgu.h
Date : 2017/09/01
Purpose :
Programmer : Claude ROUX (claude.roux@naverlabs.com)
Reviewer :
*/
#ifndef tamgu_h
#define tamgu_h
#include <stdio.h>
#include <string.h>
#include "messages_error.h"
#include <thread>
#include <mutex>
#include <atomic>
#include <condition_variable>
#include "conversion.h"
#include "vecte.h"
class TamguCode;
class TamguGlobal;
class Tamgu;
class TamguCall;
class TamguDeclaration;
class TamguConst;
class TamguFunction;
class TamguFrame;
class TamguIteration;
class TamguInstruction;
class Tamgufraction;
class TamguFunctionLambda;
class TamguIndex;
class TamguPredicateContainer;
class TamguPredicateVariableInstance;
class TamguInstructionEvaluate;
class An_any;
class PredicateInstanceDeclaration;
#include "tamguconstants.h"
#ifdef GARBAGESCAN
Exporting void Garbaging(hmap<std::string, long>& issues);
Exporting void Garbaging(hmap<long, long>& issues);
#endif
#ifdef MULTIGLOBALTAMGU
Exporting void Garbaging(hmap<std::string, long>& issues);
Exporting void Garbaging(hmap<long, long>& issues);
#ifdef WIN32
#define localthread __declspec( thread )
#else
#ifdef APPLE
#define localthread thread_local
#else
#define localthread thread_local
#endif
#endif
#else
#define localthread
#endif
//-----------------------------------------------------------------------
bool ToggleLispMode();
bool isLispmode();
void Setlispmode(bool v);
Exporting void Set_keep_track_garbage(bool v);
//-----------------------------------------------------------------------
inline long maxlocal(long x, long y) { return (x > y) ? x : y; }
inline long minlocal(long x, long y) { return (x < y) ? x : y; }
//-----------------------------------------------------------------------
extern Exchanging vector<TamguGlobal*> globalTamguPool;
#define global_tamgu globalTamguPool[idglobal]
//The main variable, which controls the world...
#ifdef MULTIGLOBALTAMGU
extern localthread TamguGlobal* globalTamgu;
#else
extern Exchanging TamguGlobal* globalTamgu;
#endif
#define _getlocktamgu(x) globalTamgu->threadMODE ? (x->hasLock() ? new Locking((TamguObject*)x) : NULL) : NULL
#define _cleanlocktamgu(x) if (x != NULL) delete x
#define _getlock(x) globalTamgu->threadMODE ? new Locking(x) : NULL
#define _getlocks(x,y) globalTamgu->threadMODE ? new Doublelocking(x,y) : NULL
#define _cleanlock(x) if (globalTamgu->threadMODE) delete x
#define _getlockg(x) threadMODE ? new Locking(x) : NULL
#define _cleanlockg(x) if (threadMODE) delete x
//-----------------------------------------------------------------------
void PrintALine(TamguGlobal* g, string s);
//-----------------------------------------------------------------------
#include "tamguglobal.h"
typedef enum {is_none = 0, is_container = 1, is_constante = 2, is_constcontainer = 3, is_declaration = 4,
is_tracked = 8, is_null = 0x0A, is_variable = 0x10, is_callvariable = 0x18,
is_index = 0x1C, is_string = 0x20, is_pure_string = 0x24, is_number = 0x40, is_regular = 0x80,
is_tobelocked = 0x100, is_noneedforlock = 0x200, is_checkforlock = 0x300, is_frameinstance = 0x400, is_predicate = 0x800, is_predicatemethod = 0x1000,
is_continue = 0x8002, is_error = 0xC002, is_break = 0xE002, is_return = 0xF002,
is_noconst = 0xFFFD
} is_investigations;
//Tamgu is the class from which every element descends
class Tamgu {
public:
long idtracker;
unsigned short investigate;
#if defined(GARBAGESCAN) || defined(GARBAGEINDEBUG)
long iddebug;
Exporting Tamgu();
Exporting virtual ~Tamgu();
#else
Tamgu();
virtual ~Tamgu();
#endif
virtual Tamgu* Compile(TamguGlobal*, Tamgu* parent) {
return this;
}
void Protectfromtracker() {
idtracker = -100;
}
//These two methods are the most important, they store or get a value from an element
virtual Tamgu* Put(Tamgu* index, Tamgu* value, short idthread) {
return this;
}
virtual Tamgu* EvalWithSimpleIndex(Tamgu* idx, short idthread, bool) {
return this;
}
virtual Tamgu* EvalIndex(Tamgu* context, TamguIndex* value, short idthread) {
return this;
}
virtual Tamgu* Eval_Arguments(TamguDeclarationLocal* context, Tamgu* value, short idthread) {
return aFALSE;
}
virtual Tamgu* Eval(Tamgu* context, Tamgu* value, short idthread) {
return this;
}
virtual Tamgu* EvalComplexe(Tamgu* context, Tamgu* value, short idthread) {
return Eval(context, value, idthread);
}
virtual Tamgu* Execute(Tamgu* environment, Tamgu* value, short idthread) {
return Eval(environment, value, idthread);
}
virtual void Setidtype(TamguGlobal* global) {}
virtual Tamgu* CallMethod(short idname, Tamgu* contextualpattern, short idthread, TamguCall* callfunc) {
return this;
}
virtual Tamgu* CallTopMethod(short idname, TamguFrame* frame, Tamgu* contextualpattern, short idthread, TamguCall* callfunc) {
return this;
}
virtual bool Setvalue(Tamgu* index, Tamgu* value, short idthread, bool strict = false) {
return Put(index, value, idthread)->Boolean();
}
virtual Tamgu* Putvalue(Tamgu* value, short idthread) {
return Put(aNULL, value, idthread);
}
virtual Tamgu* Clonevalue(Tamgu* value, short idthread) {
return Putvalue(value, idthread);
}
virtual void Putatomicvalue(Tamgu* value) {
Put(value, aNULL, globalTamgu->GetThreadid());
}
inline Tamgu* GetvalueforThread() {
if (!duplicateForCall())
return this;
return Atom();
}
virtual Tamgu* Loopin(TamguInstruction*, Tamgu* context, short idthread);
virtual void Insert(long idx, Tamgu* ke) {}
//Some building operations...
//This operation is called whenever an instruction is added to a structure...
virtual void Subcontext(bool b) {}
virtual void Setpartialtest(bool b) {}
virtual Tamgu* Parent() {
return aNULL;
}
virtual void Getshape(vector<long>& sh) {}
virtual bool isPredicateNameVariable() {
return false;
}
virtual void add(An_any* e) {}
virtual void push(An_any* e) {}
virtual void InstructionClear() {}
virtual Tamgu* Lastinstruction() { return aNULL; }
virtual void AddInstruction(Tamgu* a) {}
virtual void Putinstruction(size_t i, Tamgu* ke) {}
virtual Tamgu* InstructionRemoveLast() { return aNULL; }
virtual void InstructionRemove(size_t i) {}
virtual size_t InstructionSize() { return 0; }
virtual Tamgu* Instruction(size_t i) { return aNULL; }
virtual Tamgu* Lispbody() {return this;}
virtual void ScanVariables(vector<short>& vars) {}
virtual void CheckTaskellComposition() {}
virtual void Setinstruction(short) {}
virtual void Setinfo(Tamgu* a) {}
virtual void Getinfo(Tamgu* a) {}
virtual Tamgu* Initialisation() {
return aNULL;
}
virtual bool Checkvariable() {
return false;
}
virtual Tamgu* Getpredicatezone(short);
//We check if all variables are accessible for computing (see where variables Haskell)
virtual bool Computevariablecheck(short idthread) {
return false;
}
virtual void Setchoice(char v) {}
virtual char Choice() {
return -1;
}
virtual Tamgu* car(short idthread) {
return aNOELEMENT;
}
virtual Tamgu* cdr(short idthread) {
return aNOELEMENT;
}
virtual char Declarelocal(short idthread, short n, Tamgu* a) {
return globalTamgu->Topstack()->Declarelocal(idthread, n, a);
}
virtual void Replacedeclaration(short idthread, short n, Tamgu* a) {
globalTamgu->Topstack()->Replacedeclaration(idthread, n, a);
globalTamgu->Replacevariable(idthread, n, a);
}
//------------------------------------------------------------------
//Reference operations
virtual uchar checkmark() {
return 0;
}
virtual void mark(uchar m) {}
virtual void unmark() {}
virtual void markloop(uchar m) {}
virtual void Removecontainerreference(short inc) {}
virtual void Removereference(short inc = 1) {
Resetreference(inc);
}
virtual void Cleanreference(short inc) {}
virtual void Addreference(unsigned short inv, short inc=1) {}
virtual void Setreference(short r) {}
virtual void Setreference() {}
virtual void Resetreference(short r = 1) {}
virtual void Resetreferencenoprotect(short r = 1) {}
virtual void Release() {}
virtual void Protect() {}
virtual void Remove() {}
virtual void SetConst() {}
virtual string Info(string n) {
return "Unknown method";
}
virtual void Methods(Tamgu*) {}
virtual void Prepare(Tamgu* env, short idthread) {}
virtual void Setaffectation(bool b){}
virtual void Setevaluate(bool v) {}
Exporting virtual Tamgu* Succ();
Exporting virtual Tamgu* Pred();
virtual Tamgu* Nextfunction() {
return NULL;
}
virtual Tamgu* Atom(bool forced = false) {
return this;
}
virtual Tamgu* Returned(short idthread) {
return this;
}
virtual Tamgu* Value() {
return this;
}
virtual Tamgu* GetLetValue() {
return this;
}
virtual Tamgu* Value(wstring& w) {
string res;
s_unicode_to_utf8(res, w);
return Value(res);
}
virtual Tamgu* Value(string&) {
return aNOELEMENT;
}
virtual Tamgu* Value(long) {
return aNOELEMENT;
}
virtual Tamgu* Value(double) {
return aNOELEMENT;
}
virtual Tamgu* Value(Tamgu*) {
return aNOELEMENT;
}
//------------------------------------------------------------------
virtual bool directCall() {
return false;
}
virtual bool isLocalEvaluation() {
return false;
}
virtual bool isFunctionVariable() {
return false;
}
virtual bool isaIF() {
return false;
}
virtual bool isPartialtest() {
return false;
}
virtual Tamgu* update(short idthread) {
return this;
}
Exporting virtual bool Unify(TamguDeclaration* dom, Tamgu* a);
virtual bool isUnified(TamguDeclaration* dom) {
return true;
}
virtual bool isComputable(TamguDeclaration* dom) {
return isUnified(dom);
}
virtual short checkTypePredicate() {
return a_null;
}
virtual bool Checkparameters(TamguDeclaration*) {
return false;
}
virtual void Cleans(Tamgu* v, bool localvalue) {}
virtual void Leaves(Tamgu* v) {
v->Push(this);
}
virtual Tamgu* Returnobject() { return aNULL; }
virtual Tamgu* PredicateEvalue(TamguInstructionEvaluate* context, VECTE<Tamgu*>& stack, TamguPredicate* currenthead, long depth) {
return aFALSE;
}
Exporting virtual Tamgu* Predicate(TamguDeclaration* dom, short idthread);
virtual bool Insertvalue(Tamgu* dom, Tamgu* v, basebin_hash<Tamgu*>&) {
return true;
}
virtual void Variables(vector<short>& vars) {}
virtual Tamgu* VariableValue(TamguDeclaration* dom, short idthread) {
return aNULL;
}
virtual Tamgu* Variable(TamguDeclaration* dom) {
return NULL;
}
Exporting virtual Tamgu* ExtractPredicateVariables(Tamgu* contextualpattern, TamguDeclaration* dom, Tamgu* c, Tamgu* e, short, bool root);
Exporting virtual Tamgu* EvaluePredicateVariables(Tamgu* context, TamguDeclaration* dom, short idthread);
virtual void Setfail(bool) {}
virtual Tamgu* Last() {
return aNULL;
}
virtual bool FindAndClean(Tamgu* a) {
return true;
}
virtual void Setdomainlock() {}
virtual void Resetdomainlock() {}
//------------------------------------------------------------------
virtual void SetVariablesWillBeCreated() {}
virtual void Forcedclean() {}
virtual void Setforced(bool v) {}
virtual Tamgu* Newinstance(short idthread, Tamgu* f = NULL) { return this; }
virtual Tamgu* Newvalue(Tamgu* a, short idthread) {
Tamgu* v = Newinstance(idthread);
v->Put(aNULL, a, idthread);
a = v->Eval(aNULL, aNULL, idthread);
v->Release();
return a;
}
//This is a specific case to avoid returning an instance through Providexxx...
virtual Tamgu* Newpureinstance(short idthread) {
return Newinstance(idthread);
}
virtual Tamgu* anInstance(long i) {
return Newinstance(0);
}
virtual TamguIteration* Newiteration(bool direction) {
return (TamguIteration*)aITERNULL;
}
virtual void Postinstantiation(short idthread, bool setreference) {}
virtual bool isObject() {
return false;
}
virtual long Lockid() {
return -1;
}
virtual bool isEQU() {
return false;
}
virtual bool isAffectation() {
return false;
}
virtual bool checkAffectation() {
return true;
}
virtual bool isSequence() {
return false;
}
virtual bool hasDeclaration() {
return false;
}
virtual bool isDeclared(short id) {
return false;
}
virtual void Declare(short id, Tamgu* a) {}
virtual Tamgu* Declaration(short id) {
return NULL;
}
virtual Tamgu* Declared(short id) {
return Declaration(id);
}
virtual uchar BType() {
return 255;
}
virtual short Type() {
return 0;
}
virtual string Typestring() {
return globalTamgu->Getsymbol(Type());
}
virtual short Typenumber() {
if (isNumber())
return Type();
return 0;
}
virtual void Setname(short n) {}
virtual string Typename() {
return globalTamgu->Getsymbol(Type());
}
void Setid(long i) {
idtracker = i;
}
long Setidreturn(long i) {
idtracker = i;
return idtracker;
}
long Idtracker() {
return idtracker;
}
virtual void Setcodereference(long l, short i) {}
virtual long Currentinfo() {
return -1;
}
virtual long Currentline() {
return -1;
}
virtual short Currentspace() {
return -1;
}
virtual short Currentfile() {
return -1;
}
virtual void Setaction(short a) {}
virtual short Action() {
return a_none;
}
virtual void Addparent(Tamgu*) {}
virtual Tamgu* Frame() {
return NULL;
}
virtual bool isParent(TamguFrame*) {
return false;
}
virtual void Setprotect(bool n) {}
virtual void Protectcontainervalues() {}
virtual void Popping() {}
virtual bool Candelete() {
return true;
}
virtual void Finalclean(std::set<Tamgu*>& elements_to_delete) {}
void Deletion(std::set<Tamgu*>& elements_to_delete);
virtual long Setprotect() {
return -1;
}
//-----------------------------------------------
virtual void searchall(string& txt, vector<long>&) {}
virtual void searchall(wstring& txt, vector<long>&) {}
virtual void searchall(string& txt, vector<long>&, long init) {}
virtual void searchall(wstring& txt, vector<long>&, long init) {}
virtual bool search(wstring& w, long& f, long& l, long init =0) {
return false;
}
virtual bool search(string& w, long& f, long& l, long init = 0) {
return false;
}
virtual bool searchlast(wstring& w, long& first, long& last, long init = 0) {
return false;
}
virtual bool searchlast(string& w, long& first, long& last, long init = 0) {
return false;
}
virtual wstring wreplace(wstring& w, wstring& rep) {
return L"";
}
virtual string replace(string& w, string& rep) {
return "";
}
virtual Tamgu* splitting(Tamgu* contextual, wstring& w) {
return aNULL;
}
virtual Tamgu* splitting(Tamgu* contextual, string& w) {
return aNULL;
}
//-----------------------------------------------
virtual void Reserve(long d) {}
virtual void Clone(TamguInstruction* ki) {}
virtual Tamgu* Merging(Tamgu*) {
return aNOELEMENT;
}
virtual Tamgu* Combine(Tamgu*) {
return aNOELEMENT;
}
//-----------------------------------------------
virtual void Setdisjunction(bool v) {}
virtual PredicateInstanceDeclaration* Dico() {
return NULL;
}
virtual void Setdico(short n, TamguPredicateVariableInstance* a) {}
virtual TamguPredicateVariableInstance* Getdico(short n) {
return NULL;
}
virtual bool Checkdico(short n) {
return false;
}
virtual void setSucessfull(bool v) {}
virtual bool hasbeenSuccesfull() {
return false;
}
virtual char Indexes(short idthread, long sz, long& ileft, long& iright) {
Tamgu* val = Eval(aNULL, aNULL, idthread);
ileft = val->Integer();
val->Release();
if (ileft < 0 || ileft >= sz)
return 0;
return 1;
}
virtual bool Failed() {
return false;
}
virtual Tamgu* Evalue(TamguDeclaration* dom, short idthread, char duplicate) {
return Getvalues(dom, idthread);
}
Exporting virtual Tamgu* Getvalues(TamguDeclaration* dom, char duplicate);
virtual Tamgu* Unifies(TamguDeclaration* dom) {
return Getvalues(dom, 2);
}
virtual Tamgu* isBound(Tamgu*, short) {
return aTRUE;
}
virtual void Setmerge() {}
virtual bool Checkprecision(Tamgu* r) {
return true;
}
//-----------------------------------------------
virtual bool isPredicateVariable() {
return false;
}
virtual bool isDisjunction() {
return false;
}
virtual bool checkDisjunction() {
return false;
}
// Status Functions
virtual short Reference() {
return 0;
}
virtual bool duplicateForCall() {
return true;
}
virtual bool Subcontext() {
return false;
}
virtual bool isProtected() {
return false;
}
virtual bool isPrivate() {
return false;
}
virtual bool isTail() {
return false;
}
virtual bool isCall() {
return false;
}
virtual bool isCallFunction() {
return false;
}
virtual char isCallTaskellFunction() {
return 0;
}
virtual bool isLisp() {
return false;
}
virtual bool isFile() {
return false;
}
virtual bool isLong() {
return false;
}
virtual bool isShort() {
return false;
}
virtual bool isFloat() {
return false;
}
virtual bool isInteger() {
return false;
}
virtual bool isDecimal() {
return false;
}
virtual bool isPureCallVariable() {
return false;
}
virtual bool isAssignable() {
return false;
}
virtual bool isBoolean() {
return false;
}
virtual bool isIncrement() {
return false;
}
virtual bool isAtom() {
return false;
}
virtual bool checkAtomType(short ty) {
return false;
}
virtual Tamgu* Atomref() {
return this;
}
virtual Tamgu* AtomNoConst() {
return Atom();
}
virtual bool isTime() {
return false;
}
virtual bool isLoop() {
return false;
}
virtual bool isJoined() {
return false;
}
virtual bool isObjectContainer() {
return false;
}
virtual bool isContainerClass() {
return false;
}
virtual bool isValueContainer() {
return false;
}
virtual bool isVectorValueContainer() {
return false;
}
virtual bool isVectorContainer() {
return false;
}
virtual bool isMerge() {
return false;
}
virtual bool isMapContainer() {
return false;
}
virtual bool isEvaluate() {
return false;
}
virtual bool isEmpty() {
return true;
}
virtual bool isFrame() {
return false;
}
virtual bool isMainFrame() {
return false;
}
virtual bool isInfinite() {
return false;
}
virtual bool isChosen() {
return false;
}
virtual bool isROOTOPERATION() {
return false;
}
virtual bool isOperation() {
return false;
}
virtual bool is_e_operation() {
return false;
}
virtual bool isInstruction() {
return false;
}
virtual bool isInterval() {
return false;
}
virtual bool isStop() {
return false;
}
virtual short Name() {
return 0;
}
virtual bool isName(short n) {
return false;
}
virtual bool isAlias() {
return false;
}
virtual bool isFunction() {
return false;
}
virtual bool isCurryfied() {
return false;
}
virtual bool isFunctionParameter() {
return false;
}
virtual bool isaFunction() {
return false;
}
virtual bool isThread() {
return false;
}
virtual bool isExclusive() {
return false;
}
virtual bool isTaskellFunction() {
return false;
}
virtual bool Predeclared() {
return false;
}
virtual bool isUsed() {
return false;
}
virtual short Typeframe() {
return 0;
}
virtual short Typevariable() {
return Type();
}
virtual short Typevariable(short i) {
return a_none;
}
virtual short Typeinfered() {
return Typevariable();
}
virtual short Yourowntype() {
return 0;
}
inline bool isConstContainer() {
return (investigate == is_constcontainer); //is_const | is_container
}
inline bool isVariable() {
return (investigate == is_variable);
}
inline bool isCallVariable() {
return (investigate == is_callvariable);
}
inline bool isDeclaration() {
return (is_declaration == (investigate & is_declaration));
}
inline bool isConst() {
return ( is_constante == (investigate & is_constante));
}
inline bool isNULL() {
return (investigate == is_null);
}
inline bool isPredicate() {
return (is_predicate == (investigate & is_predicate));
}
inline bool isPredicateMethod() {