Skip to content

Towards the Automated Generation of Consistent, Diverse, Scalable, and Realistic Graph Models

Oszkár Semeráth edited this page Sep 16, 2017 · 7 revisions

This page contains supplementary material for the measurements taken in book chapter "Towards the Automated Generation of Consistent, Diverse, Scalable, and Realistic Graph Models". For more details, ask the authors:

Yakindu Metamodel

We have extraced a simplified (pruned) metamodel from the Yakindu Statechart tool, which only contains elements relevant to the state hierarchy and transitions (excluding namespace management and action language). The simplified metamodel is illustrated below:

Simplified Metamodel

The .ecore metamodel is downloadable from here.

Well-Formedness Constraints

We have implemented several well-formedness constraint as graph patterns from the actual validation rules of the Yakindu developement environment. Patterns annoted by @Constraint indicate an error pattern.

package hu.bme.mit.inf.dslreasoner.partialsnapshot_mavo.yakindu

import "hu.bme.mit.inf.yakindumm"

/////////
// Entry
/////////

pattern entryInRegion(r1 : Region, e1 : Entry) {
	Region.vertices(r1, e1);
}

@Constraint(severity="error", message="error", key = {r1})
pattern noEntryInRegion(r1 : Region) {
	neg find entryInRegion(r1, _);
}

@Constraint(severity="error", message="error", key = {r})
pattern multipleEntryInRegion(r : Region) {
	find entryInRegion(r, e1);
	find entryInRegion(r, e2);
	e1 != e2;
}

pattern transition(t : Transition, src : Vertex, trg : Vertex) {
	Transition.source(t, src);
	Transition.target(t, trg);
}

@Constraint(severity="error", message="error", key = {e})
pattern incomingToEntry(t : Transition, e : Entry) {
	find transition(t, _, e);
}

@Constraint(severity="error", message="error", key = {e})
pattern noOutgoingTransitionFromEntry(e : Entry) {
	neg find transition(_, e, _);
}

@Constraint(severity="error", message="error", key = {e})
pattern multipleTransitionFromEntry(e : Entry, t1 : Transition, t2: Transition) {
	Entry.outgoingTransitions(e,t1);
	Entry.outgoingTransitions(e,t2);
	t1!=t2;
}

/////////
// Exit
/////////

@Constraint(severity="error", message="error", key = {e})
pattern outgoingFromExit(t : Transition, e : Exit) {
	Exit.outgoingTransitions(e,t);
}

/////////
// Final
/////////

@Constraint(severity="error", message="error", key = {f})
pattern outgoingFromFinal(t : Transition, f : FinalState) {
	FinalState.outgoingTransitions(f,t);
}

/////////
// State vs Region
/////////

@Constraint(severity="error", message="error", key = {region})
pattern noStateInRegion(region: Region) {
	neg find StateInRegion(region,_);
}
pattern StateInRegion(region: Region, state: State) {
	Region.vertices(region,state);
}

/////////
// Choice
/////////

@Constraint(severity="error", message="error", key = {c})
pattern choiceHasNoOutgoing(c : Choice) {
	neg find transition(_, c, _);
}

@Constraint(severity="error", message="error", key = {c})
pattern choiceHasNoIncoming(c: Choice) {
	neg find transition(_, _, c);
}

Instance Models

We have generated several instance models using Alloy and VIATRA-Solver. The models are available here: https://github.com/FTSRG/publication-pages/tree/master/FMHE-Models

Clone this wiki locally