~tapaal-contributor/tapaal/disappearing-tokens-1940098

« back to all changes in this revision

Viewing changes to src/dk/aau/cs/TCTL/visitors/StandardSymmetryTranslationQueryVisitor.java

  • Committer: Kenneth Yrke Jørgensen
  • Date: 2011-04-12 09:50:16 UTC
  • mfrom: (329.1.188 tapaal-1.5)
  • Revision ID: mail@yrke.dk-20110412095016-e4hqdgab5596ja09
Merged with branch addning support for new 1.5 features

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
        private static final String PLOCK = "P_lock";
9
9
        private static final String CONTROL = "Control";
10
10
        private static final String FINISH = "finish";
11
 
        
12
 
        private static final String TOKEN_TEMPLATE_NAME = "P";
 
11
 
 
12
        private static final String TOKEN_TEMPLATE_NAME = "Token";
13
13
 
14
14
        @Override
15
 
        public void visit(TCTLAtomicPropositionNode atomicPropositionNode, Object context) {
 
15
        public void visit(TCTLAtomicPropositionNode atomicPropositionNode,
 
16
                        Object context) {
16
17
                append("(sum(i:");
17
18
                append(ID_TYPE);
18
19
                append(")");
27
28
 
28
29
        @Override
29
30
        protected void addEnding(QueryType type) {
30
 
                if(type == QueryType.EF || type == QueryType.AF){
 
31
                if (type == QueryType.EF || type == QueryType.AF) {
31
32
                        append(" && ");
32
 
                }else{
 
33
                } else {
33
34
                        append(" || !");
34
35
                }
35
 
                append(String.format("(%1$s.%2$s == 1 && %3$s.%4$s == 1)", LOCK_TEMPLATE, PLOCK, CONTROL, FINISH));
 
36
                append(String.format("(%1$s.%2$s == 1 && %3$s.%4$s == 1)",
 
37
                                LOCK_TEMPLATE, PLOCK, CONTROL, FINISH));
36
38
        }
37
39
 
38
40
}