Re: [abc-dev] Pass scheduling

From: Wouter De Borger <w.deborger_at_gmail.com>
Date: Wed, 13 Aug 2008 10:06:01 +0200

To solve my problem I would use a class that looks like the attached class
the code would then look like:

                // phase check exceptions
                if (!abc.main.Debug.v().dontCheckExceptions) {
                    monitor.begin("Exceptions check");
                   * checkExceptions();*
                }
                monitor.begin("Inline Advice",false);
                *inlineAdvice();*

ABCTimer and Debug would be added to a composite monitor

to improve modularity of the sequence, I would use a pass scheduler as in
soot or polyglot,...

if you think the monitor is a good idea, I'll add it to one compile
sequence.
but I don't know if it's worth the effort if there are many sequences (with
only minor differences)
Wouter

On Tue, Aug 12, 2008 at 5:54 PM, Eric Bodden <eric.bodden_at_mail.mcgill.ca>wrote:

> I see.
>
> Also here, please note that there are multiple versions of
> CompileSequence, e.g.:
>
> /abc/src/abc/main/CompileSequence.java and
> /abc-ja/src/abc/ja/CompileSequence.java and
> /abc-ja-exts/src-eaj/abc/ja/eaj/CompileSequence.java
> ...
> (one for each extension)
>
> I can see that this is not very extensible right now. If you can
> propose a refactoring that would help you out please let us know.
>
> Eric
>
> 2008/8/12 Wouter De Borger <w.deborger_at_gmail.com>:
> > I mean all the things that are in runsequence, weave and compile methods
> >
> > like (bold is functional code, green is what I added to support eclipse,
> > black is original ABC code)
> >
> > // phase check exceptions
> > if (!abc.main.Debug.v().dontCheckExceptions) {
> >
> > monitor.isCanceled();
> > monitor.setPhase("Exceptions check");
> > checkExceptions();
> > AbcTimer.mark("Exceptions check");
> > Debug.phaseDebug("Exceptions check");
> > monitor.setProgress(61);
> > }
> >
> > // phase inline advice
> > {
> > monitor.isCanceled();
> > monitor.setPhase("Inline Advice");
> > inlineAdvice();
> > monitor.setProgress(62);
> > }
> > Wouter
> >
> > On Tue, Aug 12, 2008 at 5:02 PM, Eric Bodden <eric.bodden_at_mail.mcgill.ca
> >
> > wrote:
> >>
> >> Hi Wouter.
> >>
> >> Which passes are you referring to? The polyglot passes that
> >> analyze/rewrite the AST? If so please note that any new extensions to
> >> abc will be based on JastAdd (see packages abc.ja.*) and that those
> >> extensions don't really have the notion of passes any more. (There are
> >> still some coarse passes like jimplification etc. but not very many.)
> >>
> >> In general I don't think that there was much of a plan for
> >> formalization, exactly for the reason that we switched to JastAdd.
> >>
> >> Hope that helps.
> >>
> >> Eric
> >>
> >> 2008/8/12 Wouter De Borger <w.deborger_at_gmail.com>:
> >> > Hi,
> >> >
> >> > Is there a plan to formalize the pass/stage scheduling in the ABC?
> >> > (if so, I'd love to help)
> >> >
> >> > Each pass/stage begins with a call to abortIfErrors() and ends with a
> >> > call
> >> > to both the timer and debug-logger.
> >> >
> >> > I'm now adding a progress monitor and cancellation support, (for
> >> > eclipse)
> >> > which adds a call before and after each stage,....
> >> > This requires a lot of scattered code and it doesn't exactly make the
> >> > code
> >> > more readable,....
> >> >
> >> >
> >> > Wouter
> >> >
> >>
> >>
> >>
> >> --
> >> Eric Bodden
> >> Sable Research Group
> >> McGill University, Montréal, Canada
> >>
> >
> >
>
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>
>

Received on Wed Aug 13 2008 - 09:06:05 BST

This archive was generated by hypermail 2.2.0 : Wed Aug 13 2008 - 14:10:11 BST