src/HOL/ex/Codegenerator.thy
author haftmann
Wed, 22 Nov 2006 10:20:20 +0100
changeset 21460 cda5cd8bfd16
parent 21420 8b15e5e66813
child 21511 16c62deb1adf
permissions -rw-r--r--
example tuned
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     1
(*  ID:         $Id$
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     2
    Author:     Florian Haftmann, TU Muenchen
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     3
*)
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     4
20187
af47971ea304 small adjustments
haftmann
parents: 19888
diff changeset
     5
header {* Test and Examples for code generator *}
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     6
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     7
theory Codegenerator
21155
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
     8
imports Main Records
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
     9
begin
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    10
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    11
subsection {* booleans *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    12
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    13
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    14
  xor :: "bool \<Rightarrow> bool \<Rightarrow> bool" where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    15
  "xor p q = ((p | q) & \<not> (p & q))"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    16
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    17
subsection {* natural numbers *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    18
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    19
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    20
  n :: nat where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    21
  "n = 42"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    22
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    23
subsection {* pairs *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    24
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    25
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    26
  swap :: "'a * 'b \<Rightarrow> 'b * 'a" where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    27
  "swap p = (let (x, y) = p in (y, x))"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    28
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    29
definition
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    30
  appl :: "('a \<Rightarrow> 'b) * 'a \<Rightarrow> 'b" where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    31
  "appl p = (let (f, x) = p in f x)"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    32
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    33
definition
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    34
  snd_three :: "'a * 'b * 'c => 'b" where
21092
2e0a59d829d5 added example with split
haftmann
parents: 21080
diff changeset
    35
  "snd_three a = id (\<lambda>(a, b, c). b) a"
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    36
20936
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    37
lemma [code]:
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    38
  "swap (x, y) = (y, x)"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    39
  unfolding swap_def Let_def by auto
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    40
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    41
lemma [code]:
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    42
  "appl (f, x) = f x"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    43
  unfolding appl_def Let_def by auto
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
    44
20187
af47971ea304 small adjustments
haftmann
parents: 19888
diff changeset
    45
subsection {* integers *}
af47971ea304 small adjustments
haftmann
parents: 19888
diff changeset
    46
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    47
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    48
  k :: "int" where
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
    49
  "k = -42"
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    50
20968
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    51
function
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    52
  fac :: "int => int" where
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    53
  "fac j = (if j <= 0 then 1 else j * (fac (j - 1)))"
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    54
  by pat_completeness auto
21319
cf814e36f788 replaced "auto_term" by the simpler method "relation", which does not try
krauss
parents: 21191
diff changeset
    55
termination by (relation "measure nat") auto
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    56
20968
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    57
declare fac.simps [code]
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    58
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    59
subsection {* sums *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    60
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    61
subsection {* options *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    62
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    63
subsection {* lists *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    64
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    65
definition
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    66
  ps :: "nat list" where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    67
  "ps = [2, 3, 5, 7, 11]"
21404
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    68
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    69
definition
eb85850d3eb7 more robust syntax for definition/abbreviation/notation;
wenzelm
parents: 21319
diff changeset
    70
  qs :: "nat list" where
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    71
  "qs == rev ps"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    72
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    73
subsection {* mutual datatypes *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    74
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    75
datatype mut1 = Tip | Top mut2
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    76
  and mut2 = Tip | Top mut1
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    77
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    78
consts
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    79
  mut1 :: "mut1 \<Rightarrow> mut1"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    80
  mut2 :: "mut2 \<Rightarrow> mut2"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    81
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    82
primrec
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    83
  "mut1 mut1.Tip = mut1.Tip"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    84
  "mut1 (mut1.Top x) = mut1.Top (mut2 x)"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    85
  "mut2 mut2.Tip = mut2.Tip"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    86
  "mut2 (mut2.Top x) = mut2.Top (mut1 x)"
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    87
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
    88
subsection {* records *}
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    89
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    90
subsection {* equalities *}
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
    91
20702
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
    92
subsection {* strings *}
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
    93
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
    94
definition
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
    95
  "mystring = ''my home is my castle''"
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
    96
20968
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    97
subsection {* nested lets and such *}
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    98
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
    99
definition
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   100
  "abs_let x = (let (y, z) = x in (\<lambda>u. case u of () \<Rightarrow> (y + y)))"
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   101
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   102
definition
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   103
  "nested_let x = (let (y, z) = x in let w = y z in w * w)"
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   104
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   105
definition
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   106
  "case_let x = (let (y, z) = x in case y of () => z)"
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   107
21155
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
   108
definition
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
   109
  "base_case f = f list_case"
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
   110
20702
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   111
definition
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   112
  "apply_tower = (\<lambda>x. x (\<lambda>x. x (\<lambda>x. x)))"
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   113
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   114
definition
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   115
  "keywords fun datatype class instance funa classa =
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   116
    Suc fun + datatype * class mod instance - funa - classa"
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   117
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   118
hide (open) const keywords
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   119
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   120
definition
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   121
  "shadow keywords = keywords @ [Codegenerator.keywords 0 0 0 0 0 0]"
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   122
20713
823967ef47f1 renamed 0 and 1 to HOL.zero and HOL.one respectivly; introduced corresponding syntactic classes
haftmann
parents: 20702
diff changeset
   123
code_gen
823967ef47f1 renamed 0 and 1 to HOL.zero and HOL.one respectivly; introduced corresponding syntactic classes
haftmann
parents: 20702
diff changeset
   124
  xor
823967ef47f1 renamed 0 and 1 to HOL.zero and HOL.one respectivly; introduced corresponding syntactic classes
haftmann
parents: 20702
diff changeset
   125
code_gen
823967ef47f1 renamed 0 and 1 to HOL.zero and HOL.one respectivly; introduced corresponding syntactic classes
haftmann
parents: 20702
diff changeset
   126
  "0::nat" "1::nat"
20702
8b79d853eabb added examples for variable name handling
haftmann
parents: 20597
diff changeset
   127
code_gen
21092
2e0a59d829d5 added example with split
haftmann
parents: 21080
diff changeset
   128
  Pair fst snd Let split swap snd_three
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   129
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   130
  "op + :: nat \<Rightarrow> nat \<Rightarrow> nat"
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   131
  "op - :: nat \<Rightarrow> nat \<Rightarrow> nat"
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   132
  "op * :: nat \<Rightarrow> nat \<Rightarrow> nat"
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   133
  "op < :: nat \<Rightarrow> nat \<Rightarrow> bool"
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   134
  "op <= :: nat \<Rightarrow> nat \<Rightarrow> bool"
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   135
code_gen
20597
65fe827aa595 code generation 2 adjustments
haftmann
parents: 20453
diff changeset
   136
  appl
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   137
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   138
  Inl Inr
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   139
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   140
  None Some
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   141
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   142
  hd tl "op @" ps qs
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   143
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   144
  mut1 mut2
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   145
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   146
  remove1
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   147
  null
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   148
  replicate
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   149
  rotate1
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   150
  rotate
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   151
  splice
20597
65fe827aa595 code generation 2 adjustments
haftmann
parents: 20453
diff changeset
   152
code_gen
65fe827aa595 code generation 2 adjustments
haftmann
parents: 20453
diff changeset
   153
  remdups
65fe827aa595 code generation 2 adjustments
haftmann
parents: 20453
diff changeset
   154
  "distinct"
21155
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
   155
  filter
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   156
code_gen
20351
c7658e811ffb added more examples
haftmann
parents: 20187
diff changeset
   157
  foo1 foo3
20453
855f07fabd76 final syntax for some Isar code generator keywords
haftmann
parents: 20383
diff changeset
   158
code_gen
20936
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   159
  mystring
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   160
code_gen
21155
95142d816793 added particular test for partially applied case constants
haftmann
parents: 21125
diff changeset
   161
  apply_tower Codegenerator.keywords shadow base_case
20968
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   162
code_gen
5294baa98468 added examples for nested let
haftmann
parents: 20952
diff changeset
   163
  abs_let nested_let case_let
20936
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   164
code_gen "0::int" "1::int"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   165
  (SML) (Haskell)
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   166
code_gen n
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   167
  (SML) (Haskell)
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   168
code_gen fac
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   169
  (SML) (Haskell)
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   170
code_gen
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   171
  k
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   172
  "op + :: int \<Rightarrow> int \<Rightarrow> int"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   173
  "op - :: int \<Rightarrow> int \<Rightarrow> int"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   174
  "op * :: int \<Rightarrow> int \<Rightarrow> int"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   175
  "op < :: int \<Rightarrow> int \<Rightarrow> bool"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   176
  "op <= :: int \<Rightarrow> int \<Rightarrow> bool"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   177
  fac
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   178
  "op div :: int \<Rightarrow> int \<Rightarrow> int"
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   179
  "op mod :: int \<Rightarrow> int \<Rightarrow> int"  
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   180
  (SML) (Haskell)
dc5dc0e55938 changed order
haftmann
parents: 20807
diff changeset
   181
code_gen
21460
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   182
  "op = :: bool \<Rightarrow> bool \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   183
  "op = :: nat \<Rightarrow> nat \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   184
  "op = :: int \<Rightarrow> int \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   185
  "op = :: ('a\<Colon>eq) * ('b\<Colon>eq) \<Rightarrow> 'a * 'b \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   186
  "op = :: ('a\<Colon>eq) + ('b\<Colon>eq) \<Rightarrow> 'a + 'b \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   187
  "op = :: ('a\<Colon>eq) option \<Rightarrow> 'a option \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   188
  "op = :: ('a\<Colon>eq) list \<Rightarrow> 'a list \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   189
  "op = :: mut1 \<Rightarrow> mut1 \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   190
  "op = :: mut2 \<Rightarrow> mut2 \<Rightarrow> bool"
cda5cd8bfd16 example tuned
haftmann
parents: 21420
diff changeset
   191
  "op = :: ('a\<Colon>eq) point_scheme \<Rightarrow> 'a point_scheme \<Rightarrow> bool"
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
   192
21420
8b15e5e66813 cleanup
haftmann
parents: 21404
diff changeset
   193
code_gen (SML *) (Haskell -)
19281
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
   194
b411f25fff25 added example for operational classes and code generator
haftmann
parents:
diff changeset
   195
end