File formats suported in GeNIe: DSL File Format
From DSL
The DSL format is the only one of those supported by GeNIe and SMILE that allows for saving all model features. We suggest that models developed using GeNIe be saved in the DSL format.
Here is an abbreviated BNF specification of DSL file format:
<file> ::= <net>
<net> ::= net <id> { [<netstatement>;]* };
<netstatement> ::= <netfield> | <node>
<netfield> ::= HEADER = { [<headerstatement>;]* } |
CREATION = { [<creationstatement>;]* } | NUMSAMPLES = <integer>
<node> ::= node <id> { [<nodestatement>;]* }
<nodestatement> ::= <nodefield>
<nodefield> ::= TYPE = <id> |
HEADER = { [<headerstatement>;]* } |
PARENTS = <identifierlist> |
DEFINITION = { [<definitionstatement>;]* }
<headerstatement> ::= ID = <id> |
NAME = <string> |
COMMENT = <string>
<creationstatement> ::= CREATOR = <string> |
CREATED = <string> |
MODIFIED = <string>
<definitionstatement> ::= NAMESTATES = <identifierlist> |
PROBABILITIES = <doublelist> |
NAMECHOICES = <identifierlist> |
RESULTINGSTATES = <identifierlist> |
UTILITIES = <doublelist> |
WEIGHTS = <doublelist>
<identifierlist> ::= ( [<id>] [,<id>]* )
<doublelist> ::= ( [<real>] [,<real>]* )
<integerlist> ::= ( [<integer>] [,<integer>]* )
<boolean> ::= TRUE |
FALSE
Identifiers (<id>), strings (<string>), numbers (<real> and <integer>), and comments follow the syntax of C++. Identifiers, in particular, have to start with a letter followed by any sequence of letters, numbers, and the underscore character (_). Control characters inside strings are preceded by the backslash character (\). Comments are of three types: (1) two characters // start a comment, which terminates at the and of the line on which they occur, (2) the characters /* start a non-nesting comment terminated with the characters */, and (3) the characters /# start a nesting comment terminated with the characters #/.
The content of matrices is written as a flat list of doubles (<doublelist>), listed in the order of columns, i.e., the fastest changing index is that of the current variable, then the last parent, then the one before last, etc. The first parent supplies the slowest changing index.
