Search in sources :

Example 1 with AgreePattern

use of com.rockwellcollins.atc.agree.analysis.realtime.AgreePattern in project AGREE by loonwerks.

the class AgreeMenuListener method addResultsLinkingMenu.

private void addResultsLinkingMenu(IMenuManager manager, AnalysisResult result) {
    if (result instanceof PropertyResult) {
        PropertyResult pr = (PropertyResult) result;
        Map<String, EObject> refMap = linker.getReferenceMap(pr.getParent());
        EObject property = refMap.get(pr.getName());
        if (property instanceof GuaranteeStatement) {
            manager.add(createHyperlinkAction("Go To Guarantee", property));
        }
        if (property instanceof LemmaStatement) {
            manager.add(createHyperlinkAction("Go To Lemma", property));
        }
        if (property instanceof AssumeStatement) {
            manager.add(createHyperlinkAction("Go To Assumption", property));
        }
        if (property instanceof CallExpr) {
            manager.add(createHyperlinkAction("Go To Node Call", property));
        }
        if (property instanceof AgreeStatement) {
            AgreeStatement statement = (AgreeStatement) property;
            if (statement.reference instanceof AgreePattern) {
                AgreePattern pattern = (AgreePattern) statement.reference;
                manager.add(createHyperlinkAction("Go To Pattern", pattern.reference));
            }
        }
    }
}
Also used : GuaranteeStatement(com.rockwellcollins.atc.agree.agree.GuaranteeStatement) AgreeStatement(com.rockwellcollins.atc.agree.analysis.ast.AgreeStatement) AssumeStatement(com.rockwellcollins.atc.agree.agree.AssumeStatement) EObject(org.eclipse.emf.ecore.EObject) CallExpr(com.rockwellcollins.atc.agree.agree.CallExpr) LemmaStatement(com.rockwellcollins.atc.agree.agree.LemmaStatement) PropertyResult(jkind.api.results.PropertyResult) AgreePattern(com.rockwellcollins.atc.agree.analysis.realtime.AgreePattern)

Aggregations

AssumeStatement (com.rockwellcollins.atc.agree.agree.AssumeStatement)1 CallExpr (com.rockwellcollins.atc.agree.agree.CallExpr)1 GuaranteeStatement (com.rockwellcollins.atc.agree.agree.GuaranteeStatement)1 LemmaStatement (com.rockwellcollins.atc.agree.agree.LemmaStatement)1 AgreeStatement (com.rockwellcollins.atc.agree.analysis.ast.AgreeStatement)1 AgreePattern (com.rockwellcollins.atc.agree.analysis.realtime.AgreePattern)1 PropertyResult (jkind.api.results.PropertyResult)1 EObject (org.eclipse.emf.ecore.EObject)1