Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9233859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:39:07+00:00 2026-06-18T06:39:07+00:00

I’ve designed a very simple domain specific language(DSL) to specify and execute full-screen interactive

  • 0

I’ve designed a very simple domain specific language(DSL) to specify and execute full-screen interactive behavior on devices. It’s event based action language with XML as the carrier syntax. Example of it is here:

<state no="15000" >
    <timeout>30</timeout>
    <backgroundactions>
      <as3function name="hideImages">
      </as3function>
    </backgroundactions>
    <screen>
      <components>
        <textfield x="50" y="120" width="924" textsize="50" background="1" border="1">
          <text say="1">
            <part type="text">Who would you like to call?</part>
          </text>          
        </textfield>
        <button label="MENU" width="80" height="30" x="920" y="10" textsize="14" icon="none" adjtext="-5">
          <event name="clicked">
            <action preconditions="no" name="transition">
              <parameter>
                <type>state</type>
                <name>n</name>
                <value>800</value>
              </parameter>
            </action>
          </event>
        </button>
        <button label="My contacts" width="250" height="200" x="212" y="500" textsize="40" icon="iconRight2.png" iconx="65" icony="20" adjtext="35">
          <event name="clicked">
            <action preconditions="no" name="transition">
              <parameter>
                <type>state</type>
                <name>n</name>
                <value>15007</value>
              </parameter>
            </action>
          </event>
        </button>
        <button label="Other" width="250" height="200" x="562" y="500" textsize="40" icon="iconWrong2.png" iconx="65" icony="20" adjtext="35">
          <event name="clicked">
            <action preconditions="no" name="transition">
              <parameter>
                <type>state</type>
                <name>n</name>
                <value>15100</value>
              </parameter>
            </action>
          </event>
        </button>
      </components>
    </screen>
  </state>

It semantically means the following:
Semantic interpretation of the DSL

It’s a state transition language where the programmer declaratively describes the UI layout and the events to which the program should react to and the actions flowing the events. The DSL is designed for readability. Here’s a short description of the nodes:

  • timeout: The duration of a state timer while executing each state
  • backgroundactions:these represent the actions executed on-entering a state
  • state screen: screen components and events associated with them
  • expectedevents: Events expected by the current state. these are async
    events

Is there a way to represent this particular language in a more formal description as a grammar or meta-model(i am not familiar with language modeling techniques). My idea is to write a language specifications for this DSL so that other programmers in my team can generate scripts in other languages of their choice such as python or lua from this specifications. Possibly even code-generate this XML as well? What would be the best way to represent this? I have been going through lots of language tools and dsl tools, but i can’t figure out what would be most efficient for this langauge? someone with expertise can help me in the right direction and give a headstart on the steps that need to be done.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T06:39:08+00:00Added an answer on June 18, 2026 at 6:39 am

    Use of DSLs to get close to the actual problem domain (UI and related events) makes perfectly sense. I’m aware of several metamodels specified for a certain UI, such as: mobile phones, sports computers, automotive infotainment systems, various touchscreen devices and web apps (see some public languages at http://www.metacase.com/cases/dsm_examples-ui.html). The generators can then be used to produce actual code, prototypes or test scripts.

    To define these domain-specific modeling languages you specify first the metamodel including concepts (e.g. button, transition, state) and related rules (e.g. pressing button triggers a transition) followed by some notation. Then you can test the language to define a sample models like you did with the XML, and finally having some models ready, you can define the generators producing the expected results. With this appraoch companies like Panasonic, Polar and EADS have reported about better quality and increase speed. I’ve been personally involved is several such cases providing assistance, and wrote an article on the language definition at http://www.devx.com/enterprise/Article/30550. Hope this helps.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and
I am doing a simple coin flipping experiment for class that involves flipping a
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm making a simple page using Google Maps API 3. My first. One marker
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
Seemingly simple, but I cannot find anything relevant on the web. What is the
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.