<?xml version="1.0"?>


<!-- We consider in this file polynomial functions over positive integers).


The grammar is the following (initial symbol is F)
0,1 are digit
N generates bit strings
A generates the expressions begining by + (addition)
M generates the expressions begining by * (multiplication)
V generates variables

F -> N | A | M | V
N -> Seq_conc(D)
A -> Seq_add(nonA) 
M -> Seq_mult(nonM)
D -> 0 | 1 
V -> x

-->




<!DOCTYPE specification SYSTEM "seed.dtd">


<specification>
  <start idref="All"/> 

  <union id="All"> <!-- defintion of a Peano expression-->
    <child idref="N"/> <!-- either an integer -->
    <child idref="M"/> <!-- or the product of two expressions-->
    <child idref="A"/><!-- or the addition of two expressions-->
    <child idref="V"/><!-- or the variable x-->
  </union> 

  <constants id="D"> <!-- digits-->
    <symbol value="0"/>
    <symbol value="1"/>
  </constants>

  <constants id="V"> <!-- variable-->
    <symbol value="x"/>
  </constants>

  <sequence id="N"> <!-- defintion  of numbers -->
    <symbol value="int"/>
    <child idref="D"/>
  </sequence>


  <union id="nonM"> <!-- definition of non-mutliplicative expressions -->
    <child idref="D"/>
    <child idref="A"/>
    <child idref="V"/>
  </union>
  
  <union id="nonA"> <!-- definition of non-additive expressions -->
    <child idref="D"/>
    <child idref="V"/>
    <child idref="M"/>
  </union>


  <sequence id="M"> <!-- defintion  of multiplicative expressions -->
    <symbol value="*"/>
    <child idref="nonM"/>
  </sequence>


  <sequence id="A"> <!-- defintion  of additive expressions -->
    <symbol value="+"/>
    <child idref="nonA"/>
  </sequence>


</specification>

