Search in sources :

Example 66 with SystemInstance

use of org.osate.aadl2.instance.SystemInstance in project osate-plugin by sireum.

the class LaunchHAMR method runJob.

@Override
public IStatus runJob(Element elem, IProgressMonitor monitor) {
    prompt = null;
    MessageConsole console = displayConsole();
    console.clearConsole();
    if (// 
    !Util.emitSireumVersion(console) || !(ApiUtil.hamrCliApiCompatible(new PrintStream(console.newMessageStream())))) {
        displayPopup("HAMR code generation was unsuccessful");
        return Status.CANCEL_STATUS;
    }
    SystemInstance si = getSystemInstance(elem);
    if (si == null) {
        Dialog.showError(getToolName(), "Please select a system implementation or a system instance");
        return Status.CANCEL_STATUS;
    }
    writeToConsole("Generating AIR ...");
    Aadl model = Util.getAir(si, true, console);
    if (model != null) {
        final int bit_width = HAMRPropertyProvider.getDefaultBitWidthFromElement(si);
        if (!HAMRPropertyProvider.bitWidths.contains(bit_width)) {
            String options = HAMRPropertyProvider.bitWidths.stream().map(Object::toString).collect(Collectors.joining(", "));
            displayPopup("Invalid bit width: " + bit_width + ".  Valid options are " + options);
            return Status.CANCEL_STATUS;
        }
        final int max_seq_size = HAMRPropertyProvider.getDefaultMaxSequenceSizeFromElement(si);
        if (max_seq_size < 0) {
            displayPopup("Max sequence size must be greater than or equal to 0");
            return Status.CANCEL_STATUS;
        }
        final int max_string_size = HAMRPropertyProvider.getDefaultMaxStringSizeFromElement(si);
        if (max_string_size < 0) {
            displayPopup("Max string size must be greater than or equal to 0");
            return Status.CANCEL_STATUS;
        }
        List<Platform> platforms = HAMRPropertyProvider.getPlatformsFromElement(si);
        List<HW> hardwares = HAMRPropertyProvider.getHWsFromElement(si);
        if (PreferenceValues.HAMR_SERIALIZE_AIR_OPT.getValue()) {
            File f = serializeToFile(model, PreferenceValues.HAMR_AIR_OUTPUT_FOLDER_OPT.getValue(), si);
            writeToConsole("Wrote: " + f.getAbsolutePath());
        }
        Display.getDefault().syncExec(() -> {
            prompt = new HAMRPrompt(getProject(si), getShell(), si.getComponentImplementation().getFullName(), platforms, hardwares, bit_width, max_seq_size, max_string_size);
            prompt.open();
        });
        if (prompt.getReturnCode() == Window.OK) {
            try {
                int toolRet = 0;
                List<Report> report = HAMRUtil.checkModel(si, prompt);
                for (Report r : report) {
                    writeToConsole(r.toString());
                    if (r instanceof ErrorReport) {
                        toolRet = 1;
                    }
                }
                if (toolRet == 0) {
                    writeToConsole("Generating " + getToolName() + " artifacts...");
                    final File workspaceRoot = getProjectPath(si).toFile();
                    final org.sireum.String _slangOutputDir = // 
                    prompt.getSlangOptionOutputDirectory().equals("") ? new org.sireum.String(workspaceRoot.getAbsolutePath()) : new org.sireum.String(prompt.getSlangOptionOutputDirectory());
                    final org.sireum.String _base = // 
                    prompt.getOptionBasePackageName().equals("") ? new org.sireum.String(HAMRUtil.cleanupPackageName(new File(_slangOutputDir.string()).getName())) : new org.sireum.String(HAMRUtil.cleanupPackageName(prompt.getOptionBasePackageName()));
                    final org.sireum.String _cOutputDirectory = // 
                    prompt.getOptionCOutputDirectory().equals("") ? null : new org.sireum.String(prompt.getOptionCOutputDirectory());
                    org.sireum.String _camkesOutputDir = // 
                    prompt.getOptionCamkesOptionOutputDirectory().equals("") ? null : new org.sireum.String(prompt.getOptionCamkesOptionOutputDirectory());
                    toolRet = Util.callWrapper(getToolName(), console, () -> {
                        boolean verbose = PreferenceValues.HAMR_VERBOSE_OPT.getValue();
                        String platform = prompt.getOptionPlatform().hamrName();
                        Option<org.sireum.String> slangOutputDir = ArsitBridge.sireumOption(_slangOutputDir);
                        Option<org.sireum.String> slangPackageName = ArsitBridge.sireumOption(_base);
                        boolean noProyekIve = !PreferenceValues.HAMR_RUN_PROYEK_IVE_OPT.getValue();
                        boolean noEmbedArt = !PreferenceValues.HAMR_EMBED_ART_OPT.getValue();
                        boolean devicesAsThreads = PreferenceValues.HAMR_DEVICES_AS_THREADS_OPT.getValue();
                        boolean genSbtMill = PreferenceValues.HAMR_GEN_SBT_MILL_OPT.getValue();
                        IS<Z, org.sireum.String> slangAuxCodeDirs = prompt.getOptionCAuxSourceDirectory().equals("") ? VisitorUtil.toISZ() : VisitorUtil.toISZ(new org.sireum.String(prompt.getOptionCAuxSourceDirectory()));
                        Option<org.sireum.String> slangOutputCDirectory = ArsitBridge.sireumOption(_cOutputDirectory);
                        boolean excludeComponentImpl = prompt.getOptionExcludesSlangImplementations();
                        Z bitWidth = SlangUtils.toZ(prompt.getOptionBitWidth());
                        Z maxStringSize = SlangUtils.toZ(prompt.getOptionMaxStringSize());
                        Z maxArraySize = SlangUtils.toZ(prompt.getOptionMaxSequenceSize());
                        boolean runTranspiler = PreferenceValues.HAMR_RUN_TRANSPILER_OPT.getValue();
                        Option<org.sireum.String> camkesOutputDirectory = ArsitBridge.sireumOption(_camkesOutputDir);
                        IS<Z, org.sireum.String> camkesAuxCodeDirs = prompt.getOptionCamkesAuxSrcDir().equals("") ? VisitorUtil.toISZ() : VisitorUtil.toISZ(new org.sireum.String(prompt.getOptionCamkesAuxSrcDir()));
                        Option<org.sireum.String> aadlRootDir = ArsitBridge.sireumOption(new org.sireum.String(workspaceRoot.getAbsolutePath()));
                        List<org.sireum.String> exOptions = new ArrayList<>();
                        if (org.sireum.aadl.osate.PreferenceValues.getPROCESS_BA_OPT()) {
                            exOptions.add(new org.sireum.String("PROCESS_BTS_NODES"));
                        }
                        if (PreferenceValues.HAMR_PROOF_GENERATE.getValue()) {
                            exOptions.add(new org.sireum.String("GENERATE_REFINEMENT_PROOF"));
                        }
                        IS<Z, org.sireum.String> experimentalOptions = VisitorUtil.toISZ(exOptions);
                        Reporter reporter = org.sireum.message.Reporter$.MODULE$.create();
                        Z codegenRet = // 
                        org.sireum.cli.HAMR.codeGenR(// 
                        model, // 
                        verbose, // 
                        org.sireum.Cli.SireumHamrCodegenHamrPlatform$.MODULE$.byName(platform).get(), // 
                        slangOutputDir, // 
                        slangPackageName, // 
                        noProyekIve, // 
                        noEmbedArt, // 
                        devicesAsThreads, // 
                        genSbtMill, // 
                        slangAuxCodeDirs, // 
                        slangOutputCDirectory, // 
                        excludeComponentImpl, // 
                        bitWidth, // 
                        maxStringSize, // 
                        maxArraySize, // 
                        runTranspiler, // 
                        camkesOutputDirectory, // 
                        camkesAuxCodeDirs, // 
                        aadlRootDir, // 
                        experimentalOptions, reporter);
                        // For now just making HAMR markers an opt-in feature
                        if (PreferenceValues.HAMR_PROPOGATE_MARKERS.getValue()) {
                            report(reporter, si);
                        }
                        return codegenRet.toInt();
                    });
                    if (toolRet == 0 && PreferenceValues.HAMR_PROOF_GENERATE.getValue() && (prompt.getOptionPlatform() == Platform.seL4 || prompt.getOptionPlatform() == Platform.seL4_Only)) {
                        String sep = File.separator;
                        File smt2FileLocation = new File(new File(_slangOutputDir.string()), "src" + sep + "c" + sep + "camkes" + sep + "proof" + sep + "smt2_case.smt2");
                        if (_camkesOutputDir != null) {
                            smt2FileLocation = new File(new File(_camkesOutputDir.string()), "proof" + sep + "smt2_case.smt2");
                        }
                        // or perhaps store the path in the eclipse store
                        ProofUtil.lastSMT2Proof = smt2FileLocation;
                        if (PreferenceValues.HAMR_PROOF_CHECK.getValue()) {
                            PrintStream out = new PrintStream(console.newMessageStream());
                            toolRet = ProofUtil.checkProof(smt2FileLocation, out);
                            out.close();
                        }
                    }
                }
                String msg = "HAMR code " + (toolRet == 0 ? "successfully generated" : "generation was unsuccessful");
                displayPopup(msg);
                refreshWorkspace();
            } catch (Throwable ex) {
                ex.printStackTrace();
                displayPopup("Error encountered while running HAMR.\n\n" + ex.getLocalizedMessage());
                return Status.CANCEL_STATUS;
            }
        }
    }
    return Status.OK_STATUS;
}
Also used : Platform(org.sireum.aadl.osate.hamr.handlers.HAMRPropertyProvider.Platform) HW(org.sireum.aadl.osate.hamr.handlers.HAMRPropertyProvider.HW) ErrorReport(org.sireum.aadl.osate.hamr.handlers.HAMRUtil.ErrorReport) SystemInstance(org.osate.aadl2.instance.SystemInstance) Aadl(org.sireum.hamr.ir.Aadl) Z(org.sireum.Z) ArrayList(java.util.ArrayList) List(java.util.List) PrintStream(java.io.PrintStream) MessageConsole(org.eclipse.ui.console.MessageConsole) Report(org.sireum.aadl.osate.hamr.handlers.HAMRUtil.Report) ErrorReport(org.sireum.aadl.osate.hamr.handlers.HAMRUtil.ErrorReport) Reporter(org.sireum.message.Reporter) IS(org.sireum.IS) Option(org.sireum.Option) IFile(org.eclipse.core.resources.IFile) File(java.io.File)

Example 67 with SystemInstance

use of org.osate.aadl2.instance.SystemInstance in project AMASE by loonwerks.

the class GenMCSHandler method runJob.

@Override
protected IStatus runJob(Element root, IProgressMonitor monitor) {
    EphemeralImplementationUtil implUtil = new EphemeralImplementationUtil(monitor);
    // this flag is set by the rerun handler to prevent clearing the advice map
    if (!calledFromRerun) {
        rerunAdviceMap.clear();
    }
    calledFromRerun = false;
    disableRerunHandler();
    handlerService = getWindow().getService(IHandlerService.class);
    try {
        // Make sure the user selected a component implementation
        ComponentImplementation ci = getComponentImplementation(root, implUtil);
        SystemInstance si = getSysInstance(ci, implUtil);
        AnalysisResult result;
        CompositeAnalysisResult wrapper = new CompositeAnalysisResult("");
        // SystemType sysType = si.getSystemImplementation().getType();
        ComponentType sysType = AgreeUtils.getInstanceType(si);
        EList<AnnexSubclause> annexSubClauses = AnnexUtil.getAllAnnexSubclauses(sysType, AgreePackage.eINSTANCE.getAgreeContractSubclause());
        if (annexSubClauses.size() == 0) {
            throw new AgreeException("There is not an AGREE annex in the '" + sysType.getName() + "' system type.");
        }
        if (isRecursive()) {
            if (AgreeUtils.usingKind2()) {
                throw new AgreeException("Kind2 only supports monolithic verification");
            }
            result = buildAnalysisResult(((NamedElement) root).getName(), si);
            wrapper.addChild(result);
            result = wrapper;
        } else if (isRealizability()) {
            AgreeProgram agreeProgram = new AgreeASTBuilder().getAgreeProgram(si, false);
            Program program = LustreAstBuilder.getRealizabilityLustreProgram(agreeProgram);
            wrapper.addChild(createVerification("Realizability Check", si, program, agreeProgram, AnalysisType.Realizability));
            result = wrapper;
        } else {
            wrapVerificationResult(si, wrapper);
            result = wrapper;
        }
        showView(result, linker);
        return doAnalysis(root, monitor, result, linker);
    } catch (Throwable e) {
        String messages = getNestedMessages(e);
        return new Status(IStatus.ERROR, Activator.PLUGIN_ID, 0, messages, e);
    } finally {
        implUtil.cleanup();
    }
}
Also used : ComponentImplementation(org.osate.aadl2.ComponentImplementation) IStatus(org.eclipse.core.runtime.IStatus) Status(org.eclipse.core.runtime.Status) ComponentType(org.osate.aadl2.ComponentType) Program(jkind.lustre.Program) AgreeProgram(com.rockwellcollins.atc.agree.analysis.ast.AgreeProgram) AgreeProgram(com.rockwellcollins.atc.agree.analysis.ast.AgreeProgram) EphemeralImplementationUtil(com.rockwellcollins.atc.agree.analysis.EphemeralImplementationUtil) AnalysisResult(jkind.api.results.AnalysisResult) CompositeAnalysisResult(jkind.api.results.CompositeAnalysisResult) IHandlerService(org.eclipse.ui.handlers.IHandlerService) AgreeASTBuilder(com.rockwellcollins.atc.agree.analysis.ast.AgreeASTBuilder) SystemInstance(org.osate.aadl2.instance.SystemInstance) CompositeAnalysisResult(jkind.api.results.CompositeAnalysisResult) AgreeException(com.rockwellcollins.atc.agree.analysis.AgreeException) NamedElement(org.osate.aadl2.NamedElement) AnnexSubclause(org.osate.aadl2.AnnexSubclause)

Example 68 with SystemInstance

use of org.osate.aadl2.instance.SystemInstance in project osate-plugin by sireum.

the class AwasServerHandler method highlightInstanceDiagram.

@SuppressWarnings("restriction")
public static void highlightInstanceDiagram(Map<URI, String> uris, SystemInstance root) {
    display.syncExec(() -> {
        Set<DiagramElement> des = new HashSet<DiagramElement>();
        AwasUtil.getAllDiagramElements(ade.getDiagram()).forEach(de -> des.add(de));
        des.forEach(de -> {
            URI hUri = new EObjectURIWrapper((EObject) de.getBusinessObject()).getUri();
            if (de.getBusinessObject() instanceof EObject && uris.containsKey(hUri)) {
                de.setStyle(StyleBuilder.create(de.getStyle()).backgroundColor(AwasUtil.hex2Rgb(uris.get(hUri))).outlineColor(AwasUtil.hex2Rgb(uris.get(hUri))).build());
            }
        });
        ade.getActionExecutor().execute("highlight diagram", ExecutionMode.NORMAL, () -> {
            ade.updateNowIfModelHasChanged();
            ade.updateDiagram();
            ade.getGefDiagram().refreshDiagramStyles();
            ade.doSave(new NullProgressMonitor());
            return null;
        });
    // 
    // ade.forceDiagramUpdateOnNextModelChange();
    // ade.updateDiagram();
    // ade.setFocus();
    // ade.clearSelection();
    // ade.updateNowIfModelHasChanged();
    // ade.doSave(new NullProgressMonitor());
    });
}
Also used : DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) NullProgressMonitor(org.eclipse.core.runtime.NullProgressMonitor) EObjectURIWrapper(org.osate.aadl2.modelsupport.EObjectURIWrapper) EObject(org.eclipse.emf.ecore.EObject) URI(org.eclipse.emf.common.util.URI) HashSet(java.util.HashSet)

Example 69 with SystemInstance

use of org.osate.aadl2.instance.SystemInstance in project osate-plugin by sireum.

the class ReachForwardHandler method execute.

@SuppressWarnings("restriction")
@Override
public Object execute(ExecutionEvent event) throws ExecutionException {
    final Boolean isImplDiagram = false;
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
    Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell();
    List<DiagramElement> des = SelectionUtil.getSelectedDiagramElements(SelectionHelper.getDiagramSelection(), // getSelectedDiagramElem(event)
    true);
    List<InstanceObject> ios = des.stream().flatMap(de -> {
        Object bo = de.getBusinessObject();
        List<InstanceObject> io = new ArrayList();
        if (bo != null && bo instanceof InstanceObject) {
            io.add(((InstanceObject) bo));
        }
        return io.stream();
    }).collect(Collectors.toList());
    List<String> criterions = ios.stream().map(io -> io.getInstanceObjectPath()).collect(Collectors.toList());
    if (!ios.isEmpty()) {
        MessageConsole console = displayConsole("Awas Console");
        try {
            Aadl model = Util.getAir(ios.get(0).getSystemInstance(), true, console);
            Model awasModel = org.sireum.awas.slang.Aadl2Awas$.MODULE$.apply(model);
            SymbolTable st = org.sireum.awas.symbol.SymbolTable$.MODULE$.apply(awasModel, new ConsoleTagReporter());
            FlowGraph<FlowNode, FlowEdge<FlowNode>> graph = org.sireum.awas.flow.FlowGraph$.MODULE$.apply(awasModel, st, false);
            AwasGraph awasgraph = new AwasGraphImpl(graph, st);
            String query = "t = reach forward " + "{" + String.join(",", criterions) + "}";
            Map<String, Collector> qres = awasgraph.queryEvaluator(query);
            if (qres.isEmpty()) {
                MessageDialog.openError(window.getShell(), "Sireum", "Empty result");
            } else {
                final DiagramService diagramService = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getService(DiagramService.class);
                SystemInstance si = ios.get(0).getSystemInstance();
                Resource resource = si.eResource();
                ComponentImplementation cii = InstanceUtil.getComponentImplementation(si, 0, null);
                // cii.eResource().getResourceSet().get
                List<Collector> lc = new ArrayList<Collector>(qres.values());
                Set<AgeEditor> ads = AwasUtil.awasGraphUri2AgeDiagramEditor(lc.get(0).getGraph(), isImplDiagram, st, resource, diagramService);
                AwasUtil.highlightDiagrams(ads, lc.get(0), isImplDiagram, st, resource);
            }
        } catch (URISyntaxException e1) {
            // // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        } catch (Exception e3) {
            e3.printStackTrace();
            String m2 = "Could not invoke visualizer.  Please make sure Awas is configured correctly.\n\n" + e3.getLocalizedMessage();
            MessageDialog.openError(window.getShell(), "Sireum", m2);
        }
    } else {
        String m3 = "Please select a component or port from the instance diagram";
        MessageDialog.openError(window.getShell(), "Sireum", m3);
    }
    return null;
}
Also used : ExecutionEvent(org.eclipse.core.commands.ExecutionEvent) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) Element(org.osate.aadl2.Element) AbstractSireumHandler(org.sireum.aadl.osate.handlers.AbstractSireumHandler) URISyntaxException(java.net.URISyntaxException) AwasGraphImpl(org.sireum.awas.awasfacade.AwasGraphImpl) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) ComponentImplementation(org.osate.aadl2.ComponentImplementation) ArrayList(java.util.ArrayList) HandlerUtil(org.eclipse.ui.handlers.HandlerUtil) AgeEditor(org.osate.ge.gef.ui.editor.AgeEditor) IStatus(org.eclipse.core.runtime.IStatus) SelectionHelper(org.sireum.aadl.osate.util.SelectionHelper) Map(java.util.Map) Collector(org.sireum.awas.awasfacade.Collector) FlowGraph(org.sireum.awas.flow.FlowGraph) MessageDialog(org.eclipse.jface.dialogs.MessageDialog) AwasUtil(org.sireum.aadl.osate.awas.util.AwasUtil) InstanceUtil(org.osate.aadl2.instance.util.InstanceUtil) SystemInstance(org.osate.aadl2.instance.SystemInstance) Shell(org.eclipse.swt.widgets.Shell) PlatformUI(org.eclipse.ui.PlatformUI) DiagramService(org.osate.ge.internal.services.DiagramService) Aadl(org.sireum.hamr.ir.Aadl) SelectionUtil(org.osate.ge.internal.ui.util.SelectionUtil) SymbolTable(org.sireum.awas.symbol.SymbolTable) Set(java.util.Set) IOException(java.io.IOException) ExecutionException(org.eclipse.core.commands.ExecutionException) MessageConsole(org.eclipse.ui.console.MessageConsole) Model(org.sireum.awas.ast.Model) Collectors(java.util.stream.Collectors) IProgressMonitor(org.eclipse.core.runtime.IProgressMonitor) FlowEdge(org.sireum.awas.flow.FlowEdge) FlowNode(org.sireum.awas.flow.FlowNode) List(java.util.List) Util(org.sireum.aadl.osate.util.Util) Resource(org.eclipse.emf.ecore.resource.Resource) ConsoleTagReporter(org.sireum.util.ConsoleTagReporter) AwasGraph(org.sireum.awas.awasfacade.AwasGraph) InstanceObject(org.osate.aadl2.instance.InstanceObject) ComponentImplementation(org.osate.aadl2.ComponentImplementation) AwasGraph(org.sireum.awas.awasfacade.AwasGraph) ArrayList(java.util.ArrayList) URISyntaxException(java.net.URISyntaxException) ConsoleTagReporter(org.sireum.util.ConsoleTagReporter) DiagramElement(org.osate.ge.internal.diagram.runtime.DiagramElement) InstanceObject(org.osate.aadl2.instance.InstanceObject) AwasGraphImpl(org.sireum.awas.awasfacade.AwasGraphImpl) Shell(org.eclipse.swt.widgets.Shell) AgeEditor(org.osate.ge.gef.ui.editor.AgeEditor) SystemInstance(org.osate.aadl2.instance.SystemInstance) Aadl(org.sireum.hamr.ir.Aadl) Collector(org.sireum.awas.awasfacade.Collector) ArrayList(java.util.ArrayList) List(java.util.List) FlowEdge(org.sireum.awas.flow.FlowEdge) IWorkbenchWindow(org.eclipse.ui.IWorkbenchWindow) MessageConsole(org.eclipse.ui.console.MessageConsole) Resource(org.eclipse.emf.ecore.resource.Resource) SymbolTable(org.sireum.awas.symbol.SymbolTable) IOException(java.io.IOException) URISyntaxException(java.net.URISyntaxException) IOException(java.io.IOException) ExecutionException(org.eclipse.core.commands.ExecutionException) Model(org.sireum.awas.ast.Model) InstanceObject(org.osate.aadl2.instance.InstanceObject) DiagramService(org.osate.ge.internal.services.DiagramService) FlowNode(org.sireum.awas.flow.FlowNode)

Example 70 with SystemInstance

use of org.osate.aadl2.instance.SystemInstance in project osate-plugin by sireum.

the class Phantom method hamrCodegen.

int hamrCodegen(SireumHamrCodegenOption ho, ResourceSet rs) {
    if (ho.args().size().toInt() != 1) {
        addError("Expecting exactly one argument");
        return 1;
    }
    String s = ho.args().apply(z(0)).string();
    File f = new File(s).getAbsoluteFile();
    if (!f.exists() || !f.isFile()) {
        addError("Either point to a serialized AIR file, or to a .project or .system file");
        return 1;
    }
    addInfo("Sireum Version: " + SireumApi.version());
    Reporter reporter = org.sireum.message.Reporter$.MODULE$.create();
    int ret = 0;
    if (f.getName().equals(".project") || f.getName().startsWith(".system")) {
        List<AadlSystem> systems = AadlProjectUtil.findSystems(f);
        if (systems.size() != 1) {
            addError("Found " + systems.size() + " AADL projects. " + "Point to a single .project file " + "or a .system file\n");
            // printUsage();
            return 1;
        }
        AadlSystem system = systems.get(0);
        SystemInstance si = getSystemInstance(system, rs);
        if (si == null) {
            ret = 1;
        } else {
            Aadl model = Util.getAir(si, true);
            org.sireum.cli.HAMR.codeGenReporter(model, ho, reporter);
            ret = reporter.hasError() ? 1 : 0;
        }
    } else {
        // assume it's a serialized AIR file
        ret = org.sireum.cli.HAMR.codeGen(ho, reporter).toInt();
    }
    addInfo("HAMR Codegen was " + ((ret != 0) ? "un" : "") + "succesful");
    return ret;
}
Also used : SystemInstance(org.osate.aadl2.instance.SystemInstance) Reporter(org.sireum.message.Reporter) Aadl(org.sireum.hamr.ir.Aadl) AadlSystem(org.sireum.aadl.osate.util.AadlProjectUtil.AadlSystem) File(java.io.File)

Aggregations

SystemInstance (org.osate.aadl2.instance.SystemInstance)100 ComponentInstance (org.osate.aadl2.instance.ComponentInstance)52 InstanceObject (org.osate.aadl2.instance.InstanceObject)26 ComponentImplementation (org.osate.aadl2.ComponentImplementation)25 Element (org.osate.aadl2.Element)25 SystemOperationMode (org.osate.aadl2.instance.SystemOperationMode)22 ConnectionInstance (org.osate.aadl2.instance.ConnectionInstance)21 Classifier (org.osate.aadl2.Classifier)18 ForAllElement (org.osate.aadl2.modelsupport.modeltraversal.ForAllElement)18 ComponentCategory (org.osate.aadl2.ComponentCategory)17 NamedElement (org.osate.aadl2.NamedElement)16 List (java.util.List)14 Resource (org.eclipse.emf.ecore.resource.Resource)14 AadlPackage (org.osate.aadl2.AadlPackage)14 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)14 ArrayList (java.util.ArrayList)13 EList (org.eclipse.emf.common.util.EList)13 IOException (java.io.IOException)12 IStatus (org.eclipse.core.runtime.IStatus)12 Optional (java.util.Optional)10