Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages | Examples

Document Type Definition file

The following code snippet shows the Document Type Definition (DTD) file that describes the XML grammar used to represent the problem topology. The DTD file contains the set of rules that specify which tags can be used and what they can contain. It is used by the program setupcpp to generate the XML file corresponding to your SPARK problem.

<-- package (root element) -->
<!ELEMENT package ( functions, problem ) >
<!ATTLIST package 
            name              CDATA   #REQUIRED
            filename          CDATA   #REQUIRED
            date              CDATA   #REQUIRED
            version           CDATA   #REQUIRED
            cwd               CDATA   #REQUIRED
>


<-- functions -->
<!ELEMENT functions ( function+ ) >
<!ATTLIST functions 
            size              CDATA   #REQUIRED
>


<-- function  -->
<!ELEMENT function EMPTY >
<!ATTLIST function
            name              (#PCDATA)   #REQUIRED
            type              ( ProtoType_MODIFIER     |
                                ProtoType_NON_MODIFIER |
                                ProtoType_STATIC
                              )   #REQUIRED
            library           (#PCDATA)   #REQUIRED
>


<-- problem -->
<!ELEMENT problem ( inverses, variables, components ) >
<!ATTLIST problem 
            name              CDATA   #REQUIRED
>


<-- inverses -->
<!ELEMENT inverses ( inverse+ ) >
<!ATTLIST inverses 
            size              CDATA   #REQUIRED
>


<-- inverse -->
<!ELEMENT inverse ( callbacks ) >
<!ATTLIST inverse
            handle            ID      #REQUIRED
            name              CDATA   #REQUIRED
            classname         CDATA   #REQUIRED
            filename          CDATA   #REQUIRED
            type              ( AtomicType_DEFAULT    | 
                                AtomicType_INTEGRATOR | 
                                AtomicType_SINK
                              )   #REQUIRED
>


<-- callbacks -->
<!ELEMENT callbacks ( callback* ) >
<!ATTLIST callbacks 
            size              CDATA   #REQUIRED
>


<-- callback --> 
<!ELEMENT callback EMPTY >
<!ATTLIST callback 
            type              ( CallbackType_EVALUATE             |
                                CallbackType_PREDICT              |
                                CallbackType_CONSTRUCT            |
                                CallbackType_DESTRUCT             |
                                CallbackType_PREPARE_STEP         |
                                CallbackType_CHECK_STEP           |
                                CallbackType_COMMIT               |
                                CallbackType_ROLLBACK             |
                                CallbackType_STATIC_CONSTRUCT     |
                                CallbackType_STATIC_DESTRUCT      |
                                CallbackType_STATIC_PREPARE_STEP  |
                                CallbackType_STATIC_CHECK_STEP    |
                                CallbackType_STATIC_COMMIT        |
                                CallbackType_STATIC_ROLLBACK    
                              )   #REQUIRED
            function_name     CDATA   #REQUIRED
            return_type       ( ReturnType_VALUE        | 
                                ReturnType_RESIDUAL
                              )   #IMPLIED
>


<-- variables -->
<!ELEMENT variables (variable+) >
<!ATTLIST variables
            size              CDATA   #REQUIRED
            num_past_values   CDATA   #REQUIRED
>


<-- variable -->
<!ELEMENT variable EMPTY >
<!ATTLIST variable
            handle            ID     #REQUIRED
            name              CDATA  #REQUIRED
            unit              CDATA  #REQUIRED
            type              ( VariableType_CLOCK     |
                                VariableType_DT        |
                                VariableType_PARAMETER |
                                VariableType_INPUT     |
                                VariableType_UNKNOWN 
                              )   #REQUIRED
            init              CDATA      #REQUIRED
            min               CDATA      #REQUIRED
            max               CDATA      #REQUIRED
            atol              CDATA      #REQUIRED
            from_link_id      IDREF      #IMPLIED
            url_rd            CDATA      #IMPLIED
            url_wr            CDATA      #IMPLIED
>


<-- components -->
<!ELEMENT components ( component+ ) >
<!ATTLIST components
            size              CDATA   #REQURIED
>


<-- component -->
<!ELEMENT component ( normal_unknowns, break_unknowns, objects ) >
<!ATTLIST component
            handle            ID      #REQUIRED
>


<-- normal_unknowns -->
<!ELEMENT normal_unknowns ( unknown* ) >
<!ATTLIST normal_unknowns
            size              CDATA   #REQURIED
>


<-- break_unknowns -->
<!ELEMENT break_unknowns ( unknown* ) >
<!ATTLIST break_unknowns
            size              CDATA   #REQURIED
>


<-- unknown -->
<!ELEMENT unknown EMPTY >
<!ATTLIST unknown
            var_id       IDREF   #REQUIRED
>


<-- objects -->
<!ELEMENT objects (object+) >
<!ATTLIST objects
            size              CDATA   #REQURIED
>


<-- object -->
<!ELEMENT object ( targets, arglists ) >
<!ATTLIST object
            handle            ID      #REQUIRED
            name              CDATA   #REQUIRED
            inverse_id        IDREF   #REQUIRED
>


<-- targets -->
<!ELEMENT targets ( target* ) >
<!ATTLIST targets
            size              CDATA   #REQUIRED
>


<-- target -->
<!ELEMENT target EMPTY >
<!ATTLIST target
            var_id            IDREF   #REQUIRED
>


<-- arglists -->
<!ELEMENT arglists ( arglist* ) >
<!ATTLIST arglists
            size              CDATA   #REQUIRED
>


<-- arglist -->
<!ELEMENT arglist ( argument* ) >
<!ATTLIST arglist
            size              CDATA   #REQUIRED
            callback_type     ( CallbackType_CONSTRUCT     |
                                CallbackType_DESTRUCT      |
                                CallbackType_EVALUATE      |
                                CallbackType_PREDICT       |
                                CallbackType_PREPARE_STEP  |
                                CallbackType_CHECK_STEP    |
                                CallbackType_COMMIT        |
                                CallbackType_ROLLBACK   
                              )   #REQUIRED
>


<-- argument -->
<!ELEMENT argument EMPTY >
<!ATTLIST argument
            var_id            IDREF   #REQUIRED
>




Generated on 5 Nov 2003 for VisualSPARK 2.01