JSim XMML (Extensible MML)

Introduction

XMML is an XML representation of a compiled JSim MML model. It is designed to enable JSim to communicate will language translators and Bioinformatics tools. The XMML is nearing completion and a full release is expected with JSim 2.01. Until then, the following rough outline may be helpful to XMML tool writers.

Contents:

  • XMML specification - version 2.00 (current)
  • XMML specification - version 2.01 (under development)
  • Comments or Questions?
    Give feedback

XMML Specification - version 2.00

This XMML specification applies to output from JSim version 2.00 only.

== XMML version 2 spec (11:35 AM, 31 Jan 2011)

Note: 
 1) all tags ending in 'List' are possibly empty lists of base tag
 2) ? follows optional elements

// entire XMML file
xmml ::= model toolList sequence;

// pre-compiled model
model ::= unitList variableList equationList relationList 
	eventList procedureCallList;

// unit definition (in unitList)
unit ::= fundamentalUnit | derivedUnit;

// fundamental unit
fundamentalUnit ::= id=String;

// derived unit
derivedUnit ::= id=String realFactor unitFactorList;

// realFactor
realFactor ::= multiplier=Double;

// unitFactor
unitFactor ::= exponent=Double unitID=String;

// model variable (in variableList)
variable ::= dataType=(real|int) id=String isDomain=Boolean 
	isExtern=Boolean isPrivate=Boolean isState=Boolean 
	domainList? propertyValueList?;

// domain in domainList
domain ::= domainID=String;

// property value (value in Element text)
propertyValue ::= dataType=string name=String value;

// model equation (in equationList)
equation ::= id=String expression;

// model relation (in relationList)
relation ::= id=String expression;

// model event (in eventList)
event ::= id=String timeDomainID=String trigger actionList;

// event trigger
trigger ::= type=(absolute|relative) expression;

// event action (in actionList)
action ::= variableID=String expression;

// procedure call (in procedureCallList)
procedureCall ::= procedureID=String procedureCallArgumentList

// 1 argument to procedure call (in procedureCallArgumentList)
procedureCallArgument ::= loopDomains expression;

// loop domains (not yet implemented)
loopDomains ::= ;

// model tool = calculation derived from equations (in toolList)
tool ::= domainTool | exprTool | externTool | implicitTool | 
	ODETool | PDETool | procedureTool | queryTool | stateTool;

// domain tool
domainTool ::= toolCommon;

// v=expr tool
exprTool ::= toolCommon expression;

// extern variable
externTool ::= toolCommon;

// implcit eqn(s)
implicitTool ::= toolCommon zeroExpressionList boundsList linearMatrix?;

// zeroExpression (in zeroExpressionList)
zeroExpression ::= expression;

// implicit bound (in boundsList, not yet implemented)
bound ::= ;

// linear matrix (not yet implemented)
linearMatrix ::= ;

// ODE tool
ODETool ::= toolCommon timeDomainID=String timeOrder=int 
	initialConditionList stateEquation

// ODE tool
ODETool ::= toolCommon timeDomainID=String timeOrder=int 
	initialConditionList boundaryConditionList stateEquation

// initial condition (in ODETool, PDETool initialConditionList)
initialCondition ::= toolID=String;  

// boundary condition (in PDETool boundaryConditionList)
boundaryCondition ::= domainID=String side=(left|right) 
	(toolID=String | equationID=String);  

// procedureCall tool (not yet implemented)
procedureTool ::= toolCommon;

// query tool (internal use only e.g. v(t.max))
queryTool ::= toolCommon;

// state variable tool
stateTool ::= toolCommon;

// common items for all Tools
toolCommon ::= id=String solvedVariables requiredVariables sequenceLoops;

// solved or required variable (in solvedVariables or requiredVariables)
variableUsage ::= id=String status variableID=String;

// variable usage status (CURR=entire, MIN=LHBC, others are queries)
status ::= status=(CURR|MIN|MAX|DELAY|QUERY|EXPR|XEXPR);

// sequenced calculations (not yet implemented)
sequence ::=  ;

// mathematical expression
expression ::= debug math;

// user-readable expression (value is Element text)
debug ::= value

// mathML expression
math ::=  see MathML spec


XMML Specification - version 2.01

This XMML specification applies to output from JSim version 2.01 and above.

Automatically generated schema documents (via trang):

Manually generated outline:

== XMML version 2.01 spec (24 Feb 2011)

Note: 
 1) all tags ending in 'List' are possibly empty lists of base tag
 2) ? follows optional elements

// entire XMML file
xmml ::= jsimVersion=String xmmlVersion=String model toolList sequence;

// pre-compiled model
model ::= unitList variableList equationList relationList 
	eventList procedureCallList;

// unit definition (in unitList)
unit ::= fundamentalUnit | derivedUnit;

// fundamental unit
fundamentalUnit ::= id=String unitType=String;

// derived unit
derivedUnit ::= id=String unitType=String realFactor unitFactorList;

// realFactor
realFactor ::= multiplier=Double;

// unitFactor
unitFactor ::= exponent=Double unitID=String;

// model variable (in variableList)
variable ::= dataType=(real|int) id=String isDomain=Boolean 
	isExtern=Boolean isPrivate=Boolean isState=Boolean 
	domainList? propertyValueList?;

// domain in domainList
domain ::= domainID=String;

// property value (value in Element text)
propertyValue ::= dataType=string name=String value;

// model equation (in equationList)
equation ::= id=String expression;

// model relation (in relationList)
relation ::= id=String expression;

// model event (in eventList)
event ::= id=String timeDomainID=String trigger actionList;

// event trigger
trigger ::= type=(absolute|relative) expression;

// event action (in actionList)
action ::= variableID=String expression;

// procedure call (in procedureCallList)
procedureCall ::= procedureID=String procedureCallArgumentList

// 1 argument to procedure call (in procedureCallArgumentList)
procedureCallArgument ::= loopDomainList expression;

// proc argument loops in (loopDomainList)
loopDomain ::= domainID=String

// model tool = calculation derived from equations (in toolList)
tool ::= domainTool | exprTool | externTool | implicitTool | 
	ODETool | PDETool | procedureTool | queryTool | stateTool;

// domain tool
domainTool ::= toolCommon;

// v=expr tool
exprTool ::= toolCommon expression;

// extern variable
externTool ::= toolCommon;

// implcit eqn(s)
implicitTool ::= toolCommon zeroExpressionList boundList linearFactorList?;

// zeroExpression (in zeroExpressionList)
zeroExpression ::= expression;

// implicit bound (in boundList)
bound ::= type=MIN|MAX|APPROX variableUsage expr;

// linear implicit factor (in linearFactorList)
linearFactor ::= row=Integer column=Integer expr;

// ODE tool
ODETool ::= toolCommon timeDomainID=String timeOrder=int 
	initialConditionList stateEquation

// PDE tool
PDETool ::= toolCommon timeDomainID=String
	initialConditionList boundaryConditionList stateEquation

// initial condition (in ODETool, PDETool initialConditionList)
initialCondition ::= toolID=String;  

// boundary condition (in PDETool boundaryConditionList)
boundaryCondition ::= domainID=String side=(left|right) 
	(toolID=String | equationID=String);  

// procedureCall tool (not yet implemented)
procedureTool ::= toolCommon;

// query tool (internal use only e.g. v(t.max))
queryTool ::= toolCommon;

// state variable tool
stateTool ::= toolCommon;

// common items for all Tools
toolCommon ::= id=String solvedVariableList requiredVariableList sequenceLoops;

// variable in solvedVariableList or requiredVariableList
variableUsage ::= id=String status=CURR|MIN|MAX|QUERY variableID=String 
           domainUsage*;

// domain usage in variableUsage
domainUsage ::= domainID=String domainStatus*

// domain query status
domainStatus ::= domainStatus=(CURR|MIN|MAX|DELAY|EXPR|XEXPR);

// sequenced calculations (not yet implemented)
sequence ::=  main;

// sequence mainline
main ::= itemList;

// itemList
itemList ::= ordered list of item, loopBlock, ODEBlock, PDEBlock elements;

// calculation item (tool, relation, event)
item ::= itemID=String;

// loop block
loopBlock ::= loopDomainID=String itemList;

// ODE block
ODEBlock ::= timeDomainID=String stateToolList microSequence;

// PDE block
PDEBlock ::= timeDomainID=String spatialDomainList stateToolList 
         microSequence PDEBlockBoundaryList;

// ODE/PDE state tool (in stateToolList)
stateTool ::= toolID=String;

// PDE spatialDomain (in spatialDomainList)
spatialDomain ::= domainID=String;

// PDE boundary block (in PDEBlockBoundaryList)
PDEBlockBoundary ::= domainID=String side=left|right microSequence;

// micro sequence (ordered calculation within ODE, PDE or BC block
microSequence ::= itemList;

// mathematical expression
expression ::= debug math;

// user-readable expression (text is Element text)
debug ::= text

// mathML expression
math ::=  see MathML spec

Comments or Questions?

Give feedback

 

Model development and archiving support at https://www.imagwiki.nibib.nih.gov/physiome provided by the following grants: NIH U01HL122199 Analyzing the Cardiac Power Grid, 09/15/2015 - 05/31/2020, NIH/NIBIB BE08407 Software Integration, JSim and SBW 6/1/09-5/31/13; NIH/NHLBI T15 HL88516-01 Modeling for Heart, Lung and Blood: From Cell to Organ, 4/1/07-3/31/11; NSF BES-0506477 Adaptive Multi-Scale Model Simulation, 8/15/05-7/31/08; NIH/NHLBI R01 HL073598 Core 3: 3D Imaging and Computer Modeling of the Respiratory Tract, 9/1/04-8/31/09; as well as prior support from NIH/NCRR P41 RR01243 Simulation Resource in Circulatory Mass Transport and Exchange, 12/1/1980-11/30/01 and NIH/NIBIB R01 EB001973 JSim: A Simulation Analysis Platform, 3/1/02-2/28/07.