Next: A Code Generator Up: Compilation Phases Previous: Compilation Phases

A Classifier with Indexing Heuristics

The result of the MV-Algorithm that enriches the classified clauses by heuristic indexing information is described by the following EBNF:



classified-procedure ::= 
  (proc <name>/<n>                   ; <n> is the arity
        <number-of-clauses>
        <indexing>
        <classified-clause-1>
        ...
        <classified-clause-n> )

indexing ::= (indexing [ <iblock> ] )

iblock ::= <pblock> | <sblock>

pblock ::= (pblock <rblock> { <sblock> | <1block> }+ )

rblock ::= (rblock <clauses> { arg-col }+ )

clauses ::= (clauses { <clause-number> }+ )

arg-col ::= (arg <arg-number> { <base-type> }+ )

base-type ::= <const> | <struct> | <var>

const ::= (const <symbol>)

struct ::= (struct <symbol> <arity>)

var ::= (var <symbol>)

1block ::= (1block <clauses> { arg-col }+ )

sblock ::= (sblock <rblock> <seqind> [ <pblock> ] )

seqind ::= (seqind { <seqind-arg> }+ )

seqind-arg ::= (arg <arg-number>
                    (info <inhomogenity>)
                    <constants>
                    <structures>
                    <lists>
                    <empty-lists>
                    [ <others> ])

constants ::= (const { <element> }* )

structures ::= (struct { <element> }* )

element ::= ( <element-name> <clauses> [ <iblock> ] )

element-name ::= <symbol> | ( <symbol> <arity> )

lists ::= (list <clauses> [ <iblock> ] )

empty-lists ::= (nil <clauses> [ <iblock> ] )

others ::= (other <clauses> [ <iblock> ] )

Explanations:

For further details and an example, refer to appendices B and D.


Michael Sintek - sintek@dfki.uni-kl.de