Skip to content

Commit

Permalink
polystat#10 avoid NONE values and fixed Qulice
Browse files Browse the repository at this point in the history
  • Loading branch information
mnj2kk committed Jul 14, 2022
1 parent ea7d884 commit 86b0c52
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
25 changes: 22 additions & 3 deletions src/main/java/org/polystat/far/Expr.java
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,19 @@
package org.polystat.far;

import com.jcabi.xml.XML;
import com.microsoft.z3.*;
import com.microsoft.z3.BoolExpr;
import com.microsoft.z3.Context;
import com.microsoft.z3.Model;
import com.microsoft.z3.Solver;
import com.microsoft.z3.Status;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.xembly.Directives;

import java.util.*;

/**
* Boolean Expression Solver.
* @since 1.1
Expand Down Expand Up @@ -134,6 +142,17 @@ private static BoolExpr opts(final XML xml) {
result = CTX.mkOr(result, cur);
}
}
if (result != null) {
result = CTX.mkAnd(
result,
CTX.mkNot(
CTX.mkEq(
CTX.mkConst(name, CTX.getStringSort()),
CTX.mkString("NONE")
)
)
);
}
return result;
}

Expand Down
23 changes: 17 additions & 6 deletions src/main/java/org/polystat/far/FaR.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,23 @@

package org.polystat.far;

import com.jcabi.xml.*;
import com.yegor256.xsline.*;
import com.jcabi.xml.ClasspathSources;
import com.jcabi.xml.XML;
import com.jcabi.xml.XMLDocument;
import com.jcabi.xml.XSL;
import com.jcabi.xml.XSLDocument;
import com.yegor256.xsline.Shift;
import com.yegor256.xsline.StEndless;
import com.yegor256.xsline.StLambda;
import com.yegor256.xsline.StRepeated;
import com.yegor256.xsline.TrDefault;
import com.yegor256.xsline.TrLogged;
import com.yegor256.xsline.TrXSL;
import com.yegor256.xsline.Train;
import com.yegor256.xsline.Xsline;
import java.util.Collection;
import java.util.LinkedList;
import javax.xml.transform.stream.StreamSource;
import org.cactoos.Func;
import org.cactoos.io.InputStreamOf;
import org.cactoos.io.ResourceOf;
Expand All @@ -35,10 +50,6 @@
import org.xembly.Directives;
import org.xembly.Xembler;

import javax.xml.transform.stream.StreamSource;
import java.util.Collection;
import java.util.LinkedList;

/**
* Finding bugs via reverses.
*
Expand Down

0 comments on commit 86b0c52

Please sign in to comment.