src/Pure/Syntax/syn_ext.ML
author wenzelm
Sat May 01 22:10:37 2004 +0200 (2004-05-01)
changeset 14697 5ad13d05049b
parent 14647 3f9d3d5cd0cd
child 14819 4dae1cb304a4
permissions -rw-r--r--
improved indexed syntax / implicit structures;
wenzelm@240
     1
(*  Title:      Pure/Syntax/syn_ext.ML
wenzelm@240
     2
    ID:         $Id$
wenzelm@911
     3
    Author:     Markus Wenzel and Carsten Clasohm, TU Muenchen
wenzelm@12785
     4
    License:    GPL (GNU GENERAL PUBLIC LICENSE)
wenzelm@240
     5
wenzelm@240
     6
Syntax extension (internal interface).
wenzelm@240
     7
*)
wenzelm@240
     8
wenzelm@240
     9
signature SYN_EXT0 =
wenzelm@4050
    10
sig
wenzelm@6760
    11
  val dddot_indexname: indexname
wenzelm@6760
    12
  val constrainC: string
wenzelm@240
    13
  val typeT: typ
wenzelm@5690
    14
  val max_pri: int
wenzelm@4050
    15
end;
wenzelm@240
    16
wenzelm@240
    17
signature SYN_EXT =
wenzelm@4050
    18
sig
wenzelm@240
    19
  include SYN_EXT0
paulson@1510
    20
  val logic: string
paulson@1510
    21
  val args: string
paulson@1510
    22
  val cargs: string
paulson@1510
    23
  val any: string
paulson@1510
    24
  val sprop: string
paulson@1510
    25
  val typ_to_nonterm: typ -> string
paulson@1510
    26
  datatype xsymb =
paulson@1510
    27
    Delim of string |
paulson@1510
    28
    Argument of string * int |
paulson@1510
    29
    Space of string |
paulson@1510
    30
    Bg of int | Brk of int | En
paulson@1510
    31
  datatype xprod = XProd of string * xsymb list * string * int
paulson@1510
    32
  val chain_pri: int
wenzelm@4701
    33
  val delims_of: xprod list -> string list list
paulson@1510
    34
  datatype mfix = Mfix of string * typ * string * int list * int
paulson@1510
    35
  datatype syn_ext =
paulson@1510
    36
    SynExt of {
paulson@1510
    37
      logtypes: string list,
paulson@1510
    38
      xprods: xprod list,
paulson@1510
    39
      consts: string list,
wenzelm@2913
    40
      prmodes: string list,
paulson@1510
    41
      parse_ast_translation: (string * (Ast.ast list -> Ast.ast)) list,
paulson@1510
    42
      parse_rules: (Ast.ast * Ast.ast) list,
paulson@1510
    43
      parse_translation: (string * (term list -> term)) list,
wenzelm@4146
    44
      print_translation: (string * (bool -> typ -> term list -> term)) list,
paulson@1510
    45
      print_rules: (Ast.ast * Ast.ast) list,
wenzelm@2694
    46
      print_ast_translation: (string * (Ast.ast list -> Ast.ast)) list,
wenzelm@6322
    47
      token_translation: (string * string * (string -> string * real)) list}
wenzelm@4054
    48
  val mfix_args: string -> int
wenzelm@12865
    49
  val escape_mfix: string -> string
paulson@1510
    50
  val mk_syn_ext: bool -> string list -> mfix list ->
paulson@1510
    51
    string list -> (string * (Ast.ast list -> Ast.ast)) list *
paulson@1510
    52
    (string * (term list -> term)) list *
wenzelm@4146
    53
    (string * (bool -> typ -> term list -> term)) list * (string * (Ast.ast list -> Ast.ast)) list
wenzelm@6322
    54
    -> (string * string * (string -> string * real)) list
paulson@1510
    55
    -> (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
paulson@1510
    56
  val syn_ext: string list -> mfix list -> string list ->
paulson@1510
    57
    (string * (Ast.ast list -> Ast.ast)) list * (string * (term list -> term)) list *
wenzelm@4146
    58
    (string * (bool -> typ -> term list -> term)) list * (string * (Ast.ast list -> Ast.ast)) list
wenzelm@6322
    59
    -> (string * string * (string -> string * real)) list
paulson@1510
    60
    -> (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
paulson@1510
    61
  val syn_ext_logtypes: string list -> syn_ext
paulson@1510
    62
  val syn_ext_const_names: string list -> string list -> syn_ext
paulson@1510
    63
  val syn_ext_rules: string list -> (Ast.ast * Ast.ast) list * (Ast.ast * Ast.ast) list -> syn_ext
paulson@1510
    64
  val syn_ext_trfuns: string list ->
wenzelm@14647
    65
    (string * (Ast.ast list -> Ast.ast)) list *
wenzelm@14647
    66
    (string * (term list -> term)) list *
wenzelm@14647
    67
    (string * (bool -> typ -> term list -> term)) list *
wenzelm@14647
    68
    (string * (Ast.ast list -> Ast.ast)) list -> syn_ext
wenzelm@2694
    69
  val syn_ext_tokentrfuns: string list
wenzelm@6322
    70
    -> (string * string * (string -> string * real)) list -> syn_ext
paulson@1510
    71
  val pure_ext: syn_ext
wenzelm@4050
    72
end;
wenzelm@240
    73
paulson@1510
    74
structure SynExt : SYN_EXT =
wenzelm@240
    75
struct
wenzelm@240
    76
wenzelm@2694
    77
wenzelm@240
    78
(** misc definitions **)
wenzelm@240
    79
wenzelm@7472
    80
val dddot_indexname = ("dddot", 0);
wenzelm@6760
    81
val constrainC = "_constrain";
wenzelm@6760
    82
wenzelm@6760
    83
wenzelm@240
    84
(* syntactic categories *)
wenzelm@240
    85
wenzelm@240
    86
val logic = "logic";
wenzelm@240
    87
val logicT = Type (logic, []);
wenzelm@240
    88
wenzelm@240
    89
val args = "args";
clasohm@1178
    90
val cargs = "cargs";
wenzelm@240
    91
clasohm@330
    92
val typeT = Type ("type", []);
wenzelm@240
    93
clasohm@764
    94
val sprop = "#prop";
clasohm@764
    95
val spropT = Type (sprop, []);
wenzelm@240
    96
clasohm@764
    97
val any = "any";
clasohm@624
    98
val anyT = Type (any, []);
clasohm@624
    99
wenzelm@780
   100
wenzelm@240
   101
wenzelm@240
   102
(** datatype xprod **)
wenzelm@240
   103
wenzelm@240
   104
(*Delim s: delimiter s
wenzelm@240
   105
  Argument (s, p): nonterminal s requiring priority >= p, or valued token
wenzelm@240
   106
  Space s: some white space for printing
wenzelm@240
   107
  Bg, Brk, En: blocks and breaks for pretty printing*)
wenzelm@240
   108
wenzelm@240
   109
datatype xsymb =
wenzelm@240
   110
  Delim of string |
wenzelm@240
   111
  Argument of string * int |
wenzelm@240
   112
  Space of string |
wenzelm@240
   113
  Bg of int | Brk of int | En;
wenzelm@240
   114
wenzelm@12513
   115
fun is_delim (Delim _) = true
wenzelm@12513
   116
  | is_delim _ = false;
wenzelm@12513
   117
wenzelm@12513
   118
fun is_terminal (Delim _) = true
wenzelm@12513
   119
  | is_terminal (Argument (s, _)) = Lexicon.is_terminal s
wenzelm@12513
   120
  | is_terminal _ = false;
wenzelm@12513
   121
wenzelm@12513
   122
fun is_argument (Argument _) = true
wenzelm@12513
   123
  | is_argument _ = false;
wenzelm@12513
   124
wenzelm@12513
   125
fun is_index (Argument ("index", _)) = true
wenzelm@12513
   126
  | is_index _ = false;
wenzelm@12513
   127
wenzelm@12513
   128
val index = Argument ("index", 1000);
wenzelm@12513
   129
wenzelm@240
   130
wenzelm@240
   131
(*XProd (lhs, syms, c, p):
wenzelm@240
   132
    lhs: name of nonterminal on the lhs of the production
wenzelm@240
   133
    syms: list of symbols on the rhs of the production
wenzelm@240
   134
    c: head of parse tree
wenzelm@240
   135
    p: priority of this production*)
wenzelm@240
   136
wenzelm@240
   137
datatype xprod = XProd of string * xsymb list * string * int;
wenzelm@240
   138
wenzelm@240
   139
val max_pri = 1000;   (*maximum legal priority*)
wenzelm@240
   140
val chain_pri = ~1;   (*dummy for chain productions*)
wenzelm@240
   141
wenzelm@240
   142
wenzelm@240
   143
(* delims_of *)
wenzelm@240
   144
wenzelm@240
   145
fun delims_of xprods =
wenzelm@240
   146
  let
wenzelm@240
   147
    fun del_of (Delim s) = Some s
wenzelm@240
   148
      | del_of _ = None;
wenzelm@240
   149
wenzelm@240
   150
    fun dels_of (XProd (_, xsymbs, _, _)) =
wenzelm@240
   151
      mapfilter del_of xsymbs;
wenzelm@240
   152
  in
wenzelm@4701
   153
    map Symbol.explode (distinct (flat (map dels_of xprods)))
wenzelm@240
   154
  end;
wenzelm@240
   155
wenzelm@240
   156
wenzelm@240
   157
wenzelm@240
   158
(** datatype mfix **)
wenzelm@240
   159
wenzelm@240
   160
(*Mfix (sy, ty, c, ps, p):
wenzelm@240
   161
    sy: rhs of production as symbolic string
wenzelm@240
   162
    ty: type description of production
wenzelm@240
   163
    c: head of parse tree
wenzelm@240
   164
    ps: priorities of arguments in sy
wenzelm@240
   165
    p: priority of production*)
wenzelm@240
   166
wenzelm@240
   167
datatype mfix = Mfix of string * typ * string * int list * int;
wenzelm@240
   168
wenzelm@12513
   169
fun err_in_mfix msg (Mfix (sy, _, const, _, _)) =
wenzelm@12513
   170
  error ((if msg = "" then "" else msg ^ "\n") ^
wenzelm@12513
   171
    "in mixfix annotation " ^ quote sy ^ " for " ^ quote const);
wenzelm@12513
   172
wenzelm@240
   173
wenzelm@240
   174
(* typ_to_nonterm *)
wenzelm@240
   175
clasohm@865
   176
fun typ_to_nt _ (Type (c, _)) = c
clasohm@865
   177
  | typ_to_nt default _ = default;
clasohm@865
   178
clasohm@764
   179
(*get nonterminal for rhs*)
clasohm@865
   180
val typ_to_nonterm = typ_to_nt any;
wenzelm@240
   181
clasohm@764
   182
(*get nonterminal for lhs*)
clasohm@865
   183
val typ_to_nonterm1 = typ_to_nt logic;
wenzelm@240
   184
wenzelm@240
   185
wenzelm@12513
   186
(* read_mixfix *)
wenzelm@4050
   187
wenzelm@4050
   188
local
wenzelm@12513
   189
  fun is_meta c = c mem ["(", ")", "/", "_", "\\<index>"];
wenzelm@4050
   190
wenzelm@4701
   191
  val scan_delim_char =
wenzelm@4701
   192
    $$ "'" |-- Scan.one ((not o Symbol.is_blank) andf Symbol.not_eof) ||
wenzelm@4701
   193
    Scan.one ((not o is_meta) andf (not o Symbol.is_blank) andf Symbol.not_eof);
wenzelm@4050
   194
wenzelm@4050
   195
  val scan_sym =
wenzelm@4050
   196
    $$ "_" >> K (Argument ("", 0)) ||
wenzelm@12513
   197
    $$ "\\<index>" >> K index ||
wenzelm@4701
   198
    $$ "(" |-- Scan.any Symbol.is_digit >> (Bg o #1 o Term.read_int) ||
wenzelm@4050
   199
    $$ ")" >> K En ||
wenzelm@4050
   200
    $$ "/" -- $$ "/" >> K (Brk ~1) ||
wenzelm@4701
   201
    $$ "/" |-- Scan.any Symbol.is_blank >> (Brk o length) ||
wenzelm@4701
   202
    Scan.any1 Symbol.is_blank >> (Space o implode) ||
wenzelm@4701
   203
    Scan.repeat1 scan_delim_char >> (Delim o implode);
wenzelm@4050
   204
wenzelm@4050
   205
  val scan_symb =
wenzelm@4050
   206
    scan_sym >> Some ||
wenzelm@4701
   207
    $$ "'" -- Scan.one Symbol.is_blank >> K None;
wenzelm@4050
   208
wenzelm@4701
   209
  val scan_symbs = Scan.repeat scan_symb --| Scan.ahead (Scan.one (not_equal "'"));
wenzelm@5870
   210
  val read_symbs = mapfilter I o the o Scan.read Symbol.stopper scan_symbs;
wenzelm@12513
   211
wenzelm@12513
   212
  fun unique_index xsymbs =
wenzelm@12513
   213
    if length (filter is_index xsymbs) <= 1 then xsymbs
wenzelm@12513
   214
    else error "Duplicate index arguments (\\<index>)";
wenzelm@4050
   215
in
wenzelm@12513
   216
  val read_mixfix = unique_index o read_symbs o Symbol.explode;
wenzelm@12513
   217
  val mfix_args = length o filter is_argument o read_mixfix;
wenzelm@12865
   218
  val escape_mfix = implode o map (fn s => if is_meta s then "'" ^ s else s) o Symbol.explode;
wenzelm@4050
   219
end;
wenzelm@4050
   220
wenzelm@4050
   221
wenzelm@240
   222
(* mfix_to_xprod *)
wenzelm@240
   223
wenzelm@12513
   224
fun mfix_to_xprod convert logtypes (mfix as Mfix (sy, typ, const, pris, pri)) =
wenzelm@240
   225
  let
wenzelm@240
   226
    fun check_pri p =
wenzelm@240
   227
      if p >= 0 andalso p <= max_pri then ()
wenzelm@12513
   228
      else err_in_mfix ("Precedence out of range: " ^ string_of_int p) mfix;
wenzelm@240
   229
wenzelm@240
   230
    fun blocks_ok [] 0 = true
wenzelm@240
   231
      | blocks_ok [] _ = false
wenzelm@240
   232
      | blocks_ok (Bg _ :: syms) n = blocks_ok syms (n + 1)
wenzelm@240
   233
      | blocks_ok (En :: _) 0 = false
wenzelm@240
   234
      | blocks_ok (En :: syms) n = blocks_ok syms (n - 1)
wenzelm@240
   235
      | blocks_ok (_ :: syms) n = blocks_ok syms n;
wenzelm@240
   236
wenzelm@240
   237
    fun check_blocks syms =
wenzelm@240
   238
      if blocks_ok syms 0 then ()
wenzelm@12513
   239
      else err_in_mfix "Unbalanced block parentheses" mfix;
wenzelm@240
   240
wenzelm@240
   241
wenzelm@240
   242
    val cons_fst = apfst o cons;
wenzelm@240
   243
wenzelm@240
   244
    fun add_args [] ty [] = ([], typ_to_nonterm1 ty)
wenzelm@12513
   245
      | add_args [] _ _ = err_in_mfix "Too many precedences" mfix
wenzelm@12513
   246
      | add_args ((arg as Argument ("index", _)) :: syms) ty ps =
wenzelm@12513
   247
          cons_fst arg (add_args syms ty ps)
wenzelm@240
   248
      | add_args (Argument _ :: syms) (Type ("fun", [ty, tys])) [] =
wenzelm@240
   249
          cons_fst (Argument (typ_to_nonterm ty, 0)) (add_args syms tys [])
wenzelm@240
   250
      | add_args (Argument _ :: syms) (Type ("fun", [ty, tys])) (p :: ps) =
wenzelm@240
   251
          cons_fst (Argument (typ_to_nonterm ty, p)) (add_args syms tys ps)
wenzelm@240
   252
      | add_args (Argument _ :: _) _ _ =
wenzelm@12513
   253
          err_in_mfix "More arguments than in corresponding type" mfix
wenzelm@240
   254
      | add_args (sym :: syms) ty ps = cons_fst sym (add_args syms ty ps);
wenzelm@240
   255
wenzelm@240
   256
    fun rem_pri (Argument (s, _)) = Argument (s, chain_pri)
wenzelm@240
   257
      | rem_pri sym = sym;
wenzelm@240
   258
wenzelm@4054
   259
    fun logify_types copy_prod (a as (Argument (s, p))) =
wenzelm@4054
   260
          if s mem logtypes then Argument (logic, p) else a
wenzelm@4054
   261
      | logify_types _ a = a;
wenzelm@240
   262
wenzelm@2364
   263
wenzelm@12513
   264
    val raw_symbs = read_mixfix sy handle ERROR => err_in_mfix "" mfix;
wenzelm@12513
   265
    val args = filter (fn Argument _ => true | _ => false) raw_symbs;
wenzelm@12513
   266
    val (const', typ', parse_rules) =
wenzelm@12513
   267
      if not (exists is_index args) then (const, typ, [])
wenzelm@12513
   268
      else
wenzelm@12513
   269
        let
wenzelm@14697
   270
          val indexed_const = if const <> "" then "_indexed_" ^ const
wenzelm@12513
   271
            else err_in_mfix "Missing constant name for indexed syntax" mfix;
wenzelm@14697
   272
          val rangeT = Term.range_type typ handle Match =>
wenzelm@12513
   273
            err_in_mfix "Missing structure argument for indexed syntax" mfix;
wenzelm@12513
   274
wenzelm@14697
   275
          val xs = map Ast.Variable (Term.invent_names [] "xa" (length args - 1));
wenzelm@14697
   276
          val (xs1, xs2) = Library.splitAt (Library.find_index is_index args, xs);
wenzelm@12513
   277
          val i = Ast.Variable "i";
wenzelm@14697
   278
          val lhs = Ast.mk_appl (Ast.Constant indexed_const)
wenzelm@14697
   279
            (xs1 @ [Ast.mk_appl (Ast.Constant "_index") [i]] @ xs2);
wenzelm@14697
   280
          val rhs = Ast.mk_appl (Ast.Constant const) (i :: xs);
wenzelm@14697
   281
        in (indexed_const, rangeT, [(lhs, rhs)]) end;
wenzelm@12513
   282
wenzelm@12513
   283
    val (symbs, lhs) = add_args raw_symbs typ' pris;
wenzelm@12513
   284
wenzelm@2364
   285
    val copy_prod =
wenzelm@2364
   286
      lhs mem ["prop", "logic"]
wenzelm@2364
   287
        andalso const <> ""
wenzelm@2364
   288
        andalso not (null symbs)
wenzelm@2364
   289
        andalso not (exists is_delim symbs);
wenzelm@2364
   290
    val lhs' =
wenzelm@2364
   291
      if convert andalso not copy_prod then
wenzelm@2364
   292
       (if lhs mem logtypes then logic
wenzelm@2364
   293
        else if lhs = "prop" then sprop else lhs)
wenzelm@2364
   294
      else lhs;
wenzelm@4054
   295
    val symbs' = map (logify_types copy_prod) symbs;
wenzelm@12513
   296
    val xprod = XProd (lhs', symbs', const', pri);
wenzelm@240
   297
wenzelm@12513
   298
    val _ = (seq check_pri pris; check_pri pri; check_blocks symbs');
wenzelm@12513
   299
    val xprod' =
wenzelm@12513
   300
      if Lexicon.is_terminal lhs' then err_in_mfix ("Illegal lhs: " ^ lhs') mfix
wenzelm@12513
   301
      else if const <> "" then xprod
wenzelm@12513
   302
      else if length (filter is_argument symbs') <> 1 then
wenzelm@12513
   303
        err_in_mfix "Copy production must have exactly one argument" mfix
wenzelm@12513
   304
      else if exists is_terminal symbs' then xprod
wenzelm@12513
   305
      else XProd (lhs', map rem_pri symbs', "", chain_pri);
wenzelm@12513
   306
wenzelm@12513
   307
  in (xprod', parse_rules) end;
wenzelm@12513
   308
wenzelm@240
   309
wenzelm@240
   310
wenzelm@240
   311
(** datatype syn_ext **)
wenzelm@240
   312
wenzelm@240
   313
datatype syn_ext =
wenzelm@240
   314
  SynExt of {
clasohm@764
   315
    logtypes: string list,
wenzelm@240
   316
    xprods: xprod list,
wenzelm@240
   317
    consts: string list,
wenzelm@2913
   318
    prmodes: string list,
paulson@1510
   319
    parse_ast_translation: (string * (Ast.ast list -> Ast.ast)) list,
paulson@1510
   320
    parse_rules: (Ast.ast * Ast.ast) list,
wenzelm@240
   321
    parse_translation: (string * (term list -> term)) list,
wenzelm@4146
   322
    print_translation: (string * (bool -> typ -> term list -> term)) list,
paulson@1510
   323
    print_rules: (Ast.ast * Ast.ast) list,
wenzelm@2694
   324
    print_ast_translation: (string * (Ast.ast list -> Ast.ast)) list,
wenzelm@6322
   325
    token_translation: (string * string * (string -> string * real)) list}
wenzelm@240
   326
wenzelm@240
   327
wenzelm@240
   328
(* syn_ext *)
wenzelm@240
   329
wenzelm@12513
   330
fun mk_syn_ext convert logtypes mfixes consts trfuns tokentrfuns (parse_rules, print_rules) =
wenzelm@240
   331
  let
wenzelm@240
   332
    val (parse_ast_translation, parse_translation, print_translation,
wenzelm@240
   333
      print_ast_translation) = trfuns;
clasohm@764
   334
    val logtypes' = logtypes \ "prop";
wenzelm@240
   335
wenzelm@12513
   336
    val (xprods, parse_rules') = map (mfix_to_xprod convert logtypes') mfixes
wenzelm@12513
   337
      |> split_list |> apsnd (rev o flat);
wenzelm@12513
   338
    val mfix_consts = distinct (map (fn Mfix x => #3 x) mfixes @ map (fn XProd x => #3 x) xprods);
wenzelm@240
   339
  in
wenzelm@240
   340
    SynExt {
clasohm@764
   341
      logtypes = logtypes',
clasohm@624
   342
      xprods = xprods,
wenzelm@11546
   343
      consts = consts union_string mfix_consts,
wenzelm@2913
   344
      prmodes = distinct (map (fn (m, _, _) => m) tokentrfuns),
wenzelm@240
   345
      parse_ast_translation = parse_ast_translation,
wenzelm@12513
   346
      parse_rules = parse_rules' @ parse_rules,
wenzelm@240
   347
      parse_translation = parse_translation,
wenzelm@240
   348
      print_translation = print_translation,
wenzelm@12513
   349
      print_rules = map swap parse_rules' @ print_rules,
wenzelm@2694
   350
      print_ast_translation = print_ast_translation,
wenzelm@2694
   351
      token_translation = tokentrfuns}
wenzelm@240
   352
  end;
wenzelm@240
   353
wenzelm@2382
   354
clasohm@764
   355
val syn_ext = mk_syn_ext true;
wenzelm@240
   356
clasohm@764
   357
fun syn_ext_logtypes logtypes =
wenzelm@2694
   358
  syn_ext logtypes [] [] ([], [], [], []) [] ([], []);
clasohm@764
   359
clasohm@764
   360
fun syn_ext_const_names logtypes cs =
wenzelm@2694
   361
  syn_ext logtypes [] cs ([], [], [], []) [] ([], []);
wenzelm@555
   362
clasohm@764
   363
fun syn_ext_rules logtypes rules =
wenzelm@2694
   364
  syn_ext logtypes [] [] ([], [], [], []) [] rules;
clasohm@764
   365
wenzelm@14647
   366
fun syn_ext_trfuns logtypes trfuns =
wenzelm@14647
   367
  syn_ext logtypes [] [] trfuns [] ([], []);
wenzelm@2694
   368
wenzelm@2694
   369
fun syn_ext_tokentrfuns logtypes tokentrfuns =
wenzelm@2694
   370
  syn_ext logtypes [] [] ([], [], [], []) tokentrfuns ([], []);
wenzelm@2382
   371
wenzelm@240
   372
clasohm@764
   373
(* pure_ext *)
wenzelm@240
   374
clasohm@764
   375
val pure_ext = mk_syn_ext false []
clasohm@764
   376
  [Mfix ("_", spropT --> propT, "", [0], 0),
clasohm@764
   377
   Mfix ("_", logicT --> anyT, "", [0], 0),
clasohm@764
   378
   Mfix ("_", spropT --> anyT, "", [0], 0),
clasohm@764
   379
   Mfix ("'(_')", logicT --> logicT, "", [0], max_pri),
clasohm@764
   380
   Mfix ("'(_')", spropT --> spropT, "", [0], max_pri),
clasohm@764
   381
   Mfix ("_::_",  [logicT, typeT] ---> logicT, "_constrain", [4, 0], 3),
clasohm@764
   382
   Mfix ("_::_",  [spropT, typeT] ---> spropT, "_constrain", [4, 0], 3)]
clasohm@764
   383
  []
clasohm@764
   384
  ([], [], [], [])
wenzelm@2694
   385
  []
clasohm@764
   386
  ([], []);
wenzelm@240
   387
wenzelm@240
   388
end;