XREF Improvements - Community input is requested

Posted by Garry Hall on 23-Mar-2015 15:54

In a similar vein to the recent "Strict mode for the ABL Compiler" thread (https://community.progress.com/community_groups/openedge_development/f/19/t/16733.aspx?pi20882=1#59978), we have received requests for enhancements to XREF.

The 11.6 Product Enhancements forum had a thread on XREF enhancements (https://community.progress.com/community_groups/products_enhancements/i/openedge_116_community_input/add_now_compiler_option_to_output_index_information_on_all_static_queries.aspx). The following requests were made in this thread:


1) Exposing SEARCH information for local temp-tables. There is a proposal in the thread to address this.


2) Expanding XREF "to cover other things that are local to a given program". What things are missing for local entities?


3) Providing an "explain plan" (bracketing information) on queries, to make it easier to identify potentially bad queries. I have been working on an initial proposal for this, but I don't want to hold up this discussion waiting on it.

I would appreciate your input on these topics, and would like to hear any other input you have for XREF enhancements.

Thanks,

Garry Hall.

OpenEdge Development
Progress Software

All Replies

Posted by Thomas Mercer-Hursh on 23-Mar-2015 16:12

Rationalize procedure references

community.progress.com/.../rationalize_procedure_references_in_xref.aspx

Identify which DB table, not just the buffer name.

Actually, my real proposal would not to do an incremental change, but to dump and replace.  I know that goes counter to the core PSC upward compatibility doctrine, but this was not a feature that was well thought out.  There is no reason to have all of the same tags underneath every entry and have most of them go unused and no reason not to have tags which are actually meaningful ... like the DB table for a buffer and whether it is a buffer to a DB or TT table.  There is just ***so*** much more information which is right there in the parse tree that one could dump out and use.   Or, maybe you could dead end XREF and actually do something to dump the parse tree instead???

How about COMPILE LIST as well?

community.progress.com/.../compile_listing.aspx

Posted by Tim Kuehn on 23-Mar-2015 17:36

Having the entire parse tree, and in particular all the symbols (variables, procedures, functions, buffers, strings, etc.) would be quite helpful for searching where a db table is referenced, impact analysis, and finding un-used code paths.

What would be all the better is if the provided information was in a format that could easily be fed into a database for searching and reporting.

I'd suggest looking into John Green's "Programmer's Analyst" - his tools feeds proparse output into a searchable db.

Posted by Mike Fechner on 23-Mar-2015 18:13

Thomas, why don't you just use proparse?

Ok. The finding of a DB table for a buffer sounds like the compiler is better at it.

But when asking for the parser tree, what are you actually missing from proparse?

Von meinem Windows Phone gesendet

Von: Thomas Mercer-Hursh
Gesendet: ‎23.‎03.‎2015 22:13
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] XREF Improvements - Community input is requested

Reply by Thomas Mercer-Hursh

Rationalize procedure references

community.progress.com/.../rationalize_procedure_references_in_xref.aspx

Identify which DB table, not just the buffer name.

Actually, my real proposal would not to do an incremental change, but to dump and replace.  I know that goes counter to the core PSC upward compatibility doctrine, but this was not a feature that was well thought out.  There is no reason to have all of the same tags underneath every entry and have most of them go unused and no reason not to have tags which are actually meaningful ... like the DB table for a buffer and whether it is a buffer to a DB or TT table.  There is just ***so*** much more information which is right there in the parse tree that one could dump out and use.   Or, maybe you could dead end XREF and actually do something to dump the parse tree instead???

How about COMPILE LIST as well?

community.progress.com/.../compile_listing.aspx

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Simon L. Prinsloo on 24-Mar-2015 01:24

  1) It would definitely be nice to get insight over the bracketing information. For instance, the selected index may look like a good index, but still bracket too wide (e.g. only the first component instead of the first three).

2) Indicate when the lock state of a record changes, what it changes to and why.

Examples:

REPEAT:
    PROMPT-FOR Customer.CustNum.
    FIND Customer EXCLUSIVE-LOCK USING CustNum.
    DISPLAY Customer.Name.
    UPDATE CreditLimit.
    FIND CURRENT-CUSTOMER NO-LOCK.
    FOR EACH Order OF Customer:
        DISPLAY Order.Total - Order.Paid.
    END.
END.
  • Line 3: LOCK Customer EXCLUSIVE, Explicit
  • Line 7: LOCK Order SHARE, Implicit
  • Line 9: RELEASE Order, Implicit
  • Line 19: RELEASE Customer, Implicit.

 

DO TRANSACTION:
    FIND CURRENT Invoice EXCLUSIVE-LOCK.
    UPDATE Invoice.Terms.
END.

  1. Line 2: LOCK Invoice EXCLISIVE, Explicit
  2. Line 4: LOCK Invoice SHARED, Implicit downgrade

 

PROMPT-FOR Item.ItemNum.
FIND Item USING ItemNum.
DO TRANSACTION:
    UPDATE OnHand.
    FIND CURRENT Item NO-LOCK.
    DISPLAY Item.OnHand
        Item.BackOrder
        Item.OnOrder.
END.

  • Line 2: LOCK Item SHARED, Implicit
  • Line 4: LOCK Item EXCLUSIVE, Implicit upgrade
  • Line 9: LOCK Item NO-LOCK, Explicit Due to the read on line 5, this is now explicit.


Posted by Thomas Mercer-Hursh on 24-Mar-2015 09:33

@Tim: Of course, Analyst does a wee bit more than databasing the parse tree, but yes, that is the obvious goal.  I would think dumping the parse tree to XML would be an almost trivial task.

@Mike: The issue with Proparse is its support for syntax past 10.2B.   Looked at your mail lately?

Posted by Mike Fechner on 24-Mar-2015 09:38

It certainly does work with all 11.5 keywords I needed so far … https://github.com/consultingwerk/proparse
 
Von: Thomas Mercer-Hursh [mailto:bounce-tamhas@community.progress.com]
Gesendet: Dienstag, 24. März 2015 15:34
An: TU.OE.Development@community.progress.com
Betreff: RE: [Technical Users - OE Development] XREF Improvements - Community input is requested
 
Reply by Thomas Mercer-Hursh

@Tim: Of course, Analyst does a wee bit more than databasing the parse tree, but yes, that is the obvious goal.  I would think dumping the parse tree to XML would be an almost trivial task.

@Mike: The issue with Proparse is its support for syntax past 10.2B.   Looked at your mail lately?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

Posted by Jeff Ledbetter on 25-Mar-2015 15:19

With regards to #2:
 
WRX reference. Currently, the only way to determine if a window contains a WRX file is to call adeuib/_uibinfo.p (without parsing).  Including the WRX reference in the xref output seems like a natural extension to the current output.
 
RUN reference. The only reference to an internal procedure in the current xref output, are the PROCEDURE and PRIVATE-PROCEDURE tokens.  These tell us if the compile unit contains an internal procedure, however the RUN of an internal procedure (in the same compile unit) is not represented. If the compile unit containing the procedure definition also contains a RUN for that same procedure, we would like to see a separate RUN reference in the xref listing.
 
IMAGE reference. An IMAGE token that represents a referenced image file (such as in the IMAGE-UP, IMAGE-DOWN, and IMAGE-INSENSITVE options of DEFINE BUTTON statement) would be a welcome addition.
 
OS-COMMAND reference. An indication of the existence of the OS-COMMAND statement in a compile unit would be a welcome addition.
 
Finally, it would be handy it one could optionally choose to not generate STRING references.
 
Jeff Ledbetter
skype: jeff.ledbetter
 
[collapse]
From: Garry Hall [mailto:bounce-gih@community.progress.com]
Sent: Monday, March 23, 2015 3:55 PM
To: TU.OE.Development@community.progress.com
Subject: [Technical Users - OE Development] XREF Improvements - Community input is requested
 
Thread created by Garry Hall

In a similar vein to the recent "Strict mode for the ABL Compiler" thread (https://community.progress.com/community_groups/openedge_development/f/19/t/16733.aspx?pi20882=1#59978), we have received requests for enhancements to XREF.

The 11.6 Product Enhancements forum had a thread on XREF enhancements (https://community.progress.com/community_groups/products_enhancements/i/openedge_116_community_input/add_now_compiler_option_to_output_index_information_on_all_static_queries.aspx). The following requests were made in this thread:


1) Exposing SEARCH information for local temp-tables. There is a proposal in the thread to address this.


2) Expanding XREF "to cover other things that are local to a given program". What things are missing for local entities?


3) Providing an "explain plan" (bracketing information) on queries, to make it easier to identify potentially bad queries. I have been working on an initial proposal for this, but I don't want to hold up this discussion waiting on it.

I would appreciate your input on these topics, and would like to hear any other input you have for XREF enhancements.

Thanks,

Garry Hall.

OpenEdge Development
Progress Software

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Thomas Mercer-Hursh on 25-Mar-2015 15:37

While the output is very bulky, especially the XML one, I'm not inclined to suppress any output since I may not process the output file at the same time that I compile it.  It is easy to skip over things and deceptive if something is not there and one doesn't know to not expect it.

Posted by Garry Hall on 13-May-2015 13:05

For those not (yet) on the 11.6 ESAP, item 1 from my original post (SEARCH information for local temp-tables) is now available in the new 11.6 ESAP. Please feel free to try it out.

There is no commitment to address the other suggestions from this thread in 11.6, but I appreciate the dialog.

Posted by OctavioOlguin on 13-May-2015 15:10

in 1998, I asked my tech support, (at the time techsup  was regional, so I contacted Mexico office) if there would be a listing or something about database plan, and got no for an answer..

Posted by TheMadDBA on 13-May-2015 16:54

Hopefully we can get an explain plan/bracketing information in 11.7 :)

This thread is closed