How to specify requirements for diagrams?

Hello GoDiagram users and developers.

I have a pretty general question about the techniques, styles and methods about specifying the requirements (also constrains and/or scenarios) how your diagram (not necessary the implementation) should act. Perhaps I don't express myself clear enough. So I will describe the specific situation in which our project is. I'm sure that some of you have been there and overcome it one or other way.

I currently work on a project that must produce a tool that transforms a custom domain specific graphical modeling notation (called ProcGraph) into some programming language. Because of the complexity we decide to develop prototype, which only allows diagram modeling. For that matter we want to use GoDiagram (which shouldn't be important on the level of requirements specification). Because all diagramming frameworks are very customizable and meant for a broad use, we must adopt it for our needs. Personally I've never developed such a product and we have major problems in our team (which consists mainly of electrical engineers) to specify how our diagram elements should act, interact, behave, which constrains they have... I will name those demands diagramming requirements. (The notation is also under development and some changes must definitely be made, the specification is just a scientific article long a couple of sites, which in I think isn't enough, but still they want have it implemented). I my opinion it is very important to specify all these things in some way so that we can later verify the prototype and validate the requirements with our users. Because these requirements are very different form the normal requirements of a software project, I'm not sure which technique to use for capturing them. I've spend the last month reading books on requirements and found nothing useful. I would be very thankful if someone could share how he has overcome this huge issue.

Since now I have captured these requirements or scenarios of possible situations with USE CASES, but the more I thing about it, the more inappropriate seems this technique. Here is the example:

Overview of the system:

![](upload://sbBqtbXCDvTPqTChrNPjkof8dDB.gif)

The insides of modifying an existing relation:

![](upload://sbBqtbXCDvTPqTChrNPjkof8dDB.gif)

Then I described each use case, like this:

1. Model an entity;

<table =“MsoTableGrid” style=“border: medium none ; border-collapse: collapse;” border=“1” cellpadding=“0” cellspacing=“0”>

Name:

Create new Element

Id:

001

Implemented:

Half

Prerequisite(s):

/

Condition(s):

· The bounds of the created element do not intersect with bounds of any other object (except relations)

Action(s):

· Create new element

· Place its center on the mouse click point

· Adjust it to the grid

Interactive behavior:

/

<table =“MsoTableGrid” style=“border: medium none ; border-collapse: collapse;” border=“1” cellpadding=“0” cellspacing=“0”>

Name:

Deny creation of new Element

Id:

002

Implemented:

Half

Prerequisite(s):

/

Condition(s):

· The bounds of the created element intersect with bounds of another object

Action(s):

· Ignore the mouse click

Interactive behavior:

· Change mouse cursor to No symbol, when we are in the intersection area

But such a specification seems very akward too overwhelming. It also seems unnatural because use cases aren't meant for such modeling (it's weird to model each button and menu item in the GUI as an use case)

Any comments on that perhaps?

I would really be very thankful for anykind of comment or help.

Toma¾ L. @ E2 @ "Jo¾ef Stefan" Institute

I think you first need to get the syntax and semantics of your visual language specified precisely. There must be a clear mapping of each visual construct to the textual language to which you are translating/compiling.
Then you can worry about figuring out what editing operations should be possible, making sure that they prevent users from making errors if at all possible, and providing easy to use constructs and gestures.

Hello Walter,

I'm aware of this but unfortunately this won't happen so fast, especial the transformation definitions, because the final tool, won't be shipped so fast. But I must implement a prototype, to see the responses of users and stakeholders...it's pretty difficult because none of them is a software engineer. The most realistic scenario is that the notation will evolve and be updated during the realization of the CASE tool to avoid problems in implementation/use.

Walter have you had some experience in defining what should be allowed and shouldn’t
be to the user. I mean any special technique or method to do that?
<o:p></o:p>

Thank you for the quick response,

Toma¾ L. @ E2 @ “Jo¾ef
Stefan” Institute

Oh yes, we have had a lot of experience defining and implementing various kinds of visual languages. That was the original impetus for the creation of Northwoods Software. We called our technology Fully Visual Programming.
One specific manifestation of that technology was called Sanscript. Not only did it define a visual language, but it also implemented an integrated editor, interpreter, and debugging facilities, with various code generation possibilities (C++, Java, JavaScript, and more obscure languages). Read more at:
http://www.nwoods.com/sanscript
You can get it for free from:
http://www.nwoods.com/sanscript/evaluation.htm
Our business actually depends on a lot of Sanscript applications to handle orders, do bookkeeping, and do other business automation.
We then started selling part of FVP, GO++, as a separate library. Our design improved with JGo and improved again with GoDiagram. Always we have had our experiences with implementing non-trivial visual applications in mind when designing GoDiagram. That’s why GoDiagram has the flexibility it has that the competition doesn’t, even when that flexibility might mean that it appears there is often more than one way to do things.

However, there aren’t many simple and concise things to recommend that would apply to most design situations such as yours. But maybe I can add to what I said before.
You should do the basic prototyping on paper. Implementing anything in software, unless you already have something that would be easy to modify as we did with FVP for our OEM customers, will take too much time.
Your design should be driven initially by use cases which are high-level tasks only. Not more detailed tasks, but only the big-picture requirements. Then you can get a rough idea of whether the visual designs are intuitive and whether it’s possible to generate code from that.