Conference paper Open Access

Writing a best-effort portable code walker in Common Lisp

Raskin Mikhail


JSON Export

{
  "files": [
    {
      "links": {
        "self": "https://zenodo.org/api/files/38d2f2d1-a917-4819-b292-cd54234708cf/writing-portable-macroexpand-all.pdf"
      }, 
      "checksum": "md5:157e8df3fbae027251bb0462e105e12c", 
      "bucket": "38d2f2d1-a917-4819-b292-cd54234708cf", 
      "key": "writing-portable-macroexpand-all.pdf", 
      "type": "pdf", 
      "size": 296586
    }
  ], 
  "owners": [
    64612
  ], 
  "doi": "10.5281/zenodo.3254669", 
  "stats": {
    "version_unique_downloads": 197.0, 
    "unique_views": 227.0, 
    "views": 241.0, 
    "version_views": 241.0, 
    "unique_downloads": 197.0, 
    "version_unique_views": 227.0, 
    "volume": 64952334.0, 
    "version_downloads": 219.0, 
    "downloads": 219.0, 
    "version_volume": 64952334.0
  }, 
  "links": {
    "doi": "https://doi.org/10.5281/zenodo.3254669", 
    "conceptdoi": "https://doi.org/10.5281/zenodo.3254668", 
    "bucket": "https://zenodo.org/api/files/38d2f2d1-a917-4819-b292-cd54234708cf", 
    "conceptbadge": "https://zenodo.org/badge/doi/10.5281/zenodo.3254668.svg", 
    "html": "https://zenodo.org/record/3254669", 
    "latest_html": "https://zenodo.org/record/3254669", 
    "badge": "https://zenodo.org/badge/doi/10.5281/zenodo.3254669.svg", 
    "latest": "https://zenodo.org/api/records/3254669"
  }, 
  "conceptdoi": "10.5281/zenodo.3254668", 
  "created": "2019-06-24T14:07:53.353697+00:00", 
  "updated": "2020-01-20T17:35:05.690423+00:00", 
  "conceptrecid": "3254668", 
  "revision": 5, 
  "id": 3254669, 
  "metadata": {
    "access_right_category": "success", 
    "doi": "10.5281/zenodo.3254669", 
    "description": "<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>", 
    "language": "eng", 
    "title": "Writing a best-effort portable code walker in Common Lisp", 
    "license": {
      "id": "CC-BY-SA-4.0"
    }, 
    "relations": {
      "version": [
        {
          "count": 1, 
          "index": 0, 
          "parent": {
            "pid_type": "recid", 
            "pid_value": "3254668"
          }, 
          "is_last": true, 
          "last_child": {
            "pid_type": "recid", 
            "pid_value": "3254669"
          }
        }
      ]
    }, 
    "communities": [
      {
        "id": "els"
      }
    ], 
    "keywords": [
      "code walker", 
      "macro expansion", 
      "code transformation"
    ], 
    "publication_date": "2017-04-04", 
    "creators": [
      {
        "orcid": "0000-0002-6660-5673", 
        "affiliation": "LaBRI, University of Bordeaux", 
        "name": "Raskin Mikhail"
      }
    ], 
    "meeting": {
      "acronym": "ELS-2017", 
      "url": "https://european-lisp-symposium.org/2017/", 
      "dates": "3-4 April 2017", 
      "place": "Brussels, Belgium", 
      "title": "European Lisp Symposum 2017"
    }, 
    "access_right": "open", 
    "resource_type": {
      "subtype": "conferencepaper", 
      "type": "publication", 
      "title": "Conference paper"
    }, 
    "related_identifiers": [
      {
        "scheme": "doi", 
        "identifier": "10.5281/zenodo.3254668", 
        "relation": "isVersionOf"
      }
    ]
  }
}
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