Children of type List<string>

I need to hold a variable declaration that can have one (e.g. 'x') or many (e.g., 'a,b,c') variable names on one line. When I declare it as property, there's no List<string> type. When I declare it in Children, again there's no possibility to declare the type as string. So how do I declare it?
4 comments
Hi Dmitri.
I suggest you make the "name" of the variable into a separate concept (holding the name), let's call it "MultiVarInstance" for example. And then have a child in the main concept (let's call the "main" concept "MultiVarDeclaration" for example), that will have multiple cardinality and will use MultiVarInstance as elements.
Working with List<String> at concept level is probably not possible. And even if it was, it would be much less flexible than having a separate concept for items.
Having smaller concepts gives you possibilities of adding more properties per-list-item in the future; If you worked directly with strings (names), you would have this possibility cut off.

Let me know if that helped.

Btw, what project are you using MPS for?

Best Wishes from LA :),
Karol Depka Pradzinski
0
Thanks. This was precisely the thing I wanted to avoid, but I guess there's no choice. The above is needed for VHDL port declarations.
0
Hello Dmitri,

I would also suggest the same solution as Karol. In particular if you have references to your ports, you need multiple nodes to seperate the target of each reference.

Do you plan to build a complete VHDL implementation inside MPS? I expect this as a real brave task ;). I'm also working on a framework for synchronous hardware design generating VHDL. I haven't publish sources yet, but you can find a paper about it here: http://ieeexplore.ieee.org/xpl/articleDetails.jsp?arnumber=6732310
Perhaps we can share some ideas.

Kind regards
Fabian
0
Actually, VHDL as a language seems very simple (compared to most). What concerns me is not 100% implementation but just having the generators I need to save time.
0

Please sign in to leave a comment.