libSBML Perl API  libSBML 5.10.0 Perl API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
ASTTypes.h File Reference

Abstract Syntax Tree (AST) class types. More...

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

Enumerations

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_QUALIFIER_BVAR,
  AST_QUALIFIER_LOGBASE,
  AST_QUALIFIER_DEGREE,
  AST_SEMANTICS,
  AST_CONSTRUCTOR_PIECE,
  AST_CONSTRUCTOR_OTHERWISE,
  AST_UNKNOWN,
  AST_ORIGINATES_IN_PACKAGE
}
 ASTNodeType_t is the enumeration of possible ASTNode types. More...
 

Detailed Description

Abstract Syntax Tree (AST) class types.

Author
Sarah Keating

Enumeration Type Documentation

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 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_COT AST_LOGICAL_NOT
AST_CONSTANT_FALSE AST_FUNCTION_COTH AST_LOGICAL_OR
AST_CONSTANT_PI AST_FUNCTION_CSC AST_LOGICAL_XOR
AST_CONSTANT_TRUE AST_FUNCTION_CSCH AST_MINUS
AST_DIVIDE AST_FUNCTION_DELAY AST_NAME
AST_FUNCTION AST_FUNCTION_EXP AST_NAME_AVOGADRO (Level 3 only)
AST_FUNCTION_ABS AST_FUNCTION_FACTORIAL AST_NAME_TIME
AST_FUNCTION_ARCCOS AST_FUNCTION_FLOOR AST_PLUS
AST_FUNCTION_ARCCOSH AST_FUNCTION_LN AST_POWER
AST_FUNCTION_ARCCOT AST_FUNCTION_LOG AST_RATIONAL
AST_FUNCTION_ARCCOTH AST_FUNCTION_PIECEWISE AST_REAL
AST_FUNCTION_ARCCSC AST_FUNCTION_POWER AST_REAL_E
AST_FUNCTION_ARCCSCH AST_FUNCTION_ROOT AST_RELATIONAL_EQ
AST_FUNCTION_ARCSEC AST_FUNCTION_SEC AST_RELATIONAL_GEQ
AST_FUNCTION_ARCSECH AST_FUNCTION_SECH AST_RELATIONAL_GT
AST_FUNCTION_ARCSIN AST_FUNCTION_SIN AST_RELATIONAL_LEQ
AST_FUNCTION_ARCSINH AST_FUNCTION_SINH AST_RELATIONAL_LT
AST_FUNCTION_ARCTAN AST_FUNCTION_TAN AST_RELATIONAL_NEQ
AST_FUNCTION_ARCTANH AST_FUNCTION_TANH AST_TIMES
AST_FUNCTION_CEILING AST_INTEGER AST_UNKNOWN
AST_FUNCTION_COS AST_LAMBDA
AST_FUNCTION_COSH AST_LOGICAL_AND

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.
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_QUALIFIER_BVAR 

Bvar qualifier (MathML <bvar>)

AST_QUALIFIER_LOGBASE 

Logbase qualifier (MathML <logbase>)

AST_QUALIFIER_DEGREE 

Degree qualifier (MathML <degree>)

AST_SEMANTICS 

Semantics (MathML <semantics>)

AST_CONSTRUCTOR_PIECE 

Piece constructor (MathML <piece>)

AST_CONSTRUCTOR_OTHERWISE 

Otherwise constructor (MathML <otherwise>)

AST_UNKNOWN 

Unknown node: will not produce any MathML

AST_ORIGINATES_IN_PACKAGE 

This node uses math that is only available in an L3 package