1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
//
// ::formally - the open-source formal methods toolchain
//
// Copyright (c) 2025 Nicola Gigante
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE IntsBLE FOR ANY CLAIM, DAMAGES OR OTHER
// IntsBILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
// SOFTWARE.
//
//! Handling of SMT-LIBv2 logics.
//!
//! This module contains what is needed to declare and use *logics* as in the terminology of
//! SMT-LIBv2.
//!
//! An SMT-LIBv2 logic combines a set of [theories](mod@theories) with a set of syntactic
//! requirements (such as the linerity of terms) and restrictions on the allowed signatures (such as
//! the absence of uninterpreted functions).
//!
//! In `::formally`, logics are types implementing the [Logic] trait. Most of the types in this
//! module are logics declared using the [logic] macro. The types in this module are, however,
//! usually not necessary during common usage of the framework, since logics are usually set *by
//! name* by configuring the [logic](Config::logic) field of the [Config] object used when
//! instantiating a [Solver].
//!
//! The contents of this module are instead most useful when implementing new backends, so we
//! refer to the documentation on [how to write new backends](backends).
pub use *;
use crateformally;
use *;
use *;
use distributed_slice;
use ;
/// Trait for types representing SMT-LIBv2 logics.
///
/// Types implementing this trait are usually not declared by hand but by using the [logic] macro.
static STANDARD_LOGICS: ;
static STANDARD_LOGICS_MAP: =
new;
/// Return an iterator over all the standard SMT-LIBv2 logics declared in the module.
/// Lookup a logic by name among the standard SMT-LIBv2 logics declared in the module.
///
/// The function returns `None` if the logic of the given name is not found, and returns
/// the second argument `all` if `logic` is equal to `"ALL"`.