lisa/src/main/java/it/unive/lisa/analysis/nonrelational/value/impl/stringgraphdomain/SGNUtils.java
public static boolean strContainsAux_checkFalse(StringGraphNode<?> node, Character c) {

        if (node instanceof ConstStringGraphNode)
            return !ConstValues.MAX.equals( ((ConstStringGraphNode)node).getValue() );
        if (node instanceof SimpleStringGraphNode)
            return !((SimpleStringGraphNode) node).getValueAsChar().equals(c);

        // for all children must hold that: no child is c or MAX
        for (StringGraphNode<?> child: node.getChildren())
            if (!strContainsAux_checkFalse(child, c))
                return false;

        // survived the check
        return true;
    }
/**
     * Auxiliary function for implementing Contains.
     * Following Section 4.4.6 - Table VII, this recursive algorithm checks whether there is no node which is labelled with the character 'c' or the constant MAX
     *
     * @param node the root of the graph tree of interest
     * @param c the character which has NOT to be contained in the graph tree with root node
     * @return true iff there is no node labelled 'c' or MAX
     */
Auxiliary function for implementing Contains.
Following Section 4.4.6 - Table VII, this recursive algorithm checks whether there is no node which is labelled with the character 'c' or the constant MAX

@param node the root of the graph tree of interest
@param c the character which has NOT to be contained in the graph tree with root node
@return true iff there is no node labelled 'c' or MAX
Auxiliary function for implementing Contains . Following Section 4 . 4 . 6 - Table VII this recursive algorithm checks whether there is no node which is labelled with the character ' c ' or the constant MAX @param node the root of the graph tree of interest @param c the character which has NOT to be contained in the graph tree with root node @return true iff there is no node labelled ' c ' or MAX
public static boolean strContainsAux_checkFalse(StringGraphNode<?> node, Character c) {
        if (node instanceof ConstStringGraphNode)
            return !ConstValues.MAX.equals( ((ConstStringGraphNode)node).getValue() );
        if (node instanceof SimpleStringGraphNode)
            return !((SimpleStringGraphNode) node).getValueAsChar().equals(c);
        for (StringGraphNode<?> child: node.getChildren())
            if (!strContainsAux_checkFalse(child, c))
                return false;
        return true;
    }
public static boolean strContainsAux_checkFalse ( StringGraphNode < ? > node , Character c ) { if ( node instanceof ConstStringGraphNode ) return ! ConstValues . MAX . equals ( ( ( ConstStringGraphNode ) node ) . getValue ( ) ) ; if ( node instanceof SimpleStringGraphNode ) return ! ( ( SimpleStringGraphNode ) node ) . getValueAsChar ( ) . equals ( c ) ; for ( StringGraphNode < ? > child : node . getChildren ( ) ) if ( ! strContainsAux_checkFalse ( child , c ) ) return false ; return true ; }
Auxiliary function for implementing Contains.
Auxiliary function for implementing Contains .
// for all children must hold that: no child is c or MAX // survived the check