BYU - Spring 2013 - CS 630 - 6/4 - Paper

2 views
Skip to first unread message

Noonan

unread,
Jun 3, 2013, 12:23:20 PM6/3/13
to byu-cs-630-spring-2013

Debugging Hygienic Macros


Summary:The intro talks about macros, why they’re important and why a debugger for them is a good idea. The next section starts out talking about ways to define a macro in Scheme and then gives a sample macro and steps through it using the debugger. Next they discuss the rules for bindings when a macro is written and show an example of the debugger showing where a variable is bound. The next section discusses a method of showing which macros to expand and which ones to leave alone when debugging, as well as issues with that. Issues it discusses are the program being expressed in ways it really isn’t as well as issues dealing with expansions of cloned expressions. The author then discusses the issues with the current machinery for macro debugging, expand gives too much informaiton, expand-once makes it hard to find the context of interest, because it’s applied to the root of the macro. The author then explains on a high level how the debugger works in the context of the syntax-rules expansion algorithm, the algorithm normally used for macro expansion in PLT Scheme. The author then shows exactly where in the code various operations are added in order to track information about the macro in order to construct a tree used for debugging the macro. Then the author shows the grammar used in parsing the information used to make the tree and then describes the tree structure. The author then goes on to describe how errors are detected and handled with the debugging system and then talks about how the tree is used in order to generate debug information for display in the UI. The author then moves on to describe exactly how the UI uses information from the IR tree. The author then shows the formal model for the debug system, proving its correctness.


Primary Contributions: The introduction of a macro debugger that is very powerful in giving the user the ability to isolate bugs.


Something I Understood Well: Macros. Maybe not 100% well, but a lot better. I also understood the advantage that this system presented over the previous system.


Something I had trouble Understanding: I had trouble understanding the issues with the proposed system when performing the intermediate expansions, like what the author exactly meant when they were discussing those issues.


Fortifying Macros:


Summary: The author starts out describing macros like every paper. He then moves on to show how macros are represented using lambda expressions and explains that is bad given the fact that it’s decoupled from the actual language the macro is written in. He then moves on to discuss how the MBE system evaluates macros of this nature. He then describes how because of this decoupling, the debug information given is not helpful or even correct. The author then expresses the same macro using different constructs like syntax-case and define-struct and further expounds on the weaknesses of MBE. The autor then introduces syntax-parse (their version of macro writing) and then show examples of how to use it and how it is used to capture errors.. The paper then moves on to discuss Error capture and how it is performed. The author then moves on to show what makes syntax-parse more powerful than MBE. He uses a grammar and examples to support his view point. The author then goes over the semantics of syntax-parse. The author then goes over specific examples of how syntax-parse had been used and how that was an improvement. The author then discusses related work and re-emphasizes their contribution.


Primary Contributions: More robust language for writing macros.


Something I Understood Well: I understood that the errors for MBE were less useful.


Something I had trouble understanding: I had touble understanding the core difference between syntax-parse and the examples at the beginning of the paper. The input structure looked very similar, does this mean the way syntax-parse is written is differently at its core and that’s why it can do these things? Its structure looked very similar to syntax-rules.


Reply all
Reply to author
Forward
0 new messages