bugKawa - Bugs: bug #40869, self-referential (cyclic) syntax...

 
 

bug #40869: self-referential (cyclic) syntax template

Submitted by:  John Tobey <jtobey>
Submitted on:  Wed 11 Dec 2013 04:04:51 AM UTC  
 
Category: Scheme languageSeverity: 3 - Normal
Item Group: Run-time exceptionStatus: Fixed
Privacy: PublicAssigned to: Per Bothner <bothner>
Open/Closed: Closed

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 20 Dec 2013 08:33:47 PM UTC, comment #5:

Checked in the patch.

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Mon 16 Dec 2013 01:02:22 PM UTC, comment #4:

This patch works for me, thanks.

John Tobey <jtobey>
Sun 15 Dec 2013 11:38:52 PM UTC, comment #3:

Could you try SyntaxTemplate.patch ?
It seems that would still catch cycles, while ruling out some classes of false positives related to macro-generated macros,

(file #29929)

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Sat 14 Dec 2013 08:00:17 PM UTC, comment #2:

Thanks. I haven't got as far as debugging the Java, but simply disabling the cycle check works around the problem.

If it is hard to fix in the current design, perhaps a limit of 1000 (or some configurable number) of template expansions would serve the same purpose, albeit less elegantly. Or an --i-know-what-im-doing flag to disable the check at run time.

In case it helps, at the point of error, form.toString() is "(false)".

John Tobey <jtobey>
Wed 11 Dec 2013 04:27:23 AM UTC, comment #1:

If you grep though kawa/lang/Syntax.java for the string DEBUGGING you'll see things can be uncommented to get debugging output. If you want to try to debug it yourself, you might find this link a useful (if slightly dated) introduction:
http://www.gnu.org/software/kawa/internals/semantic-analysis.html

Per Bothner <bothner>
Project AdministratorIn charge of this item.
Wed 11 Dec 2013 04:04:51 AM UTC, original submission:

Given this comment in kawa/lang/SyntaxTemplate.java:
Would you like me to create a minimal test case? I do not want to waste my time, since you seem to know about a bug that causes this error. My program dies with this error under Kawa but works under Chibi. Looking at my syntax templates, I do not see how they can be cyclic, but they are very complex, so I am unsure. Perhaps there is some --debug option to print each template as it is applied...

John Tobey <jtobey>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #29929:  SyntaxTemplate.patch added by bothner (2kB - text/x-patch - Possible patch.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bothner (Posted a comment)
  • -unavailable- added by jtobey (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 20 Dec 2013 08:33:47 PM UTCbothnerStatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Sun 15 Dec 2013 11:38:52 PM UTCbothnerAttached File-=>Added SyntaxTemplate.patch, #29929
      Assigned toNone=>bothner

    Back to the top


    Powered by Savane 3.1-cleanup