Search in sources :

Example 6 with PatternStatement

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

the class AgreeASTBuilder method getLemmaStatements.

private List<AgreeStatement> getLemmaStatements(EList<SpecStatement> specs) {
    List<AgreeStatement> lemmas = new ArrayList<>();
    for (SpecStatement spec : specs) {
        if (spec instanceof LemmaStatement) {
            LemmaStatement lemma = (LemmaStatement) spec;
            if (lemma.getExpr() != null) {
                lemmas.add(new AgreeStatement(lemma.getStr(), doSwitch(lemma.getExpr()), spec));
            } else {
                PatternStatement pattern = lemma.getPattern();
                lemmas.add(new AgreePatternBuilder(lemma.getStr(), lemma, this).doSwitch(pattern));
            }
        }
    }
    return lemmas;
}
Also used : PatternStatement(com.rockwellcollins.atc.agree.agree.PatternStatement) ArrayList(java.util.ArrayList) SpecStatement(com.rockwellcollins.atc.agree.agree.SpecStatement) AgreePatternBuilder(com.rockwellcollins.atc.agree.analysis.realtime.AgreePatternBuilder) LemmaStatement(com.rockwellcollins.atc.agree.agree.LemmaStatement)

Aggregations

PatternStatement (com.rockwellcollins.atc.agree.agree.PatternStatement)6 SpecStatement (com.rockwellcollins.atc.agree.agree.SpecStatement)5 AgreePatternBuilder (com.rockwellcollins.atc.agree.analysis.realtime.AgreePatternBuilder)5 ArrayList (java.util.ArrayList)5 SubstitutionVisitor (jkind.translation.SubstitutionVisitor)3 AssertStatement (com.rockwellcollins.atc.agree.agree.AssertStatement)1 AssumeStatement (com.rockwellcollins.atc.agree.agree.AssumeStatement)1 GuaranteeStatement (com.rockwellcollins.atc.agree.agree.GuaranteeStatement)1 LemmaStatement (com.rockwellcollins.atc.agree.agree.LemmaStatement)1 ReachableStatement (com.rockwellcollins.atc.agree.agree.ReachableStatement)1 UnaryExpr (jkind.lustre.UnaryExpr)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1