dsl pattern language

Post on 28-Jan-2015

121 Views

Category:

Technology

0 Downloads

Preview:

Click to see full reader

DESCRIPTION

This presentation was shown at Object Club 2008 Summer Event.

TRANSCRIPT

Pattern Languages in “Domain Specific Language”

DSL ���������

Shibukawa Yoshiki�� ���

Email: "eW9zaGlraUBzaGlidS5qcA==".decode("base64")

���

• �����������– ������������ ��������

– ����������������� !�

• �� ������– LT"#$�%&�'(��

• ����• ����(�� ���)• ����

– )*+,��-.�/$0123��4�

• ������������������� !"#$�

������LT��� � ��

���� ������ ��

2006� XP����(����� ) ��������

2006Xmas �������(��� � ) !"�����

2007� #$%&'()*(��+,-� ) !"�����

2007Xmas ./012134%56(78� ) ���

���������� ����

What’s DSL?

LanguageProgrammer

What’s DSL?DSL

DSLDSL

Programmer

User

Pattern Catalog• Distance

– Move Away– Move Closer

• Structure– Late Evaluation– Preprocessor– Embedded Processor– External Data– External System

• Purpose– End User Programming– Flexibility– Acceleration– Paradigm Change

Relationship between PatternsMoveCloser Away

Struc

ture

Purpo

seLate EvaluationLate Evaluation

PreprocessorPreprocessor

Embedded ProcessorEmbedded Processor

External DataExternal DataExternal SystemExternal System

FlexibilityFlexibilityAccelerationAccelerationEnd User ProgrammingEnd User Programming

Paradigm ChangeParadigm Change

Distance

Distance – Move Closer• �������������

– 567$8/9�:/��;<��

– =>$�?�!�@A!B�

– 56$CDEFGHI#J�KL����MNOP

• �� !– dRuby, Jython/IronPython, SQL CLR

Distance – Move Away• ���������"#��

– QR$56$�R-S��TUVWXY�

– QR$56$Z[�\ #�

– ]/^_/��?� ��

• �� !– HTML^/`G��, ab�:�56cSQLcLINQ#d,��56?efg$hi��j�

Structure

Structure - Late Evaluation• $%��&'%(�)*+,-�

– klDSLm n���

– opmqr$st���$�cuv$wxy�z�

– 56$e{$|}�~�W���

• �� !– Rakefile, RSpec

Structure - Preprocessor• .���������/012�

– a��G�WH��56mR#y�

– ����qr�������y#�/�!�

– ��W����-�KY�q���MNyO�

• 3– Hot Ruby / IronPython / C��� / YACC

Structure – Embedded Processor• �����/.�456� 789�

– �-�:8�$DSL�KL����

– ��R$56�q���MNOP

• �� !– Lua, VBA, SQLite, XML-��, ����

Structure - External Data• :(;<9!=>?���452�

– �a�^������Pc���z�

– � m��W¡�.�8¢�z�

– ^£���¤zW �¥�.¦§y���?��

– -��cuv$�������yO�

• �� !– XML?.ini, ¨©��ª«8I#d$opª«8I

– MDA, ActiveRecord

Structure - External System• :(�@�AB�CD2�?����

– ¬­#®la�^��¯"��

– UyYP#a�^�y° c=>±(²yAy�

• �� !– dRuby– ¨G�a³_I¥�.H��

– ab�:�56c´µ¶·`��¸I

Purpose

Purpose - End User Programming• E87FG:H E87B�IJ�KL2�

– a�^�$¹��º»W¼�����

– DSLls�½¾W�P¿ÀMNyO�

• �� !– Trac$S��ª��cVBA– MDA, MATLAB$simlink– 3D CADmY$¥�.

Purpose - Flexibility• MNO�PQRSTUV�WP-�

– S��ª��ls�LL�ÁÂ��ÃÄÅ�`

– ÆÇ�WO��ls�¾PÈ�cÉÊ�ËW��

– opls�¾PÈ��®lÌ��

• �� !– Lua, VBA, HTML^/`G��, opª«8I

Purpose - Accelerate• (XY/Z[\���CD>R[]�^_

• �� !– C56/Java/CLR(LLY�*�), Shader56

– 8/�8/ÅÍ/Î�, Inline::C(Perl)

Purpose - Paradigm Change• `a/bcd7e9B����fc

– H��56$g��ÁÂ�W �ÏÐ�wÑ��

• %&'()*+�,-, .��/�012• 345(126789:;!),<=>0�?@A

• �� !– MATLAB/simlink– SQL,����

– ��¡�+_ÒÅÁÓ

DSL Futures• ghTi>jc\kl

– `¨`�Í�K?fg¿guvÔ��

• �BCDEF�GHIGJK!LM$�BNIOP0�?@����OP.Q���RS$�TU(RubyVWJ9)

– Å�^ÕÆ^ÕÖW���I×�G��/¸Å$=>

• ;XYYZ[K!(�\�]K^_�`a• =Q�bcd�ef�ghDSLifj�klmn

– Ø/�Ù��(¸/9Ç�.Ú®$Ø/ÛÜÅ)@�

• PowerPoint�N��oP��pqrX.��/�012/s�512�,-J9r!gUA

top related