sábado, 22 de octubre de 2011

¿Cómo medir la expresividad de nuestros DSL?


How do you measure the expressive power of your DSL?



Antonio Vallecillo •  In my experience the Expressiveness of a language is hard to measure in an objective way. Using a similar approach to ISO-9126, which defines quality characteristics and sub-characteristics, I think Expressiveness is a characteristic that can be decomposed in terms of 4 sub-characteristics:

  1.  Conciseness
  2. Precision (i.e., lack of vagueness :-)
  3.  Completeness and 
  4. Suitability



Other important characteristics of DSLs are: 

  • Usability (Learnability, Understandability, Operability, Attractiveness), 
  • Maintainability (Analysability, Changeability, Stability, Testability) 
  • and Reliability (Consistency, Maturity). 


Although such classification is nice, it is useless unless we have a set of objective measures that can help evaluate them - for particular languages and in particular domains, of course! 


There is some *intuition* that for instance the number of metaclasses and relationships between them (i.e., the size) of the metamodel that defines the abstract syntax of the language can positively impact the Completeness and negatively impact the Learnability, Understandability, or Maintainablity of a language. Or that the use of the adequate symbols in the concrete syntax may favour the attractiveness of the language, although it is not clear whether visual or textual concrete syntaxes favour operability or not. In any case, this issue opens up an interesting research field related the quality of DSLs. 


Coming back to expressiveness, given that we do not have such measures yet, it could be (needs to be) evaluated by


experiments that show some evidences about how the language positively or negatively impacts its four related subcharacteristics


in the particular domain your DSL is targeted to. Thus, probably the easiest way is to prepare a set of experiments that test how users perform using the two (or more) competing languages when they have to express something of the domain under study. I believe there have been many different experiments defined for deciding whether textual languages are better than visual ones for programming (for "end-user development" [http://en.wikipedia.org/wiki/End-user_development], and specially when the users are kids). But for DSLs I am not sure I have seen anything like that. The problem for DSLs is that it is VERY dependent on the domain... 
My two cents, 
Antonio


No hay comentarios:

Publicar un comentario