|Re: Extending OCL : visitor problems [message #809981 is a reply to message #809868]
||Wed, 29 February 2012 14:24
| Ed Willink
Registered: July 2009
No there is no documentation; one of many jobs to do before promotion.
They should be extensible; see the EssentialOCL CS accept methods that
all do a getAdapter downcast. The Visitor infrastructure is
auto-generated by Acceleo templates in the build plugin. The accept
methods could probably be autogenerated too now that Bug 326130 has been
fixed. Raise bugs for anything that isn't extensible.
The PreOrder phase establishes the major structural objects with names,
aware that child objects do not exist, the visit may drop Continuations
to be resolved in a polled fashion.
Then the PostOrder finishes off, the original intention being to resolve
references, but the complex nature of operation template parameters
means that most references are actualy resolved during PreOrder
During the PostOrder traversal the Left2Right visitor is dispatched to
sort out expressions which can be fully resolved in a left-to-right
The ScopeVisitor provides the ScopeAdapter that returns scope specific
These are all manually written and being gradually simplified; the
intention is to autogenerate all the above from an OCL-like, perhaps
QVTr, definition of the visible names in a scope and the CST to AST
mapping. This modeled definition will replace the synthesized
attributes/environment definitions in the OCL spec. The same
auto-generation should support at least QVTr and QVTc. Once
auto-generated, the polled continuations should be resolvable in a
deterministic fashion. One day the CST to AST mapping may be defined by
OCL equations so that the Impact Analyzer can be used to perform a fast
On 29/02/2012 11:28, Damien Lenci wrote:
> I'm a student currently working on extending OCL with another language
> : CCSL (INRIA project under the tutoring of Julien Deantoni)
> I'm having trouble understanding the role of the different visitors
> (PreOrder, PostOrder, Left2Right, Scope).
> Is there any document explaining how they work or how to allow them
> visiting the new elements introduced in CCSL?
> Thanks in advance,
> Damien Lenci
Powered by FUDForum
. Page generated in 0.02930 seconds