Package eu.bandm.tools.umod
Class UMod2visitors.V_makeRewriterCoRewriter
java.lang.Object
eu.bandm.tools.umod.UMod.Visitor
eu.bandm.tools.umod.UMod2visitors.Lr_decoder
eu.bandm.tools.umod.UMod2visitors.V_makeRewriterCoRewriter
- Enclosing class:
- UMod2visitors
Is created and called for toplevel classes, and then
created anew for all sub-classes!
-
Field Summary
Modifier and TypeFieldDescription(package private) final Format
protected UMod.FieldDef
protected GeneratedMethod
protected boolean
protected int
protected Format
protected int
The cursor variables in "for (i0:...)" are built with an ever increasing number, instead of shadowing previous model names.protected boolean
protected Format
protected UMod.ClassDef
(package private) final Set<GeneratedMethod>
protected boolean
protected GeneratedClass
Fields inherited from class eu.bandm.tools.umod.UMod2visitors.Lr_decoder
leftSelected, lrcode, lrposition, rightSelected
-
Constructor Summary
ConstructorDescriptionV_makeRewriterCoRewriter
(int k, GeneratedClass v, UMod.ClassDef s, boolean iscorew, boolean ms) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
action
(UMod.ClassDef cd) protected void
action
(UMod.FieldDef fd) protected void
protected void
action
(UMod.T_map t) protected void
action
(UMod.T_opt t) protected void
Potential optimizations:
a) multiple not supported -> abfrage kann raus, single case only!
b) any side is empty -> return emptyprotected void
protected void
protected void
action
(UMod.T_rel t) protected void
action
(UMod.T_seq t) protected void
protected Format
convertOneSide_REW
(boolean cast) protected void
protected void
visitMap_or_Multimap
(UMod.T_2 t, boolean ismultimap) Diagram of semantics:
M = original, L/R = maps representing rewriting, M' = resultprotected void
visitSetList
(UMod.TypeConstructed t, boolean isseq) protected Format
wrapOptimizingCut
(Format code) Methods inherited from class eu.bandm.tools.umod.UMod2visitors.Lr_decoder
updateSelection
-
Field Details
-
modelnum
protected int modelnumThe cursor variables in "for (i0:...)" are built with an ever increasing number, instead of shadowing previous model names. -
visitor
-
iscorewriter
protected boolean iscorewriter -
multiSupport
protected boolean multiSupport -
keynum
protected int keynum -
dorwmeth
-
superclass
-
curfield
-
model
-
result
-
userResponsible
protected boolean userResponsible -
suppress_addAll_warning_annotated
-
convertOneSide_CORW
-
-
Constructor Details
-
V_makeRewriterCoRewriter
public V_makeRewriterCoRewriter(int k, GeneratedClass v, UMod.ClassDef s, boolean iscorew, boolean ms)
-
-
Method Details
-
action
- Overrides:
action
in classUMod.Visitor
-
wrapOptimizingCut
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
put_suppress_addAll_warning_annotation
-
visitSetList
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
convertOneSide_REW
-
visitMap_or_Multimap
Diagram of semantics:
M = original, L/R = maps representing rewriting, M' = resultM ------------------> | | L | | R V V ------------------> M' M' := Linv o M o R potential optimizations: a) if L or M or R is empty ==> return empty M' immediately b) if M is map (not multimap) and rewriter does not support "substitute_multi()" then 1) L and R can be simple maps (not multi-maps!) and 2) only "injectiveness" of L needs to be tested, to ensure M' being a map!
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
action
- Overrides:
action
in classUMod.Visitor
-
action
Potential optimizations:
a) multiple not supported -> abfrage kann raus, single case only!
b) any side is empty -> return empty- Overrides:
action
in classUMod.Visitor
-