mirror of
https://github.com/Z3Prover/z3
synced 2026-02-28 10:51:28 +00:00
Distinguish between Quantifier and Lambda in AST.java
This commit is contained in:
parent
253a7245d0
commit
121f66c19c
1 changed files with 7 additions and 1 deletions
|
|
@ -208,7 +208,13 @@ public class AST extends Z3Object implements Comparable<AST>
|
|||
case Z3_FUNC_DECL_AST:
|
||||
return new FuncDecl<>(ctx, obj);
|
||||
case Z3_QUANTIFIER_AST:
|
||||
return new Quantifier(ctx, obj);
|
||||
// a quantifier AST is a lambda iff it is neither a forall nor an exists.
|
||||
boolean isLambda = !Native.isQuantifierExists(ctx, obj) && !Native.isQuantifierForall(ctx, obj);
|
||||
if (isLambda) {
|
||||
return new Lambda(ctx, obj);
|
||||
} else {
|
||||
return new Quantifier(ctx, obj);
|
||||
}
|
||||
case Z3_SORT_AST:
|
||||
return Sort.create(ctx, obj);
|
||||
case Z3_APP_AST:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue