import models/SimpleClassDiagrams as SCD
include "primitives.alh"

SCD FiniteStateAutomata_Design{
    Class String {
        $
            if (bool_not(is_physical_string(self))):
                return "String has no string value"!
            else:
                return "OK"!
        $
    }

    Class State {
        name : String {
            target_lower_cardinality = 1
            target_upper_cardinality = 1
        }
    }

    Class InitialState {
        lower_cardinality = 1
        upper_cardinality = 1
    }

    Association Transition (State, State) {
        event : String {
            target_lower_cardinality = 1
            target_upper_cardinality = 1
        }

        raise : String {
            target_upper_cardinality = 1
        }
    }

    Inheritance (InitialState, State){}
}

export FiniteStateAutomata_Design to models/FiniteStateAutomata_Design
