Position of MPS in DSL World

To MPS Team:

In 2004 Sergey Dmitriev point out two use-case for then MPS in article "Language Oriented Programming: The Next Programming Paradigm". And it was:

  1. Coding part of Java-application using MPS (MPS is being written in itself)
  2. Creation Configurations and Scripting DSL
  3. Also in some documents (such as RegExp Tutorial) we can see the examples of using MPS as tool for creation library-based language. (The language interface for library.)

Have the situation changed today ? Do you plan expand MPS broader, than tool (very comprehensive and effective in fact) for building external DSLs ?

For example in thread "can you extend java with mps" some people, said about their hunger for using MPS to create in-language DSL.

If I were you, I've said, that our first and foremost task is to build complete system, and that we can't continously expand MPS on user request. :-) But I'm definetly not you, and so from my point of view such things like console-version of MPS (which of course will need to more simple syntax of MPS languages), like better integration of Java-generated and Java-hand-written parts of project, injection DSL in Java by using MPS, all this things have value for end user.

For example in 2005 Karsten Wagner wrote:
"Will it be possible to change the MPS 'base' (like editor-language, query-language etc.) in MPS itself?"
I can't find MPS Team answer on this question. Yes, MPS is being written in itself, but could we do the same ?

To make my suggestions and thoughts more concrete, I want to ask, RegExp tutorial describes the creation and usecase for Regular Expressions Language, but when we built Regular Expressions Language we could use it only in Basic Language. And so, if I'm not wrong, to use Regular Expressions from hand-written part of project we need to code something like wrapper (HelperClass for example) for MPS generated code and then use this HelperClass methods to interact with generated code.
And if so, what have we had ?

Instead of

public static void main (String emailToAnalyse){

  if( emailToAnalyse matches ){
    System . out . println ( "User name = " + user );
    System . out . println ( "Domain = " +domain );
  }
}

we would have to code (because we haven't in-language DSL capability in MPS, we can't expand Java):

public static void main (String emailToAnalyse){
  String user;
  String domain;
  MPSHelper.IsEmailMathes(emailToAnalyse, user, domain);
}

Am I right ?

And the last, but no least, I only want to gain an understanding of practical aspect of using MPS, by this post I don't want to touch MPS Team on any way.

Thank you.

5 comments
Comment actions Permalink

Have the situation changed today ? Do you plan expand MPS broader, than tool (very comprehensive and effective in fact) for building external DSLs ? MPS now isn't just a tool for external DSLs. We have many internal DSLs which extend base language (regexps, collections lang, smodel lang). On the other hand, many external DSLs (for example editor lang) embed base language inside of themselves so the distinction between external and internal DSL is superficial. "Will it be possible to change the MPS 'base' (like editor-language, query-language etc.) in MPS itself?"
I can't find MPS Team answer on this question. Yes, MPS is being written in itself, but could we do the same ? Yes, it's possible to change MPS from itself and we actually do it. All the bootstrap languages are being developed from MPS. There are some parts which aren't written in MPS, for example IDE, but we are going to rewrite them with the aid of MPS. To make my suggestions and thoughts more concrete, I want to ask, RegExp tutorial describes the creation and usecase for Regular Expressions Language, but when we built Regular Expressions Language we could use it only in Basic Language. And so, if I'm not wrong, to use Regular Expressions from hand-written part of project we need to code something like wrapper (HelperClass for example) for MPS generated code and then use this HelperClass methods to interact with generated code.

If I wanted to use regexps from hand-written part of a project, I would used javax.regexp without any wrappers. Our wrappers were created only in order to simplify language generation, not in order to be used by users in hand-written code.

0
Comment actions Permalink

If I wanted to use regexps from hand-written part of

a project, I would used javax.regexp without any

wrappers. Our wrappers were created only in order to

simplify language generation, not in order to be used

by users in hand-written code.

But is any recommend way to interact with generated code form hand-written ? Or it is recommend not to do it at all and write the whole application in DSL (+baseLanguage) ?

0
Comment actions Permalink

And yet another question:

After DSL is built in MPS (structureeditorgenerator+type system), is there some possibility to use the editor as independent application ? So that DSL-programmer couldn't change language in MPS, but only code the program in DSL in Editor ?

Thank you

0
Comment actions Permalink

I think, you can call any methods from generated code unless it's implementation details. Runtime libraries, for example, stuff which we used to implement regexp language is definitely implementation detail.

0
Comment actions Permalink

Now there is no such a possibility but we experimented with it (mpswiki, bugsqueezer etc. You can find short descriptions of them in my live journal). We are going to have such an ability in the future.

0

Please sign in to leave a comment.