Difference between revisions of "NumML Language Reference"
| Line 9: | Line 9: | ||
''LHS'' <code>@#</code> ''RHS'' | ''LHS'' <code>@#</code> ''RHS'' | ||
</blockquote> | </blockquote> | ||
with slightly different rules for what is allowed on each side of the operator. In discussing NumML syntax we use the following terms: | |||
;Constant | |||
:Either a string constant enclosed in single or double quotes (<code>"SIR Model""</code>, <code>'Infection Stats'</code>) or a number in decimal (<code>3.1415</code>) or scientific notation (<code>3.14159e5</code>). | |||
;Identifier | |||
:Equivalent of a Javascript variable such as <code>Sigma</code>, <code>N</code>, <code>beta</code>, etc. | |||
;Call Expression | |||
:A function name followed by a list of arguments enclosed in parentheses. The function name must be an identifier; the arguments can be either identifiers or constants. | |||
Revision as of 17:34, 4 July 2025
What is NumML?
NumML is a small, domain-specific language (dsl) for coding SD models and configuring the UI of a Numerus WebKit (NWK) site. It is used in URAM models and in the Configuration Window. This document serves as reference for NWK authors and users wishing to use NumML in their designs.
NumML Operators
NumML uses Javascript syntax extended with 2 infix operators (@= and #=) that are not recognized as meaningful to Javascript. NWK uses a Javascript parser extended to accept these operators to analyze NumML code and respectively generate code or change the value of specific configuration parameters. Each NumML statement has the form:
LHS
@=RHS
LHS@#RHS
with slightly different rules for what is allowed on each side of the operator. In discussing NumML syntax we use the following terms:
- Constant
- Either a string constant enclosed in single or double quotes (
"SIR Model"",'Infection Stats') or a number in decimal (3.1415) or scientific notation (3.14159e5). - Identifier
- Equivalent of a Javascript variable such as
Sigma,N,beta, etc. - Call Expression
- A function name followed by a list of arguments enclosed in parentheses. The function name must be an identifier; the arguments can be either identifiers or constants.