4
$\begingroup$

I want to define a semantics of a DSL through transition semantics. For my DSL I defined the syntax and implemented a code generator. Although I can provide a demo by giving examples, I want to write the semantics of my DSL to provide a formal specification of it.

However I don't know how to do it!. Can someone provide me with an example?

$\endgroup$

migrated from cstheory.stackexchange.com Sep 20 '12 at 11:12

This question came from our site for theoretical computer scientists and researchers in related fields.

  • $\begingroup$ I migrated this from cstheory, as I feel that it is more appropriate here. It is not research level. Apologies for not commenting on the original post. $\endgroup$ – Dave Clarke Sep 20 '12 at 11:18
  • $\begingroup$ @DaveClarke Essentially I'm asking how to turn a set of transformation rules into semantical definitions. Anyway hope I get an answer here! $\endgroup$ – asghar ashgari Sep 21 '12 at 12:51
  • $\begingroup$ If you have an existing set of transformation rules, perhaps you could write some of them in your question, to give the answerer something specific to work with. $\endgroup$ – Dave Clarke Sep 21 '12 at 13:07
  • $\begingroup$ I agree. Without (part of) the syntax definition and and idea what your informal semantics look like, you won't get a specific answer. $\endgroup$ – Raphael Sep 21 '12 at 13:13
  • $\begingroup$ This question: cs.stackexchange.com/questions/3313/… asks more or less the same thing. If you want any more specific information, you will need to ask a more specific question with examples etc. $\endgroup$ – Dave Clarke Sep 21 '12 at 13:52
5
$\begingroup$

What do you mean by "transitional semantics"? If you mean structural operational semantics using transition systems, then maybe a good place to start is a good text on the semantics of programming languages, Examples:

I recommend ignoring denotational semantics for your task.

Since the semantics of programming languages is really well-understood, most of the work in formalising DSLs usually comes from the domain-specific part of the language.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.