-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlogics-all.shtml
1277 lines (1108 loc) · 39.6 KB
/
logics-all.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
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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">
<a name="AUFLIA"/>
<h2>AUFLIA</h2>
<pre class="prettyprint lang-smtlib">
(logic AUFLIA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories (Ints ArraysEx)
:language
"Closed formulas built over arbitrary expansions of the Ints and ArraysEx
signatures with free sort and function symbols, but with the following
restrictions:
- all terms of sort Int are linear, that is, have no occurrences of the
function symbols *, /, div, mod, and abs, except as specified in the
:extensions attributes;
- all array terms have sort (Array Int Int).
"
:extensions
"As in the logic QF_AUFLIA."
:notes
"This logic properly extends the logic QF_AUFLIA by allowing quantifiers."
)
</pre>
(<a href="Logics/AUFLIA.smt2">raw file</a>)
<br>
<br>
<a name="AUFLIRA"/>
<h2>AUFLIRA</h2>
<pre class="prettyprint lang-smtlib">
(logic AUFLIRA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli and Clark Barrett"
:date "2010-05-05"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2011-06-03 Replaced "(* c x), or (* x c)" with "c, (* c x), or (* x c)"
in :extensions.
(The missing case was had been left out unintentionally.)
"
:theories (Reals_Ints ArraysEx)
:language
"Closed formulas built over arbitrary expansions of the Reals_Ints and
ArraysEx signatures with free sort and function symbols, but with the
following restrictions:
- all terms of sort Int are linear, that is, have no occurrences of the
function symbols *, /, div, mod, and abs, except as specified in the
:extensions attributes;
- all terms of sort Real are linear, that is, have no occurrences of the
function symbols * and /, except as specified in the
:extensions attribute;
- all array terms have sort
(Array Int Real) or
(Array Int (Array Int Real)).
"
:extensions
"For every operator op with declaration (op Real Real s) for some sort s,
and every term t1, t2 of sort Int and t of sort Real, the expression
- (op t1 t) is syntactic sugar for (op (to_real t1) t)
- (op t t1) is syntactic sugar for (op t (to_real t1))
- (/ t1 t2) is syntactic sugar for (/ (to_real t1) (to_real t2))
"
:extensions
"Real or Int terms with _concrete_ coefficients are also allowed, that is,
terms of the form c, (* c x), or (* x c) where
x is a free constant of sort Int or Real and
c is an integer or rational coefficient, respectively.
- An integer coefficient is a term of the form m or (- m) for some
numeral m.
- A rational coefficient is a term of the form d, (- d) or (/ c n)
for some decimal d, integer coefficient c and numeral n other than 0.
"
)
</pre>
(<a href="Logics/AUFLIRA.smt2">raw file</a>)
<br>
<br>
<a name="AUFNIRA"/>
<h2>AUFNIRA</h2>
<pre class="prettyprint lang-smtlib">
(logic AUFNIRA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli and Clark Barrett"
:date "2010-05-12"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2012-09-26 Clarified in :notes in what way AUFNIRA extendes AUFLIRA.
"
:theories (Reals_Ints ArraysEx)
:language
"Closed formulas built over arbitrary expansions of the Reals_Ints and
ArraysEx signatures with free sort and function symbols.
"
:extensions
"For every operator op with declaration (op Real Real s) for some sort s,
and every term t1, t2 of sort Int and t of sort Real, the expression
- (op t1 t) is syntactic sugar for (op (to_real t1) t)
- (op t t1) is syntactic sugar for (op t (to_real t1))
- (/ t1 t2) is syntactic sugar for (/ (to_real t1) (to_real t2))
"
:notes
"This logic properly extends the logic AUFLIRA by allowing
- non-linear (integer/real) operators such as *, /, div, mod, and abs, and
- allowing terms with an arbitrary array sort (as opposed to just
(Array Int Real) and (Array Int (Array Int Real)) ).
"
)
</pre>
(<a href="Logics/AUFNIRA.smt2">raw file</a>)
<br>
<br>
<a name="LIA"/>
<h2>LIA</h2>
<pre class="prettyprint lang-smtlib">
(logic LIA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2016-02-07"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
"
:theories (Ints)
:language
"Closed formulas built over an arbitrary expansion of the
Ints signature with free constant symbols, but whose terms of sort Int
are all linear, that is, have no occurrences of the function symbols
*, /, div, mod, and abs, except as specified the :extensions attribute.
"
:extensions
"Terms with _concrete_ coefficients are also allowed, that is, terms
of the form c, (* c x), or (* x c) where x is a free constant and
c is a term of the form n or (- n) for some numeral n.
"
)
</pre>
(<a href="Logics/LIA.smt2">raw file</a>)
<br>
<br>
<a name="LRA"/>
<h2>LRA</h2>
<pre class="prettyprint lang-smtlib">
(logic LRA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-05-11"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2011-06-03 Replaced ''(* c x), or (* x c)'' with ''c, (* c x), or (* x c)''
in :extensions.
(The missing case was had been left out unintentionally.)
"
:theories (Reals)
:language
"Closed formulas built over arbitrary expansions of the Reals signature
with free constant symbols, but containing only linear atoms, that is,
atoms with no occurrences of the function symbols * and /, except as
specified the :extensions attribute.
"
:extensions
"Terms with _concrete_ coefficients are also allowed, that is, terms
of the form c, (* c x), or (* x c) where x is a free constant and
c is an integer or rational coefficient.
- An integer coefficient is a term of the form m or (- m) for some
numeral m.
- A rational coefficient is a term of the form d, (- d) or (/ c n)
for some decimal d, integer coefficient c and numeral n other than 0.
"
:notes
"This logic properly extends the logic QF_LRA by allowing quantifiers."
)
</pre>
(<a href="Logics/LRA.smt2">raw file</a>)
<br>
<br>
<a name="QF_ABV"/>
<h2>QF_ABV</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_ABV
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli and Clark Barrett"
:date "2010-07-05"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2013-06-24 Changed references to Fixed_Size_Bitvectors to FixedSizeBitVectors.
"
:theories (FixedSizeBitVectors ArraysEx)
:language
"Closed quantifier-free formulas built over the FixedSizeBitVectors and
ArraysEx signatures, with the restriction that all array terms have sort of
the form (Array (_ BitVec i) (_ BitVec j)) for some i, j > 0.
"
:extensions "As in the logic QF_BV."
)
</pre>
(<a href="Logics/QF_ABV.smt2">raw file</a>)
<br>
<br>
<a name="QF_AUFBV"/>
<h2>QF_AUFBV</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_AUFBV
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli and Clark Barrett"
:date "2010-05-11"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2013-06-24 Changed references to Fixed_Size_Bitvectors to FixedSizeBitVectors.
"
:theories (FixedSizeBitVectors ArraysEx)
:language
"Closed quantifier-free formulas built over an arbitrary expansion of the
FixedSizeBitVectors and ArraysEx signatures with free sort and function
symbols, but with the restriction that all array terms have sort of the
form (Array (_ BitVec i) (_ BitVec j)) for some i, j > 0.
"
:extensions "As in the logic QF_BV."
)
</pre>
(<a href="Logics/QF_AUFBV.smt2">raw file</a>)
<br>
<br>
<a name="QF_AUFLIA"/>
<h2>QF_AUFLIA</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_AUFLIA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2011-06-03 Allowed x to be more than a free constants in terms of the form
(* c x) or (*x c) in :extensions.
"
:theories (Ints ArraysEx)
:language
"Closed quantifier-free formulas built over arbitrary expansions of the
Ints and ArraysEx signatures with free sort and function symbols, but
with the following restrictions:
- all terms of sort Int are linear, that is, have no occurrences of the
function symbols *, /, div, mod, and abs, except as specified in the
:extensions attributes;
- all array terms have sort (Array Int Int).
"
:extensions
"Terms with _concrete_ integer coefficients are also allowed, that is, terms
of the form c, (* c x), or (* x c) where
- x is a free constant or a term with top symbol not in Ints, and
- c is a term of the form n or (- n) for some numeral n.
")
</pre>
(<a href="Logics/QF_AUFLIA.smt2">raw file</a>)
<br>
<br>
<a name="QF_AX"/>
<h2>QF_AX</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_AX
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories (ArraysEx)
:language
"Closed quantifier-free formulas built over an arbitrary expansion of
the ArraysEx signature with free sort and constant symbols.
"
:notes
"Formulas can contain variables as long as they are bound by a let binder."
)
</pre>
(<a href="Logics/QF_AX.smt2">raw file</a>)
<br>
<br>
<a name="QF_BV"/>
<h2>QF_BV</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_BV
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Clark Barrett, Pascal Fontaine, Silvio Ranise, and Cesare Tinelli"
:date "2010-05-02"
:last-updated "2025-02-25"
:update-history
"Note: history only accounts for content changes, not release changes.
2025-02-25 Renamed and updated conversion operators to/from integers.
2024-07-21 Updated to Version 2.7.
2024-07-15 Added conversion operators between bitvectors and integers.
2024-07-14 Minor disambiguation.
2023-11-29 Added bvnego bvuaddo bvsaddo bvumulo bvsmulo bvusubo bvssubo bvsdivo
2020-05-20 bvxnor is no longer marked as left associative, as that is
inconsistent with its meaning as the negation of bvxor.
2017-06-13 Added that bvxor and bvxnor are left associative
2017-05-03 Updated to Version 2.6. Division and remainder operations are no
longer undefiend when the second operand is 0. See
the FixedSizeBitVectors theory definition for details.
2015-04-25 Updated to Version 2.5.
2013-06-24 Changed references to Fixed_Size_Bitvectors to FixedSizeBitVectors.
2011-06-15 Fixed bug in definition of bvsmod. Previously, it gave an incorrect
answer when the divisor is negative and goes into the dividend evenly.
"
:theories (FixedSizeBitVectors)
:language
"Closed quantifier-free formulas built over an arbitrary expansion of the
FixedSizeBitVectors signature with free constant symbols over the sorts
(_ BitVec m) for 0 < m. Formulas in ite terms must satisfy the same
restriction as well, with the exception that they need not be closed
(because they may be in the scope of a let binder).
"
:notes
"For quick reference, the following is a brief and informal summary of the
legal symbols in this logic and their meaning (formal definitions are found
either in the FixedSizeBitvectors theory, or in the extensions below).
Defined in theory FixedSizeBitvectors:
Bitvector constants:
- #bX where X is a binary numeral of length m defines the
bitvector constant with value X and size m.
- #xX where X is a hexadecimal numeral of length m defines the
bitvector constant with value X and size 4*m.
Functions:
(concat (_ BitVec i) (_ BitVec j) (_ BitVec m))
- concatenation of bitvectors of size i and j to get a new bitvector of
size m, where m = i + j
((_ extract i j) (_ BitVec m) (_ BitVec n))
- extraction of bits i down to j from a bitvector of size m to yield a
new bitvector of size n, where n = i - j + 1
(bvnot (_ BitVec m) (_ BitVec m))
- bitwise negation
(bvand (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise and
(bvor (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise or
(bvneg (_ BitVec m) (_ BitVec m))
- 2's complement unary minus
(bvadd (_ BitVec m) (_ BitVec m) (_ BitVec m))
- addition modulo 2^m
(bvmul (_ BitVec m) (_ BitVec m) (_ BitVec m))
- multiplication modulo 2^m
(bvudiv (_ BitVec m) (_ BitVec m) (_ BitVec m))
- unsigned division, truncating towards 0
(bvurem (_ BitVec m) (_ BitVec m) (_ BitVec m))
- unsigned remainder from truncating division
(bvshl (_ BitVec m) (_ BitVec m) (_ BitVec m))
- shift left (equivalent to multiplication by 2^x where x is the value of
the second argument)
(bvlshr (_ BitVec m) (_ BitVec m) (_ BitVec m))
- logical shift right (equivalent to unsigned division by 2^x where x is
the value of the second argument)
(bvult (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for unsigned less-than
(bvnego (_ BitVec m) Bool)
- overflow predicate for 2's complement unary minus
(bvuaddo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for unsigned addition modulo 2^m
(bvsaddo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for signed addition on m-bit 2's complement
(bvumulo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for unsigned multiplication modulo 2^m
(bvsmulo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for signed multiplication on m-bit 2's complement
(ubv_to_int (_ BitVec m) Int)
- convert bitvector, interpreted as unsigned, to its integer value
(sbv_to_int (_ BitVec m) Int)
- convert a bitvector, interpreted as signed, to its integer value
((_ int_to_bv m) (Int) (_ BitVec m))
- convert an Integer to a bitvector
Defined below:
Functions:
(bvnand (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise nand (negation of and)
(bvnor (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise nor (negation of or)
(bvxor (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise exclusive or
(bvxnor (_ BitVec m) (_ BitVec m) (_ BitVec m))
- bitwise equivalence (equivalently, negation of bitwise exclusive or)
(bvcomp (_ BitVec m) (_ BitVec m) (_ BitVec 1))
- bit comparator: equals #b1 iff all bits are equal
(bvsub (_ BitVec m) (_ BitVec m) (_ BitVec m))
- 2's complement subtraction modulo 2^m
(bvsdiv (_ BitVec m) (_ BitVec m) (_ BitVec m))
- 2's complement signed division
(bvsrem (_ BitVec m) (_ BitVec m) (_ BitVec m))
- 2's complement signed remainder (sign follows dividend)
(bvsmod (_ BitVec m) (_ BitVec m) (_ BitVec m))
- 2's complement signed remainder (sign follows divisor)
(bvashr (_ BitVec m) (_ BitVec m) (_ BitVec m))
- Arithmetic shift right, like logical shift right except that the most
significant bits of the result always copy the most significant
bit of the first argument.
(bvusubo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for unsigned subtraction modulo 2^m
(bvssubo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for signed 2's complement m-bit subtraction
(bvsdivo (_ BitVec m) (_ BitVec m) Bool)
- overflow predicate for 2's complement signed division
The following symbols are parameterized by the numeral i, where i >= 1.
((_ repeat i) (_ BitVec m) (_ BitVec i*m))
- ((_ repeat i) x) means concatenate i copies of x
The following symbols are parameterized by the numeral i, where i >= 0.
((_ zero_extend i) (_ BitVec m) (_ BitVec m+i))
- ((_ zero_extend i) x) means extend x with zeroes to the (unsigned)
equivalent bitvector of size m+i
((_ sign_extend i) (_ BitVec m) (_ BitVec m+i))
- ((_ sign_extend i) x) means extend x to the (signed) equivalent bitvector
of size m+i
((_ rotate_left i) (_ BitVec m) (_ BitVec m))
- ((_ rotate_left i) x) means rotate bits of x to the left i times
((_ rotate_right i) (_ BitVec m) (_ BitVec m))
- ((_ rotate_right i) x) means rotate bits of x to the right i times
(bvule (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for unsigned less than or equal
(bvugt (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for unsigned greater than
(bvuge (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for unsigned greater than or equal
(bvslt (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for signed less than
(bvsle (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for signed less than or equal
(bvsgt (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for signed greater than
(bvsge (_ BitVec m) (_ BitVec m) Bool)
- binary predicate for signed greater than or equal
"
:extensions
"Below, let |exp| denote the integer resulting from the evaluation
of the arithmetic expression exp.
- Bitvector Constants:
(_ bvX n) where X and n are numerals, i.e. (_ bv13 32),
abbreviates the term #bY of sort (_ BitVec n) such that
[[#bY]] = nat2bv[n](X) for X=0, ..., 2^n - 1.
See the specification of the theory's semantics for a definition
of the functions [[_]] and nat2bv. Note that this convention implicitly
considers the numeral X as a number written in decimal. It is
an error to write (_ bvX n) with X >= 2^n.
- Bitwise operators
For all terms s,t of sort (_ BitVec m), where 0 < m,
(bvnand s t) abbreviates (bvnot (bvand s t))
(bvnor s t) abbreviates (bvnot (bvor s t))
(bvxor s t) abbreviates (bvor (bvand s (bvnot t)) (bvand (bvnot s) t))
(bvxnor s t) abbreviates (bvor (bvand s t) (bvand (bvnot s) (bvnot t)))
(bvcomp s t) abbreviates (bvxnor s t) if m = 1, and
(bvand (bvxnor ((_ extract |m-1| |m-1|) s) ((_ extract |m-1| |m-1|) t))
(bvcomp ((_ extract |m-2| 0) s) ((_ extract |m-2| 0) t))) otherwise.
Additionally, bvxor is left associative, so:
(bvxor s_1 s_2 ... s_n) abbreviates (bvxor (bvxor s_1 s_2 ...) s_n), and
- Arithmetic operators
For all terms s,t of sort (_ BitVec m), where 0 < m,
(bvsub s t) abbreviates (bvadd s (bvneg t))
(bvsdiv s t) abbreviates
(let ((?msb_s ((_ extract |m-1| |m-1|) s))
(?msb_t ((_ extract |m-1| |m-1|) t)))
(ite (and (= ?msb_s #b0) (= ?msb_t #b0))
(bvudiv s t)
(ite (and (= ?msb_s #b1) (= ?msb_t #b0))
(bvneg (bvudiv (bvneg s) t))
(ite (and (= ?msb_s #b0) (= ?msb_t #b1))
(bvneg (bvudiv s (bvneg t)))
(bvudiv (bvneg s) (bvneg t))))))
(bvsrem s t) abbreviates
(let ((?msb_s ((_ extract |m-1| |m-1|) s))
(?msb_t ((_ extract |m-1| |m-1|) t)))
(ite (and (= ?msb_s #b0) (= ?msb_t #b0))
(bvurem s t)
(ite (and (= ?msb_s #b1) (= ?msb_t #b0))
(bvneg (bvurem (bvneg s) t))
(ite (and (= ?msb_s #b0) (= ?msb_t #b1))
(bvurem s (bvneg t)))
(bvneg (bvurem (bvneg s) (bvneg t))))))
(bvsmod s t) abbreviates
(let ((?msb_s ((_ extract |m-1| |m-1|) s))
(?msb_t ((_ extract |m-1| |m-1|) t)))
(let ((abs_s (ite (= ?msb_s #b0) s (bvneg s)))
(abs_t (ite (= ?msb_t #b0) t (bvneg t))))
(let ((u (bvurem abs_s abs_t)))
(ite (= u (_ bv0 m))
u
(ite (and (= ?msb_s #b0) (= ?msb_t #b0))
u
(ite (and (= ?msb_s #b1) (= ?msb_t #b0))
(bvadd (bvneg u) t)
(ite (and (= ?msb_s #b0) (= ?msb_t #b1))
(bvadd u t)
(bvneg u))))))))
(bvule s t) abbreviates (or (bvult s t) (= s t))
(bvugt s t) abbreviates (bvult t s)
(bvuge s t) abbreviates (or (bvult t s) (= s t))
(bvslt s t) abbreviates:
(or (and (= ((_ extract |m-1| |m-1|) s) #b1)
(= ((_ extract |m-1| |m-1|) t) #b0))
(and (= ((_ extract |m-1| |m-1|) s) ((_ extract |m-1| |m-1|) t))
(bvult s t)))
(bvsle s t) abbreviates:
(or (and (= ((_ extract |m-1| |m-1|) s) #b1)
(= ((_ extract |m-1| |m-1|) t) #b0))
(and (= ((_ extract |m-1| |m-1|) s) ((_ extract |m-1| |m-1|) t))
(bvule s t)))
(bvsgt s t) abbreviates (bvslt t s)
(bvsge s t) abbreviates (bvsle t s)
(bvusubo s t) stands for (bvult s t)
(bvssubo s t) abbreviates (ite (bvnego t) (bvsge s (_ bv0 m)) (bvsaddo s (bvneg t)))
(bvsdivo s t) abbreviates (and (bvnego s) (= t (bvnot (_ bv0 m))))
- Other operations
For all numerals i > 0, j > 1 and 0 < m, and all terms s and t of
sort (_ BitVec m),
(bvashr s t) abbreviates
(ite (= ((_ extract |m-1| |m-1|) s) #b0)
(bvlshr s t)
(bvnot (bvlshr (bvnot s) t)))
((_ repeat 1) t) stands for t
((_ repeat j) t) abbreviates (concat t ((_ repeat |j-1|) t))
((_ zero_extend 0) t) stands for t
((_ zero_extend i) t) abbreviates (concat ((_ repeat i) #b0) t)
((_ sign_extend 0) t) stands for t
((_ sign_extend i) t) abbreviates
(concat ((_ repeat i) ((_ extract |m-1| |m-1|) t)) t)
((_ rotate_left 0) t) stands for t
((_ rotate_left i) t) abbreviates t if m = 1, and
((_ rotate_left |i-1|)
(concat ((_ extract |m-2| 0) t) ((_ extract |m-1| |m-1|) t))
otherwise
((_ rotate_right 0) t) stands for t
((_ rotate_right i) t) abbreviates t if m = 1, and
((_ rotate_right |i-1|)
(concat ((_ extract 0 0) t) ((_ extract |m-1| 1) t)))
otherwise
"
)
</pre>
(<a href="Logics/QF_BV.smt2">raw file</a>)
<br>
<br>
<a name="QF_IDL"/>
<h2>QF_IDL</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_IDL
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories ( Ints )
:language
"Closed quantifier-free formulas with atoms of the form:
- q
- (op (- x y) n),
- (op (- x y) (- n)), or
- (op x y)
where
- q is a variable or free constant symbol of sort Bool,
- op is <, <=, >, >=, =, or distinct,
- x, y are free constant symbols of sort Int,
- n is a numeral.
"
)
</pre>
(<a href="Logics/QF_IDL.smt2">raw file</a>)
<br>
<br>
<a name="QF_LIA"/>
<h2>QF_LIA</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_LIA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2021-01-21 Clarified wording around what terms are included in extensions.
2015-04-25 Updated to Version 2.5.
"
:theories (Ints)
:language
"Closed quantifier-free formulas built over an arbitrary expansion of the
Ints signature with free constant symbols, but whose terms of sort Int
are all linear, that is, have no occurrences of the function symbols
/, div, mod, and abs, and no occurrences of the function symbol *,
except as specified in the :extensions attribute.
"
:extensions
"Terms containing * with _concrete_ coefficients are also allowed, that
is, terms of the form c, (* c x), or (* x c) where x is a free constant
and c is a term of the form n or (- n) for some numeral n.
"
)
</pre>
(<a href="Logics/QF_LIA.smt2">raw file</a>)
<br>
<br>
<a name="QF_NIA"/>
<h2>QF_NIA</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_NIA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-05-12"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories ( Ints )
:language
"Closed quantifier-free formulas built over an arbitrary expansion of the
Ints signature with free constant symbols.
"
)
</pre>
(<a href="Logics/QF_NIA.smt2">raw file</a>)
<br>
<br>
<a name="QF_NRA"/>
<h2>QF_NRA</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_NRA
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2011-06-11"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories ( Reals )
:language
"Closed quantifier-free formulas built over arbitrary expansions of
the Reals signature with free constant symbols."
)
</pre>
(<a href="Logics/QF_NRA.smt2">raw file</a>)
<br>
<br>
<a name="QF_RDL"/>
<h2>QF_RDL</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_RDL
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-30"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2010-12-16 Replaced erroneous ''n > 0'' with ''n > 1'' in language attribute.
"
:theories (Reals)
:language
"Closed quantifier-free formulas with atoms of the form:
- p
- (op (- x y) c),
- (op x y),
- (op (- (+ x ... x) (+ y ... y)) c) with n > 1 occurrences of x and of y,
where
- p is a variable or free constant symbol of sort Bool,
- c is an expression of the form m or (- m) for some numeral m,
- op is <, <=, >, >=, =, or distinct,
- x, y are free constant symbols of sort Real.
"
:extensions
"The expression (op (- x y) (/ c n)) where n is a numeral other than 0 and
c is an expression of the form m or (- m) for some numeral m,
abbreviates the expression
(op (- (+ x ... x) (+ y ... y)) c) with n occurrences of x and y.
"
)
</pre>
(<a href="Logics/QF_RDL.smt2">raw file</a>)
<br>
<br>
<a name="QF_UF"/>
<h2>QF_UF</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_UF
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2010-04-14"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
"
:theories () ; includes just Core theory
:language
"Closed quantifier-free formulas built over an arbitrary expansion of
the Core signature with free sort and function symbols.
"
:values
"For each sort other than Bool the set of values is abstract.
For Bool it is defined as in the Core theory declaration.
"
:notes
"Formulas can contain variables as long as they are bound by a let binder.
"
:notes
"All the free symbols used in scripts for this logic must be declared in
the scripts themselves.
"
)
</pre>
(<a href="Logics/QF_UF.smt2">raw file</a>)
<br>
<br>
<a name="QF_UFBV"/>
<h2>QF_UFBV</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_UFBV
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Cesare Tinelli"
:date "2011-06-11"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2013-06-24 Changed references to Fixed_Size_Bitvectors to FixedSizeBitVectors.
"
:theories ( FixedSizeBitVectors )
:language
"Closed quantifier-free formulas built over arbitrary expansions of
the FixedSizeBitVectors signature with free sort and function
symbols.
"
:extensions "As in the logic QF_BV."
)
</pre>
(<a href="Logics/QF_UFBV.smt2">raw file</a>)
<br>
<br>
<a name="QF_UFIDL"/>
<h2>QF_UFIDL</h2>
<pre class="prettyprint lang-smtlib">
(logic QF_UFIDL
:smt-lib-version 2.7
:smt-lib-release "2024-07-21"
:written-by "Clark Barrett, Cesare Tinelli"
:date "2010-05-12"
:last-updated "2024-07-21"
:update-history
"Note: history only accounts for content changes, not release changes.
2024-07-21 Updated to Version 2.7.
2015-04-25 Updated to Version 2.5.
2011-06-03 Added :note field."
:theories (Ints)
:language
"Closed quantifier-free formulas built over an arbitrary expansion with
free sort and function symbols of the signature consisting of
- all the sort and function symbols of Core and
- the following symbols of Int:
:sorts ((Int 0))
:funs ((NUMERAL Int)
(- Int Int Int)
(+ Int Int Int)
(<= Int Int Bool)
(< Int Int Bool)
(>= Int Int Bool)
(> Int Int Bool)
)
Additionally, for every term of the form (op t1 t2) with op in {+, -},
at least one of t1 and t2 is a numeral.
"
:note
"For historical reasons, the syntax of this logic is *not* an extension
of QF_IDL's syntax. However, any formula in this logic with no free sorts
and no free function symbol of arity > 0 can be converted into an
equisatisfiable formula in QF_IDL.
"
)
</pre>
(<a href="Logics/QF_UFIDL.smt2">raw file</a>)