|
26 | 26 | ** |
27 | 27 | ** RCS: $Id$ |
28 | 28 | ** |
29 | | - ** When instantiating an expression, there is a prefix that has to be |
30 | | - ** added to each variable name to be able to use it in the flattened |
31 | | - ** equation set. These relations take care of adding the prefixes. |
| 29 | + ** When instantiating an expression, there is a prefix that *sometimes* |
| 30 | + ** has to be added to each variable name to be able to use it in the |
| 31 | + ** flattened equation set. |
| 32 | + ** |
| 33 | + ** A prefix for a variable x could be for example a.b.c so that the |
| 34 | + ** fully qualified name is a.b.c.x. |
| 35 | + ** |
| 36 | + ** Some components should not have prefixes added, for example constants. |
| 37 | + ** |
32 | 38 | **) |
33 | 39 |
|
34 | 40 | module Prefix: |
@@ -77,8 +83,7 @@ relation print_prefix_str : Prefix => string = |
77 | 83 |
|
78 | 84 | rule print_prefix_str rest => rest' & |
79 | 85 | string_append (rest', ".") => s & |
80 | | - string_append (s, str) => s' & |
81 | | - string_append (s', "[]") => s'' |
| 86 | + string_append (s, str) => s' string_append (s', "[]") => s'' |
82 | 87 | ---------------------------- |
83 | 88 | print_prefix_str PRE(str, _, rest) => s'' |
84 | 89 |
|
@@ -268,15 +273,12 @@ relation prefix_exp : (Env.Env,Exp.Exp,Prefix) => Exp.Exp = |
268 | 273 | ----------------------- |
269 | 274 | prefix_exp(env,Exp.CALL(f,es,b,bi),p) => Exp.CALL(f,es',b,bi) |
270 | 275 |
|
271 | | - (**) |
272 | 276 | axiom prefix_exp(env,Exp.ARRAY(t,a,[]),p) => Exp.ARRAY(t,a,[]) |
273 | 277 |
|
274 | 278 | rule prefix_exp_list(env,es,p) => es' |
275 | 279 | ------------------------------- |
276 | 280 | prefix_exp(env,Exp.ARRAY(t,a,es),p) => Exp.ARRAY(t,a,es') |
277 | 281 |
|
278 | | - |
279 | | -(* PR. *) |
280 | 282 | rule prefix_exp_list(env,es,p) => es' |
281 | 283 | ------------------------------- |
282 | 284 | prefix_exp(env,Exp.TUPLE(es),p) => Exp.TUPLE(es') |
|
0 commit comments