Home » Modeling » TMF (Xtext) » Hint on how to implement dynamically enabled/disabled language features(Hints on which parts of xtext would need to be customized for a language to have a dynamical grammar/model. Where "dynamic" means in this case to be able to enabled/ disable rules)
|Re: Hint on how to implement dynamically enabled/disabled language features [message #1738003 is a reply to message #1737930]
|Thu, 14 July 2016 20:42
| Javier Fernandes
Registered: July 2009
Thanks Karsten !
I was thinking more like in a single language than composing multiples. And introducing some "intrusive changes" to enable / disabled features.
But I could try what you said.
@Lorenzo: also thanks for your response. I'll take a look at it.
As for the language itself, we already have one that now has more than 2 years. It is called Wollok.
We have been using it in two national universities in Argentina. Soon also to be used in a public high-school.
It is an interpreted, dynamically typed language (but with many static checks).
And it combines objects with classes.
Over many years of teaching OOP we (a group of professors from several national universities in Argentina) elaborated what we call an "incremental learning path" which, to summarise, starts just with objects and introduces classes later.
We initially used Pharo's Smalltalk, and then a tool that we built (not me, but some other colleagues) on top of it for working only with objects called Ozono (Paper here, and link to the tool sorry only in spanish).
Wollok is the "evolution" of such experiences, built on top of XText (I have been also using XText to teach DSLs in another subjects also in nat univ here)
Two other papers we wrote
- Wollok - Relearning How To Teach Object-Oriented Programming
- Instances and classes in the Introduction of Object Oriented Programming
Here is the github page
The language reference (quiet long)
And some screenshots on the release notes (sorry, pending two latest releases notes )
Examples (need a refactor)
We are currently working (amongst other subjects) in a webapp to try the language online, and contribute with examples, tests (ending up in automatic branches and PRs).
It is in a really alpha state
Another prototype that we are working on is an (almost) automatic graphical interface for objects called "Wollok Game". So that professors can build "incomplete" games, or bundle assets, and then student just need to code the domain code, but still be able to "see" their logic running in a visual way.
Sorry only in spanish for the moment, but you can check the screenshots
We also have a test plugin, similar to JUnit in eclipse, a debugger, a Sublime plugin that along with a headless version of the product allows to run wollok in a lightweight way, ACEEditor support (web editor), and some work-in-progress diagrams
The language is starting to have advanced feature like mixins (similar to scala's traits) and we are very concerned on the fact that starters students shouldn't be bothered or confused with advanced topic (that for example was took in consideration while thinking on the modularization and import system. You don't want the student to write imports and packages for your first hello-world program. Even if you just tell them "write this as it is, we will explain it later")
We would love to have language features getting "unlocked" as far as they go through the learning process.
Anyway. I think that I will get better knowledge on AntLR and the inner details of how XText generates the parser to see if there's a way to dynamically change that
[Updated on: Thu, 14 July 2016 20:46]
Report message to a moderator
Current Time: Tue Feb 27 21:34:37 GMT 2024
Powered by FUDForum
. Page generated in 0.02313 seconds