Adding sypet to repo
[Benchmarks_CSolver.git] / sypet / src / edu / utexas / sypet / synthesis / sat4j / FunctionVar.java
1 /*
2  * Copyright (C) 2017 The SyPet Authors
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 package edu.utexas.sypet.synthesis.sat4j;
17
18 import uniol.apt.adt.pn.Transition;
19
20 /**
21  * Each FunctionVar denote a Pair(f,t): f is the function(transition) and t is
22  * the timestamp
23  * 
24  * @author yufeng
25  *
26  */
27 public class FunctionVar extends Variable {
28
29         private Transition transition;
30
31         public FunctionVar(int id, int time, Transition t) {
32                 super(id, time);
33                 transition = t;
34         }
35
36         public Transition getTransition() {
37                 return transition;
38         }
39
40         public void setTransition(Transition t) {
41                 this.transition = t;
42         }
43         
44         public String toString() {
45                 StringBuilder sb = new StringBuilder();
46                 sb.append(transition.getId()).append(" time:").append(time).append(" solverId:" + (solverId+1));
47                 return sb.toString();
48         }
49
50 }