کد مقاله کد نشریه سال انتشار مقاله انگلیسی نسخه تمام متن
417997 681599 2015 23 صفحه PDF دانلود رایگان
عنوان انگلیسی مقاله ISI
Combining deep and shallow embedding of domain-specific languages
ترجمه فارسی عنوان
ترکیبی از تعبیه عمیق و کم عمق زبان های خاص دامنه
کلمات کلیدی
زبان های خاص دامنه، جاسازی کوچک، تعبیه عمیق، فیوژن، موندها
موضوعات مرتبط
مهندسی و علوم پایه مهندسی کامپیوتر نظریه محاسباتی و ریاضیات
چکیده انگلیسی


• We present a technique for combining deep and shallow embedding for embedded languages.
• The technique gives a more natural programming interface to embedded languages.
• The technique makes it easy to extend embedded languages.
• We give a plethora of examples demonstrating the advantages of the technique.

We present a technique to combine deep and shallow embedding in the context of compiling embedded languages in order to provide the benefits of both techniques. When compiling embedded languages it is natural to use an abstract syntax tree to represent programs. This is known as a deep embedding and it is a rather cumbersome technique compared to other forms of embedding, typically leading to more code and being harder to extend. In shallow embeddings, language constructs are mapped directly to their semantics which yields more flexible and succinct implementations. But shallow embeddings are not well-suited for compiling embedded languages.Our technique uses a combination of deep and shallow embedding, which helps keeping the deep embedding small and makes extending the embedded language much easier. The technique also has some unexpected but welcome secondary effects. It provides fusion of functions to remove intermediate results for free without any additional effort. It also helps us to give the embedded language a more natural programming interface.

ناشر
Database: Elsevier - ScienceDirect (ساینس دایرکت)
Journal: Computer Languages, Systems & Structures - Volume 44, Part B, December 2015, Pages 143–165
نویسندگان
, ,