next up previous contents
Next: 5 The code generator Up: 4 The classifier Previous: 4.6 An example with

4.7 EBNF syntax for Classified clauses

 

 
classified_database     		 ::= 		 (db {classified_procedure}*)

classified_procedure ::= (proc procedure_name clause_count

indexing {clause_classification} tex2html_wrap_inline2789 )

indexing ::= (indexing [iblock])

iblock ::= pblock tex2html_wrap_inline2907 sblock

pblock ::= (pblock rblock {sblock tex2html_wrap_inline2907 1block} tex2html_wrap_inline2789 )

rblock ::= (rblock clauses {arg-col} tex2html_wrap_inline2789 )

clauses ::= (clauses {clause-number} tex2html_wrap_inline2789 )

arg-col ::= (arg arg-number {base-type} tex2html_wrap_inline2789 )

base-type ::= const tex2html_wrap_inline2907 struct tex2html_wrap_inline2907 var

const ::= (const symbol)

struct ::= (struct symbol arity)

var ::= (var symbol)

1block ::= (1block clauses {arg-col} tex2html_wrap_inline2789 )

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

seqind ::= (seqind {seqind-arg} tex2html_wrap_inline2789 )

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 tex2html_wrap_inline2907 (symbol arity)

lists ::= (list clauses [iblock])

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

others ::= (other clauses [iblock])

clause_classification ::= (clause_type cut_info perm_var_list temp_var_list chunk_sequence)

chunk_sequence ::= head_chunk_fact tex2html_wrap_inline2907 head_chunk_rule body_chunk_list

cut_info ::= (cut-info cut_type)

head_chunk_fact ::= (chunk (head_literal {chunk_guard}*) chunk_descr)

head_chunk_rule ::= (chunk (head_literal {chunk_guard}* first_premise_literal)

chunk_descr)

body_chunk_list ::= {body_chunk}* [(({chunk_guard}*) chunk_descr)]

body_chunk ::= (chunk ({chunk_guard}* call_literal) chunk_descr)

chunk_descr ::= (lu_reg ({(variable permvar_uselit_list)}*))

head_literal ::= literal_classification

first_premise_literal ::= call_literal

call_literal ::= literal_classification tex2html_wrap_inline2907 lispcall_classification

chunk_guard ::= builtin tex2html_wrap_inline2907 passive_term

passive_term ::= term_classification

permvar_uselit_list ::= ({arg_nr} tex2html_wrap_inline2789 )

literal_classification ::= (usrlit (functor arglist_classification) literal_descr)

lispcall_classification ::= (lispcall_type (lisp-builtin arglist_classification)

lispcall_descr)

builtin ::= unknown tex2html_wrap_inline2907 is_primitive tex2html_wrap_inline2907 (refl-Xreg lhs_term)

arglist_classification ::= {term_classification}*

term_classification ::= constant_classification tex2html_wrap_inline2907 variable_classification

tex2html_wrap_inline2907 structure_classification

is_primitive ::= (is lhs_term rhs_term)

lhs_term ::= constant_classification tex2html_wrap_inline2907 variable_classification

rhs_term ::= term_classification

constant_classification ::= constant_name

variable_classification ::= (variable local_var_descr)

structure_classification ::= `(functor arglist_classification)

tex2html_wrap_inline2907 (inst (functor arglist_classification))

perm_var_list ::= (perm {global_perm_var_descr}*)

temp_var_list ::= (temp {global_temp_var_descr}*)

literal_descr ::= (arity env_size arg_seq)

lispcall_descr ::= (arity env_size arg_seq)

global_perm_var_descr ::= (variable perm_descr)

global_temp_var_descr ::= (variable temp_descr)

perm_descr ::= (Y-reg_nr use_head (last_chunk last_chunkliteral))

temp_descr ::= (X-reg_nr use_head use_premise)

local_var_descr ::= (occurrence saveness var_class)

clause_type ::= rel0 tex2html_wrap_inline2907 fun1den tex2html_wrap_inline2907 fun1eva tex2html_wrap_inline2907 fun*den tex2html_wrap_inline2907 fun*eva

lispcall_type ::= cl-func tex2html_wrap_inline2907 cl-pred tex2html_wrap_inline2907 cl-extra

Y-reg_nr ::= reg_nr

X-reg_nr ::= reg_nr

last_chunk ::= chunk_nr

last_chunkliteral ::= lit_nr

use_head ::= ({reg_nr}*)

use_premise ::= ({reg_nr}*)

arg_seq ::= ({arg_nr}*)

lu_reg ::= reg_nr

occurrence ::= first tex2html_wrap_inline2907 nonfirst tex2html_wrap_inline2907 reuse

saveness ::= global tex2html_wrap_inline2907 safe tex2html_wrap_inline2907 unsafe

var_class ::= perm tex2html_wrap_inline2907 temp

variable ::= _name tex2html_wrap_inline2907 (vari name)

procedure_name ::= name/arity

functor ::= name

lisp-builtin ::= lisp-fcts tex2html_wrap_inline2907 lisp-preds tex2html_wrap_inline2907 lisp-extras

lisp-fcts ::= ;;;;; RELFUN supported LISP functions

lisp-preds ::= ;;;;; RELFUN supported LISP predicates

lisp-extras ::= ;;;;; RELFUN supported LISP functions with side effects

constant_name ::= name

clause_count ::= cardinal

arg_nr ::= cardinal

reg_nr ::= cardinal

chunk_nr ::= cardinal

lit_nr ::= cardinal0

env_size ::= cardinal0

arity ::= cardinal0

name ::= letter {letter tex2html_wrap_inline2907 digit0}*

cardinal ::= digit {digit0}*

cardinal0 ::= 0 tex2html_wrap_inline2907 cardinal

letter ::= a tex2html_wrap_inline2907 b tex2html_wrap_inline2907 ... tex2html_wrap_inline2907 z

digit ::= 1 tex2html_wrap_inline2907 2 tex2html_wrap_inline2907 ... tex2html_wrap_inline2907 9

digit0 ::= 0 tex2html_wrap_inline2907 digit


next up previous contents
Next: 5 The code generator Up: 4 The classifier Previous: 4.6 An example with

Harold Boley (boley@informatik.uni-kl.de)