3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-16 17:36:39 +00:00
Commit graph

24 commits

Author SHA1 Message Date
Nikolaj Bjorner
939bf1c725 wip - alpha support for polymorphism
An initial update to support polymorphism from SMTLIB3 and the API (so far C, Python).

The WIP SMTLIB3 format is assumed to be supporting the following declaration

```
(declare-type-var A)
```
Whenever A is used in a type signature of a function/constant or bound quantified variable, it is taken to mean that all instantiations of A are included in the signature and assertions.
For example, if the function f is declared with signature A -> A, then there is a version of f for all instances of A.
The semantics of polymorphism appears to follow previous proposals: the instances are effectively different functions.
This may clash with some other notions, such as the type signature forall 'a . 'a -> 'a would be inhabited by a unique function (the identity), while this is not enforced in this version (and hopefully never because it is more busy work).

The C API has the function 'Z3_mk_type_variable' to create a type variable and applying functions modulo polymorphic type signatures is possible.
The kind Z3_TYPE_VAR is added to sort discriminators.

This version is considered as early alpha. It passes a first rudimentary unit test involving quantified axioms, declare-fun, define-fun, and define-fun-rec.
2023-07-12 18:09:02 -07:00
Nikolaj Bjorner
ecba26beae missing
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2021-01-26 17:07:46 -08:00
Nikolaj Bjorner
d0e20e44ff booyah
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2020-07-04 15:56:30 -07:00
Nikolaj Bjorner
8d5507008e adding cmd_context
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2019-03-28 07:04:21 -07:00
Nikolaj Bjorner
c7d0d4e191 add c-cube's recursive function theory
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-10-17 04:56:58 -07:00
Nikolaj Bjorner
540baa88f4 na
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-08-13 17:08:34 -07:00
Nikolaj Bjorner
593a6e5139 update smt_setup and default parameters to only use new solver consveratively
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2018-07-01 12:52:50 -07:00
Simon Cruanes
d5e134dd94 wip: add recursive functions 2017-12-25 22:51:39 +01:00
Nikolaj Bjorner
8ff1e070be add QF_DT
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-09-17 01:39:39 +02:00
Nikolaj Bjorner
b19f94ae5b make include paths uniformly use path relative to src. #534
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-07-31 13:24:11 -07:00
Nikolaj Bjorner
9b3e2a9afe re-enable LRA after fixing dispatch for LRA in smt-setup
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-11 09:16:07 -07:00
Nikolaj Bjorner
911b24784a merge LRA
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-09 10:46:11 -07:00
Nikolaj Bjorner
1177be6391 add common utility to set up seq
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2017-05-02 20:52:39 -07:00
Murphy Berzish
92755b0185 smt_setup framework, all hooks to theory_str are redirected to theory_seq 2017-05-02 17:16:35 -04:00
Christoph M. Wintersteiger
6749c19ab1 Merge branch 'static_analysis' of https://github.com/daniel-j-h/z3
# Conflicts:
#	src/ast/ast.h
#	src/interp/iz3foci.cpp
#	src/muz/duality/duality_dl_interface.cpp
#	src/util/hwf.h
2015-10-19 15:14:45 +01:00
Nikolaj Bjorner
4bc044c982 update header guards to be C++ style. Fixes issue #9
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2015-07-08 23:18:40 -07:00
Daniel J. Hofmann
4e59ba922b Wc++11-extensions 2015-04-03 19:13:52 +02:00
Nikolaj Bjorner
52619b9dbb pull unstable
Signed-off-by: Nikolaj Bjorner <nbjorner@hotmail.com>
2015-04-01 14:57:11 -07:00
Christoph M. Wintersteiger
afae49b9ed More renaming QF_FPA -> QF_FP
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2014-12-31 16:15:40 +00:00
Christoph M. Wintersteiger
a8b65ebb36 added stubs for theory_fpa
Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
2014-04-23 20:10:53 +01:00
Nikolaj Bjorner
c5b82796ca moving parameters to theory_pb
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2014-01-01 20:00:10 -08:00
Nikolaj Bjorner
9467806a5c debugging cardinality theory
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
2013-11-05 09:39:28 -08:00
Leonardo de Moura
ffb7e26c75 removed front-end-params
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-12-02 10:05:29 -08:00
Leonardo de Moura
add684d8e9 checkpoint
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2012-10-21 13:32:12 -07:00
Renamed from lib/smt_setup.h (Browse further)