3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-05-11 09:44: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

35
lib/expr_weight.h Normal file
View file

@ -0,0 +1,35 @@
/*++
Copyright (c) 2007 Microsoft Corporation
Module Name:
expr_weight.h
Abstract:
Functor for computing the weight of an expression.
Author:
Leonardo (leonardo) 2008-01-11
Notes:
--*/
#ifndef _EXPR_WEIGHT_H_
#define _EXPR_WEIGHT_H_
#include"recurse_expr.h"
#include"approx_nat.h"
typedef approx_nat weight;
struct expr_weight_visitor {
weight visit(var * n) { return weight(1); }
weight visit(app const * n, weight const * args);
weight visit(quantifier * n, weight body, weight *, weight *) { body += 1; return body; }
};
typedef recurse_expr<weight, expr_weight_visitor, true> expr_weight;
#endif /* _EXPR_WEIGHT_H_ */