Search in sources :

Example 1 with AgreeContractSubclause

use of com.rockwellcollins.atc.agree.agree.AgreeContractSubclause in project VERDICT by ge-high-assurance.

the class Agree2Vdm method translateAgreeAnnex.

private Model translateAgreeAnnex(List<SystemType> systemTypes, List<SystemImplementation> systemImpls, Model model, HashSet<String> dataTypeDecl, HashSet<String> nodeDecl) {
    LustreProgram lustreProgram = new LustreProgram();
    // Initializing the lustre program in the VDM
    model.setDataflowCode(lustreProgram);
    // System.out.println("Processing "+systemTypes.size()+" SystemTypes for agree annexes");
    for (SystemType sysType : systemTypes) {
        // unpacking sysType
        for (AnnexSubclause annex : sysType.getOwnedAnnexSubclauses()) {
            if (annex.getName().equalsIgnoreCase("agree")) {
                // annex is of type DefaultAnnexSubclause
                DefaultAnnexSubclause ddASC = (DefaultAnnexSubclause) annex;
                // AnnexSubclause aSC = ddASC.getParsedAnnexSubclause();
                AgreeContractSubclause agreeAnnex = (AgreeContractSubclause) ddASC.getParsedAnnexSubclause();
                // populating agree contracts in the vdm component type -- SHOULD ADD THIS CODE TO AADL2VDM
                verdict.vdm.vdm_lustre.ContractSpec contractSpec = new verdict.vdm.vdm_lustre.ContractSpec();
                EList<EObject> annexContents = agreeAnnex.eContents();
                if (annexContents.isEmpty()) {
                    System.out.println("Empty Agree Annex.");
                }
                for (EObject clause : annexContents) {
                    // mapping to AgreeContractclause
                    AgreeContract agreeContract = (AgreeContract) clause;
                    // getting specStatements
                    EList<SpecStatement> specStatements = agreeContract.getSpecs();
                    for (SpecStatement specStatement : specStatements) {
                        if (specStatement instanceof EqStatement) {
                            EqStatement eqStmt = (EqStatement) specStatement;
                            // translate EqStatement in Agree to SymbolDefinition in vdm
                            SymbolDefinition symbDef = translateEqStatement(eqStmt, model, dataTypeDecl, nodeDecl);
                            // Add agree variable/symbol definition to the contractSpec in vdm
                            contractSpec.getSymbol().add(symbDef);
                        } else if (specStatement instanceof GuaranteeStatement) {
                            GuaranteeStatement guaranteeStmt = (GuaranteeStatement) specStatement;
                            ContractItem contractItem = translateGuaranteeStatement(guaranteeStmt, dataTypeDecl, nodeDecl, model);
                            contractSpec.getGuarantee().add(contractItem);
                        } else if (specStatement instanceof AssumeStatement) {
                            AssumeStatement assumeStmt = (AssumeStatement) specStatement;
                            ContractItem contractItem = translateAssumeStatement(assumeStmt, dataTypeDecl, nodeDecl, model);
                            contractSpec.getAssume().add(contractItem);
                        } else {
                            if (!(specStatement instanceof ConstStatementImpl)) {
                                System.out.println("Element not recognizable" + clause.eContents().toString());
                            }
                        }
                    }
                }
                if (contractSpec != null) {
                    List<ComponentType> vdmComponentTypes = model.getComponentType();
                    for (ComponentType vdmComponentType : vdmComponentTypes) {
                        // populating agree contract details in the corresponding componentType instance in vdm
                        if (vdmComponentType.getName().equalsIgnoreCase(sysType.getName())) {
                            vdmComponentType.setContract(contractSpec);
                        }
                    }
                // populating agree contract details in the componentType instance in vdm
                // packComponent.setContract(contractSpec);
                }
            }
        }
    // End of unpacking sysType
    }
    for (SystemImplementation sysImpl : systemImpls) {
        // unpacking sysType
        for (AnnexSubclause annex : sysImpl.getOwnedAnnexSubclauses()) {
            if (annex.getName().equalsIgnoreCase("agree")) {
                // annex is of type DefaultAnnexSubclause
                DefaultAnnexSubclause ddASC = (DefaultAnnexSubclause) annex;
                // AnnexSubclause aSC = ddASC.getParsedAnnexSubclause();
                AgreeContractSubclause agreeAnnex = (AgreeContractSubclause) ddASC.getParsedAnnexSubclause();
                // populating agree contracts in the vdm node body for component implementation type
                verdict.vdm.vdm_lustre.NodeBody nodeBody = new verdict.vdm.vdm_lustre.NodeBody();
                ;
                EList<EObject> annexContents = agreeAnnex.eContents();
                if (annexContents.isEmpty()) {
                    System.out.println("Empty Agree Annex.");
                }
                for (EObject clause : annexContents) {
                    // mapping to AgreeContractclause
                    AgreeContract agreeContract = (AgreeContract) clause;
                    // getting specStatements
                    EList<SpecStatement> specStatements = agreeContract.getSpecs();
                    for (SpecStatement specStatement : specStatements) {
                        if (specStatement instanceof ConstStatementImpl) {
                            ConstStatementImpl constStmtImpl = (ConstStatementImpl) specStatement;
                            ConstantDeclaration constDecl = translateConstStatementImpl(constStmtImpl, dataTypeDecl, nodeDecl, model);
                            nodeBody.getConstantDeclaration().add(constDecl);
                        } else if (specStatement instanceof EqStatementImpl) {
                            EqStatementImpl eqStmtImpl = (EqStatementImpl) specStatement;
                            nodeBody = translateEqStatementImpl(eqStmtImpl, dataTypeDecl, nodeDecl, model, nodeBody);
                        } else if (specStatement instanceof AssignStatementImpl) {
                            AssignStatementImpl assignStmtImpl = (AssignStatementImpl) specStatement;
                            NodeEquation nodeEquation = translateAssignStatementImpl(assignStmtImpl, dataTypeDecl, nodeDecl, model);
                            nodeBody.getEquation().add(nodeEquation);
                        } else if (specStatement instanceof AssertStatementImpl) {
                            AssertStatementImpl assertStmtImpl = (AssertStatementImpl) specStatement;
                            Expression assertion = translateAssertStatementImpl(assertStmtImpl, dataTypeDecl, nodeDecl, model);
                            nodeBody.getAssertion().add(assertion);
                        } else {
                            System.out.println("Element not recognizable" + clause.eContents().toString());
                        }
                    }
                }
                List<ComponentImpl> vdmComponentImpls = model.getComponentImpl();
                for (ComponentImpl vdmComponentImpl : vdmComponentImpls) {
                    // populating agree contract details in the corresponding componentImplType instance in vdm
                    if (vdmComponentImpl.getName().equalsIgnoreCase(sysImpl.getName())) {
                        vdmComponentImpl.setDataflowImpl(nodeBody);
                    }
                }
            }
        }
    }
    return model;
}
Also used : ConstStatementImpl(com.rockwellcollins.atc.agree.agree.impl.ConstStatementImpl) ConstantDeclaration(verdict.vdm.vdm_lustre.ConstantDeclaration) SystemType(org.osate.aadl2.SystemType) ComponentImpl(verdict.vdm.vdm_model.ComponentImpl) ContractItem(verdict.vdm.vdm_lustre.ContractItem) EObject(org.eclipse.emf.ecore.EObject) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause) AssertStatementImpl(com.rockwellcollins.atc.agree.agree.impl.AssertStatementImpl) SymbolDefinition(verdict.vdm.vdm_lustre.SymbolDefinition) NodeBody(verdict.vdm.vdm_lustre.NodeBody) AgreeContract(com.rockwellcollins.atc.agree.agree.AgreeContract) EqStatementImpl(com.rockwellcollins.atc.agree.agree.impl.EqStatementImpl) GuaranteeStatement(com.rockwellcollins.atc.agree.agree.GuaranteeStatement) ComponentType(verdict.vdm.vdm_model.ComponentType) AssumeStatement(com.rockwellcollins.atc.agree.agree.AssumeStatement) NodeBody(verdict.vdm.vdm_lustre.NodeBody) SpecStatement(com.rockwellcollins.atc.agree.agree.SpecStatement) AgreeContractSubclause(com.rockwellcollins.atc.agree.agree.AgreeContractSubclause) NodeEquation(verdict.vdm.vdm_lustre.NodeEquation) PropertyExpression(org.osate.aadl2.PropertyExpression) Expression(verdict.vdm.vdm_lustre.Expression) LustreProgram(verdict.vdm.vdm_lustre.LustreProgram) SystemImplementation(org.osate.aadl2.SystemImplementation) EqStatement(com.rockwellcollins.atc.agree.agree.EqStatement) AssignStatementImpl(com.rockwellcollins.atc.agree.agree.impl.AssignStatementImpl) AnnexSubclause(org.osate.aadl2.AnnexSubclause) DefaultAnnexSubclause(org.osate.aadl2.DefaultAnnexSubclause)

Example 2 with AgreeContractSubclause

use of com.rockwellcollins.atc.agree.agree.AgreeContractSubclause in project AGREE by loonwerks.

the class AgreeASTBuilder method getAgreeNode.

private AgreeNode getAgreeNode(ComponentInstance compInst, boolean isTop) {
    List<AgreeVar> inputs = new ArrayList<>();
    List<AgreeVar> outputs = new ArrayList<>();
    List<AgreeVar> locals = new ArrayList<>();
    List<AgreeAADLConnection> aadlConnections = new ArrayList<>();
    List<AgreeOverriddenConnection> userDefinedConections = new ArrayList<>();
    List<AgreeConnection> connections = new ArrayList<>();
    List<AgreeNode> subNodes = new ArrayList<>();
    List<AgreeStatement> assertions = new ArrayList<>();
    List<AgreeStatement> assumptions = new ArrayList<>();
    List<AgreeStatement> guarantees = new ArrayList<>();
    List<AgreeStatement> lemmas = new ArrayList<>();
    List<AgreeEquation> localEquations = new ArrayList<>();
    List<AgreeStatement> patternProps = Collections.emptyList();
    timeOfVarMap = new HashMap<>();
    timeRiseVarMap = new HashMap<>();
    timeFallVarMap = new HashMap<>();
    unspecifiedAadlProperties = new HashMap<>();
    Expr clockConstraint = new BoolExpr(true);
    Expr initialConstraint = new BoolExpr(true);
    String id = compInst.getName();
    AgreeVar clockVar = new AgreeVar(id + clockIDSuffix, NamedType.BOOL, compInst.getSubcomponent(), compInst, null);
    EObject reference = isTop ? compInst.getComponentClassifier() : compInst.getSubcomponent();
    TimingModel timing = null;
    boolean foundSubNode = false;
    boolean hasDirectAnnex = false;
    boolean hasSubcomponents = false;
    ComponentClassifier compClass = compInst.getComponentClassifier();
    Set<ComponentType> effectiveTypes = new HashSet<>();
    Map<String, jkind.lustre.Expr> portRewriteMap = new HashMap<>();
    if (compClass instanceof ComponentImplementation) {
        boolean latched = false;
        ComponentImplementation cc = (ComponentImplementation) compClass;
        effectiveTypes.addAll(getEffectiveComponentTypes(cc.getType()));
        if (isTop || isMonolithic) {
            while (cc != null) {
                AgreeContractSubclause annex = getAgreeAnnex(cc);
                for (ComponentInstance subInst : compInst.getComponentInstances()) {
                    hasSubcomponents = true;
                    curInst = subInst;
                    AgreeNode subNode = getAgreeNode(subInst, false);
                    if (subNode != null && subNodes.stream().noneMatch(it -> it.reference.equals(subNode.reference))) {
                        foundSubNode = true;
                        subNodes.add(subNode);
                    }
                }
                if (annex != null) {
                    hasDirectAnnex = true;
                    AgreeContract contract = (AgreeContract) annex.getContract();
                    curInst = compInst;
                    assertions.addAll(getAssertionStatements(contract.getSpecs()));
                    getEquationStatements(contract.getSpecs(), portRewriteMap).addAllTo(locals, assertions, guarantees);
                    assertions.addAll(getPropertyStatements(contract.getSpecs()));
                    assertions.addAll(getAssignmentStatements(contract.getSpecs()));
                    userDefinedConections.addAll(getConnectionStatements(contract.getSpecs()));
                    lemmas.addAll(getLemmaStatements(contract.getSpecs()));
                    lemmas.addAll(getReachableStatements(contract.getSpecs(), portRewriteMap));
                    addLustreNodes(contract.getSpecs());
                    gatherLustreTypes(contract.getSpecs());
                    // the clock constraints contain other nodes that we add
                    clockConstraint = getClockConstraint(contract.getSpecs(), subNodes);
                    timing = getTimingModel(contract.getSpecs());
                    outputs.addAll(getEquationVars(contract.getSpecs(), compInst));
                    for (SpecStatement spec : contract.getSpecs()) {
                        if (spec instanceof LatchedStatement) {
                            latched = true;
                            break;
                        }
                    }
                }
                // Find extended effective types
                effectiveTypes.addAll(getEffectiveComponentTypes(cc.getType()));
                cc = cc.getExtended();
            }
            EList<ConnectionInstance> connectionInstances = compInst.getAllEnclosingConnectionInstances();
            List<ConnectionInstance> foo = new ArrayList<>();
            compInst.getAllComponentInstances().forEach(ci -> ci.allEnclosingConnectionInstances().forEach(foo::add));
            aadlConnections.addAll(getConnectionsFromInstances(connectionInstances, compInst, subNodes, latched));
            connections.addAll(filterConnections(aadlConnections, userDefinedConections));
        }
        ComponentType compType = ((ComponentImplementation) compClass).getType();
        AgreeContractSubclause compImpAnnex = getAgreeAnnex(compClass);
        if (compImpAnnex != null) {
            AgreeContract contract = (AgreeContract) compImpAnnex.getContract();
            for (SpecStatement spec : contract.getSpecs()) {
                if (spec instanceof LiftContractStatement) {
                    Subcomponent sub = ((ComponentImplementation) compClass).getOwnedSubcomponents().get(0);
                    ComponentType ct = sub.getComponentType();
                    for (Connection conn : ((ComponentImplementation) compClass).getAllConnections()) {
                        NamedElement sourceNe = conn.getSource().getConnectionEnd();
                        NamedElement destNe = conn.getDestination().getConnectionEnd();
                        String sourceStr = sourceNe.getName().replace("::", "__");
                        String destStr = destNe.getName().replace("::", "__");
                        if (ct == sourceNe.getContainingClassifier()) {
                            portRewriteMap.put(sourceStr, new IdExpr(destStr));
                        } else if (ct == destNe.getContainingClassifier()) {
                            portRewriteMap.put(destStr, new IdExpr(sourceStr));
                        }
                    }
                    effectiveTypes.addAll(getEffectiveComponentTypes(ct));
                }
            }
        }
        // make compClass the type so we can get it's other contract elements
        compClass = compType;
    } else if (compClass instanceof ComponentType) {
        effectiveTypes.addAll(getEffectiveComponentTypes((ComponentType) compClass));
    } else {
        throw new AgreeException("Internal error: attempt to run AGREE analysis on instance " + compInst.getFullName() + " not instance of ComponentImplementation or ComponentType.");
    }
    curInst = compInst;
    if (timing == null) {
        timing = TimingModel.SYNC;
    }
    for (ComponentType compType : effectiveTypes) {
        AgreeContractSubclause annex = getAgreeAnnex(compType);
        if (annex != null) {
            hasDirectAnnex = true;
            AgreeContract contract = (AgreeContract) annex.getContract();
            // this makes files for monolithic verification a bit smaller
            if (!isMonolithic || isTop || !hasSubcomponents) {
                assumptions.addAll(getAssumptionStatements(contract.getSpecs(), portRewriteMap));
                guarantees.addAll(getGuaranteeStatements(contract.getSpecs(), portRewriteMap));
                lemmas.addAll(getReachableStatements(contract.getSpecs(), portRewriteMap));
            }
            // Count eq statements with expressions as assertions
            getEquationStatements(contract.getSpecs(), portRewriteMap).addAllTo(locals, assertions, guarantees);
            assertions.addAll(getPropertyStatements(contract.getSpecs()));
            outputs.addAll(getEquationVars(contract.getSpecs(), compInst));
            getAgreeInputVars(contract.getSpecs(), compInst).addAllTo(inputs, assumptions, guarantees);
            initialConstraint = getInitialConstraint(contract.getSpecs());
            addLustreNodes(contract.getSpecs());
            gatherLustreTypes(contract.getSpecs());
        }
    }
    gatherUnspecifiedAadlProperties(unspecifiedAadlProperties, inputs, assumptions, guarantees);
    if (!(foundSubNode || hasDirectAnnex)) {
        return null;
    }
    gatherOutputsInputsAndTypes(outputs, inputs, compInst.getFeatureInstances(), assumptions, guarantees);
    AgreeNodeBuilder builder = new AgreeNodeBuilder(id);
    builder.addInput(inputs);
    builder.addOutput(outputs);
    builder.addLocal(locals);
    builder.addLocalEquation(localEquations);
    builder.addConnection(connections);
    builder.addSubNode(subNodes);
    // Clean up any vacuous true predicates
    Predicate<AgreeStatement> isBoolExprAndisTrue = st -> (st.expr instanceof BoolExpr) && ((BoolExpr) st.expr).value;
    assertions.removeIf(isBoolExprAndisTrue);
    assumptions.removeIf(isBoolExprAndisTrue);
    guarantees.removeIf(isBoolExprAndisTrue);
    builder.addAssertion(assertions);
    builder.addAssumption(assumptions);
    builder.addGuarantee(guarantees);
    builder.addLemma(lemmas);
    builder.addPatternProp(patternProps);
    builder.setClockConstraint(clockConstraint);
    builder.setInitialConstraint(initialConstraint);
    builder.setClockVar(clockVar);
    builder.setReference(reference);
    builder.setTiming(timing);
    builder.setCompInst(compInst);
    builder.addTimeOf(timeOfVarMap);
    builder.addTimeRise(timeRiseVarMap);
    builder.addTimeFall(timeFallVarMap);
    AgreeNode result = builder.build();
    renamings.put(id, compInst.getName());
    refMap.put(id, compInst);
    return linearizationRewriter.visit(result);
}
Also used : ComponentImplementation(org.osate.aadl2.ComponentImplementation) EnumLitExpr(com.rockwellcollins.atc.agree.agree.EnumLitExpr) IndicesExpr(com.rockwellcollins.atc.agree.agree.IndicesExpr) AnnexUtil(org.osate.annexsupport.AnnexUtil) AadlBoolean(org.osate.aadl2.AadlBoolean) TimeRiseExpr(com.rockwellcollins.atc.agree.agree.TimeRiseExpr) RecordDef(com.rockwellcollins.atc.agree.agree.RecordDef) FnDef(com.rockwellcollins.atc.agree.agree.FnDef) DoubleDotRef(com.rockwellcollins.atc.agree.agree.DoubleDotRef) RecordAccessExpr(jkind.lustre.RecordAccessExpr) FlatmapExpr(com.rockwellcollins.atc.agree.agree.FlatmapExpr) TimeFallExpr(com.rockwellcollins.atc.agree.agree.TimeFallExpr) RealLitExpr(com.rockwellcollins.atc.agree.agree.RealLitExpr) BigDecimal(java.math.BigDecimal) PropertyExpression(org.osate.aadl2.PropertyExpression) GetPropertyExpr(com.rockwellcollins.atc.agree.agree.GetPropertyExpr) AgreeAutomaterRegistry(com.rockwellcollins.atc.agree.analysis.extentions.AgreeAutomaterRegistry) Map(java.util.Map) Expr(jkind.lustre.Expr) InputStatement(com.rockwellcollins.atc.agree.agree.InputStatement) BigInteger(java.math.BigInteger) CastExpr(jkind.lustre.CastExpr) EnumerationLiteral(org.osate.aadl2.EnumerationLiteral) ConnectionEnd(org.osate.aadl2.ConnectionEnd) CalenStatement(com.rockwellcollins.atc.agree.agree.CalenStatement) FeatureCategory(org.osate.aadl2.instance.FeatureCategory) AgreeContract(com.rockwellcollins.atc.agree.agree.AgreeContract) PatternStatement(com.rockwellcollins.atc.agree.agree.PatternStatement) MNSynchronyElement(com.rockwellcollins.atc.agree.analysis.MNSynchronyElement) Set(java.util.Set) ComponentRef(com.rockwellcollins.atc.agree.agree.ComponentRef) AadlPackage(org.osate.aadl2.AadlPackage) ConnectionType(com.rockwellcollins.atc.agree.analysis.ast.AgreeAADLConnection.ConnectionType) AgreePatternTranslator(com.rockwellcollins.atc.agree.analysis.realtime.AgreePatternTranslator) PropertyDoesNotApplyToHolderException(org.osate.aadl2.properties.PropertyDoesNotApplyToHolderException) AgreeCalendarUtils(com.rockwellcollins.atc.agree.analysis.AgreeCalendarUtils) MNSynchStatement(com.rockwellcollins.atc.agree.agree.MNSynchStatement) Node(jkind.lustre.Node) ConnectionStatement(com.rockwellcollins.atc.agree.agree.ConnectionStatement) SpecStatement(com.rockwellcollins.atc.agree.agree.SpecStatement) AgreeUtils(com.rockwellcollins.atc.agree.analysis.AgreeUtils) AgreeSporadicPattern(com.rockwellcollins.atc.agree.analysis.realtime.AgreeSporadicPattern) NodeCallExpr(jkind.lustre.NodeCallExpr) GuaranteeStatement(com.rockwellcollins.atc.agree.agree.GuaranteeStatement) TimeOfExpr(com.rockwellcollins.atc.agree.agree.TimeOfExpr) BoolExpr(jkind.lustre.BoolExpr) BinaryExpr(jkind.lustre.BinaryExpr) AgreePackage(com.rockwellcollins.atc.agree.agree.AgreePackage) AgreePeriodicPattern(com.rockwellcollins.atc.agree.analysis.realtime.AgreePeriodicPattern) Feature(org.osate.aadl2.Feature) RealExpr(jkind.lustre.RealExpr) ComponentImplementation(org.osate.aadl2.ComponentImplementation) IdGatherer(com.rockwellcollins.atc.agree.analysis.lustre.visitors.IdGatherer) Type(jkind.lustre.Type) ArrayList(java.util.ArrayList) ComponentClassifier(org.osate.aadl2.ComponentClassifier) ArrayExpr(jkind.lustre.ArrayExpr) LiftContractStatement(com.rockwellcollins.atc.agree.agree.LiftContractStatement) AgreeCauseEffectPattern(com.rockwellcollins.atc.agree.analysis.realtime.AgreeCauseEffectPattern) SubstitutionVisitor(jkind.translation.SubstitutionVisitor) Aadl2Package(org.osate.aadl2.Aadl2Package) Subcomponent(org.osate.aadl2.Subcomponent) BinaryOp(jkind.lustre.BinaryOp) PrevExpr(com.rockwellcollins.atc.agree.agree.PrevExpr) IdExpr(jkind.lustre.IdExpr) TimeExpr(com.rockwellcollins.atc.agree.agree.TimeExpr) FeatureGroup(org.osate.aadl2.FeatureGroup) FoldRightExpr(com.rockwellcollins.atc.agree.agree.FoldRightExpr) TagExpr(com.rockwellcollins.atc.agree.agree.TagExpr) IntegerLiteral(org.osate.aadl2.IntegerLiteral) NamedType(jkind.lustre.NamedType) EventExpr(com.rockwellcollins.atc.agree.agree.EventExpr) LatchedExpr(com.rockwellcollins.atc.agree.agree.LatchedExpr) AgreeInlineLatchedConnections(com.rockwellcollins.atc.agree.analysis.ast.visitors.AgreeInlineLatchedConnections) ReachableStatement(com.rockwellcollins.atc.agree.agree.ReachableStatement) PropertyConstant(org.osate.aadl2.PropertyConstant) AgreePatternBuilder(com.rockwellcollins.atc.agree.analysis.realtime.AgreePatternBuilder) Aadl2GlobalScopeUtil(org.osate.aadl2.modelsupport.scoping.Aadl2GlobalScopeUtil) EventPort(org.osate.aadl2.EventPort) NamedElmExpr(com.rockwellcollins.atc.agree.agree.NamedElmExpr) FeatureGroupType(org.osate.aadl2.FeatureGroupType) PortConnection(org.osate.aadl2.PortConnection) FunctionCallExpr(jkind.lustre.FunctionCallExpr) RealCast(com.rockwellcollins.atc.agree.agree.RealCast) DataSubcomponentType(org.osate.aadl2.DataSubcomponentType) ConnectionReference(org.osate.aadl2.instance.ConnectionReference) DataPort(org.osate.aadl2.DataPort) ConstStatement(com.rockwellcollins.atc.agree.agree.ConstStatement) VarDecl(jkind.lustre.VarDecl) SelectionExpr(com.rockwellcollins.atc.agree.agree.SelectionExpr) AnnexSubclause(org.osate.aadl2.AnnexSubclause) BooleanLiteral(org.osate.aadl2.BooleanLiteral) IfThenElseExpr(jkind.lustre.IfThenElseExpr) NamedElement(org.osate.aadl2.NamedElement) UninterpretedFnDef(com.rockwellcollins.atc.agree.agree.UninterpretedFnDef) RealLiteral(org.osate.aadl2.RealLiteral) NodeStmt(com.rockwellcollins.atc.agree.agree.NodeStmt) AsynchStatement(com.rockwellcollins.atc.agree.agree.AsynchStatement) NamedValue(org.osate.aadl2.NamedValue) NamedID(com.rockwellcollins.atc.agree.agree.NamedID) TupleExpr(jkind.lustre.TupleExpr) PropertyUtils(org.osate.xtext.aadl2.properties.util.PropertyUtils) UnaryExpr(jkind.lustre.UnaryExpr) AgreeMakeClockedLustreNodes(com.rockwellcollins.atc.agree.analysis.ast.visitors.AgreeMakeClockedLustreNodes) ArraySubExpr(com.rockwellcollins.atc.agree.agree.ArraySubExpr) ComponentType(org.osate.aadl2.ComponentType) FeatureInstance(org.osate.aadl2.instance.FeatureInstance) IntExpr(jkind.lustre.IntExpr) UnaryOp(jkind.lustre.UnaryOp) LatchedStatement(com.rockwellcollins.atc.agree.agree.LatchedStatement) AadlReal(org.osate.aadl2.AadlReal) AgreeTypeSystem(com.rockwellcollins.atc.agree.AgreeTypeSystem) PreExpr(com.rockwellcollins.atc.agree.agree.PreExpr) Predicate(java.util.function.Predicate) AgreeContractSubclause(com.rockwellcollins.atc.agree.agree.AgreeContractSubclause) AssertStatement(com.rockwellcollins.atc.agree.agree.AssertStatement) NodeEq(com.rockwellcollins.atc.agree.agree.NodeEq) TimingModel(com.rockwellcollins.atc.agree.analysis.ast.AgreeNode.TimingModel) NodeLemma(com.rockwellcollins.atc.agree.agree.NodeLemma) LinearizationRewriter(com.rockwellcollins.atc.agree.analysis.linearization.LinearizationRewriter) EObject(org.eclipse.emf.ecore.EObject) Connection(org.osate.aadl2.Connection) RecordLitExpr(com.rockwellcollins.atc.agree.agree.RecordLitExpr) NodeDef(com.rockwellcollins.atc.agree.agree.NodeDef) List(java.util.List) Property(org.osate.aadl2.Property) ExistsExpr(com.rockwellcollins.atc.agree.agree.ExistsExpr) Entry(java.util.Map.Entry) FoldLeftExpr(com.rockwellcollins.atc.agree.agree.FoldLeftExpr) SynchStatement(com.rockwellcollins.atc.agree.agree.SynchStatement) AgreeAutomater(com.rockwellcollins.atc.agree.analysis.extentions.AgreeAutomater) ExtensionRegistry(com.rockwellcollins.atc.agree.analysis.extentions.ExtensionRegistry) RecordUpdateExpr(com.rockwellcollins.atc.agree.agree.RecordUpdateExpr) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) ForallExpr(com.rockwellcollins.atc.agree.agree.ForallExpr) AadlInteger(org.osate.aadl2.AadlInteger) StringLiteral(org.osate.aadl2.StringLiteral) Arg(com.rockwellcollins.atc.agree.agree.Arg) TypeTable(com.rockwellcollins.atc.agree.analysis.TypeTable) Activator(com.rockwellcollins.atc.agree.analysis.Activator) FloorCast(com.rockwellcollins.atc.agree.agree.FloorCast) ArrayAccessExpr(jkind.lustre.ArrayAccessExpr) HashMap(java.util.HashMap) NodeBuilder(jkind.lustre.builders.NodeBuilder) ConnectionInstanceEnd(org.osate.aadl2.instance.ConnectionInstanceEnd) LinearizationDef(com.rockwellcollins.atc.agree.agree.LinearizationDef) HashSet(java.util.HashSet) DataSubcomponent(org.osate.aadl2.DataSubcomponent) InitialStatement(com.rockwellcollins.atc.agree.agree.InitialStatement) Function(jkind.lustre.Function) LustreExprFactory(com.rockwellcollins.atc.agree.analysis.translation.LustreExprFactory) PropertyStatement(com.rockwellcollins.atc.agree.agree.PropertyStatement) AgreeException(com.rockwellcollins.atc.agree.analysis.AgreeException) AgreeLogger(com.rockwellcollins.atc.agree.analysis.AgreeLogger) ThisRef(com.rockwellcollins.atc.agree.agree.ThisRef) AssignStatement(com.rockwellcollins.atc.agree.agree.AssignStatement) ArrayUpdateExpr(com.rockwellcollins.atc.agree.agree.ArrayUpdateExpr) AssumeStatement(com.rockwellcollins.atc.agree.agree.AssumeStatement) EqStatement(com.rockwellcollins.atc.agree.agree.EqStatement) BoolLitExpr(com.rockwellcollins.atc.agree.agree.BoolLitExpr) Equation(jkind.lustre.Equation) NodeBodyExpr(com.rockwellcollins.atc.agree.agree.NodeBodyExpr) ConnectionInstance(org.osate.aadl2.instance.ConnectionInstance) EList(org.eclipse.emf.common.util.EList) IntLitExpr(com.rockwellcollins.atc.agree.agree.IntLitExpr) LemmaStatement(com.rockwellcollins.atc.agree.agree.LemmaStatement) AgreeSwitch(com.rockwellcollins.atc.agree.agree.util.AgreeSwitch) PreferenceConstants(com.rockwellcollins.atc.agree.analysis.preferences.PreferenceConstants) DataClassifier(org.osate.aadl2.DataClassifier) EventDataPort(org.osate.aadl2.EventDataPort) CallExpr(com.rockwellcollins.atc.agree.agree.CallExpr) Collections(java.util.Collections) ArrayLiteralExpr(com.rockwellcollins.atc.agree.agree.ArrayLiteralExpr) ConnectionInstance(org.osate.aadl2.instance.ConnectionInstance) BoolExpr(jkind.lustre.BoolExpr) ComponentClassifier(org.osate.aadl2.ComponentClassifier) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) TimingModel(com.rockwellcollins.atc.agree.analysis.ast.AgreeNode.TimingModel) EObject(org.eclipse.emf.ecore.EObject) Subcomponent(org.osate.aadl2.Subcomponent) DataSubcomponent(org.osate.aadl2.DataSubcomponent) ComponentInstance(org.osate.aadl2.instance.ComponentInstance) LiftContractStatement(com.rockwellcollins.atc.agree.agree.LiftContractStatement) HashSet(java.util.HashSet) AgreeContract(com.rockwellcollins.atc.agree.agree.AgreeContract) ComponentType(org.osate.aadl2.ComponentType) IdExpr(jkind.lustre.IdExpr) PortConnection(org.osate.aadl2.PortConnection) Connection(org.osate.aadl2.Connection) SpecStatement(com.rockwellcollins.atc.agree.agree.SpecStatement) AgreeContractSubclause(com.rockwellcollins.atc.agree.agree.AgreeContractSubclause) EnumLitExpr(com.rockwellcollins.atc.agree.agree.EnumLitExpr) IndicesExpr(com.rockwellcollins.atc.agree.agree.IndicesExpr) TimeRiseExpr(com.rockwellcollins.atc.agree.agree.TimeRiseExpr) RecordAccessExpr(jkind.lustre.RecordAccessExpr) FlatmapExpr(com.rockwellcollins.atc.agree.agree.FlatmapExpr) TimeFallExpr(com.rockwellcollins.atc.agree.agree.TimeFallExpr) RealLitExpr(com.rockwellcollins.atc.agree.agree.RealLitExpr) GetPropertyExpr(com.rockwellcollins.atc.agree.agree.GetPropertyExpr) Expr(jkind.lustre.Expr) CastExpr(jkind.lustre.CastExpr) NodeCallExpr(jkind.lustre.NodeCallExpr) TimeOfExpr(com.rockwellcollins.atc.agree.agree.TimeOfExpr) BoolExpr(jkind.lustre.BoolExpr) BinaryExpr(jkind.lustre.BinaryExpr) RealExpr(jkind.lustre.RealExpr) ArrayExpr(jkind.lustre.ArrayExpr) PrevExpr(com.rockwellcollins.atc.agree.agree.PrevExpr) IdExpr(jkind.lustre.IdExpr) TimeExpr(com.rockwellcollins.atc.agree.agree.TimeExpr) FoldRightExpr(com.rockwellcollins.atc.agree.agree.FoldRightExpr) TagExpr(com.rockwellcollins.atc.agree.agree.TagExpr) EventExpr(com.rockwellcollins.atc.agree.agree.EventExpr) LatchedExpr(com.rockwellcollins.atc.agree.agree.LatchedExpr) NamedElmExpr(com.rockwellcollins.atc.agree.agree.NamedElmExpr) FunctionCallExpr(jkind.lustre.FunctionCallExpr) SelectionExpr(com.rockwellcollins.atc.agree.agree.SelectionExpr) IfThenElseExpr(jkind.lustre.IfThenElseExpr) TupleExpr(jkind.lustre.TupleExpr) UnaryExpr(jkind.lustre.UnaryExpr) ArraySubExpr(com.rockwellcollins.atc.agree.agree.ArraySubExpr) IntExpr(jkind.lustre.IntExpr) PreExpr(com.rockwellcollins.atc.agree.agree.PreExpr) RecordLitExpr(com.rockwellcollins.atc.agree.agree.RecordLitExpr) ExistsExpr(com.rockwellcollins.atc.agree.agree.ExistsExpr) FoldLeftExpr(com.rockwellcollins.atc.agree.agree.FoldLeftExpr) RecordUpdateExpr(com.rockwellcollins.atc.agree.agree.RecordUpdateExpr) ForallExpr(com.rockwellcollins.atc.agree.agree.ForallExpr) ArrayAccessExpr(jkind.lustre.ArrayAccessExpr) ArrayUpdateExpr(com.rockwellcollins.atc.agree.agree.ArrayUpdateExpr) BoolLitExpr(com.rockwellcollins.atc.agree.agree.BoolLitExpr) NodeBodyExpr(com.rockwellcollins.atc.agree.agree.NodeBodyExpr) IntLitExpr(com.rockwellcollins.atc.agree.agree.IntLitExpr) CallExpr(com.rockwellcollins.atc.agree.agree.CallExpr) ArrayLiteralExpr(com.rockwellcollins.atc.agree.agree.ArrayLiteralExpr) LatchedStatement(com.rockwellcollins.atc.agree.agree.LatchedStatement) AgreeException(com.rockwellcollins.atc.agree.analysis.AgreeException) NamedElement(org.osate.aadl2.NamedElement)

Example 3 with AgreeContractSubclause

use of com.rockwellcollins.atc.agree.agree.AgreeContractSubclause in project AGREE by loonwerks.

the class AgreeHandlerUtil method getOrCreateAgreeContract.

public static AgreeContract getOrCreateAgreeContract(final Object element) {
    // Subclauses
    final AgreeContractSubclause agreeSubclause;
    if (element instanceof Classifier) {
        agreeSubclause = getOrCreateAgreeSubclause((Classifier) element);
    } else if (element instanceof AgreeContractSubclause) {
        agreeSubclause = (AgreeContractSubclause) element;
    } else {
        agreeSubclause = null;
    }
    final AgreeContract contract;
    if (agreeSubclause == null) {
        // Libraries
        final AgreeContractLibrary agreeLibrary;
        if (element instanceof AadlPackage) {
            agreeLibrary = getOrCreateAgreeLibrary((AadlPackage) element);
        } else if (element instanceof AgreeContractLibrary) {
            agreeLibrary = (AgreeContractLibrary) element;
        } else {
            throw new RuntimeException("Specified business object is not a classifier or a subclause: " + element);
        }
        if (agreeLibrary.getContract() == null) {
            agreeLibrary.setContract(AgreeFactory.eINSTANCE.createAgreeContract());
        }
        if (!(agreeLibrary.getContract() instanceof AgreeContract)) {
            throw new RuntimeException("Contract is not an AGREE contract");
        }
        contract = (AgreeContract) agreeLibrary.getContract();
    } else {
        if (agreeSubclause.getContract() == null) {
            agreeSubclause.setContract(AgreeFactory.eINSTANCE.createAgreeContract());
        }
        if (!(agreeSubclause.getContract() instanceof AgreeContract)) {
            throw new RuntimeException("Contract is not an AGREE contract");
        }
        contract = (AgreeContract) agreeSubclause.getContract();
    }
    return contract;
}
Also used : AgreeContract(com.rockwellcollins.atc.agree.agree.AgreeContract) AadlPackage(org.osate.aadl2.AadlPackage) AgreeContractLibrary(com.rockwellcollins.atc.agree.agree.AgreeContractLibrary) Classifier(org.osate.aadl2.Classifier) AgreeContractSubclause(com.rockwellcollins.atc.agree.agree.AgreeContractSubclause)

Example 4 with AgreeContractSubclause

use of com.rockwellcollins.atc.agree.agree.AgreeContractSubclause in project AGREE by loonwerks.

the class AgreeTypeSystem method typeDefFromClassifier.

public static TypeDef typeDefFromClassifier(Classifier c) {
    if (c instanceof DataType || (c instanceof DataImplementation && ((DataImplementation) c).getAllSubcomponents().isEmpty() && ((DataImplementation) c).getType() != null)) {
        // Includes special case for data implementations implementing extensions of primitive types
        Classifier classifierType = c instanceof DataImplementation ? ((DataImplementation) c).getType() : c;
        List<PropertyAssociation> pas = classifierType.getAllPropertyAssociations();
        for (Classifier classType : classifierType.getSelfPlusAllExtended()) {
            if (classType != null && hasIntegerDataRepresentation(classType)) {
                for (PropertyAssociation choice : pas) {
                    Property p = choice.getProperty();
                    PropertyExpression v = choice.getOwnedValues().get(0).getOwnedValue();
                    String key = p.getQualifiedName();
                    if (key.equals("Data_Model::Integer_Range")) {
                        if (v instanceof RangeValue) {
                            try {
                                RangeValue rangeValue = (RangeValue) v;
                                long min = intFromPropExp(rangeValue.getMinimum()).get();
                                long max = intFromPropExp(rangeValue.getMaximum()).get();
                                return new RangeIntTypeDef(min, max);
                            } catch (Exception e) {
                                return Prim.ErrorTypeDef;
                            }
                        }
                    }
                }
                return Prim.IntTypeDef;
            } else if (classType != null && hasFloatDataRepresentation(classType)) {
                for (PropertyAssociation choice : pas) {
                    Property p = choice.getProperty();
                    PropertyExpression v = choice.getOwnedValues().get(0).getOwnedValue();
                    String key = p.getQualifiedName();
                    if (key.equals("Data_Model::Real_Range")) {
                        if (v instanceof RangeValue) {
                            try {
                                RangeValue rangeValue = (RangeValue) v;
                                double min = realFromPropExp(rangeValue.getMinimum()).get();
                                double max = realFromPropExp(rangeValue.getMaximum()).get();
                                return new RangeRealTypeDef(min, max);
                            } catch (Exception e) {
                                return Prim.ErrorTypeDef;
                            }
                        }
                    }
                }
                return Prim.RealTypeDef;
            } else if (classType != null && hasBooleanDataRepresentation(classType)) {
                return Prim.BoolTypeDef;
            }
        }
        boolean prop_isArray = false;
        int prop_arraySize = 0;
        TypeDef prop_arrayBaseType = null;
        boolean prop_isEnum = false;
        List<String> prop_enumValues = null;
        for (PropertyAssociation choice : pas) {
            Property p = choice.getProperty();
            PropertyExpression v = choice.getOwnedValues().get(0).getOwnedValue();
            String key = p.getQualifiedName();
            key = key == null ? p.getName() : key;
            if (key == null) {
                return Prim.ErrorTypeDef;
            }
            if (key.equalsIgnoreCase("Data_Model::Data_Representation")) {
                if (v instanceof NamedValue) {
                    AbstractNamedValue anv = ((NamedValue) v).getNamedValue();
                    if (anv instanceof EnumerationLiteral) {
                        EnumerationLiteral el = (EnumerationLiteral) anv;
                        prop_isArray = el.getName().equals("Array");
                        prop_isEnum = el.getName().equals("Enum");
                    }
                }
            } else if (key.equalsIgnoreCase("Data_Model::Enumerators")) {
                if (v instanceof ListValue) {
                    EList<PropertyExpression> peList = ((ListValue) v).getOwnedListElements();
                    String prefix = c.getQualifiedName() + "_";
                    prop_enumValues = new ArrayList<>();
                    for (PropertyExpression pe : peList) {
                        if (pe instanceof StringLiteral) {
                            String enumString = prefix + ((StringLiteral) pe).getValue();
                            prop_enumValues.add(enumString);
                        }
                    }
                }
            } else if (key.equalsIgnoreCase("Data_Model::Base_Type")) {
                if (v instanceof ListValue) {
                    ListValue l = (ListValue) v;
                    PropertyExpression pe = l.getOwnedListElements().get(0);
                    if (pe instanceof ClassifierValue) {
                        prop_arrayBaseType = typeDefFromClassifier(((ClassifierValue) pe).getClassifier());
                    }
                }
            } else if (key.equalsIgnoreCase("Data_Model::Dimension")) {
                if (v instanceof ListValue) {
                    ListValue l = (ListValue) v;
                    PropertyExpression pe = l.getOwnedListElements().get(0);
                    prop_arraySize = Math.toIntExact(intFromPropExp(pe).orElse((long) -1).longValue());
                }
            }
        }
        if (prop_isArray && prop_arraySize > 0 && prop_arrayBaseType != null) {
            return new ArrayTypeDef(prop_arrayBaseType, prop_arraySize, Optional.of(c));
        } else if (prop_isEnum && prop_enumValues != null) {
            String name = c.getQualifiedName();
            return new EnumTypeDef(name, prop_enumValues, c);
        }
    } else if (c instanceof ComponentClassifier) {
        Map<String, TypeDef> fields = new HashMap<>();
        Classifier currClsfr = c;
        while (currClsfr != null) {
            ComponentType ct = null;
            if (currClsfr instanceof ComponentImplementation) {
                EList<Subcomponent> subcomps = ((ComponentImplementation) currClsfr).getAllSubcomponents();
                for (Subcomponent sub : subcomps) {
                    String fieldName = sub.getName();
                    if (sub.getClassifier() != null) {
                        boolean prop_isArray = false;
                        int prop_arraySize = 0;
                        boolean prop_isEnum = false;
                        List<String> prop_enumValues = null;
                        for (PropertyAssociation pa : sub.getOwnedPropertyAssociations()) {
                            Property p = pa.getProperty();
                            String key = p.getQualifiedName();
                            key = key == null ? p.getName() : key;
                            PropertyExpression v = null;
                            if (!pa.getOwnedValues().isEmpty()) {
                                v = pa.getOwnedValues().get(0).getOwnedValue();
                            } else {
                                continue;
                            }
                            if (key.equals("Data_Model::Data_Representation")) {
                                if (v instanceof NamedValue) {
                                    AbstractNamedValue anv = ((NamedValue) v).getNamedValue();
                                    if (anv instanceof EnumerationLiteral) {
                                        EnumerationLiteral el = (EnumerationLiteral) anv;
                                        prop_isArray = el.getName().equals("Array");
                                        prop_isEnum = el.getName().equals("Enum");
                                    }
                                }
                            } else if (key.equals("Data_Model::Dimension")) {
                                if (v instanceof ListValue) {
                                    ListValue l = (ListValue) v;
                                    PropertyExpression pe = l.getOwnedListElements().get(0);
                                    prop_arraySize = Math.toIntExact(intFromPropExp(pe).orElse((long) -1).longValue());
                                }
                            } else if (key.equals("Data_Model::Enumerators")) {
                                if (v instanceof ListValue) {
                                    EList<PropertyExpression> peList = ((ListValue) v).getOwnedListElements();
                                    String prefix = c.getQualifiedName() + "_";
                                    prop_enumValues = new ArrayList<>();
                                    for (PropertyExpression pe : peList) {
                                        if (pe instanceof StringLiteral) {
                                            String enumString = prefix + ((StringLiteral) pe).getValue();
                                            prop_enumValues.add(enumString);
                                        }
                                    }
                                }
                            }
                        }
                        if (prop_isArray && prop_arraySize > 0) {
                            TypeDef typeDef = new ArrayTypeDef(typeDefFromClassifier(sub.getClassifier()), prop_arraySize, Optional.empty());
                            fields.putIfAbsent(fieldName, typeDef);
                        } else if (prop_isEnum && prop_enumValues != null) {
                            String name = c.getQualifiedName();
                            TypeDef typeDef = new EnumTypeDef(name, prop_enumValues, c);
                            fields.putIfAbsent(fieldName, typeDef);
                        } else if (sub.getArrayDimensions().size() == 0) {
                            TypeDef typeDef = typeDefFromClassifier(sub.getClassifier());
                            fields.putIfAbsent(fieldName, typeDef);
                        } else if (sub.getArrayDimensions().size() == 1) {
                            ArrayDimension ad = sub.getArrayDimensions().get(0);
                            int size = Math.toIntExact(getArraySize(ad));
                            TypeDef stem = typeDefFromClassifier(sub.getClassifier());
                            TypeDef typeDef = new ArrayTypeDef(stem, size, Optional.empty());
                            fields.putIfAbsent(fieldName, typeDef);
                        }
                    }
                }
                ct = ((ComponentImplementation) currClsfr).getType();
            } else if (c instanceof ComponentType) {
                ct = (ComponentType) currClsfr;
            }
            if (ct != null) {
                EList<Feature> features = ct.getAllFeatures();
                for (Feature feature : features) {
                    String fieldName = feature.getName();
                    if (feature.getClassifier() != null) {
                        if (feature.getArrayDimensions().size() == 0) {
                            TypeDef typeDef = typeDefFromClassifier(feature.getClassifier());
                            fields.putIfAbsent(fieldName, typeDef);
                        } else if (feature.getArrayDimensions().size() == 1) {
                            ArrayDimension ad = feature.getArrayDimensions().get(0);
                            int size = Math.toIntExact(getArraySize(ad));
                            TypeDef stem = typeDefFromClassifier(feature.getClassifier());
                            TypeDef typeDef = new ArrayTypeDef(stem, size, Optional.empty());
                            fields.putIfAbsent(fieldName, typeDef);
                        }
                    }
                }
                for (AnnexSubclause annex : AnnexUtil.getAllAnnexSubclauses(currClsfr, AgreePackage.eINSTANCE.getAgreeContractSubclause())) {
                    AgreeContract contract = (AgreeContract) ((AgreeContractSubclause) annex).getContract();
                    for (SpecStatement spec : contract.getSpecs()) {
                        List<Arg> args = new ArrayList<>();
                        if (spec instanceof EqStatement) {
                            args = ((EqStatement) spec).getLhs();
                        } else if (spec instanceof InputStatement) {
                            args = ((InputStatement) spec).getLhs();
                        }
                        for (Arg arg : args) {
                            String fieldName = arg.getName();
                            TypeDef typeDef = typeDefFromNE(arg);
                            fields.putIfAbsent(fieldName, typeDef);
                        }
                        if (spec instanceof ConstStatement) {
                            String fieldName = ((ConstStatement) spec).getName();
                            TypeDef typeDef = AgreeTypeSystem.typeDefFromType(((ConstStatement) spec).getType());
                            fields.putIfAbsent(fieldName, typeDef);
                        }
                    }
                }
            }
            currClsfr = currClsfr.getExtended();
        }
        String name = c.getQualifiedName();
        return new RecordTypeDef(name, fields, c);
    }
    return Prim.ErrorTypeDef;
}
Also used : ComponentImplementation(org.osate.aadl2.ComponentImplementation) ComponentClassifier(org.osate.aadl2.ComponentClassifier) ClassifierValue(org.osate.aadl2.ClassifierValue) PropertyAssociation(org.osate.aadl2.PropertyAssociation) ArrayList(java.util.ArrayList) AbstractNamedValue(org.osate.aadl2.AbstractNamedValue) AbstractNamedValue(org.osate.aadl2.AbstractNamedValue) NamedValue(org.osate.aadl2.NamedValue) ComponentClassifier(org.osate.aadl2.ComponentClassifier) Classifier(org.osate.aadl2.Classifier) AadlString(org.osate.aadl2.AadlString) Feature(org.osate.aadl2.Feature) RangeValue(org.osate.aadl2.RangeValue) Subcomponent(org.osate.aadl2.Subcomponent) DataType(org.osate.aadl2.DataType) PropertyExpression(org.osate.aadl2.PropertyExpression) ArrayList(java.util.ArrayList) List(java.util.List) EList(org.eclipse.emf.common.util.EList) InputStatement(com.rockwellcollins.atc.agree.agree.InputStatement) ArraySizeProperty(org.osate.aadl2.ArraySizeProperty) Property(org.osate.aadl2.Property) EnumerationLiteral(org.osate.aadl2.EnumerationLiteral) AgreeContract(com.rockwellcollins.atc.agree.agree.AgreeContract) ComponentType(org.osate.aadl2.ComponentType) ListValue(org.osate.aadl2.ListValue) DataImplementation(org.osate.aadl2.DataImplementation) SpecStatement(com.rockwellcollins.atc.agree.agree.SpecStatement) AgreeContractSubclause(com.rockwellcollins.atc.agree.agree.AgreeContractSubclause) ConstStatement(com.rockwellcollins.atc.agree.agree.ConstStatement) EList(org.eclipse.emf.common.util.EList) StringLiteral(org.osate.aadl2.StringLiteral) Arg(com.rockwellcollins.atc.agree.agree.Arg) EqStatement(com.rockwellcollins.atc.agree.agree.EqStatement) Map(java.util.Map) HashMap(java.util.HashMap) ArrayDimension(org.osate.aadl2.ArrayDimension) AnnexSubclause(org.osate.aadl2.AnnexSubclause)

Aggregations

AgreeContract (com.rockwellcollins.atc.agree.agree.AgreeContract)4 AgreeContractSubclause (com.rockwellcollins.atc.agree.agree.AgreeContractSubclause)4 EqStatement (com.rockwellcollins.atc.agree.agree.EqStatement)3 SpecStatement (com.rockwellcollins.atc.agree.agree.SpecStatement)3 AnnexSubclause (org.osate.aadl2.AnnexSubclause)3 PropertyExpression (org.osate.aadl2.PropertyExpression)3 Arg (com.rockwellcollins.atc.agree.agree.Arg)2 AssumeStatement (com.rockwellcollins.atc.agree.agree.AssumeStatement)2 ConstStatement (com.rockwellcollins.atc.agree.agree.ConstStatement)2 InputStatement (com.rockwellcollins.atc.agree.agree.InputStatement)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 List (java.util.List)2 Map (java.util.Map)2 EList (org.eclipse.emf.common.util.EList)2 AadlPackage (org.osate.aadl2.AadlPackage)2 Classifier (org.osate.aadl2.Classifier)2 ComponentClassifier (org.osate.aadl2.ComponentClassifier)2 ComponentImplementation (org.osate.aadl2.ComponentImplementation)2 ComponentType (org.osate.aadl2.ComponentType)2