Project

General

Profile

Bug #2114

analyze if there are any other "no reference" use cases which are mis-converted

Added by Greg Shah about 11 years ago. Updated about 11 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
24.00 h
billable:
No
vendor_id:
GCD
case_num:
version:

History

#1 Updated by Greg Shah about 11 years ago

Buffer scoping "no reference" instances are schema references that do not affect buffer scoping. They occur in things like frame definitions where the reference to what appears to be a field is not really a buffer reference. In the recent server project work, several new cases of no references were identified and fixed. This task is meant to analyze if there are any additional cases that still need to be fixed. The primary problem caused by this is a change to buffer scope that causes the buffer scope to be different than in the 4GL. Often, this is such a subtle problem that the converted code can work just as well as (or very close to) the original 4GL.

#2 Updated by Greg Shah about 11 years ago

Constantin: please update this task with any ideas on where there may be additional issues lurking.

#3 Updated by Constantin Asofiei about 11 years ago

To search for "no reference" fields, is best to go through the list of all 4GL statements/functions and check if a statement might use a field reference only "by name". When a statement/function use a field only "by name" (and produces a "no reference"), it doesn't check the field value, it only maps (or searches) some definition using the field's name (like a frame widget, when the FORM statement is used).

Whoever gets to work on this will need to document each suspected case first, produce testcases to prove/disprove that the used field is a no-referece, and update the is_no_reference_item function in common-progress.rules as needed. And, looks like at least cases like WAIT-FOR GO OF book.book-title produce no-references. A good idea is to start with the UI statements/function first (plus trigger definitions).

To check for no-reference, the COMPILE statement must be used with a program which contains only the tested statement. Example with FORM statement which is known to produce no-references:
f1.p

form book.book-title.

compile the program:
compile f1.p listing f1.lst.

the listing
f1.p                                  04/10/2013 12:14:08   PROGRESS(R) Page 1

{} Line Blk
-- ---- ---
      0     form book.book-title.
f1.p                                  04/10/2013 12:14:08   PROGRESS(R) Page 2

     File Name       Line Blk. Type   Tran            Blk. Label
-------------------- ---- ----------- ---- --------------------------------
f1.p                    0 Procedure   No
    Frames:  Unnamed                    

If a no-reference is in effect, then the buffer name must not appear in the listing at all. If conversion works OK, then for a case like this no RecordBuffer.openScope() call will be emitted for that DMO.

Also available in: Atom PDF