Conference paper Open Access

Writing a best-effort portable code walker in Common Lisp

Raskin Mikhail


Citation Style Language JSON Export

{
  "publisher": "Zenodo", 
  "DOI": "10.5281/zenodo.3254669", 
  "language": "eng", 
  "title": "Writing a best-effort portable code walker in Common Lisp", 
  "issued": {
    "date-parts": [
      [
        2017, 
        4, 
        4
      ]
    ]
  }, 
  "abstract": "<p>One of the powerful features of the Lisp language family is possibility to extend the language using macros.&nbsp; Some of possible extensions would benefit from a code walker, i.e. a library for processing code that keeps track of the status of different part of code, for their implementation.&nbsp; But in practice code walking is generally avoided.&nbsp;<br>\n<br>\nIn this paper, we study facilities useful to code walkers provided by &lsquo;&lsquo;Common Lisp: the Language&rsquo;&rsquo; (2nd edition) and the Common Lisp standard.&nbsp; We will show that the features described in the standard are not sufficient to write a fully portable code walker.<br>\n<br>\nOne of the problems is related to a powerful but rarely discussed feature.&nbsp; The macrolet special form allows a macro function to pass information easily to other macro invocations inside the lexical scope of the expansion.<br>\n<br>\nAnother problem for code analysis is related to the usage of non-standard special forms in expansions of standard macros. We review the handling of defun by popular free software Common Lisp implementations.<br>\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br>\nWe also survey the abilities and limitations of the available code walking and recursive macro expansion libraries.&nbsp; Some examples of apparently-conforming code that exhibit avoidable limitations of the portable code walking tools are provided.<br>\n<br>\nWe present a new attempt to implement a portable best-effort code walker for Common Lisp called Agnostic Lizard.<br>\n&nbsp;</p>", 
  "author": [
    {
      "family": "Raskin Mikhail"
    }
  ], 
  "id": "3254669", 
  "event-place": "Brussels, Belgium", 
  "type": "paper-conference", 
  "event": "European Lisp Symposum 2017 (ELS-2017)"
}
241
219
views
downloads
All versions This version
Views 241241
Downloads 219219
Data volume 65.0 MB65.0 MB
Unique views 227227
Unique downloads 197197

Share

Cite as