public String generateTerm(String id, List<TrigerState[]> signal){
        BiNode start = null;
        for (int i=0;i<signal.size();i++) {
            int count_and = 0;
            for (int j = 0; j < signal.get(i).length; j++) {
                
                if(signal.get(i)[j] != TrigerState.DOES_NOT_MATTER){
                    if(start  == null){
                        if (signal.get(i)[j] == TrigerState.ONE){
                            start = new BiNode(ids.get(j), LogicElement.SIGNAL);
                        }else{
                            start = new BiNode("not "+ids.get(j), LogicElement.SIGNAL);
                        }
                        count_and++;
                    }else{
                        
                        if(count_and != 0){
                            start = start.addChild(new BiNode("and", LogicElement.AND));
                        }
                        if (signal.get(i)[j] == TrigerState.ONE){
                            start = start.addChild(new BiNode(ids.get(j), LogicElement.SIGNAL));
                            
                        }else{
                            start = start.addChild(new BiNode("not "+ids.get(j), LogicElement.SIGNAL));
                        }
                        count_and++;
                        
                    }
                    
                    
                }
                
            }
            
            if(i < signal.size() - 1){
                start = start.addChild(new BiNode("or", LogicElement.OR));
            }
            
        }
        
        
        String result = "";
        result += id + " <= " + start.toString();
        
        return result;
    }