3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-07-31 16:33:18 +00:00
z3/src/api
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
..
c++ Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
dll Tabs, formatting. 2017-09-17 14:54:09 +01:00
dotnet Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
java Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
js Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
julia disambiguate overloaded with for Julia bindings 2023-01-31 19:06:20 -08:00
ml Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
python wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
api_algebraic.cpp Use nullptr consistently instead of 0 or NULL. 2022-08-01 14:24:32 +03:00
api_arith.cpp switch to expose fresh function instead of changing legacy function 2023-01-24 13:05:34 -08:00
api_array.cpp add method for accessing i'th domain sort in array #6344 2022-09-15 07:38:02 -07:00
api_ast.cpp wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
api_ast_map.cpp remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
api_ast_map.h booyah 2020-07-04 15:56:30 -07:00
api_ast_vector.cpp remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
api_ast_vector.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_bv.cpp Added bit2bool to the API (#5992) 2022-04-22 09:54:21 +01:00
api_config_params.cpp Remove usages of Z3_bool, just use bool. 2022-07-30 05:49:05 +02:00
api_context.cpp harness del_object #6452 2022-11-14 08:54:08 -08:00
api_context.h Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
api_datalog.cpp remove a bunch of string copies in the API 2022-10-26 18:22:55 +01:00
api_datalog.h booyah 2020-07-04 15:56:30 -07:00
api_datatype.cpp #6456 - elaborate on error message 2022-11-20 11:27:39 +07:00
api_fpa.cpp Typo Fixes (#6803) 2023-07-09 11:56:10 -07:00
api_goal.cpp fixes for #6577 2023-02-11 09:33:42 -08:00
api_goal.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_log.cpp remove refs to bare_str 2022-04-09 12:06:27 +02:00
api_model.cpp fix #6034 2022-05-16 16:44:13 -07:00
api_model.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_numeral.cpp sketch initial for mpz/mpq numeral creation 2022-07-27 10:46:03 +02:00
api_opt.cpp remove a bunch of string copies in the API 2022-10-26 18:22:55 +01:00
api_params.cpp remove a bunch of string copies in the API 2022-10-26 18:22:55 +01:00
api_parsers.cpp track assumptions when parsing into a solver. This enables solver.from_file/solver.from_string to support assumptions/cores #6587 2023-02-14 11:09:11 -08:00
api_pb.cpp call it data instead of c_ptr for approaching C++11 std::vector convention. 2021-04-13 18:17:35 -07:00
api_polynomial.cpp remove virtual destructor from api::pmanager 2018-07-09 10:37:26 +01:00
api_polynomial.h remove a hundred implicit constructors/destructors 2021-05-23 14:25:01 +01:00
api_qe.cpp update release notes 2023-01-31 12:19:33 -08:00
api_quant.cpp sanity check parameters #6737 2023-05-30 09:44:06 +02:00
api_rcf.cpp remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
api_seq.cpp fix #6442 2022-11-05 23:15:03 -07:00
api_solver.cpp User Propagator: Return if propagated lemma is redundant (#6791) 2023-07-07 09:58:41 -07:00
api_solver.h add API for creating and attaching simplifiers 2023-01-31 17:06:03 -08:00
api_special_relations.cpp remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
api_stats.cpp fix infinite loop in internalize 2022-09-14 11:50:53 +01:00
api_stats.h Remove empty leaf destructors. (#6211) 2022-07-30 10:07:03 +01:00
api_tactic.cpp add unconstrained elimination for sequences 2023-03-20 17:07:04 +01:00
api_tactic.h add API for creating and attaching simplifiers 2023-01-31 17:06:03 -08:00
api_util.h Use = default for virtual constructors. 2022-08-05 18:11:46 +03:00
CMakeLists.txt attempt to fix cmake build 2022-10-01 21:48:27 +01:00
z3.h booyah 2020-07-04 15:56:30 -07:00
z3_algebraic.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_api.h wip - alpha support for polymorphism 2023-07-12 18:09:02 -07:00
z3_ast_containers.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_fixedpoint.h Added function to select the next variable to split on (User-Propagator) (#6096) 2022-06-19 10:49:25 -07:00
z3_fpa.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_logger.h Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
z3_macros.h Make sure all headers do #pragma once. (#6188) 2022-07-23 10:41:14 -07:00
z3_optimization.h Added function to select the next variable to split on (User-Propagator) (#6096) 2022-06-19 10:49:25 -07:00
z3_polynomial.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_private.h remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
z3_rcf.h fix grouping for latest doxygen (#5626) 2021-10-27 23:46:31 +02:00
z3_replayer.cpp fix #6778 2023-06-25 21:08:13 -07:00
z3_replayer.h remove '#include <iostream>' from headers and from unneeded places 2022-06-17 14:10:19 +01:00
z3_spacer.h Added function to select the next variable to split on (User-Propagator) (#6096) 2022-06-19 10:49:25 -07:00
z3_v1.h booyah 2020-07-04 15:56:30 -07:00