.. Emacs, this is -*-rst-*- .. highlight:: rst Data Formats ============ tulipcon XML ------------ .. highlight:: none The tulipcon XML schema is defined in ``tulipcon.rnc`` using `RELAX NG `_ compact syntax. You may generate a W3C XML Schema definition from this using the tool `trang `_, e.g. :: $ trang -I rnc -O xsd doc/formats/tulipcon.rnc tulipcon.xsd Versions are specified with a natural number (and no minor nor text appended). The root tag indicates the version in use, e.g., a file defined using version 0 would begin like .. code-block:: xml ... Processing for version 0 is quite lax---it allows many tags to be missing or incomplete by using default values. Once the format stabilizes (at version 1 or so), requirements for conformance will be more strict. Version 0 ````````` Pseudo-code describing the specification follows. It is *not normative*. Also, see notes below. .. code-block:: xml rhtlp or synth or none or ... ... ... ...same format as A and B... ... ...optional; if included, then system is regarded as the discretization of a continuous-time system, using the given sampling period. ...... ...same format as U_set... ... ... ...assumption string... ...guarantee string... ALTERNATIVELY (decision of which specification storage container to use is based on what tags are found under ), ... ... ... ......... N.B., this tag can also be empty (if disc dynamics is None). ... ... ...space-separated list... ...space-separated list... ... ... ...space-separated list of indices... ... ... a unique identifier number a string name or description (may be empty, or the tag may be omitted) descendent nodes; space-separated list of node ID numbers ... ... ...verbatim copy of corresponding SMV file... ...verbatim copy of corresponding specification (*.spc) file... Anything below here is arbitrary and ignored by tulip. It is included as a convenience and to facilitate keeping application-specific notes with the synthesis results. Please be careful to *not* include non-printing characters or arbitrary binary data; instead try base64 or similar, or include a reference to an external data file, e.g. HDF5. Notes: * Polytopes are defined in :math:`H`-representation, i.e. system of inequalities, :math:`Hx \leq K`. .. highlight:: none * Matrices are in row-major. E.g., :: A = [[1, 2, 3], [4, 5, 6]] would be saved as .. code-block:: xml 1 2 3 4 5 6 Key Routines ```````````` .. autofunction:: conxml.loadXML .. autofunction:: conxml.dumpXML Continuous Systems in YAML -------------------------- To facilitate experimentation, code reuse, etc., continuous systems may be defined using `YAML `_. .. highlight:: none For example, to generate a proposition and reachability preserving partition from the linear system defined in ``examples/rsimple_example.yaml``, try :: $ tools/autopart.py examples/rsimple_example.yaml -p -v foo.xml (If ``autopart.py`` is not marked as executable, you will need to prepend this with ``python``.) The resulting tulipcon XML file is saved to ``foo.xml``. The flag ``-p`` causes a plot of the (planar) partition to be shown, and the flag ``-v`` means be verbose. Key Routines ```````````` .. autofunction:: conxml.loadYAML