Print Page | Close Window

Code Generator Tutorials

Printed From: MetaCase
Category:
Forum Name: MetaEdit+
Forum Description: All topics relating to MetaEdit+ or DSM
URL: https://www.metacase.com/forums/forum_posts.asp?TID=160
Printed Date: 27.Mar.2026 at 03:35
Software Version: Web Wiz Forums 12.05 - http://www.webwizforums.com


Topic: Code Generator Tutorials
Posted By: mpierce
Subject: Code Generator Tutorials
Date Posted: 22.Jul.2010 at 03:26
Greetings,
 
I'm definitely a noob when it  comes to domain specific modeling and languages. I'm currently designing a DSML for designing simple programs for an educational concurrent virtual machine (very limited capabilities so not a lot of features to the language) and I'm now at the stage where I need to create the code generators.
 
I've read the documentation on MERL and am looking for more, if there is any. I'll start hammering away at it, but I'm hoping there are some more explanations/tutorials in addition to the online manuals.
 
Thanks and best regards,
 
Mathew Pierce



Replies:
Posted By: stevek
Date Posted: 22.Jul.2010 at 14:20

Hi Mathew,

The manuals contain about 70 pages on generators, with the main content being in http://www.metacase.com/support/45/manuals/mwb/Mw-5.html - Workbench Chapter 5: Generators . The http://www.metacase.com/support/45/manuals/watchtut/we-Preface_.html - Watch and http://www.metacase.com/support/45/manuals/S60%20Phone%20Example.pdf - S60 Mobile Phone examples add some more: you can read and work through those links, and at the same time in the demo repository in MetaEdit+ you can see the models, metamodels, generators and output, and step through the generators with the http://www.metacase.com/support/45/manuals/mwb/Mw-5_2.html - debugger .

If you've read the manuals and walked through the examples, getting your hands dirty is probably the best way to proceed. Do a quick recap of http://www.metacase.com/support/45/manuals/mwb/Mw-5_3_1.html - 5.3.1 Getting started with MERL , and dive in to some relatively simple part of what you need to generate, e.g. the top-level structure.
 
Once you have more than a few dozen lines of MERL, you'll want to think about how best to structure your generators. A page of brief advice is in http://www.metacase.com/support/45/manuals/mwb/Mw-5_1_2.html - 5.1.2 Building non-trivial generators . The http://dsmbook.com/ - DSM book  would also be useful, with over 70 pages on generators covering theory, practice, and in-depth examples.
 
Of course, feel free to post here if you get stuck!


Posted By: mpierce
Date Posted: 22.Jul.2010 at 21:08
Many Thanks Steve! I did start doing some coding, mimicking some of the examples, and now I'm starting to get it. I've also got the book so I'll delve into that too. I'm having a blast with this stuff, probably the most fun I've had doing design in 15 years! :)
 
Best regards,
 
Matt



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.05 - http://www.webwizforums.com
Copyright ©2001-2022 Web Wiz Ltd. - https://www.webwiz.net