3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 17:54:43 +00:00

Z3 sources

Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
This commit is contained in:
Leonardo de Moura 2012-10-02 11:35:25 -07:00
parent 3f9edad676
commit e9eab22e5c
1186 changed files with 381859 additions and 0 deletions

43
lib/cost_evaluator.h Normal file
View file

@ -0,0 +1,43 @@
/*++
Copyright (c) 2006 Microsoft Corporation
Module Name:
cost_evaluator.h
Abstract:
Simple evaluator for cost function
Author:
Leonardo de Moura (leonardo) 2008-06-14.
Revision History:
--*/
#ifndef _COST_EVALUATOR_H_
#define _COST_EVALUATOR_H_
#include"ast.h"
#include"arith_decl_plugin.h"
class cost_evaluator {
ast_manager & m_manager;
arith_util m_util;
unsigned m_num_args;
float const * m_args;
float eval(expr * f) const;
public:
cost_evaluator(ast_manager & m);
/**
I'm using the same standard used in quantifier instantiation.
(VAR 0) is stored in the last position of the array.
...
(VAR (num_args - 1)) is stored in the first position of the array.
*/
float operator()(expr * f, unsigned num_args, float const * args);
};
#endif /* _COST_EVALUATOR_H_ */