diff options
author | Andrew Reynolds <andrew.j.reynolds@gmail.com> | 2019-12-02 11:15:16 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-12-02 11:15:16 -0600 |
commit | 74ca9f79b0285a1139c217fbd6f3937ed66ac885 (patch) | |
tree | 598cc97c50c11d161ae216d824c43aa19fdacd31 /src/preprocessing/passes | |
parent | a39f1719ede136579cbd15c34b6a763a2b08a464 (diff) |
Fix case of higher-order + sygus inference (#3509)
Diffstat (limited to 'src/preprocessing/passes')
-rw-r--r-- | src/preprocessing/passes/sygus_inference.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/preprocessing/passes/sygus_inference.cpp b/src/preprocessing/passes/sygus_inference.cpp index 6708f3c3a..24484359a 100644 --- a/src/preprocessing/passes/sygus_inference.cpp +++ b/src/preprocessing/passes/sygus_inference.cpp @@ -189,15 +189,16 @@ bool SygusInference::solveSygus(std::vector<Node>& assertions, if (cur.getKind() == APPLY_UF) { Node op = cur.getOperator(); - if (std::find(free_functions.begin(), free_functions.end(), op) - == free_functions.end()) - { - free_functions.push_back(op); - } + // visit the operator, which might not be a variable + visit.push_back(op); } else if (cur.isVar() && cur.getKind() != BOUND_VARIABLE) { - // a free variable is a 0-argument function to synthesize + // We are either in the case of a free first-order constant or a + // function in a higher-order context. We add to free_functions + // in either case. Note that a free constant that is not in a + // higher-order context is a 0-argument function-to-synthesize. + // We should not have traversed here before due to our visited cache. Assert(std::find(free_functions.begin(), free_functions.end(), cur) == free_functions.end()); free_functions.push_back(cur); |