mirror of
https://github.com/Z3Prover/z3
synced 2025-04-11 11:43:36 +00:00
45 lines
925 B
C++
45 lines
925 B
C++
/*++
|
|
Copyright (c) 2006 Microsoft Corporation
|
|
|
|
Module Name:
|
|
|
|
pattern_validation.h
|
|
|
|
Abstract:
|
|
|
|
Code for checking whether a pattern is valid or not.
|
|
|
|
Author:
|
|
|
|
Leonardo de Moura (leonardo) 2006-12-08.
|
|
|
|
Revision History:
|
|
|
|
--*/
|
|
#ifndef _PATTERN_VALIDATION_H_
|
|
#define _PATTERN_VALIDATION_H_
|
|
|
|
#include"ast.h"
|
|
#include"uint_set.h"
|
|
#include"vector.h"
|
|
|
|
class pattern_validator {
|
|
family_id m_bfid;
|
|
family_id m_lfid;
|
|
|
|
bool process(uint_set & found_vars, unsigned num_bindings, unsigned num_new_bindings, expr * n);
|
|
|
|
public:
|
|
pattern_validator(ast_manager const & m):
|
|
m_bfid(m.get_basic_family_id()),
|
|
m_lfid(m.get_family_id("label")) {
|
|
}
|
|
|
|
bool operator()(unsigned num_bindings, unsigned num_new_bindings, expr * n);
|
|
|
|
bool operator()(unsigned num_new_bindings, expr * n) { return operator()(UINT_MAX, num_new_bindings, n); }
|
|
};
|
|
|
|
#endif /* _PATTERN_VALIDATION_H_ */
|
|
|