Blame view
BRIC/.svn/tmp/svn.tmp
2.72 KB
eeb5cac08
![]() |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 |
/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package CSP_ANALYSE; import RULES.CreatorRuleCommunicationComposition; import RULES.CreatorRuleInterleaveComposition; import LOGIC.Instance; import LOGIC.ObjectList; import LOGIC.Protocols; import RULES.CreatorRuleFeedbackComposition; import RULES.CreatorRuleReflexiveComposition; import java.util.ArrayList; import java.util.LinkedList; /** * * @author sarah */ public class CSPVerificationRules { private CreatorRuleInterleaveComposition cir; private AnalyseRuleInterleave analyRul; private CreatorRuleCommunicationComposition comm; private AnalyseRuleCommunication analComm; private CreatorRuleFeedbackComposition feed; private AnalyseRuleFeedback analyFeed; private CreatorRuleReflexiveComposition ref; private AnalyseRuleReflexive analyref; private LinkedList<Instance> instance; private LinkedList<Protocols> prot; private ObjectList objList; public CSPVerificationRules(LinkedList<Instance> i,LinkedList<Protocols> p, ObjectList lt) { this.instance = i; this.prot = p; this.objList = lt; } public ArrayList<FDRResult> RuleInterleaveIsDeadlockFree(){ cir = new CreatorRuleInterleaveComposition(instance, objList); cir.creatorRule(); analyRul = new AnalyseRuleInterleave(instance); return analyRul.resultRule(); } public ArrayList<FDRResult> RuleCommunicationIsDeadlockFree() throws InterruptedException{ comm = new CreatorRuleCommunicationComposition(instance, prot, objList); comm.creatorRule(); analComm = new AnalyseRuleCommunication(instance, prot); return analComm.resultRule(); } public ArrayList<FDRResult> RuleFeedbackIsDeadlockFree() throws InterruptedException{ feed = new CreatorRuleFeedbackComposition(instance, prot, objList); //comm = new CreatorRuleCommunicationComposition(instance, prot, objList); feed.creatorRule(); //comm.creatorRule(); analyFeed = new AnalyseRuleFeedback(instance, prot); //analComm = new AnalyseRuleCommunication(instance, prot); return analyFeed.resultRule(); } public ArrayList<FDRResult> RuleReflexiveIsDeadlockFree() throws InterruptedException{ ref = new CreatorRuleReflexiveComposition(instance, prot, objList); //comm = new CreatorRuleCommunicationComposition(instance, prot, objList); ref.creatorRule(); //comm.creatorRule(); analyref = new AnalyseRuleReflexive(instance, prot); //analComm = new AnalyseRuleCommunication(instance, prot); return analyref.resultRule(); } } |