Hi there!

I have already done that to some extent using notions from First Order Logic. Here is an example:

<Program name="HR-PersonEmployed">
  <Procedure name="HR-PersonEmployed" stereotype="Program">
    <Head>
      <Literal name="HR-PersonEmployed" modelElement="HR.PersonEmployed">
        <Term name="number" type="long" kind="var">V1</Term>
        <Term name="name" type="String" kind="var">V2</Term>
        <Term name="salary" type="double" kind="var">V3</Term>
        <Term name="deptno" type="long" kind="var">V5</Term>
        <Term name="dname" type="String" kind="var">V6</Term>
        <Term name="location" type="String" kind="var">V7</Term>
      </Literal>
    </Head>
    <Body>
      <Literal name="scott-emp-create" stereotype="" modelElement="scott.emp.create">
        <Term name="empno" type="long" constraint="primary-key" kind="var">V1</Term>
        <Term name="ename" type="String" constraint="null" kind="var">V2</Term>
        <Term name="sal" type="double" constraint="null" kind="var">V3</Term>
        <Term name="deptno" type="long" constraint="foreign-key" kind="var">V5</Term>
      </Literal>
      <Literal name="scott-dept" stereotype="instance" modelElement="scott.dept">
        <Term name="deptno" type="long" constraint="primary-key" kind="var">V5</Term>
        <Term name="dname" type="String" constraint="null" kind="var">V6</Term>
        <Term name="loc" type="String" constraint="null" kind="var">V7</Term>
      </Literal>
    </Body>
  </Procedure>
</Program>

In my special case I restricted the language to Horn clauses, which is due to the fact that I use a machine learning approach in order to automatically generate programs like the one above. The programs are stored in a repository and converted to Jess code when initializing the Rete engine.

Some of the attributes exist because I use the UML in order to describe business objects, database schemas etc. This might not be needed in general.

Greetings

Thomas

________________________________

Dipl.-Inform. Thomas Barnekow

Fraunhofer IAO, Competence Center Software Technology
mail: Nobelstra�e 12, D-70569 Stuttgart, Germany
phone: +49 (0) 711 / 970 - 2346
fax: +49 (0) 711 / 970 - 2300
email: [EMAIL PROTECTED]
web: http://www.swt.iao.fhg.de

Reply via email to