Search in sources :

Example 41 with AnnexSubclause

use of org.osate.aadl2.AnnexSubclause in project VERDICT by ge-high-assurance.

the class VerdictJavaValidator method checkStatement.

/**
 * Check that cyber relations/requirements have unique, non-empty IDs
 * and they are only located in subsystems/top-level systems, respectively.
 *
 * @param statement
 */
@Check(CheckType.FAST)
public void checkStatement(Statement statement) {
    String statementType;
    boolean shouldBeSubcomponent;
    if (statement instanceof CyberRel) {
        statementType = "Cyber relation";
        shouldBeSubcomponent = true;
    } else if (statement instanceof CyberReq) {
        statementType = "Cyber requirement";
        shouldBeSubcomponent = false;
    } else if (statement instanceof CyberMission) {
        statementType = "Mission";
        shouldBeSubcomponent = false;
    } else if (statement instanceof SafetyReq) {
        statementType = "Safety requirement";
        shouldBeSubcomponent = false;
    } else if (statement instanceof SafetyRel) {
        statementType = "Safety relation";
        shouldBeSubcomponent = true;
    } else if (statement instanceof Event) {
        statementType = "Event";
        shouldBeSubcomponent = true;
    } else {
        throw new RuntimeException("statement is not CyberRel, or CyberReq, or Mission, or SafetyReq, or SafetyRel, or Event!?");
    }
    if (statement.getId().length() == 0) {
        error(statementType + " must specify an ID", VerdictPackage.Literals.STATEMENT__ID);
        return;
    }
    // Find enclosing system
    EObject container = statement;
    while (container != null && !(container instanceof SystemType || container instanceof PublicPackageSection)) {
        container = container.eContainer();
    }
    /*
		 * Within the same component, we need to make sure that cyber relations, cyber requirements,
		 * safety relations, safety missions, events do not have naming conflicts respectively.
		 */
    Set<String> otherIds = new HashSet<>();
    if (container instanceof SystemType) {
        SystemType currentSystem = (SystemType) container;
        // Get enclosing file
        while (!(container instanceof PublicPackageSection)) {
            container = container.eContainer();
        }
        // Get all verdict annexes for this system
        for (AnnexSubclause annex : currentSystem.getOwnedAnnexSubclauses()) {
            if ("verdict".equals(annex.getName())) {
                Verdict subclause = VerdictUtil.getVerdict(annex);
                // We only check that within the same statement category, there should not be naming conflicts.
                for (Statement other : subclause.getElements()) {
                    // Don't double-count self
                    if (!statement.equals(other)) {
                        if ((statement instanceof CyberRel) && (other instanceof CyberRel)) {
                            otherIds.add(other.getId());
                        } else if ((statement instanceof CyberReq) && (other instanceof CyberReq)) {
                            otherIds.add(other.getId());
                        } else if ((statement instanceof CyberMission) && (other instanceof CyberMission)) {
                            otherIds.add(other.getId());
                        } else if ((statement instanceof SafetyReq) && (other instanceof SafetyReq)) {
                            otherIds.add(other.getId());
                        } else if ((statement instanceof SafetyRel) && (other instanceof SafetyRel)) {
                            otherIds.add(other.getId());
                        } else if ((statement instanceof Event) && (other instanceof Event)) {
                            otherIds.add(other.getId());
                        }
                    }
                }
            }
        }
        /*
			 * A system is a top-level system if it is not a subcomponent
			 * of any other system (cyber/safety requirements are valid).
			 *
			 * If it is a subcomponent of another system, then it is a
			 * subcomponent (cyber/safety relations are valid).
			 */
        PublicPackageSection pack = (PublicPackageSection) container;
        // Find all system impls
        for (Classifier cls : pack.getOwnedClassifiers()) {
            if (cls instanceof SystemImplementation) {
                // Grab the dependency/subcomponent tree
                SystemImplementation systemImpl = (SystemImplementation) cls;
                for (Subcomponent sub : systemImpl.getAllSubcomponents()) {
                    if (sub.getComponentImplementation() != null) {
                        subcomponents.add(sub.getComponentImplementation().getType());
                    }
                    subcomponents.add(sub.getSubcomponentType());
                }
            }
        }
        boolean isSubcomponent = subcomponents.contains(currentSystem);
        if (isSubcomponent && !shouldBeSubcomponent) {
            warning(statementType + " not allowed in subcomponent system");
        } else if (!isSubcomponent && shouldBeSubcomponent) {
            warning(statementType + " not allowed in top-level system");
        }
        if (otherIds.contains(statement.getId())) {
            error("Duplicate ID " + statement.getId(), VerdictPackage.Literals.STATEMENT__ID);
        }
    }
    // Perform extra checks for missions
    if (statement instanceof CyberMission) {
        checkMission((CyberMission) statement);
    }
    // And cyber reqs
    if (statement instanceof CyberReq) {
        checkCyberReq((CyberReq) statement);
    }
}
Also used : CyberRel(com.ge.research.osate.verdict.dsl.verdict.CyberRel) CyberMission(com.ge.research.osate.verdict.dsl.verdict.CyberMission) CyberReq(com.ge.research.osate.verdict.dsl.verdict.CyberReq) ThreatStatement(com.ge.research.osate.verdict.dsl.verdict.ThreatStatement) Statement(com.ge.research.osate.verdict.dsl.verdict.Statement) SystemType(org.osate.aadl2.SystemType) Classifier(org.osate.aadl2.Classifier) PublicPackageSection(org.osate.aadl2.PublicPackageSection) SafetyRel(com.ge.research.osate.verdict.dsl.verdict.SafetyRel) SystemImplementation(org.osate.aadl2.SystemImplementation) EObject(org.eclipse.emf.ecore.EObject) Subcomponent(org.osate.aadl2.Subcomponent) Event(com.ge.research.osate.verdict.dsl.verdict.Event) SafetyReq(com.ge.research.osate.verdict.dsl.verdict.SafetyReq) AnnexSubclause(org.osate.aadl2.AnnexSubclause) HashSet(java.util.HashSet) Verdict(com.ge.research.osate.verdict.dsl.verdict.Verdict) Check(org.eclipse.xtext.validation.Check)

Example 42 with AnnexSubclause

use of org.osate.aadl2.AnnexSubclause in project VERDICT by ge-high-assurance.

the class Aadl2Vdm method translateMemoryTypeObjects.

// End of translateThreadTypeObjects
/**
 * Analyzing each memoryType:
 * 1. Determine if it is a lower-level system or higher-level system
 * 2. If lower-level, add to componenmemType list attribute of Model
 * 	2.1 Populate the port, contract, cyberRel, safetyRel, event, id, compCategory
 *      fields of componenmemType of the Model object
 * 3. If higher-level, assign to Model
 * 	3.1 Populate the safetyReq
 *      cyberReq, mission fields of Model object
 * @param memoryTypes
 * @param m1
 * @return
 */
public Model translateMemoryTypeObjects(List<MemoryType> memoryTypes, Model m1, HashSet<String> dataTypeDecl) {
    for (MemoryType memType : memoryTypes) {
        // variables for unpacking memType
        List<Event> events = new ArrayList<>();
        List<CyberMission> missionReqs = new ArrayList<>();
        List<CyberRel> cyberRels = new ArrayList<>();
        List<SafetyRel> safetyRels = new ArrayList<>();
        List<CyberReq> cyberReqs = new ArrayList<>();
        List<SafetyReq> safetyReqs = new ArrayList<>();
        // a flag to check if a higher -level component has already been found
        boolean higher_flag = false;
        // unpacking memType
        for (AnnexSubclause annex : memType.getOwnedAnnexSubclauses()) {
            if (annex.getName().equalsIgnoreCase("verdict")) {
                Verdict verdictAnnex = VerdictUtil.getVerdict(annex);
                for (Statement statement : verdictAnnex.getElements()) {
                    if (statement instanceof Event) {
                        events.add((Event) statement);
                    } else if (statement instanceof CyberMission) {
                        missionReqs.add((CyberMission) statement);
                    } else if (statement instanceof CyberReq) {
                        cyberReqs.add((CyberReq) statement);
                    } else if (statement instanceof CyberRel) {
                        cyberRels.add((CyberRel) statement);
                    } else if (statement instanceof SafetyReq) {
                        safetyReqs.add((SafetyReq) statement);
                    } else if (statement instanceof SafetyRel) {
                        safetyRels.add((SafetyRel) statement);
                    }
                }
            }
        }
        /**
         *  For every MemoryType,
         *  populate the id, name, compCateg, port, event,
         *  cyberRel, and safetyRel fields of componenmemType
         *  and add it to the list of componenmemType
         *  of the Model object
         */
        if (true) {
            // No Filter-- do for all System Types
            // to pack the memType as a VDM component
            verdict.vdm.vdm_model.ComponentType packComponent = new verdict.vdm.vdm_model.ComponentType();
            // Note: Not populating "contract" for now
            // ISSUE: There is no getId() function for memoryType
            packComponent.setId(memType.getQualifiedName());
            // populating "name"
            packComponent.setName(memType.getName());
            // populating "compCateg"
            packComponent.setCompCateg(memType.getCategory().getName());
            // get all bus accesses and store them as ports
            List<BusAccess> busAccesses = memType.getOwnedBusAccesses();
            // checking each busAccess's details and adding it to the port list
            for (BusAccess busAccess : busAccesses) {
                String portName = busAccess.getName();
                String modeString = "in";
                if (busAccess.getKind() == AccessType.PROVIDES) {
                    modeString = "providesBusAccess";
                } else if (busAccess.getKind() == AccessType.REQUIRES) {
                    modeString = "requiresBusAccess";
                }
                verdict.vdm.vdm_model.Port newPort = createVdmPort(portName, modeString, busAccess.getQualifiedName());
                // Note: Not populating "type" for now
                // ISSUE: "probe", "event", and "id" not found in DataPort class or superclass
                // add to port list of component
                packComponent.getPort().add(newPort);
            }
            // End of checking each busAccess
            // ISSUE: no getOwnedDataAccesses for memoryTypes
            // get all ports
            List<DataPort> dataPorts = memType.getOwnedDataPorts();
            // checking each port's mode and name and adding it to the port list
            for (DataPort dataPort : dataPorts) {
                verdict.vdm.vdm_model.Port newPort = createVdmPort(dataPort, m1, dataTypeDecl);
                // Note: Not populating "type" for now
                // ISSUE: "probe", "event", and "id" not found in DataPort class or superclass
                // add to port list of component
                packComponent.getPort().add(newPort);
            }
            // End of checking each port
            // get all event data ports
            List<EventDataPort> eventDataPorts = memType.getOwnedEventDataPorts();
            for (EventDataPort eventDataPort : eventDataPorts) {
                verdict.vdm.vdm_model.Port newPort = createVdmPort(eventDataPort, m1, dataTypeDecl);
                // add to port list of component
                packComponent.getPort().add(newPort);
            }
            // get all event ports
            List<EventPort> eventPorts = memType.getOwnedEventPorts();
            for (EventPort eventPort : eventPorts) {
                verdict.vdm.vdm_model.Port newPort = createVdmEventPort(eventPort);
                // add to port list of component
                packComponent.getPort().add(newPort);
            }
            // packing all events and adding to component
            for (Event anEvent : events) {
                // To pack the event as a VDM event
                verdict.vdm.vdm_model.Event packEvent = createVdmEvent(anEvent);
                // adding to the list of component's events
                packComponent.getEvent().add(packEvent);
            }
            // packing all cyberRels and adding to component
            for (CyberRel aCyberRel : cyberRels) {
                // To pack the cyberRel as a VDM event
                verdict.vdm.vdm_model.CyberRel packCyberRel = createVdmCyberRel(aCyberRel);
                // adding to the list of component's Cyber relations
                packComponent.getCyberRel().add(packCyberRel);
            }
            // packing all safetyRels and adding to component
            for (SafetyRel aSafetyRel : safetyRels) {
                // To pack the safetyRel as a VDM event
                verdict.vdm.vdm_model.SafetyRel packSafetyRel = createVdmSafetyRel(aSafetyRel);
                // adding to the list of component's Safety relations
                packComponent.getSafetyRel().add(packSafetyRel);
            }
            // End of packing all safetyRels
            // adding to the list of componenmemTypes of the Model object
            m1.getComponentType().add(packComponent);
        }
        /**
         * If a high-level system
         *  populate the name, safetyReq, cyberReq, and mission
         *  for the model object
         */
        if (!cyberReqs.isEmpty() || !safetyReqs.isEmpty() || !missionReqs.isEmpty()) {
            // checking if a high-level system has already been found
            if (higher_flag == false) {
                higher_flag = true;
            } else {
                System.out.println("Warning: Multiple high-level systems detected!");
            }
            // populating name
            m1.setName(memType.getName());
            // packing all safetyReqs and adding to model
            for (SafetyReq aSafetyReq : safetyReqs) {
                // To pack the safettReq as a VDM event
                verdict.vdm.vdm_model.SafetyReq packSafetyReq = createVdmSafetyReq(aSafetyReq, memType.getFullName());
                // adding to the list of model's Safety requirements
                m1.getSafetyReq().add(packSafetyReq);
            }
            // packing all cyberReqs and adding to model
            for (CyberReq aCyberReq : cyberReqs) {
                // To pack the safettReq as a VDM event
                verdict.vdm.vdm_model.CyberReq packCyberReq = createVdmCyberReq(aCyberReq, memType.getFullName());
                // adding to the list of model's Cyber requirements
                m1.getCyberReq().add(packCyberReq);
            }
            // packing all missionReqs and adding to model
            for (CyberMission aMission : missionReqs) {
                // To pack the safettReq as a VDM event
                verdict.vdm.vdm_model.Mission packMission = createVdmMission(aMission);
                // adding to the list of model's Mission
                m1.getMission().add(packMission);
            }
        // End of packing all missionReqs
        }
    // End of if a higher-level system
    }
    // returning the populated Model
    return m1;
}
Also used : ArrayList(java.util.ArrayList) Port(verdict.vdm.vdm_model.Port) DataPort(org.osate.aadl2.DataPort) EventDataPort(org.osate.aadl2.EventDataPort) EventPort(org.osate.aadl2.EventPort) EventDataPort(org.osate.aadl2.EventDataPort) MemoryType(org.osate.aadl2.MemoryType) Verdict(com.ge.research.osate.verdict.dsl.verdict.Verdict) CyberRel(com.ge.research.osate.verdict.dsl.verdict.CyberRel) CyberMission(com.ge.research.osate.verdict.dsl.verdict.CyberMission) BusAccess(org.osate.aadl2.BusAccess) CyberReq(com.ge.research.osate.verdict.dsl.verdict.CyberReq) Statement(com.ge.research.osate.verdict.dsl.verdict.Statement) SafetyRel(com.ge.research.osate.verdict.dsl.verdict.SafetyRel) Event(com.ge.research.osate.verdict.dsl.verdict.Event) SafetyReq(com.ge.research.osate.verdict.dsl.verdict.SafetyReq) AnnexSubclause(org.osate.aadl2.AnnexSubclause)

Example 43 with AnnexSubclause

use of org.osate.aadl2.AnnexSubclause in project VERDICT by ge-high-assurance.

the class VerdictUtil method getEvents.

/**
 * Get the (linked) set of all cyber requirements in the AADL AST of which obj is part.
 *
 * @param obj
 * @return
 */
public static Set<String> getEvents(EObject obj) {
    Set<String> cyberReqs = new LinkedHashSet<>();
    // Find public package section
    EObject container = obj;
    while (container != null && !(container instanceof PublicPackageSection)) {
        container = container.eContainer();
    }
    PublicPackageSection pack = (PublicPackageSection) container;
    if (pack != null && pack.getOwnedClassifiers() != null) {
        // Find all systems
        for (Classifier cls : pack.getOwnedClassifiers()) {
            if (cls instanceof SystemType) {
                SystemType system = (SystemType) cls;
                // Get all verdict annexes for this system
                for (AnnexSubclause annex : system.getOwnedAnnexSubclauses()) {
                    if ("verdict".equals(annex.getName())) {
                        Verdict subclause = VerdictUtil.getVerdict(annex);
                        // Get all cyber req IDs
                        for (Statement statement : subclause.getElements()) {
                            if (statement instanceof CyberReq) {
                                cyberReqs.add(statement.getId());
                            }
                        }
                    }
                }
            }
        }
    }
    return cyberReqs;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) PublicPackageSection(org.osate.aadl2.PublicPackageSection) CyberReq(com.ge.research.osate.verdict.dsl.verdict.CyberReq) Statement(com.ge.research.osate.verdict.dsl.verdict.Statement) EObject(org.eclipse.emf.ecore.EObject) SystemType(org.osate.aadl2.SystemType) Classifier(org.osate.aadl2.Classifier) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause) AnnexSubclause(org.osate.aadl2.AnnexSubclause) Verdict(com.ge.research.osate.verdict.dsl.verdict.Verdict)

Example 44 with AnnexSubclause

use of org.osate.aadl2.AnnexSubclause in project VERDICT by ge-high-assurance.

the class VerdictUtil method getAllReqs.

/**
 * Get the (linked) set of all cyber requirements in the AADL AST of which obj is part.
 *
 * @param obj
 * @return
 */
public static Set<String> getAllReqs(EObject obj) {
    Set<String> reqs = new LinkedHashSet<>();
    // Find public package section
    EObject container = obj;
    while (container != null && !(container instanceof PublicPackageSection)) {
        container = container.eContainer();
    }
    PublicPackageSection pack = (PublicPackageSection) container;
    if (pack != null && pack.getOwnedClassifiers() != null) {
        // Find all systems
        for (Classifier cls : pack.getOwnedClassifiers()) {
            if (cls instanceof SystemType) {
                SystemType system = (SystemType) cls;
                // Get all verdict annexes for this system
                for (AnnexSubclause annex : system.getOwnedAnnexSubclauses()) {
                    if ("verdict".equals(annex.getName())) {
                        Verdict subclause = VerdictUtil.getVerdict(annex);
                        // Get all cyber req IDs
                        for (Statement statement : subclause.getElements()) {
                            if (statement instanceof CyberReq) {
                                reqs.add(statement.getId());
                            } else if (statement instanceof SafetyReq) {
                                reqs.add(statement.getId());
                            }
                        }
                    }
                }
            }
        }
    }
    return reqs;
}
Also used : LinkedHashSet(java.util.LinkedHashSet) PublicPackageSection(org.osate.aadl2.PublicPackageSection) CyberReq(com.ge.research.osate.verdict.dsl.verdict.CyberReq) Statement(com.ge.research.osate.verdict.dsl.verdict.Statement) EObject(org.eclipse.emf.ecore.EObject) SystemType(org.osate.aadl2.SystemType) Classifier(org.osate.aadl2.Classifier) SafetyReq(com.ge.research.osate.verdict.dsl.verdict.SafetyReq) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause) AnnexSubclause(org.osate.aadl2.AnnexSubclause) Verdict(com.ge.research.osate.verdict.dsl.verdict.Verdict)

Example 45 with AnnexSubclause

use of org.osate.aadl2.AnnexSubclause in project osate2 by osate.

the class AadlBaUnparser method initSwitches.

/**
 * Specific aadlba switch to unparse components
 */
protected void initSwitches() {
    aadlbaSwitch = new AadlBaSwitch<String>() {

        /**
         * Top-level method to unparse "behavior_specification"
         * annexsubclause
         */
        // public String caseAnnexSubclause(AnnexSubclause object) {
        // //FIXME : TODO : update location reference
        // 
        // process((BehaviorAnnex) object);
        // 
        // return DONE;
        // }
        /**
         * Unparse behaviorannex
         */
        @Override
        public String caseBehaviorAnnex(BehaviorAnnex object) {
            // DB: Improve code formatting
            aadlbaText.addOutputNewline("");
            // FIXME : TODO : update location reference
            if (object.isSetVariables()) {
                aadlbaText.addOutputNewline("variables");
                aadlbaText.incrementIndent();
                processEList(object.getVariables());
                aadlbaText.decrementIndent();
            }
            if (object.isSetStates()) {
                aadlbaText.addOutputNewline("states");
                aadlbaText.incrementIndent();
                processEList(object.getStates());
                aadlbaText.decrementIndent();
            }
            if (object.isSetTransitions()) {
                aadlbaText.addOutputNewline("transitions");
                aadlbaText.incrementIndent();
                processEList(object.getTransitions());
                aadlbaText.decrementIndent();
            }
            return DONE;
        }

        /**
         * Unparse behaviorvariable
         */
        @Override
        public String caseBehaviorVariable(BehaviorVariable object) {
            // FIXME : TODO : update location reference
            aadlbaText.addOutput(object.getName());
            for (ArrayDimension ad : object.getArrayDimensions()) {
                aadlbaText.addOutput("[");
                if (ad instanceof DeclarativeArrayDimension) {
                    DeclarativeArrayDimension dad = (DeclarativeArrayDimension) ad;
                    process(dad.getDimension());
                } else if (ad instanceof ArrayDimension) {
                    aadlbaText.addOutput(Long.toString(ad.getSize().getSize()));
                }
                aadlbaText.addOutput("]");
            }
            aadlbaText.addOutput(" : ");
            if (object.getDataClassifier() instanceof QualifiedNamedElement) {
                QualifiedNamedElement qn = (QualifiedNamedElement) object.getDataClassifier();
                aadlbaText.addOutput(getNamespace(qn));
                process(qn);
            } else if (object.getDataClassifier() instanceof DataClassifier) {
                aadlbaText.addOutput(object.getDataClassifier().getQualifiedName());
            }
            aadlbaText.addOutputNewline(";");
            return DONE;
        }

        private String getNamespace(final QualifiedNamedElement qn) {
            final Identifier baNameSpace = qn.getBaNamespace();
            final StringBuilder nameSpace = new StringBuilder();
            if (baNameSpace != null && !Strings.isNullOrEmpty(baNameSpace.getId())) {
                nameSpace.append(baNameSpace.getId()).append("::");
            }
            return nameSpace.toString();
        }

        /**
         * Unparse behaviorstate
         */
        @Override
        public String caseBehaviorState(BehaviorState object) {
            // FIXME : TODO : update location reference
            aadlbaText.addOutput(object.getName());
            aadlbaText.addOutput(" : ");
            if (object.isInitial()) {
                aadlbaText.addOutput("initial ");
            }
            if (object.isComplete()) {
                aadlbaText.addOutput("complete ");
            }
            if (object.isFinal()) {
                aadlbaText.addOutput("final ");
            }
            aadlbaText.addOutputNewline("state;");
            return DONE;
        }

        /**
         * Unparse behaviortransition
         */
        @Override
        public String caseBehaviorTransition(BehaviorTransition object) {
            // FIXME : TODO : update location reference
            String tid = object.getName();
            Long num = object.getPriority();
            if (tid != null) {
                aadlbaText.addOutput(tid);
                if (num != AadlBaVisitors.DEFAULT_TRANSITION_PRIORITY) {
                    // numeral
                    aadlbaText.addOutput(" [");
                    aadlbaText.addOutput(String.valueOf(num));
                    aadlbaText.addOutput("]");
                }
                aadlbaText.addOutput(" : ");
            }
            if (object.getSourceState() != null) {
                aadlbaText.addOutput(object.getSourceState().getName());
            } else if (object instanceof DeclarativeBehaviorTransition) {
                DeclarativeBehaviorTransition dbt = (DeclarativeBehaviorTransition) object;
                for (Identifier id : dbt.getSrcStates()) {
                    aadlbaText.addOutput(id.getId());
                    if (dbt.getSrcStates().get(dbt.getSrcStates().size() - 1) != id) {
                        aadlbaText.addOutput(",");
                    }
                }
            }
            aadlbaText.addOutput(" -[");
            process(object.getCondition());
            aadlbaText.addOutput("]-> ");
            if (object.getDestinationState() != null) {
                aadlbaText.addOutput(object.getDestinationState().getName());
            } else if (object instanceof DeclarativeBehaviorTransition) {
                DeclarativeBehaviorTransition dbt = (DeclarativeBehaviorTransition) object;
                aadlbaText.addOutput(dbt.getDestState().getId());
            }
            if (object.getActionBlock() != null) {
                aadlbaText.addOutput(" ");
                process(object.getActionBlock());
            }
            aadlbaText.addOutputNewline(";");
            return DONE;
        }

        @Override
        public String caseExecutionTimeoutCatch(ExecutionTimeoutCatch object) {
            aadlbaText.addOutput("timeout");
            return DONE;
        }

        @Override
        public String caseOtherwise(Otherwise object) {
            aadlbaText.addOutput("otherwise");
            return DONE;
        }

        /**
         * Unparse dispatchcondition
         */
        @Override
        public String caseDispatchCondition(DispatchCondition object) {
            // FIXME : TODO : update location reference
            aadlbaText.addOutput("on dispatch");
            if (object.getDispatchTriggerCondition() != null) {
                aadlbaText.addOutput(" ");
                process(object.getDispatchTriggerCondition());
            }
            if (object.isSetFrozenPorts()) {
                aadlbaText.addOutput(" frozen ");
                processEList(object.getFrozenPorts(), ", ");
            }
            return DONE;
        }

        @Override
        public String caseDispatchTriggerConditionStop(DispatchTriggerConditionStop object) {
            aadlbaText.addOutput("stop");
            return DONE;
        }

        @Override
        public String caseDispatchRelativeTimeout(DispatchRelativeTimeout object) {
            aadlbaText.addOutput("timeout ");
            return DONE;
        }

        @Override
        public String caseCompletionRelativeTimeout(CompletionRelativeTimeout object) {
            aadlbaText.addOutput("timeout ");
            caseBehaviorTime(object);
            return DONE;
        }

        @Override
        public String caseDispatchTriggerLogicalExpression(DispatchTriggerLogicalExpression object) {
            processEList(object.getDispatchConjunctions(), " or ");
            return DONE;
        }

        @Override
        public String caseDispatchConjunction(DispatchConjunction object) {
            processEList(object.getDispatchTriggers(), " and ");
            return DONE;
        }

        @Override
        public String caseBehaviorActionBlock(BehaviorActionBlock object) {
            aadlbaText.addOutputNewline("{");
            aadlbaText.incrementIndent();
            // aadlbaText.addOutput("{");
            process(object.getContent());
            aadlbaText.decrementIndent();
            aadlbaText.addOutputNewline("");
            aadlbaText.addOutput("}");
            if (object.getTimeout() != null) {
                aadlbaText.addOutput(" timeout ");
                process(object.getTimeout());
            }
            return DONE;
        }

        @Override
        public String caseBehaviorActionSequence(BehaviorActionSequence object) {
            // DB: Indentation problem when using \n direcly
            processEList(object.getActions(), ";", true);
            // processEList(object.getActions(), ";\n");
            return DONE;
        }

        @Override
        public String caseBehaviorActionSet(BehaviorActionSet object) {
            // DB: Indentation problem when using \n direcly
            processEList(object.getActions(), " &", true);
            // processEList(object.getActions(), " &\n");
            return DONE;
        }

        /**
         * Unparse ifstatement
         */
        @Override
        public String caseIfStatement(IfStatement object) {
            // FIXME : TODO : update location reference
            boolean hasToOutputTerminator = true;
            if (object.isElif()) {
                aadlbaText.addOutputNewline("");
                aadlbaText.addOutput("elsif (");
                hasToOutputTerminator = false;
            } else {
                aadlbaText.addOutput("if (");
                hasToOutputTerminator = true;
            }
            process(object.getLogicalValueExpression());
            aadlbaText.addOutputNewline(")");
            aadlbaText.incrementIndent();
            process(object.getBehaviorActions());
            aadlbaText.decrementIndent();
            if (object.getElseStatement() != null) {
                process(object.getElseStatement());
            }
            if (hasToOutputTerminator) {
                aadlbaText.addOutputNewline("");
                aadlbaText.addOutput("end if");
            }
            return DONE;
        }

        @Override
        public String caseElseStatement(ElseStatement object) {
            aadlbaText.addOutputNewline("");
            aadlbaText.addOutputNewline("else");
            aadlbaText.incrementIndent();
            process(object.getBehaviorActions());
            aadlbaText.decrementIndent();
            return DONE;
        }

        /**
         * Unparse fororforallstatement
         */
        @Override
        public String caseForOrForAllStatement(ForOrForAllStatement object) {
            // FIXME : TODO : update location reference
            if (object.isForAll()) {
                aadlbaText.addOutput("forall (");
            } else {
                aadlbaText.addOutput("for (");
            }
            process(object.getIterativeVariable());
            aadlbaText.addOutput(" in ");
            process(object.getIteratedValues());
            aadlbaText.addOutputNewline(") {");
            // aadlbaText.addOutputNewline("{");
            aadlbaText.incrementIndent();
            process(object.getBehaviorActions());
            aadlbaText.decrementIndent();
            aadlbaText.addOutputNewline("");
            aadlbaText.addOutput("}");
            return DONE;
        }

        @Override
        public String caseIterativeVariable(IterativeVariable iv) {
            aadlbaText.addOutput(iv.getName());
            aadlbaText.addOutput(" : ");
            // DB: Use qualified name when classifier is declared outside the package
            final DataClassifier dataClass = iv.getDataClassifier();
            final String dataClassName;
            if (dataClass.getElementRoot() == iv.getElementRoot()) {
                dataClassName = dataClass.getName();
            } else {
                dataClassName = dataClass.getQualifiedName();
            }
            aadlbaText.addOutput(dataClassName);
            return DONE;
        }

        @Override
        public String caseWhileOrDoUntilStatement(WhileOrDoUntilStatement object) {
            if (object.isDoUntil()) {
                return caseDoUntilStatement(object);
            } else {
                return caseWhileStatement(object);
            }
        }

        /**
         * Unparse whilestatement
         */
        public String caseWhileStatement(WhileOrDoUntilStatement object) {
            // FIXME : TODO : update location reference
            aadlbaText.addOutput("while (");
            process(object.getLogicalValueExpression());
            aadlbaText.addOutputNewline(") {");
            // aadlbaText.addOutputNewline("{");
            aadlbaText.incrementIndent();
            process(object.getBehaviorActions());
            aadlbaText.decrementIndent();
            aadlbaText.addOutputNewline("");
            aadlbaText.addOutputNewline("}");
            return DONE;
        }

        /**
         * Unparse dountilstatement
         */
        public String caseDoUntilStatement(WhileOrDoUntilStatement object) {
            // FIXME : TODO : update location reference
            aadlbaText.addOutputNewline("do");
            process(object.getBehaviorActions());
            aadlbaText.addOutputNewline("");
            aadlbaText.addOutput("until (");
            process(object.getLogicalValueExpression());
            aadlbaText.addOutputNewline(")");
            return DONE;
        }

        /**
         * Unparse integerrange
         */
        @Override
        public String caseIntegerRange(IntegerRange object) {
            // FIXME : TODO : update location reference
            process(object.getLowerIntegerValue());
            aadlbaText.addOutput(" .. ");
            process(object.getUpperIntegerValue());
            return DONE;
        }

        /**
         * Unparse timedaction
         */
        @Override
        public String caseTimedAction(TimedAction object) {
            aadlbaText.addOutput("computation (");
            process(object.getLowerTime());
            if (object.getUpperTime() != null) {
                aadlbaText.addOutput(" .. ");
                process(object.getUpperTime());
            }
            aadlbaText.addOutput(")");
            if (object.isSetProcessorClassifier()) {
                aadlbaText.addOutput(" in binding (");
                processEList(object.getProcessorClassifier(), ", ", object, false);
                aadlbaText.addOutput(")");
            }
            return DONE;
        }

        /**
         * Unparse assignmentaction
         */
        @Override
        public String caseAssignmentAction(AssignmentAction object) {
            // FIXME : TODO : update location reference
            process(object.getTarget());
            aadlbaText.addOutput(" := ");
            process(object.getValueExpression());
            return DONE;
        }

        @Override
        public String caseAny(Any object) {
            aadlbaText.addOutput("any");
            return DONE;
        }

        @Override
        public String caseElementHolder(ElementHolder el) {
            if (el instanceof Reference) {
                return processReference((Reference) el);
            }
            Element refContainer = Aadl2Visitors.getContainingPackageSection(el.getElement());
            Element holderPackageOrPropertySet = Aadl2Visitors.getContainingPackageSection(el);
            if (refContainer != null && holderPackageOrPropertySet != null && false == holderPackageOrPropertySet.equals(refContainer) && false == (el instanceof DataSubcomponentHolder)) {
                StringBuilder sb = new StringBuilder(el.getElement().getQualifiedName());
                String prefix = sb.substring(0, sb.lastIndexOf("::") + 2);
                aadlbaText.addOutput(prefix);
            }
            if (el instanceof GroupableElement) {
                GroupableElement ge = (GroupableElement) el;
                if (ge.isSetGroupHolders()) {
                    processEList(ge.getGroupHolders(), ".");
                    aadlbaText.addOutput(".");
                }
            }
            aadlbaText.addOutput(el.getElement().getName());
            if (el instanceof IndexableElement) {
                IndexableElement ie = (IndexableElement) el;
                if (ie.isSetArrayIndexes()) {
                    caseArrayIndex(ie.getArrayIndexes());
                }
            }
            return DONE;
        }

        private String processReference(Reference ref) {
            for (ArrayableIdentifier id : ref.getIds()) {
                aadlbaText.addOutput(id.getId());
                caseArrayIndex(id.getArrayIndexes());
                if (id != ref.getIds().get(ref.getIds().size() - 1)) {
                    aadlbaText.addOutput(".");
                }
            }
            return DONE;
        }

        private String processCommAction(CommAction object) {
            process(object.getReference());
            if (object.isLock()) {
                aadlbaText.addOutput("!<");
            } else if (object.isUnlock()) {
                aadlbaText.addOutput("!>");
            } else if (object.isPortDequeue()) {
                aadlbaText.addOutput(" ?");
            } else {
                aadlbaText.addOutput(" !");
            }
            if (object.isSetParameters() == true) {
                aadlbaText.addOutput(" (");
                processEList(object.getParameters(), ",");
                aadlbaText.addOutput(")");
                return DONE;
            } else if (object.getTarget() != null) {
                aadlbaText.addOutput(" (");
                process(object.getTarget());
                aadlbaText.addOutput(")");
                return DONE;
            }
            return DONE;
        }

        /**
         * Unparse arrayindex
         */
        public String caseArrayIndex(EList<IntegerValue> object) {
            // FIXME : TODO : update location reference
            for (IntegerValue iv : object) {
                aadlbaText.addOutput("[");
                process(iv);
                aadlbaText.addOutput("]");
            }
            return DONE;
        }

        /**
         * Unparse datacomponentreference
         */
        @Override
        public String caseDataComponentReference(DataComponentReference object) {
            // FIXME : TODO : update location reference
            processEList(object.getData(), ".");
            return DONE;
        }

        @Override
        public String defaultCase(EObject object) {
            if (object instanceof CommAction) {
                return processCommAction((CommAction) object);
            } else if (object instanceof Reference) {
                return processReference((Reference) object);
            } else if (object instanceof QualifiedNamedElement) {
                QualifiedNamedElement qn = (QualifiedNamedElement) object;
                aadlbaText.addOutput(qn.getBaName().getId());
            } else if (object instanceof org.osate.ba.declarative.NamedValue) {
                org.osate.ba.declarative.NamedValue nv = (org.osate.ba.declarative.NamedValue) object;
                process(nv.getReference());
                if (nv.isCount()) {
                    aadlbaText.addOutput("' count");
                }
                if (nv.isFresh()) {
                    aadlbaText.addOutput("' fresh");
                }
                if (nv.isDequeue()) {
                    aadlbaText.addOutput(" ?");
                }
            } else if (object instanceof DeclarativePropertyReference) {
                DeclarativePropertyReference dpr = (DeclarativePropertyReference) object;
                if (dpr.getQualifiedName().getBaName().getId().isEmpty()) {
                    aadlbaText.addOutput("#");
                }
                aadlbaText.addOutput(dpr.getQualifiedName().getBaNamespace().getId());
                aadlbaText.addOutput("::");
                if (false == dpr.getQualifiedName().getBaName().getId().isEmpty()) {
                    aadlbaText.addOutput(dpr.getQualifiedName().getBaName().getId());
                    aadlbaText.addOutput("#");
                }
                processEList(dpr.getPropertyNames(), ".");
            } else if (object instanceof DeclarativePropertyName) {
                DeclarativePropertyName dpn = (DeclarativePropertyName) object;
                aadlbaText.addOutput(dpn.getPropertyName().getId());
                // field
                process(dpn.getField());
                // indexes
                caseArrayIndex(dpn.getIndexes());
            }
            return DONE;
        }

        @Override
        public String caseSubprogramCallAction(SubprogramCallAction object) {
            if (object.getProxy() != null) {
                process(object.getProxy());
                aadlbaText.addOutput(".");
            }
            process(object.getSubprogram());
            aadlbaText.addOutput(" !");
            if (object.isSetParameterLabels()) {
                aadlbaText.addOutput(" (");
                processEList(object.getParameterLabels(), ", ");
                aadlbaText.addOutput(")");
            }
            return DONE;
        }

        @Override
        public String casePortSendAction(PortSendAction object) {
            process(object.getPort());
            aadlbaText.addOutput(" !");
            if (object.getValueExpression() != null) {
                aadlbaText.addOutput(" (");
                process(object.getValueExpression());
                aadlbaText.addOutput(")");
            }
            return DONE;
        }

        @Override
        public String casePortFreezeAction(PortFreezeAction object) {
            return casePortActionOrValue(object, " >>");
        }

        @Override
        public String casePortDequeueAction(PortDequeueAction object) {
            process(object.getPort());
            aadlbaText.addOutput(" ?");
            if (object.getTarget() != null) {
                aadlbaText.addOutput(" (");
                process(object.getTarget());
                aadlbaText.addOutput(")");
            }
            return DONE;
        }

        @Override
        public String caseLockAction(LockAction object) {
            return caseSharedDataAction(object, "!<");
        }

        @Override
        public String caseUnlockAction(UnlockAction object) {
            return caseSharedDataAction(object, "!>");
        }

        public String caseSharedDataAction(SharedDataAction object, String token) {
            if (object.getDataAccess() != null) {
                process(object.getDataAccess());
                aadlbaText.addOutput(" ");
            } else {
                aadlbaText.addOutput("*");
            }
            aadlbaText.addOutput(token);
            return DONE;
        }

        /**
         * Unparse behaviortime
         */
        @Override
        public String caseBehaviorTime(BehaviorTime object) {
            // FIXME : TODO : update location reference
            process(object.getIntegerValue());
            aadlbaText.addOutput(" ");
            if (object.getUnit() != null) {
                aadlbaText.addOutput(object.getUnit().getName());
            } else {
                if (object instanceof DeclarativeTime) {
                    DeclarativeTime dt = (DeclarativeTime) object;
                    aadlbaText.addOutput(dt.getUnitId().getId());
                }
            }
            return DONE;
        }

        @Override
        public String casePortDequeueValue(PortDequeueValue object) {
            return casePortActionOrValue(object, " ?");
        }

        @Override
        public String casePortCountValue(PortCountValue object) {
            return casePortActionOrValue(object, "' count");
        }

        @Override
        public String casePortFreshValue(PortFreshValue object) {
            return casePortActionOrValue(object, "' fresh");
        }

        public String casePortActionOrValue(PortHolder object, String token) {
            caseElementHolder(object);
            aadlbaText.addOutput(token);
            return DONE;
        }

        /**
         * Unparse booleanliteral
         */
        @Override
        public String caseBehaviorBooleanLiteral(BehaviorBooleanLiteral object) {
            // FIXME : TODO : update location reference
            if (object.isValue()) {
                aadlbaText.addOutput("true");
            } else {
                aadlbaText.addOutput("false");
            }
            return DONE;
        }

        /**
         * Unparse stringliteral
         */
        @Override
        public String caseBehaviorStringLiteral(BehaviorStringLiteral object) {
            // FIXME : TODO : update location reference
            // DB: Manage adding double quotes
            aadlbaText.addOutput(doubleQuoteString(object.getValue()));
            return DONE;
        }

        @Override
        public String caseBehaviorRealLiteral(BehaviorRealLiteral object) {
            aadlbaText.addOutput(String.valueOf(object.getValue()));
            return DONE;
        }

        @Override
        public String caseBehaviorIntegerLiteral(BehaviorIntegerLiteral object) {
            aadlbaText.addOutput(Long.toString(object.getValue()));
            return DONE;
        }

        /**
         * Unparse valueexpression
         */
        @Override
        public String caseValueExpression(ValueExpression object) {
            // FIXME : TODO : update location reference
            Iterator<Relation> itRel = object.getRelations().iterator();
            process(itRel.next());
            if (object.isSetLogicalOperators()) {
                Iterator<LogicalOperator> itOp = object.getLogicalOperators().iterator();
                while (itRel.hasNext()) {
                    LogicalOperator lo = itOp.next();
                    if (lo != LogicalOperator.NONE) {
                        aadlbaText.addOutput(" " + lo.getLiteral() + " ");
                    }
                    process(itRel.next());
                }
            }
            return DONE;
        }

        /**
         * Unparse relation
         */
        @Override
        public String caseRelation(Relation object) {
            // FIXME : TODO : update location reference
            process(object.getFirstExpression());
            if (object.getSecondExpression() != null) {
                if (object.getRelationalOperator() != RelationalOperator.NONE) {
                    aadlbaText.addOutput(" " + object.getRelationalOperator().getLiteral() + " ");
                }
                process(object.getSecondExpression());
            }
            return DONE;
        }

        /**
         * Unparse simpleexpression
         */
        @Override
        public String caseSimpleExpression(SimpleExpression object) {
            // FIXME : TODO : update location reference
            if (object.isSetUnaryAddingOperator() && object.getUnaryAddingOperator() != UnaryAddingOperator.NONE) {
                aadlbaText.addOutput(object.getUnaryAddingOperator().getLiteral());
            }
            Iterator<Term> itTerm = object.getTerms().iterator();
            process(itTerm.next());
            if (object.isSetBinaryAddingOperators()) {
                Iterator<BinaryAddingOperator> itOp = object.getBinaryAddingOperators().iterator();
                while (itTerm.hasNext()) {
                    BinaryAddingOperator bao = itOp.next();
                    if (bao != BinaryAddingOperator.NONE) {
                        aadlbaText.addOutput(" " + bao.getLiteral() + " ");
                    }
                    process(itTerm.next());
                }
            }
            return DONE;
        }

        /**
         * Unparse term
         */
        @Override
        public String caseTerm(Term object) {
            // FIXME : TODO : update location reference
            Iterator<Factor> itFact = object.getFactors().iterator();
            process(itFact.next());
            if (object.isSetMultiplyingOperators()) {
                Iterator<MultiplyingOperator> itOp = object.getMultiplyingOperators().iterator();
                while (itFact.hasNext()) {
                    MultiplyingOperator mo = itOp.next();
                    if (mo != MultiplyingOperator.NONE) {
                        aadlbaText.addOutput(" " + mo.getLiteral() + " ");
                    }
                    process(itFact.next());
                }
            }
            return DONE;
        }

        /**
         * Unparse factor
         */
        @Override
        public String caseFactor(Factor object) {
            // FIXME : TODO : update location reference
            if (object.isSetUnaryNumericOperator() || object.isSetUnaryBooleanOperator()) {
                Enumerator e = null;
                if (object.isSetUnaryNumericOperator()) {
                    e = object.getUnaryNumericOperator();
                    if (e != UnaryNumericOperator.NONE) {
                        aadlbaText.addOutput(e.getLiteral() + " ");
                    }
                } else if (object.isSetUnaryBooleanOperator()) {
                    e = object.getUnaryBooleanOperator();
                    if (e != UnaryBooleanOperator.NONE) {
                        aadlbaText.addOutput(e.getLiteral() + " ");
                    }
                }
            }
            if (object.getFirstValue() instanceof ValueExpression) {
                aadlbaText.addOutput("(");
                process(object.getFirstValue());
                aadlbaText.addOutput(")");
            } else {
                process(object.getFirstValue());
            }
            if (object.isSetBinaryNumericOperator()) {
                BinaryNumericOperator bno = object.getBinaryNumericOperator();
                if (bno != BinaryNumericOperator.NONE) {
                    aadlbaText.addOutput(" " + bno.getLiteral() + " ");
                }
                if (object.getSecondValue() instanceof ValueExpression) {
                    aadlbaText.addOutput("(");
                    process(object.getSecondValue());
                    aadlbaText.addOutput(")");
                } else {
                    process(object.getSecondValue());
                }
            }
            return DONE;
        }

        @Override
        public String caseBehaviorPropertyConstant(BehaviorPropertyConstant object) {
            aadlbaText.addOutput("#");
            if (object.getPropertySet() != null) {
                aadlbaText.addOutput(object.getPropertySet().getQualifiedName());
                aadlbaText.addOutput("::");
            }
            aadlbaText.addOutput(object.getProperty().getName());
            return DONE;
        }

        @Override
        public String casePropertySetPropertyReference(PropertySetPropertyReference object) {
            aadlbaText.addOutput("#");
            if (object.getPropertySet() != null) {
                aadlbaText.addOutput(object.getPropertySet().getQualifiedName());
                aadlbaText.addOutput("::");
            }
            processEList(object.getProperties(), ".");
            return DONE;
        }

        @Override
        public String caseClassifierPropertyReference(ClassifierPropertyReference object) {
            org.osate.aadl2.Classifier c = object.getClassifier();
            process(c, object);
            aadlbaText.addOutput("#");
            processEList(object.getProperties(), ".");
            return DONE;
        }

        @Override
        public String caseClassifierFeaturePropertyReference(ClassifierFeaturePropertyReference object) {
            process(object.getComponent());
            aadlbaText.addOutput("#");
            processEList(object.getProperties(), ".");
            return DONE;
        }

        @Override
        public String casePropertyNameHolder(PropertyNameHolder pnh) {
            PropertyElementHolder peh = pnh.getProperty();
            Element el = peh.getElement();
            if (el instanceof NamedElement) {
                aadlbaText.addOutput(((NamedElement) el).getName());
            } else if (el instanceof PropertyAssociation) {
                aadlbaText.addOutput(((PropertyAssociation) el).getProperty().getName());
            } else {
                String tmp = unparse((PropertyExpression) el);
                aadlbaText.addOutput(tmp);
            }
            if (pnh.getField() != null) {
                aadlbaText.addOutput(".");
                process(pnh.getField());
            } else if (peh.isSetArrayIndexes()) {
                caseArrayIndex(peh.getArrayIndexes());
            }
            return DONE;
        }

        @Override
        public String caseUpperBound(UpperBound object) {
            aadlbaText.addOutput("upper_bound");
            return DONE;
        }

        @Override
        public String caseLowerBound(LowerBound object) {
            aadlbaText.addOutput("lower_bound");
            return DONE;
        }
    };
}
Also used : ExecutionTimeoutCatch(org.osate.ba.aadlba.ExecutionTimeoutCatch) SubprogramCallAction(org.osate.ba.aadlba.SubprogramCallAction) BehaviorTime(org.osate.ba.aadlba.BehaviorTime) ClassifierPropertyReference(org.osate.ba.aadlba.ClassifierPropertyReference) DeclarativeBehaviorTransition(org.osate.ba.declarative.DeclarativeBehaviorTransition) DispatchTriggerLogicalExpression(org.osate.ba.aadlba.DispatchTriggerLogicalExpression) GroupableElement(org.osate.ba.aadlba.GroupableElement) TimedAction(org.osate.ba.aadlba.TimedAction) BehaviorIntegerLiteral(org.osate.ba.aadlba.BehaviorIntegerLiteral) BehaviorTransition(org.osate.ba.aadlba.BehaviorTransition) DeclarativeBehaviorTransition(org.osate.ba.declarative.DeclarativeBehaviorTransition) ArrayableIdentifier(org.osate.ba.declarative.ArrayableIdentifier) DataComponentReference(org.osate.ba.aadlba.DataComponentReference) SimpleExpression(org.osate.ba.aadlba.SimpleExpression) DispatchTriggerConditionStop(org.osate.ba.aadlba.DispatchTriggerConditionStop) IfStatement(org.osate.ba.aadlba.IfStatement) DataSubcomponentHolder(org.osate.ba.aadlba.DataSubcomponentHolder) QualifiedNamedElement(org.osate.ba.declarative.QualifiedNamedElement) Otherwise(org.osate.ba.aadlba.Otherwise) Identifier(org.osate.ba.declarative.Identifier) ArrayableIdentifier(org.osate.ba.declarative.ArrayableIdentifier) AbstractEnumerator(org.eclipse.emf.common.util.AbstractEnumerator) Enumerator(org.eclipse.emf.common.util.Enumerator) PortFreezeAction(org.osate.ba.aadlba.PortFreezeAction) UpperBound(org.osate.ba.aadlba.UpperBound) EObject(org.eclipse.emf.ecore.EObject) Factor(org.osate.ba.aadlba.Factor) PropertySetPropertyReference(org.osate.ba.aadlba.PropertySetPropertyReference) BehaviorState(org.osate.ba.aadlba.BehaviorState) BehaviorActionSet(org.osate.ba.aadlba.BehaviorActionSet) BinaryNumericOperator(org.osate.ba.aadlba.BinaryNumericOperator) ForOrForAllStatement(org.osate.ba.aadlba.ForOrForAllStatement) PropertyElementHolder(org.osate.ba.aadlba.PropertyElementHolder) IterativeVariable(org.osate.ba.aadlba.IterativeVariable) BehaviorAnnex(org.osate.ba.aadlba.BehaviorAnnex) AssignmentAction(org.osate.ba.aadlba.AssignmentAction) PortDequeueAction(org.osate.ba.aadlba.PortDequeueAction) LogicalOperator(org.osate.ba.aadlba.LogicalOperator) PortDequeueValue(org.osate.ba.aadlba.PortDequeueValue) ElementHolder(org.osate.ba.aadlba.ElementHolder) PropertyElementHolder(org.osate.ba.aadlba.PropertyElementHolder) Term(org.osate.ba.aadlba.Term) DeclarativeTime(org.osate.ba.declarative.DeclarativeTime) PortSendAction(org.osate.ba.aadlba.PortSendAction) DispatchCondition(org.osate.ba.aadlba.DispatchCondition) ElseStatement(org.osate.ba.aadlba.ElseStatement) BehaviorBooleanLiteral(org.osate.ba.aadlba.BehaviorBooleanLiteral) MultiplyingOperator(org.osate.ba.aadlba.MultiplyingOperator) LockAction(org.osate.ba.aadlba.LockAction) QualifiedNamedElement(org.osate.ba.declarative.QualifiedNamedElement) NamedElement(org.osate.aadl2.NamedElement) CompletionRelativeTimeout(org.osate.ba.aadlba.CompletionRelativeTimeout) IndexableElement(org.osate.ba.aadlba.IndexableElement) DispatchConjunction(org.osate.ba.aadlba.DispatchConjunction) LowerBound(org.osate.ba.aadlba.LowerBound) BehaviorVariable(org.osate.ba.aadlba.BehaviorVariable) PropertyAssociation(org.osate.aadl2.PropertyAssociation) QualifiedNamedElement(org.osate.ba.declarative.QualifiedNamedElement) NamedElement(org.osate.aadl2.NamedElement) Element(org.osate.aadl2.Element) BehaviorElement(org.osate.ba.aadlba.BehaviorElement) IndexableElement(org.osate.ba.aadlba.IndexableElement) GroupableElement(org.osate.ba.aadlba.GroupableElement) WhileOrDoUntilStatement(org.osate.ba.aadlba.WhileOrDoUntilStatement) PortHolder(org.osate.ba.aadlba.PortHolder) AbstractNamedValue(org.osate.aadl2.AbstractNamedValue) NamedValue(org.osate.aadl2.NamedValue) DataClassifier(org.osate.aadl2.DataClassifier) DataClassifier(org.osate.aadl2.DataClassifier) Any(org.osate.ba.aadlba.Any) DeclarativePropertyName(org.osate.ba.declarative.DeclarativePropertyName) PortCountValue(org.osate.ba.aadlba.PortCountValue) Relation(org.osate.ba.aadlba.Relation) BehaviorPropertyConstant(org.osate.ba.aadlba.BehaviorPropertyConstant) DeclarativeArrayDimension(org.osate.ba.declarative.DeclarativeArrayDimension) ClassifierFeaturePropertyReference(org.osate.ba.aadlba.ClassifierFeaturePropertyReference) BehaviorStringLiteral(org.osate.ba.aadlba.BehaviorStringLiteral) BehaviorRealLiteral(org.osate.ba.aadlba.BehaviorRealLiteral) Iterator(java.util.Iterator) BehaviorActionBlock(org.osate.ba.aadlba.BehaviorActionBlock) DeclarativePropertyReference(org.osate.ba.declarative.DeclarativePropertyReference) SharedDataAction(org.osate.ba.aadlba.SharedDataAction) CommAction(org.osate.ba.declarative.CommAction) IntegerRange(org.osate.ba.aadlba.IntegerRange) DeclarativePropertyReference(org.osate.ba.declarative.DeclarativePropertyReference) PropertySetPropertyReference(org.osate.ba.aadlba.PropertySetPropertyReference) ClassifierFeaturePropertyReference(org.osate.ba.aadlba.ClassifierFeaturePropertyReference) ClassifierPropertyReference(org.osate.ba.aadlba.ClassifierPropertyReference) Reference(org.osate.ba.declarative.Reference) DataComponentReference(org.osate.ba.aadlba.DataComponentReference) IntegerValue(org.osate.ba.aadlba.IntegerValue) PortFreshValue(org.osate.ba.aadlba.PortFreshValue) DispatchRelativeTimeout(org.osate.ba.aadlba.DispatchRelativeTimeout) PropertyNameHolder(org.osate.ba.aadlba.PropertyNameHolder) UnlockAction(org.osate.ba.aadlba.UnlockAction) ValueExpression(org.osate.ba.aadlba.ValueExpression) BinaryAddingOperator(org.osate.ba.aadlba.BinaryAddingOperator) BehaviorActionSequence(org.osate.ba.aadlba.BehaviorActionSequence) ArrayDimension(org.osate.aadl2.ArrayDimension) DeclarativeArrayDimension(org.osate.ba.declarative.DeclarativeArrayDimension)

Aggregations

AnnexSubclause (org.osate.aadl2.AnnexSubclause)54 ArrayList (java.util.ArrayList)23 DefaultAnnexSubclause (org.osate.aadl2.DefaultAnnexSubclause)21 EObject (org.eclipse.emf.ecore.EObject)19 Classifier (org.osate.aadl2.Classifier)17 CyberReq (com.ge.research.osate.verdict.dsl.verdict.CyberReq)15 Statement (com.ge.research.osate.verdict.dsl.verdict.Statement)15 Verdict (com.ge.research.osate.verdict.dsl.verdict.Verdict)15 AnnexLibrary (org.osate.aadl2.AnnexLibrary)15 SafetyReq (com.ge.research.osate.verdict.dsl.verdict.SafetyReq)14 NamedElement (org.osate.aadl2.NamedElement)14 CyberMission (com.ge.research.osate.verdict.dsl.verdict.CyberMission)13 CyberRel (com.ge.research.osate.verdict.dsl.verdict.CyberRel)13 Event (com.ge.research.osate.verdict.dsl.verdict.Event)13 SafetyRel (com.ge.research.osate.verdict.dsl.verdict.SafetyRel)13 ComponentImplementation (org.osate.aadl2.ComponentImplementation)13 EventDataPort (org.osate.aadl2.EventDataPort)13 EventPort (org.osate.aadl2.EventPort)13 ComponentType (org.osate.aadl2.ComponentType)12 DataPort (org.osate.aadl2.DataPort)12