-
Notifications
You must be signed in to change notification settings - Fork 0
/
theories-Ints.shtml
209 lines (174 loc) · 5.95 KB
/
theories-Ints.shtml
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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!--
Design by http://www.bluewebtemplates.com
Released for free under a Creative Commons Attribution 3.0 License
-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>SMT-LIB The Satisfiability Modulo Theories Library</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link href="style.css" rel="stylesheet" type="text/css" />
<!-- CuFon: Enables smooth pretty custom font rendering. 100% SEO friendly. To disable, remove this section -->
<script type="text/javascript" src="js/cufon-yui.js"></script>
<script type="text/javascript" src="js/arial.js"></script>
<script type="text/javascript" src="js/cuf_run.js"></script>
<!-- CuFon ends -->
<link href="code-prettify/prettify.css" type="text/css" rel="stylesheet" />
<script src="code-prettify/run_prettify.js?lang=smtlib&skin=desert"></script>
</head>
<body>
<div class="main">
<div class="header">
<div class="header_resize">
<div class="menu_nav">
<ul>
<li><a href="index.shtml">Home</a></li>
<li><a href="about.shtml">About</a></li>
<li><a href="news.shtml">News</a></li>
<li class="active"><a href="standard.shtml">Standard</a></li>
<li><a href="benchmarks.shtml">Benchmarks</a></li>
<li><a href="software.shtml">Software</a></li>
<li><a href="credits.shtml">Credits</a></li>
</ul>
</div>
<div class="clr"></div>
<div class="logo">
<h1><a href="index.shtml">SMT-LIB <br/>
<small>The Satisfiability Modulo Theories Library</small></a>
</h1>
</div>
</div>
</div>
<div class="content">
<div class="content_resize">
<div class="mainbar">
<h2>Ints</h2>
<pre class="prettyprint lang-smtlib">
(theory Ints
:smt-lib-version 2.6
:smt-lib-release "2017-11-24"
:written-by "Cesare Tinelli"
:date "2010-04-17"
:last-updated "2015-04-25"
:update-history
"Note: history only accounts for content changes, not release changes.
2015-04-25 Updated to Version 2.5.
"
:sorts ((Int 0))
:funs ((NUMERAL Int)
(- Int Int) ; negation
(- Int Int Int :left-assoc) ; subtraction
(+ Int Int Int :left-assoc)
(* Int Int Int :left-assoc)
(div Int Int Int :left-assoc)
(mod Int Int Int)
(abs Int Int)
(<= Int Int Bool :chainable)
(< Int Int Bool :chainable)
(>= Int Int Bool :chainable)
(> Int Int Bool :chainable)
)
:funs_description
"All ranked function symbols of the form
((_ divisible n) Int Bool)
where n is a positive numeral.
"
:values
"The set of values for the sort Int consists of
- all numerals,
- all terms of the form (- n) where n is a numeral other than 0.
"
:definition
"For every expanded signature, the instance of Ints with that
signature is the theory consisting of all Sigma-models that interpret:
- the sort Int as the set of all integer numbers,
- each numeral as the corresponding natural number,
- (_ divisible n) as the function mapping to true all and only
the integers that are divisible by n,
- abs as the absolute value function,
- div and mod according to Boute's Euclidean definition [1], that is,
so as to satify the formula
(for all ((m Int) (n Int))
(=> (distinct n 0)
(let ((q (div m n)) (r (mod m n)))
(and (= m (+ (* n q) r))
(<= 0 r (- (abs n) 1))))))
- the other function symbols of Ints as expected.
References:
[1] Boute, Raymond T. (April 1992).
The Euclidean definition of the functions div and mod.
ACM Transactions on Programming Languages and Systems (TOPLAS)
ACM Press. 14 (2): 127 - 144. doi:10.1145/128861.128862.
"
:notes
"Regardless of sign of m,
when n is positive, (div m n) is the floor of the rational number m/n;
when n is negative, (div m n) is the ceiling of m/n.
This contrasts with alternative but less robust definitions of div and mod
where (div m n) is
- always the integer part of m/n (rounding towards 0), or
- always the floor of x/y (rounding towards -infinity).
"
:notes
"See note in the Reals theory declaration about terms of the form (/ t 0).
The same observation applies here to terms of the form (div t 0) and
(mod t 0).
"
)
</pre>
(<a href="Theories/Ints.smt2">raw file</a>)
<br>
<br>
</div>
<div class="sidebar">
<div class="gadget">
<ul class="sb_menu">
<li><a href="index.shtml">Home</a></li>
<li><a href="about.shtml">About</a></li>
<li><a href="news.shtml">News</a></li>
<li>Standard
<ul class="ex_menu">
<li><a href="language.shtml">Language</a>
<li><a href="theories.shtml">Theories</a>
<li><a href="logics.shtml">Logics</a>
<li><a href="examples.shtml">Examples</a>
</ul>
</li>
<li><a href="benchmarks.shtml">Benchmarks</a></li>
<li>Software
<ul class="ex_menu">
<li><a href="solvers.shtml">Solvers</a></li>
<li><a href="utilities.shtml">Utilities</a></li>
</ul>
</li>
<li><a href="contact.shtml">Contact</a></li>
<li><a href="related.shtml">Related</a></li>
<li><a href="credits.shtml">Credits</a></li>
</ul>
</div>
</div>
</div>
</div>
<div class="clr"></div>
<div class="footer">
<div class="footer_resize">
<p class="lf">
© Copyright The SMT-LIB Initiative <br>
Based on a design by
Blue <a href="http://www.bluewebtemplates.com">Web Templates</a>
</p>
<ul class="fmenu">
<li><a href="index.shtml">Home</a></li>
<li><a href="about.shtml">About</a></li>
<li><a href="news.shtml">News</a></li>
<li class="active"><a href="standard.shtml">Standard</a></li>
<li><a href="benchmarks.shtml">Benchmarks</a></li>
<li><a href="software.shtml">Software</a></li>
<li><a href="credits.shtml">Credits</a></li>
</ul>
<div class="clr"></div>
</div>
</div>
</div>
</body>
</html>