equal
deleted
inserted
replaced
17 "('n \<times> ('e::times) \<times> 'n) \<times> ('n \<times> 'e \<times> 'n) |
17 "('n \<times> ('e::times) \<times> 'n) \<times> ('n \<times> 'e \<times> 'n) |
18 \<Rightarrow> ('n \<times> 'e \<times> 'n)" |
18 \<Rightarrow> ('n \<times> 'e \<times> 'n)" |
19 where |
19 where |
20 "connect_edges ((n,e,m), (n', e', m')) = (n, e * e', m')" |
20 "connect_edges ((n,e,m), (n', e', m')) = (n, e * e', m')" |
21 |
21 |
22 lemma grcomp_code[code]: |
22 lemma grcomp_code [code]: |
23 "grcomp (Graph G) (Graph H) = Graph (connect_edges ` { x \<in> G\<times>H. edges_match x })" |
23 "grcomp (Graph G) (Graph H) = Graph (connect_edges ` { x \<in> G\<times>H. edges_match x })" |
24 by (rule graph_ext) (auto simp:graph_mult_def has_edge_def image_def) |
24 by (rule graph_ext) (auto simp:graph_mult_def has_edge_def image_def) |
25 |
|
26 |
25 |
27 definition test_SCT :: "acg \<Rightarrow> bool" |
26 definition test_SCT :: "acg \<Rightarrow> bool" |
28 where |
27 where |
29 "test_SCT \<A> = |
28 "test_SCT \<A> = |
30 (let \<T> = mk_tcl \<A> \<A> |
29 (let \<T> = mk_tcl \<A> \<A> |
117 code_modulename SML |
116 code_modulename SML |
118 Graphs SCT |
117 Graphs SCT |
119 Kleene_Algebras SCT |
118 Kleene_Algebras SCT |
120 SCT_Implementation SCT |
119 SCT_Implementation SCT |
121 |
120 |
122 code_gen test_SCT (SML -) |
121 code_gen test_SCT (SML #) |
123 |
122 |
124 end |
123 end |