private static Optional<Boolean> tryParseBoolean(final String value) {
        return switch (value) {
            case "true", "1" -> Optional.of(true);
            case "false", "0" -> Optional.of(false);
            default -> Optional.empty();
        };
	}
Converts the string representation of an operation to the operation
object. It is used for converting the string representation of a tree to
an operation tree. If you use it that way, you should not forget to
re-index the tree variables.

{@snippet lang="java":
final TreeNode<Op<Boolean>> tree = TreeNode.parse(
    "and(or(x,y),not(y))",
    BoolOp::toBoolOp
);

assert Program.eval(tree, false, false) == false;
Var.reindex(tree);
assert Program.eval(tree, false, false) == true;
}

@since 5.0

@see Var#reindex(TreeNode)
@see Program#eval(Tree, Object[])

@param string the string representation of an operation which should be
       converted
@return the operation, converted from the given string
@throws IllegalArgumentException if the given {@code value} doesn't
        represent a mathematical expression
@throws NullPointerException if the given string {@code value} is
        {@code null}
jenetics.prog/src/main/java/io/jenetics/prog/op/BoolOp.java