You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
First, I cannot appoint class of ctx.mkToRe(ctx.mkString("")) to Expr<ReSort<SeqSort<CharSort>>>. It will result in an error in ctx.mkConcat. Is there any incompatibles in appointing exact classes?
Second, ctx.mkOption api is not compatible when I want to use this api to perform "?" in Re expressions.
Code seen below:
public static BoolExpr addRegexOrTerms(List<String> regexList, Context ctx, Expr<SeqSort<CharSort>> var) {
Expr<ReSort<SeqSort<CharSort>>> concat = ctx.mkToRe(ctx.mkString(""));
Expr res;
BoolExpr expr = ctx.mkFalse();
for (String s : regexList) {
for (int i = 0; i < s.length(); i++) {
switch (s.charAt(i)) {
case '*':
res = ctx.mkFullRe(ctx.mkReSort(ctx.mkStringSort()));
break;
case '?':
res = ctx.mkOption(ctx.mkReSort(ctx.mkStringSort()));
break;
default:
res = ctx.mkToRe(ctx.mkString(String.valueOf(s.charAt(i))));
}
concat = ctx.mkConcat(concat, res);
}
expr = ctx.mkOr(expr, ctx.mkInRe(var, concat.simplify()));
}
return expr;
}
The text was updated successfully, but these errors were encountered:
ctx.mkToRe(ctx.mkString(""))
toExpr<ReSort<SeqSort<CharSort>>>
. It will result in an error inctx.mkConcat
. Is there any incompatibles in appointing exact classes?ctx.mkOption
api is not compatible when I want to use this api to perform "?" in Re expressions.Code seen below:
The text was updated successfully, but these errors were encountered: