libSBML C++ API  5.20.4
ASTNodeType.h File Reference

Enumeration for Abstract Syntax Tree (AST). More...

Include dependency graph for ASTNodeType.h:
This graph shows which files directly or indirectly include this file:

Enumerations

enum  AllowedChildrenType_t {
  ALLOWED_CHILDREN_ANY ,
  ALLOWED_CHILDREN_ATLEAST ,
  ALLOWED_CHILDREN_EXACTLY ,
  ALLOWED_CHILDREN_UNKNOWN
}
 
enum  ASTNodeType_t {
  AST_PLUS = 43 ,
  AST_MINUS = 45 ,
  AST_TIMES = 42 ,
  AST_DIVIDE = 47 ,
  AST_POWER = 94 ,
  AST_INTEGER = 256 ,
  AST_REAL ,
  AST_REAL_E ,
  AST_RATIONAL ,
  AST_NAME ,
  AST_NAME_AVOGADRO ,
  AST_NAME_TIME ,
  AST_CONSTANT_E ,
  AST_CONSTANT_FALSE ,
  AST_CONSTANT_PI ,
  AST_CONSTANT_TRUE ,
  AST_LAMBDA ,
  AST_FUNCTION ,
  AST_FUNCTION_ABS ,
  AST_FUNCTION_ARCCOS ,
  AST_FUNCTION_ARCCOSH ,
  AST_FUNCTION_ARCCOT ,
  AST_FUNCTION_ARCCOTH ,
  AST_FUNCTION_ARCCSC ,
  AST_FUNCTION_ARCCSCH ,
  AST_FUNCTION_ARCSEC ,
  AST_FUNCTION_ARCSECH ,
  AST_FUNCTION_ARCSIN ,
  AST_FUNCTION_ARCSINH ,
  AST_FUNCTION_ARCTAN ,
  AST_FUNCTION_ARCTANH ,
  AST_FUNCTION_CEILING ,
  AST_FUNCTION_COS ,
  AST_FUNCTION_COSH ,
  AST_FUNCTION_COT ,
  AST_FUNCTION_COTH ,
  AST_FUNCTION_CSC ,
  AST_FUNCTION_CSCH ,
  AST_FUNCTION_DELAY ,
  AST_FUNCTION_EXP ,
  AST_FUNCTION_FACTORIAL ,
  AST_FUNCTION_FLOOR ,
  AST_FUNCTION_LN ,
  AST_FUNCTION_LOG ,
  AST_FUNCTION_PIECEWISE ,
  AST_FUNCTION_POWER ,
  AST_FUNCTION_ROOT ,
  AST_FUNCTION_SEC ,
  AST_FUNCTION_SECH ,
  AST_FUNCTION_SIN ,
  AST_FUNCTION_SINH ,
  AST_FUNCTION_TAN ,
  AST_FUNCTION_TANH ,
  AST_LOGICAL_AND ,
  AST_LOGICAL_NOT ,
  AST_LOGICAL_OR ,
  AST_LOGICAL_XOR ,
  AST_RELATIONAL_EQ ,
  AST_RELATIONAL_GEQ ,
  AST_RELATIONAL_GT ,
  AST_RELATIONAL_LEQ ,
  AST_RELATIONAL_LT ,
  AST_RELATIONAL_NEQ ,
  AST_END_OF_CORE = 315 ,
  AST_FUNCTION_MAX = 320 ,
  AST_FUNCTION_MIN ,
  AST_FUNCTION_QUOTIENT ,
  AST_FUNCTION_RATE_OF ,
  AST_FUNCTION_REM ,
  AST_LOGICAL_IMPLIES ,
  AST_CSYMBOL_FUNCTION = 400 ,
  AST_DISTRIB_FUNCTION_NORMAL = 500 ,
  AST_DISTRIB_FUNCTION_UNIFORM ,
  AST_DISTRIB_FUNCTION_BERNOULLI ,
  AST_DISTRIB_FUNCTION_BINOMIAL ,
  AST_DISTRIB_FUNCTION_CAUCHY ,
  AST_DISTRIB_FUNCTION_CHISQUARE ,
  AST_DISTRIB_FUNCTION_EXPONENTIAL ,
  AST_DISTRIB_FUNCTION_GAMMA ,
  AST_DISTRIB_FUNCTION_LAPLACE ,
  AST_DISTRIB_FUNCTION_LOGNORMAL ,
  AST_DISTRIB_FUNCTION_POISSON ,
  AST_DISTRIB_FUNCTION_RAYLEIGH ,
  AST_LINEAR_ALGEBRA_VECTOR = 600 ,
  AST_LINEAR_ALGEBRA_SELECTOR ,
  AST_LINEAR_ALGEBRA_MATRIX ,
  AST_LINEAR_ALGEBRA_MATRIXROW ,
  AST_LINEAR_ALGEBRA_DETERMINANT ,
  AST_LINEAR_ALGEBRA_TRANSPOSE ,
  AST_LINEAR_ALGEBRA_VECTOR_PRODUCT ,
  AST_LINEAR_ALGEBRA_SCALAR_PRODUCT ,
  AST_LINEAR_ALGEBRA_OUTER_PRODUCT ,
  AST_LOGICAL_EXISTS = 700 ,
  AST_LOGICAL_FORALL ,
  AST_STATISTICS_MEAN = 800 ,
  AST_STATISTICS_MEDIAN ,
  AST_STATISTICS_MODE ,
  AST_STATISTICS_MOMENT ,
  AST_STATISTICS_SDEV ,
  AST_STATISTICS_VARIANCE ,
  AST_STATISTICS_MOMENTABOUT ,
  AST_SERIES_PRODUCT = 900 ,
  AST_SERIES_SUM ,
  AST_SERIES_LIMIT ,
  AST_SERIES_TENDSTO ,
  AST_ALGEBRA_GCD = 1000 ,
  AST_ALGEBRA_CONJUGATE ,
  AST_ALGEBRA_ARG ,
  AST_ALGEBRA_REAL ,
  AST_ALGEBRA_IMAGINARY ,
  AST_ALGEBRA_LCM ,
  AST_RELATIONS_EQUIVALENT = 1100 ,
  AST_RELATIONS_APPROX ,
  AST_RELATIONS_FACTOROF ,
  AST_CALCULUS_INT = 1200 ,
  AST_CALCULUS_DIFF ,
  AST_CALCULUS_PARTIALDIFF ,
  AST_CALCULUS_LOWLIMIT ,
  AST_CALCULUS_UPLIMIT ,
  AST_CALCULUS_DIVERGENCE ,
  AST_CALCULUS_GRAD ,
  AST_CALCULUS_CURL ,
  AST_CALCULUS_LAPLACIAN ,
  AST_SET_THEORY_SET = 1300 ,
  AST_SET_THEORY_LIST ,
  AST_SET_THEORY_UNION ,
  AST_SET_THEORY_INTERSECT ,
  AST_SET_THEORY_IN ,
  AST_SET_THEORY_NOTIN ,
  AST_SET_THEORY_SUBSET ,
  AST_SET_THEORY_PRSUBSET ,
  AST_SET_THEORY_NOTSUBSET ,
  AST_SET_THEORY_NOTPRSUBSET ,
  AST_SET_THEORY_SETDIFF ,
  AST_SET_THEORY_CARD ,
  AST_SET_THEORY_CARTESIANPRODUCT ,
  AST_CONSTANT_IMAGINARYI = 1400 ,
  AST_CONSTANTS_INTEGERS ,
  AST_CONSTANTS_REALS ,
  AST_CONSTANTS_RATIONALS ,
  AST_CONSTANTS_NATURALNUMBERS ,
  AST_CONSTANTS_COMPLEXES ,
  AST_CONSTANTS_PRIMES ,
  AST_CONSTANTS_EMPTYSET ,
  AST_CONSTANTS_EULERGAMMA ,
  AST_BASIC_CONTENT_INTERVAL = 1500 ,
  AST_BASIC_CONTENT_INVERSE ,
  AST_BASIC_CONTENT_CONDITION ,
  AST_BASIC_CONTENT_DECLARE ,
  AST_BASIC_CONTENT_COMPOSE ,
  AST_BASIC_CONTENT_IDENT ,
  AST_BASIC_CONTENT_DOMAIN ,
  AST_BASIC_CONTENT_CODOMAIN ,
  AST_BASIC_CONTENT_IMAGE ,
  AST_BASIC_CONTENT_DOMAINOFAPPLICATION ,
  AST_UNKNOWN = 9999
}
 ASTNodeType_t is the enumeration of possible ASTNode types. More...
 
enum  ExtendedMathType_t {
  EM_L3V2 ,
  EM_DISTRIB ,
  EM_ARRAYS ,
  EM_REMAINING ,
  EM_UNKNOWN
}
 

Detailed Description

Enumeration for Abstract Syntax Tree (AST).

Author
Sarah M Keating

Enumeration Type Documentation

◆ AllowedChildrenType_t

Enumerator
ALLOWED_CHILDREN_ANY 

Any number of children (0+) are allowed

ALLOWED_CHILDREN_ATLEAST 

Any number of children above some minimum are allowed

ALLOWED_CHILDREN_EXACTLY 

Only specific number(s) of children are allowed

ALLOWED_CHILDREN_UNKNOWN 

◆ ASTNodeType_t

ASTNodeType_t is the enumeration of possible ASTNode types.

Every ASTNode has an associated type code to indicate whether, for example, it holds a number or stands for an arithmetic operator. The type is recorded as a value drawn from the enumeration ASTNodeType_t. The list of possible types is quite long, because it covers all the mathematical functions that are permitted in SBML. The values are shown in the following table:
AST_CONSTANT_E AST_FUNCTION_CSC AST_LOGICAL_AND
AST_CONSTANT_FALSE AST_FUNCTION_CSCH AST_LOGICAL_IMPLIES2
AST_CONSTANT_PI AST_FUNCTION_DELAY AST_LOGICAL_NOT
AST_CONSTANT_TRUE AST_FUNCTION_EXP AST_LOGICAL_OR
AST_DIVIDE AST_FUNCTION_FACTORIAL AST_LOGICAL_XOR
AST_FUNCTION AST_FUNCTION_FLOOR AST_MINUS
AST_FUNCTION_ABS AST_FUNCTION_LN AST_NAME
AST_FUNCTION_ARCCOS AST_FUNCTION_LOG AST_NAME_AVOGADRO1
AST_FUNCTION_ARCCOSH AST_FUNCTION_MAX2 AST_NAME_TIME
AST_FUNCTION_ARCCOT AST_FUNCTION_MIN2 AST_ORIGINATES_IN_PACKAGE2
AST_FUNCTION_ARCCOTH AST_FUNCTION_PIECEWISE AST_PLUS
AST_FUNCTION_ARCCSC AST_FUNCTION_POWER AST_POWER
AST_FUNCTION_ARCCSCH AST_FUNCTION_QUOTIENT2 AST_RATIONAL
AST_FUNCTION_ARCSEC AST_FUNCTION_RATE_OF2 AST_REAL
AST_FUNCTION_ARCSECH AST_FUNCTION_REM2 AST_REAL_E
AST_FUNCTION_ARCSIN AST_FUNCTION_ROOT AST_RELATIONAL_EQ
AST_FUNCTION_ARCSINH AST_FUNCTION_SEC AST_RELATIONAL_GEQ
AST_FUNCTION_ARCTAN AST_FUNCTION_SECH AST_RELATIONAL_GT
AST_FUNCTION_ARCTANH AST_FUNCTION_SIN AST_RELATIONAL_LEQ
AST_FUNCTION_CEILING AST_FUNCTION_SINH AST_RELATIONAL_LT
AST_FUNCTION_COS AST_FUNCTION_TAN AST_RELATIONAL_NEQ
AST_FUNCTION_COSH AST_FUNCTION_TANH AST_TIMES
AST_FUNCTION_COT AST_INTEGER AST_UNKNOWN
AST_FUNCTION_COTH AST_LAMBDA
1 (Level 3 only)
2 (Level 3 Version 2+ only)

The types have the following meanings:

  • If the node is a predefined function or operator from SBML Level 1 (in the string-based formula syntax used in Level 1) or SBML Level 2 and 3 (in the subset of MathML used in SBML Levels 2 and 3), then the node's type will be either AST_FUNCTION_X, AST_LOGICAL_X, or AST_RELATIONAL_X, as appropriate. (Examples: AST_FUNCTION_LOG, AST_RELATIONAL_LEQ.)
  • If the node refers to a user-defined function, the node's type will be AST_FUNCTION (because it holds the name of the function).
  • If the node is a lambda expression, its type will be AST_LAMBDA.
  • (Levels 2 and 3 only) If the node is the special MathML csymbol time, the value of the node will be AST_NAME_TIME. (Note, however, that the MathML csymbol delay is translated into a node of type AST_FUNCTION_DELAY. The difference is due to the fact that time is a single variable, whereas delay is actually a function taking arguments.)
  • (Level 3 only) If the node is the special MathML csymbol avogadro, the value of the node will be AST_NAME_AVOGADRO.
  • (Level 3 Version 2+ only) If the node is the special MathML csymbol rateOf, the value of the node will be AST_FUNCTION_RATE_OF.
  • (Level 3 Version 2+ only) If the node is a MathML operator that originates in a package, it is included in the ASTNodeType_t list, but may not be legally used in an SBML document that does not include that package. This includes the node types from the 'Distributions' package (AST_DISTRIB_FUNCTION_NORMAL, AST_DISTRIB_FUNCTION_UNIFORM, etc.), and elements from MathML that were not included in core.
See also
ASTNode::getType()
ASTNode::canonicalize()
Enumerator
AST_PLUS 

Plus (MathML <plus>)

AST_MINUS 

Minus (MathML <minus>)

AST_TIMES 

Times (MathML <times>)

AST_DIVIDE 

Divide (MathML <divide>)

AST_POWER 

Power (MathML <power>)

AST_INTEGER 

Integer (MathML <cn type="integer">)

AST_REAL 

Real (MathML <cn>)

AST_REAL_E 

Real number with e-notation (MathML <cn type="e-notation"> [number] <sep/> [number] </cn>)

AST_RATIONAL 

Rational (MathML <cn type="rational"> [number] <sep/> [number] <cn>)

AST_NAME 

A named node (MathML <ci>)

AST_NAME_AVOGADRO 

Avogadro (MathML <ci encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/avogadro">)

AST_NAME_TIME 

Time (MathML <ci encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/time">)

AST_CONSTANT_E 

Exponential E (MathML <exponentiale>)

AST_CONSTANT_FALSE 

False (MathML <false>)

AST_CONSTANT_PI 

Pi (MathML <pi>)

AST_CONSTANT_TRUE 

True (MathML <true>)

AST_LAMBDA 

Lambda (MathML <lambda>)

AST_FUNCTION 

User-defined function (MathML <apply>)

AST_FUNCTION_ABS 

Absolute value (MathML <abs>)

AST_FUNCTION_ARCCOS 

Arccosine (MathML <arccos>)

AST_FUNCTION_ARCCOSH 

Hyperbolic arccosine (MathML <arccosh>)

AST_FUNCTION_ARCCOT 

Arccotangent (MathML <arccot>)

AST_FUNCTION_ARCCOTH 

Hyperbolic arccotangent (MathML <arccoth>)

AST_FUNCTION_ARCCSC 

Arccosecant (MathML <arccsc>)

AST_FUNCTION_ARCCSCH 

Hyperbolic arccosecant (MathML <arccsch>)

AST_FUNCTION_ARCSEC 

Arcsecant (MathML <arcsec>)

AST_FUNCTION_ARCSECH 

Hyperbolic arcsecant (MathML <arcsech>)

AST_FUNCTION_ARCSIN 

Arcsine (MathML <arcsin>)

AST_FUNCTION_ARCSINH 

Hyperbolic arcsine (MathML <arcsinh>)

AST_FUNCTION_ARCTAN 

Arctangent (MathML <arctan>)

AST_FUNCTION_ARCTANH 

Hyperbolic arctangent (MathML <arctanh>)

AST_FUNCTION_CEILING 

Ceiling (MathML <ceiling>)

AST_FUNCTION_COS 

Cosine (MathML <cosine>)

AST_FUNCTION_COSH 

Hyperbolic cosine (MathML <cosh>)

AST_FUNCTION_COT 

Cotangent (MathML <cot>)

AST_FUNCTION_COTH 

Hyperbolic cotangent (MathML <coth>)

AST_FUNCTION_CSC 

Cosecant (MathML <csc>)

AST_FUNCTION_CSCH 

Hyperbolic cosecant (MathML <csch>)

AST_FUNCTION_DELAY 

Delay (MathML <csymbol encoding="text" definitionURL="http://www.sbml.org/sbml/symbols/delay">)

AST_FUNCTION_EXP 

Exponential (MathML <exp>)

AST_FUNCTION_FACTORIAL 

Factorial (MathML <factorial>)

AST_FUNCTION_FLOOR 

Floor (MathML <floor>)

AST_FUNCTION_LN 

Natural Log (MathML <ln>)

AST_FUNCTION_LOG 

Log (MathML <log>)

AST_FUNCTION_PIECEWISE 

Piecewise (MathML <piecewise>)

AST_FUNCTION_POWER 

Power (MathML <power>)

AST_FUNCTION_ROOT 

Root (MathML <root>)

AST_FUNCTION_SEC 

Secant (MathML <sec>)

AST_FUNCTION_SECH 

Hyperbolic secant (MathML <sech>)

AST_FUNCTION_SIN 

Sine (MathML <sin>)

AST_FUNCTION_SINH 

Hyperbolic sine (MathML <sinh>)

AST_FUNCTION_TAN 

Tangent (MathML <tan>)

AST_FUNCTION_TANH 

Hyperbolic tangent (MathML <tanh>)

AST_LOGICAL_AND 

Logical and (MathML <and>)

AST_LOGICAL_NOT 

Logical not (MathML <not>)

AST_LOGICAL_OR 

Logical or (MathML <or>)

AST_LOGICAL_XOR 

Logical exclusive or (MathML <xor>)

AST_RELATIONAL_EQ 

Equal (MathML <eq>)

AST_RELATIONAL_GEQ 

Greater than or equal (MathML <geq>)

AST_RELATIONAL_GT 

Greater than (MathML <gt>)

AST_RELATIONAL_LEQ 

Less than or equal (MathML <leq>)

AST_RELATIONAL_LT 

Less than (MathML <lt>)

AST_RELATIONAL_NEQ 

Not equal (MathML <neq>)

AST_END_OF_CORE 
AST_FUNCTION_MAX 
AST_FUNCTION_MIN 
AST_FUNCTION_QUOTIENT 
AST_FUNCTION_RATE_OF 
AST_FUNCTION_REM 
AST_LOGICAL_IMPLIES 
AST_CSYMBOL_FUNCTION 
AST_DISTRIB_FUNCTION_NORMAL 
AST_DISTRIB_FUNCTION_UNIFORM 
AST_DISTRIB_FUNCTION_BERNOULLI 
AST_DISTRIB_FUNCTION_BINOMIAL 
AST_DISTRIB_FUNCTION_CAUCHY 
AST_DISTRIB_FUNCTION_CHISQUARE 
AST_DISTRIB_FUNCTION_EXPONENTIAL 
AST_DISTRIB_FUNCTION_GAMMA 
AST_DISTRIB_FUNCTION_LAPLACE 
AST_DISTRIB_FUNCTION_LOGNORMAL 
AST_DISTRIB_FUNCTION_POISSON 
AST_DISTRIB_FUNCTION_RAYLEIGH 
AST_LINEAR_ALGEBRA_VECTOR 
AST_LINEAR_ALGEBRA_SELECTOR 
AST_LINEAR_ALGEBRA_MATRIX 
AST_LINEAR_ALGEBRA_MATRIXROW 
AST_LINEAR_ALGEBRA_DETERMINANT 
AST_LINEAR_ALGEBRA_TRANSPOSE 
AST_LINEAR_ALGEBRA_VECTOR_PRODUCT 
AST_LINEAR_ALGEBRA_SCALAR_PRODUCT 
AST_LINEAR_ALGEBRA_OUTER_PRODUCT 
AST_LOGICAL_EXISTS 
AST_LOGICAL_FORALL 
AST_STATISTICS_MEAN 
AST_STATISTICS_MEDIAN 
AST_STATISTICS_MODE 
AST_STATISTICS_MOMENT 
AST_STATISTICS_SDEV 
AST_STATISTICS_VARIANCE 
AST_STATISTICS_MOMENTABOUT 
AST_SERIES_PRODUCT 
AST_SERIES_SUM 
AST_SERIES_LIMIT 
AST_SERIES_TENDSTO 
AST_ALGEBRA_GCD 
AST_ALGEBRA_CONJUGATE 
AST_ALGEBRA_ARG 
AST_ALGEBRA_REAL 
AST_ALGEBRA_IMAGINARY 
AST_ALGEBRA_LCM 
AST_RELATIONS_EQUIVALENT 
AST_RELATIONS_APPROX 
AST_RELATIONS_FACTOROF 
AST_CALCULUS_INT 
AST_CALCULUS_DIFF 
AST_CALCULUS_PARTIALDIFF 
AST_CALCULUS_LOWLIMIT 
AST_CALCULUS_UPLIMIT 
AST_CALCULUS_DIVERGENCE 
AST_CALCULUS_GRAD 
AST_CALCULUS_CURL 
AST_CALCULUS_LAPLACIAN 
AST_SET_THEORY_SET 
AST_SET_THEORY_LIST 
AST_SET_THEORY_UNION 
AST_SET_THEORY_INTERSECT 
AST_SET_THEORY_IN 
AST_SET_THEORY_NOTIN 
AST_SET_THEORY_SUBSET 
AST_SET_THEORY_PRSUBSET 
AST_SET_THEORY_NOTSUBSET 
AST_SET_THEORY_NOTPRSUBSET 
AST_SET_THEORY_SETDIFF 
AST_SET_THEORY_CARD 
AST_SET_THEORY_CARTESIANPRODUCT 
AST_CONSTANT_IMAGINARYI 
AST_CONSTANTS_INTEGERS 
AST_CONSTANTS_REALS 
AST_CONSTANTS_RATIONALS 
AST_CONSTANTS_NATURALNUMBERS 
AST_CONSTANTS_COMPLEXES 
AST_CONSTANTS_PRIMES 
AST_CONSTANTS_EMPTYSET 
AST_CONSTANTS_EULERGAMMA 
AST_BASIC_CONTENT_INTERVAL 
AST_BASIC_CONTENT_INVERSE 
AST_BASIC_CONTENT_CONDITION 
AST_BASIC_CONTENT_DECLARE 
AST_BASIC_CONTENT_COMPOSE 
AST_BASIC_CONTENT_IDENT 
AST_BASIC_CONTENT_DOMAIN 
AST_BASIC_CONTENT_CODOMAIN 
AST_BASIC_CONTENT_IMAGE 
AST_BASIC_CONTENT_DOMAINOFAPPLICATION 
AST_UNKNOWN 

Unknown node: will not produce any MathML

◆ ExtendedMathType_t

Enumerator
EM_L3V2 

Extended math added in l3v2

EM_DISTRIB 

Extended math added by the 'distrib' package

EM_ARRAYS 

Extended math added by the 'arrays' package

EM_REMAINING 

Extended math not added by any other package

EM_UNKNOWN 

Unknown node: will not produce any MathML