CodeInterpreter.hh 52.7 KB
Newer Older
sebastien's avatar
sebastien committed
1
/*
2
 * Copyright (C) 2007-2011 Dynare Team
sebastien's avatar
sebastien committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
 *
 * This file is part of Dynare.
 *
 * Dynare is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Dynare is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with Dynare.  If not, see <http://www.gnu.org/licenses/>.
 */

20
21
#ifndef _CODEINTERPRETER_HH
#define _CODEINTERPRETER_HH
22
23
24
25
26
//#define DEBUGL
#include <cstdlib>
#include <cstdio>
#include <fstream>
#include <cstring>
27
#include <vector>
28
29
30
31
#ifdef LINBCG
# include "linbcg.hh"
#endif
#ifdef BYTE_CODE
32
33
34
35
36
# ifndef DEBUG_EX
#  include "mex.h"
# else
#  include "mex_interface.hh"
# endif
37
38
#endif

39
#include <stdint.h>
40

41
42
#define NEAR_ZERO (1e-12)

43
44
45
using namespace std;

/**
46
47
48
 * \enum Tags
 * \brief The differents flags of the bytecode
 */
49
50
enum Tags
  {
51
52
    FLDZ,         //!< Stores zero in the stack - 0 (0)
    FLDC,         //!< Stores a constant term in the stack - 1 (1)
53

54
55
56
57
58
59
    FDIMT,        //!< Defines the number of temporary terms - dynamic context (the period has to be indicated) - 2 (2)
    FDIMST,       //!< Defines the number of temporary terms - static context (the period hasn't to be indicated) - 3  (3)
    FLDT,         //!< Stores a temporary term in the stack - dynamic context (the period has to be indicated) - 4 (4)
    FLDST,        //!< Stores a temporary term in the stack - static context (the period hasn't to be indicated) - 5 (5)
    FSTPT,        //!< Loads a temporary term from the stack - dynamic context (the period has to be indicated) - 6 (6)
    FSTPST,       //!< Loads a temporary term from the stack - static context (the period hasn't to be indicated) - 7 (7)
60

61
62
63
64
    FLDU,         //!< Stores an element of the vector U in the stack - dynamic context (the period has to be indicated) - 8 (8)
    FLDSU,        //!< Stores an element of the vector U in the stack - static context (the period hasn't to be indicated) - 9 (9)
    FSTPU,        //!< Loads an element of the vector U from the stack - dynamic context (the period has to be indicated) - A (10)
    FSTPSU,       //!< Loads an element of the vector U from the stack - static context (the period hasn't to be indicated) - B (11)
65

66
67
68
69
70
    FLDV,         //!< Stores a variable (described in SymbolType) in the stack - dynamic context (the period has to be indicated) - C (12)
    FLDSV,        //!< Stores a variable (described in SymbolType) in the stack - static context (the period hasn't to be indicated) - D (13)
    FLDVS,        //!< Stores a variable (described in SymbolType) in the stack - dynamic context but inside the STEADYSTATE function (the period hasn't to be indicated) - E (14)
    FSTPV,        //!< Loads a variable (described in SymbolType) from the stack - dynamic context (the period has to be indicated) - F (15)
    FSTPSV,       //!< Loads a variable (described in SymbolType) from the stack - static context (the period hasn't to be indicated) - 10 (16)
71

72
73
    FLDR,         //!< Stores a residual in the stack - 11 (17)
    FSTPR,        //!< Loads a residual from the stack - 12 (18)
74

75
76
77
78
    FSTPG,        //!< Loads a derivative from the stack - 13 (19)
    FSTPG2,       //!< Loads a derivative matrix for static model from the stack - 14 (20)
    FSTPG3,       //!< Loads a derivative matrix for a dynamic model from the stack - 15 (21)
    FSTPG4,       //!< Loads a second order derivative matrix for a dynamic model from the stack - 16 (22)
79

80
81
82
    FUNARY,       //!< A Unary operator - 17 (23)
    FBINARY,      //!< A binary operator - 18 (24)
    FTRINARY,     //!< A trinary operator - 19 (25)
83

84
    FCUML,        //!< Cumulates the result - 1A (26)
85

86
87
    FJMPIFEVAL,   //!< Jump if evaluate = true - 1B (27)
    FJMP,         //!< Jump - 1C (28)
88

89
90
91
92
93
94
95
    FBEGINBLOCK,  //!< Defines the begining of a model block - 1D (29)
    FENDBLOCK,    //!< Defines the end of a model block - 1E (30)
    FENDEQU,      //!< Defines the last equation of the block. For block that has to be solved, the derivatives appear just after this flag - 1F (31)
    FEND,         //!< Defines the end of the model code - 20 (32)

    FOK,          //!< Used for debugging purpose - 21 (33)

96
97
98
99
100
101
102
103
104
105
106
    FNUMEXPR,     //!< Store the expression type and references - 22 (34)

    FCALL,        //!< Call an external function - 23 (35)
    FPUSH,        //!< Push a double in the stack - 24 (36)
    FPOP,         //!< Pop a double from the stack - 25 (37)
    FLDTEF,       //!< Stores the result of an external function in the stack - 26 (38)
    FSTPTEF,      //!< Loads the result of an external function from the stack- 27 (39)
    FLDTEFD,      //!< Stores the result of an external function in the stack - 28 (40)
    FSTPTEFD,     //!< Loads the result of an external function from the stack- 29 (41)
    FLDTEFDD,     //!< Stores the result of an external function in the stack - 28 (42)
    FSTPTEFDD     //!< Loads the result of an external function from the stack- 29 (43)
107

108
  };
109

sebastien's avatar
sebastien committed
110
111
enum BlockType
  {
112
113
114
115
    SIMULTANS,  //!< Simultaneous time separable block
    PROLOGUE,   //!< Prologue block (one equation at the beginning, later merged)
    EPILOGUE,   //!< Epilogue block (one equation at the beginning, later merged)
    SIMULTAN    //!< Simultaneous time unseparable block
sebastien's avatar
sebastien committed
116
117
  };

118
119
120
121
enum EquationType
  {
    E_UNKNOWN,              //!< Unknown equation type
    E_EVALUATE,             //!< Simple evaluation, normalized variable on left-hand side
ferhat's avatar
ferhat committed
122
    E_EVALUATE_S,           //!< Simple evaluation, normalize using the first order derivative
123
124
125
    E_SOLVE                 //!< No simple evaluation of the equation, it has to be solved
  };

126
127
128
129
enum BlockSimulationType
  {
    UNKNOWN,                      //!< Unknown simulation type
    EVALUATE_FORWARD,             //!< Simple evaluation, normalized variable on left-hand side, forward
130
    EVALUATE_BACKWARD,            //!< Simple evaluation, normalized variable on left-hand side, backward
131
    SOLVE_FORWARD_SIMPLE,         //!< Block of one equation, newton solver needed, forward
132
133
    SOLVE_BACKWARD_SIMPLE,        //!< Block of one equation, newton solver needed, backward
    SOLVE_TWO_BOUNDARIES_SIMPLE,  //!< Block of one equation, newton solver needed, forward & ackward
134
    SOLVE_FORWARD_COMPLETE,       //!< Block of several equations, newton solver needed, forward
135
    SOLVE_BACKWARD_COMPLETE,      //!< Block of several equations, newton solver needed, backward
136
    SOLVE_TWO_BOUNDARIES_COMPLETE //!< Block of several equations, newton solver needed, forward and backwar
137
  };
138

139
//! Enumeration of possible symbol types
sebastien's avatar
sebastien committed
140
/*! Warning: do not to change existing values for 0 to 4: the values matter for homotopy_setup command */
141
enum SymbolType
142
143
144
145
146
147
148
  {
    eEndogenous = 0,               //!< Endogenous
    eExogenous = 1,                //!< Exogenous
    eExogenousDet = 2,             //!< Exogenous deterministic
    eParameter = 4,                //!< Parameter
    eModelLocalVariable = 10,      //!< Local variable whose scope is model (pound expression)
    eModFileLocalVariable = 11,    //!< Local variable whose scope is mod file (model excluded)
149
150
    eExternalFunction = 12,        //!< External (user-defined) function
    eTrend = 13                    //!< Trend variable
151
152
  };

153
154
155
156
157
enum ExpressionType
  {
    TemporaryTerm,
    ModelEquation,
    FirstEndoDerivative,
158
    FirstOtherEndoDerivative,
159
160
161
162
163
164
165
166
167
168
169
170
171
    FirstExoDerivative,
    FirstExodetDerivative,
    FirstParamDerivative,
    SecondEndoDerivative,
    SecondExoDerivative,
    SecondExodetDerivative,
    SecondParamDerivative,
    ThirdEndoDerivative,
    ThirdExoDerivative,
    ThirdExodetDerivative,
    ThirdParamDerivative
  };

172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
enum UnaryOpcode
  {
    oUminus,
    oExp,
    oLog,
    oLog10,
    oCos,
    oSin,
    oTan,
    oAcos,
    oAsin,
    oAtan,
    oCosh,
    oSinh,
    oTanh,
    oAcosh,
    oAsinh,
    oAtanh,
190
    oSqrt,
191
192
    oAbs,
    oSign,
193
    oSteadyState,
194
195
    oSteadyStateParamDeriv, // for the derivative of the STEADY_STATE operator w.r.t. to a parameter
    oSteadyStateParam2ndDeriv, // for the 2nd derivative of the STEADY_STATE operator w.r.t. to a parameter
196
197
    oExpectation,
    oErf
198
  };
sebastien's avatar
sebastien committed
199

200
201
202
203
204
205
206
enum BinaryOpcode
  {
    oPlus,
    oMinus,
    oTimes,
    oDivide,
    oPower,
207
    oPowerDeriv, // for the derivative of the power function (see trac ticket #78)
208
209
210
211
212
213
214
215
    oEqual,
    oMax,
    oMin,
    oLess,
    oGreater,
    oLessEqual,
    oGreaterEqual,
    oEqualEqual,
216
    oDifferent
217
218
  };

sebastien's avatar
sebastien committed
219
220
enum TrinaryOpcode
  {
221
222
    oNormcdf,
    oNormpdf
sebastien's avatar
sebastien committed
223
224
  };

225
226
227
228
229
230
231
232
233
234
235
enum external_function_type
{
  ExternalFunctionWithoutDerivative,
  ExternalFunctionWithFirstDerivative,
  ExternalFunctionWithFirstandSecondDerivative,
  ExternalFunctionNumericalFirstDerivative,
  ExternalFunctionFirstDerivative,
  ExternalFunctionNumericalSecondDerivative,
  ExternalFunctionSecondDerivative
};

236
237
238
239
struct Block_contain_type
{
  int Equation, Variable, Own_Derivative;
};
240

241
#pragma pack(push, 1)
242
243
244
245
246
class TagWithoutArgument
{
protected:
  uint8_t op_code;
public:
247
248
  inline
  TagWithoutArgument(uint8_t op_code_arg) : op_code(op_code_arg)
249
250
251
  {
  };
  inline void
252
  write(ostream &CompileCode, unsigned int &instruction_number)
253
254
  {
    CompileCode.write(reinterpret_cast<char *>(this), sizeof(*this));
255
    instruction_number++;
256
  };
257
258
259
260
261
262
263
264
265
};

template < class T1 >
class TagWithOneArgument
{
protected:
  uint8_t op_code;
  T1 arg1;
public:
266
267
  inline
  TagWithOneArgument(uint8_t op_code_arg) : op_code(op_code_arg)
268
269
  {
  };
270
271
  inline
  TagWithOneArgument(uint8_t op_code_arg, T1 arg_arg1) : op_code(op_code_arg), arg1(arg_arg1)
272
273
274
  {
  };
  inline void
275
  write(ostream &CompileCode, unsigned int &instruction_number)
276
277
  {
    CompileCode.write(reinterpret_cast<char *>(this), sizeof(TagWithOneArgument));
278
    instruction_number++;
279
  };
280
281
282
283
284
285
286
287
288
289
};

template < class T1, class T2 >
class TagWithTwoArguments
{
protected:
  uint8_t op_code;
  T1 arg1;
  T2 arg2;
public:
290
291
  inline
  TagWithTwoArguments(uint8_t op_code_arg) : op_code(op_code_arg)
292
293
  {
  };
294
295
  inline
  TagWithTwoArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2)
296
297
298
  {
  };
  inline void
299
  write(ostream &CompileCode, unsigned int &instruction_number)
300
301
  {
    CompileCode.write(reinterpret_cast<char *>(this), sizeof(*this));
302
    instruction_number++;
303
  };
304
305
306
307
308
309
310
311
312
313
314
};

template < class T1, class T2, class T3 >
class TagWithThreeArguments
{
protected:
  uint8_t op_code;
  T1 arg1;
  T2 arg2;
  T3 arg3;
public:
315
316
  inline
  TagWithThreeArguments(uint8_t op_code_arg) : op_code(op_code_arg)
317
318
  {
  };
319
320
  inline
  TagWithThreeArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2), arg3(arg_arg3)
321
322
323
  {
  };
  inline void
324
  write(ostream &CompileCode, unsigned int &instruction_number)
325
326
  {
    CompileCode.write(reinterpret_cast<char *>(this), sizeof(*this));
327
    instruction_number++;
328
  };
329
330
};

331
332
333
334
335
336
337
338
339
340
template < class T1, class T2, class T3, class T4 >
class TagWithFourArguments
{
protected:
  uint8_t op_code;
  T1 arg1;
  T2 arg2;
  T3 arg3;
  T4 arg4;
public:
341
342
  inline
  TagWithFourArguments(uint8_t op_code_arg) : op_code(op_code_arg)
343
344
  {
  };
345
346
  inline
  TagWithFourArguments(uint8_t op_code_arg, T1 arg_arg1, T2 arg_arg2, T3 arg_arg3, T4 arg_arg4) : op_code(op_code_arg), arg1(arg_arg1), arg2(arg_arg2), arg3(arg_arg3), arg4(arg_arg4)
347
348
349
350
351
352
353
354
355
356
  {
  };
  inline void
  write(ostream &CompileCode, unsigned int &instruction_number)
  {
    CompileCode.write(reinterpret_cast<char *>(this), sizeof(*this));
    instruction_number++;
  };
};

357
358
359
class FLDZ_ : public TagWithoutArgument
{
public:
360
361
  inline
  FLDZ_() : TagWithoutArgument(FLDZ)
362
363
  {
  };
364
365
366
367
368
};

class FEND_ : public TagWithoutArgument
{
public:
369
370
  inline
  FEND_() : TagWithoutArgument(FEND)
371
372
  {
  };
373
374
375
376
377
};

class FENDBLOCK_ : public TagWithoutArgument
{
public:
378
379
  inline
  FENDBLOCK_() : TagWithoutArgument(FENDBLOCK)
380
381
  {
  };
382
383
384
385
386
};

class FENDEQU_ : public TagWithoutArgument
{
public:
387
388
  inline
  FENDEQU_() : TagWithoutArgument(FENDEQU)
389
390
  {
  };
391
392
393
394
395
};

class FCUML_ : public TagWithoutArgument
{
public:
396
397
  inline
  FCUML_() : TagWithoutArgument(FCUML)
398
399
  {
  };
400
401
};

402
403
404
class FPUSH_ : public TagWithoutArgument
{
public:
405
406
  inline
  FPUSH_() : TagWithoutArgument(FPUSH)
407
408
409
410
411
412
413
  {
  };
};

class FPOP_ : public TagWithoutArgument
{
public:
414
415
  inline
  FPOP_() : TagWithoutArgument(FPOP)
416
417
418
419
  {
  };
};

420
421
422
class FDIMT_ : public TagWithOneArgument<unsigned int>
{
public:
423
424
  inline
  FDIMT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMT)
425
426
  {
  };
427
428
  inline
  FDIMT_(unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMT, size_arg)
429
430
431
432
433
434
435
  {
  };
  inline unsigned int
  get_size()
  {
    return arg1;
  };
436
437
438
439
440
};

class FDIMST_ : public TagWithOneArgument<unsigned int>
{
public:
441
442
  inline
  FDIMST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMST)
443
444
  {
  };
445
446
  inline
  FDIMST_(const unsigned int size_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FDIMST, size_arg)
447
448
449
450
451
452
453
  {
  };
  inline unsigned int
  get_size()
  {
    return arg1;
  };
454
455
456
457
458
};

class FLDC_ : public TagWithOneArgument<double>
{
public:
459
460
  inline
  FLDC_() : TagWithOneArgument<double>::TagWithOneArgument(FLDC)
461
462
  {
  };
463
464
  inline
  FLDC_(const double value_arg) : TagWithOneArgument<double>::TagWithOneArgument(FLDC, value_arg)
465
466
467
468
469
470
471
  {
  };
  inline double
  get_value()
  {
    return arg1;
  };
472
473
474
475
476
};

class FLDU_ : public TagWithOneArgument<unsigned int>
{
public:
477
478
  inline
  FLDU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDU)
479
480
  {
  };
481
482
  inline
  FLDU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDU, pos_arg)
483
484
485
486
487
488
489
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
490
491
492
493
494
};

class FLDSU_ : public TagWithOneArgument<unsigned int>
{
public:
495
496
  inline
  FLDSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDSU)
497
498
  {
  };
499
500
  inline
  FLDSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDSU, pos_arg)
501
502
503
504
505
506
507
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
508
509
510
511
512
};

class FLDR_ : public TagWithOneArgument<unsigned int>
{
public:
513
514
  inline
  FLDR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDR)
515
516
  {
  };
517
518
  inline
  FLDR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDR, pos_arg)
519
520
521
522
523
524
525
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
526
527
528
529
530
};

class FLDT_ : public TagWithOneArgument<unsigned int>
{
public:
531
532
  inline
  FLDT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDT)
533
534
  {
  };
535
536
  inline
  FLDT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDT, pos_arg)
537
538
539
540
541
542
543
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
544
545
546
547
548
};

class FLDST_ : public TagWithOneArgument<unsigned int>
{
public:
549
550
  inline
  FLDST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDST)
551
552
  {
  };
553
554
  inline
  FLDST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDST, pos_arg)
555
556
557
558
559
560
561
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
562
563
564
565
566
};

class FSTPT_ : public TagWithOneArgument<unsigned int>
{
public:
567
568
  inline
  FSTPT_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPT)
569
570
  {
  };
571
572
  inline
  FSTPT_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPT, pos_arg)
573
574
575
576
577
578
579
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
580
581
582
583
584
};

class FSTPST_ : public TagWithOneArgument<unsigned int>
{
public:
585
586
  inline
  FSTPST_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPST)
587
588
  {
  };
589
590
  inline
  FSTPST_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPST, pos_arg)
591
592
593
594
595
596
597
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
598
599
600
601
602
};

class FSTPR_ : public TagWithOneArgument<unsigned int>
{
public:
603
604
  inline
  FSTPR_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPR)
605
606
  {
  };
607
608
  inline
  FSTPR_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPR, pos_arg)
609
610
611
612
613
614
615
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
616
617
618
619
620
};

class FSTPU_ : public TagWithOneArgument<unsigned int>
{
public:
621
622
  inline
  FSTPU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPU)
623
624
  {
  };
625
626
  inline
  FSTPU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPU, pos_arg)
627
628
629
630
631
632
633
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
634
635
636
637
638
};

class FSTPSU_ : public TagWithOneArgument<unsigned int>
{
public:
639
640
  inline
  FSTPSU_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPSU)
641
642
  {
  };
643
644
  inline
  FSTPSU_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPSU, pos_arg)
645
646
647
648
649
650
651
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
652
653
654
655
656
};

class FSTPG_ : public TagWithOneArgument<unsigned int>
{
public:
657
658
  inline
  FSTPG_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPG, 0)
659
660
  {
  };
661
662
  inline
  FSTPG_(const unsigned int pos_arg) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPG, pos_arg)
663
664
665
666
667
668
669
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  };
670
671
};

672
673
674
class FSTPG2_ : public TagWithTwoArguments<unsigned int, unsigned int>
{
public:
675
676
  inline
  FSTPG2_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPG2, 0, 0)
677
678
  {
  };
679
680
  inline
  FSTPG2_(const unsigned int pos_arg1, const unsigned int pos_arg2) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPG2, pos_arg1, pos_arg2)
681
682
683
684
685
686
687
688
689
690
691
692
693
694
  {
  };
  inline unsigned int
  get_row()
  {
    return arg1;
  };
  inline unsigned int
  get_col()
  {
    return arg2;
  };
};

695
696
697
class FSTPG3_ : public TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>
{
public:
698
699
  inline
  FSTPG3_() : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments(FSTPG3, 0, 0, 0, 0)
700
701
  {
  };
702
703
  inline
  FSTPG3_(const unsigned int pos_arg1, const unsigned int pos_arg2, const int pos_arg3, const unsigned int pos_arg4) : TagWithFourArguments<unsigned int, unsigned int, int, unsigned int>::TagWithFourArguments(FSTPG3, pos_arg1, pos_arg2, pos_arg3, pos_arg4)
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
  {
  };
  inline unsigned int
  get_row()
  {
    return arg1;
  };
  inline unsigned int
  get_col()
  {
    return arg2;
  };
  inline int
  get_lag()
  {
    return arg2;
  };
  inline unsigned int
  get_col_pos()
  {
    return arg4;
  };
};
727

728
729
730
class FUNARY_ : public TagWithOneArgument<uint8_t>
{
public:
731
732
  inline
  FUNARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FUNARY)
733
734
  {
  };
735
736
  inline
  FUNARY_(uint8_t op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FUNARY, op_type_arg)
737
738
739
740
741
742
743
  {
  };
  inline uint8_t
  get_op_type()
  {
    return arg1;
  };
744
745
746
747
748
};

class FBINARY_ : public TagWithOneArgument<uint8_t>
{
public:
749
750
  inline
  FBINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FBINARY)
751
752
  {
  };
753
754
  inline
  FBINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FBINARY, op_type_arg)
755
756
757
758
759
760
761
  {
  };
  inline uint8_t
  get_op_type()
  {
    return arg1;
  };
762
763
};

764
765
766
class FTRINARY_ : public TagWithOneArgument<uint8_t>
{
public:
767
768
  inline
  FTRINARY_() : TagWithOneArgument<uint8_t>::TagWithOneArgument(FTRINARY)
769
770
  {
  };
771
772
  inline
  FTRINARY_(const int op_type_arg) : TagWithOneArgument<uint8_t>::TagWithOneArgument(FTRINARY, op_type_arg)
773
774
775
776
777
778
779
780
781
  {
  };
  inline uint8_t
  get_op_type()
  {
    return arg1;
  };
};

782
783
784
class FOK_ : public TagWithOneArgument<int>
{
public:
785
786
  inline
  FOK_() : TagWithOneArgument<int>::TagWithOneArgument(FOK)
787
788
  {
  };
789
790
  inline
  FOK_(const int arg_arg) : TagWithOneArgument<int>::TagWithOneArgument(FOK, arg_arg)
791
792
793
794
795
796
797
  {
  };
  inline int
  get_arg()
  {
    return arg1;
  };
798
799
};

800
801
802
class FJMPIFEVAL_ : public TagWithOneArgument<unsigned int>
{
public:
803
804
  inline
  FJMPIFEVAL_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMPIFEVAL)
805
806
  {
  };
807
808
  inline
  FJMPIFEVAL_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMPIFEVAL, arg_pos)
809
810
811
812
813
814
815
816
817
818
819
820
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  }
};

class FJMP_ : public TagWithOneArgument<unsigned int>
{
public:
821
822
  inline
  FJMP_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMP)
823
824
  {
  };
825
826
  inline
  FJMP_(unsigned int arg_pos) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FJMP, arg_pos)
827
828
829
830
831
832
833
834
835
  {
  };
  inline unsigned int
  get_pos()
  {
    return arg1;
  }
};

836
837
838
class FLDTEF_ : public TagWithOneArgument<unsigned int>
{
public:
839
840
  inline
  FLDTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDTEF)
841
842
  {
  };
843
844
  inline
  FLDTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FLDTEF, number)
845
846
847
848
849
850
851
852
853
854
855
856
  {
  };
  inline unsigned int
  get_number()
  {
    return arg1;
  }
};

class FSTPTEF_ : public TagWithOneArgument<unsigned int>
{
public:
857
858
  inline
  FSTPTEF_() : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPTEF)
859
860
  {
  };
861
862
  inline
  FSTPTEF_(unsigned int number) : TagWithOneArgument<unsigned int>::TagWithOneArgument(FSTPTEF, number)
863
864
865
866
867
868
869
870
871
872
873
874
  {
  };
  inline unsigned int
  get_number()
  {
    return arg1;
  }
};

class FLDTEFD_ : public TagWithTwoArguments<unsigned int, unsigned int>
{
public:
875
876
  inline
  FLDTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FLDTEFD)
877
878
  {
  };
879
880
  inline
  FLDTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FLDTEFD, indx, row)
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
  {
  };
  inline unsigned int
  get_indx()
  {
    return arg1;
  };
  inline unsigned int
  get_row()
  {
    return arg2;
  };
};

class FSTPTEFD_ : public TagWithTwoArguments<unsigned int, unsigned int>
{
public:
898
899
  inline
  FSTPTEFD_() : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPTEFD)
900
901
  {
  };
902
903
  inline
  FSTPTEFD_(unsigned int indx, unsigned int row) : TagWithTwoArguments<unsigned int, unsigned int>::TagWithTwoArguments(FSTPTEFD, indx, row)
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
  {
  };
  inline unsigned int
  get_indx()
  {
    return arg1;
  };
  inline unsigned int
  get_row()
  {
    return arg2;
  };
};

class FLDTEFDD_ : public TagWithThreeArguments<unsigned int, unsigned int, unsigned int>
{
public:
921
922
  inline
  FLDTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FLDTEFDD)
923
924
  {
  };
925
926
  inline
  FLDTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FLDTEFDD, indx, row, col)
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
  {
  };
  inline unsigned int
  get_indx()
  {
    return arg1;
  };
  inline unsigned int
  get_row()
  {
    return arg2;
  };
  inline unsigned int
  get_col()
  {
    return arg3;
  };
};

class FSTPTEFDD_ : public TagWithThreeArguments<unsigned int, unsigned int, unsigned int>
{
public:
949
950
  inline
  FSTPTEFDD_() : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FSTPTEFDD)
951
952
  {
  };
953
954
  inline
  FSTPTEFDD_(unsigned int indx, unsigned int row, unsigned int col) : TagWithThreeArguments<unsigned int, unsigned int, unsigned int>::TagWithThreeArguments(FSTPTEF, indx, row, col)
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
  {
  };
  inline unsigned int
  get_indx()
  {
    return arg1;
  };
  inline unsigned int
  get_row()
  {
    return arg2;
  };
  inline unsigned int
  get_col()
  {
    return arg3;
  };
};

974
975
976
class FLDVS_ : public TagWithTwoArguments<uint8_t, unsigned int>
{
public:
977
978
  inline
  FLDVS_() : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDVS)
979
980
  {
  };
981
982
  inline
  FLDVS_(uint8_t type_arg, const unsigned int pos_arg) : TagWithTwoArguments<uint8_t, unsigned int>::TagWithTwoArguments(FLDVS, type_arg, pos_arg)
983
984
985
986
987
988
989
990
991
992
993
994
  {
  };
  inline uint8_t
  get_type()
  {
    return arg1;
  };
  inline unsigned int
  get_pos()
  {
    return arg2;
  };
995
996
997
998
999
};

class FLDSV_ : public TagWithTwoArguments<uint8_t, unsigned int>
{
public:
1000
  inline