vocabulary <http://flandersmake.be/cdf/vocabulary/statechart#> as statechart {
	
	extends <http://flandersmake.be/cdf/vocabulary/acyclic#> as acyclic
	extends <http://flandersmake.be/cdf/vocabulary/object_diagram#> as object_diagram
	extends <http://www.w3.org/2001/XMLSchema#> as xsd
	
	aspect element :> object_diagram:Object []
	
	aspect State :> element [
		restricts scalar property hasName to exactly 1
	]
	
	scalar property hasName :> object_diagram:hasField [
		domain State
		range xsd:string
		functional
	]
	
	concept OrState :> State [
		restricts relation hasDefaultState to exactly 1
		restricts relation hasChild to min 1
	]
	
	relation entity DefaultState :> object_diagram:Link [
		from OrState
		to State
		forward hasDefaultState
		reverse isDefaultStateOf
		functional
		asymmetric
		irreflexive
	]

	rule DefaultStateIsChild [
		OrState(P) ^ hasDefaultState(P,C) -> hasChild(P,C)
	]

	
	concept AndState :> State []
	
	relation entity Parent :> object_diagram:Link, acyclic:Acyclic [
		from State
		to State
		forward hasParent
		reverse hasChild
		functional
		asymmetric
		irreflexive
	]
		
	relation entity Transition :> object_diagram:Link, element [
		from State
		to State
		
		restricts scalar property hasLabel to exactly 1
	]
	
	scalar property hasLabel :> object_diagram:hasField [
		domain Transition
		range xsd:string
		functional
	]
	
	concept Model :> object_diagram:Model, object_diagram:Object [
		restricts relation hasRoot to exactly 1
		restricts all relation object_diagram:hasObject to element
	]
	
	relation entity Root :> object_diagram:Link [
		from Model
		to OrState
		forward hasRoot
		reverse rootOf
		functional
		asymmetric
		irreflexive
	]
}