forked from potassco/potassco.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
group__Control.html
1471 lines (1429 loc) · 102 KB
/
group__Control.html
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">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>Clingo C API: Grounding and Solving</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="clingo.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectalign" style="padding-left: 0.5em;">
<div id="projectname">Clingo C API
</div>
<div id="projectbrief">C API for clingo providing high level functions to control grounding and solving.</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main Page</span></a></li>
<li class="current"><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li><a href="examples.html"><span>Examples</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#groups">Modules</a> |
<a href="#nested-classes">Classes</a> |
<a href="#typedef-members">Typedefs</a> |
<a href="#enum-members">Enumerations</a> |
<a href="#enumval-members">Enumerator</a> |
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Grounding and Solving</div> </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>Functions to control the grounding and solving process. </p>
<p>For an example, see <a class="el" href="control_8c-example.html">control.c</a>. </p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="groups"></a>
Modules</h2></td></tr>
<tr class="memitem:group__Model"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Model.html">Model Inspection</a></td></tr>
<tr class="memdesc:group__Model"><td class="mdescLeft"> </td><td class="mdescRight">Inspection of models and a high-level interface to add constraints during solving. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__SolveIter"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveIter.html">Iterative Solving</a></td></tr>
<tr class="memdesc:group__SolveIter"><td class="mdescLeft"> </td><td class="mdescRight">Iterative enumeration of models (without using callbacks). <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__SolveAsync"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SolveAsync.html">Asynchronous Solving</a></td></tr>
<tr class="memdesc:group__SolveAsync"><td class="mdescLeft"> </td><td class="mdescRight">Solve in the background and notify about new models. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__SymbolicAtoms"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__SymbolicAtoms.html">Symbolic Atom Inspection</a></td></tr>
<tr class="memdesc:group__SymbolicAtoms"><td class="mdescLeft"> </td><td class="mdescRight">Inspection of atoms occurring in ground logic programs. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__TheoryAtoms"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__TheoryAtoms.html">Theory Atom Inspection</a></td></tr>
<tr class="memdesc:group__TheoryAtoms"><td class="mdescLeft"> </td><td class="mdescRight">Inspection of theory atoms occurring in ground logic programs. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__Propagator"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Propagator.html">Theory Propagation</a></td></tr>
<tr class="memdesc:group__Propagator"><td class="mdescLeft"> </td><td class="mdescRight">Extend the search with propagators for arbitrary theories. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__ProgramBuilder"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__ProgramBuilder.html">Program Building</a></td></tr>
<tr class="memdesc:group__ProgramBuilder"><td class="mdescLeft"> </td><td class="mdescRight">Add non-ground program representations (ASTs) to logic programs or extend the ground (aspif) program. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__Configuration"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Configuration.html">Solver Configuration</a></td></tr>
<tr class="memdesc:group__Configuration"><td class="mdescLeft"> </td><td class="mdescRight">Configuration of search and enumeration algorithms. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:group__Statistics"><td class="memItemLeft" align="right" valign="top"> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Statistics.html">Statistics</a></td></tr>
<tr class="memdesc:group__Statistics"><td class="mdescLeft"> </td><td class="mdescRight">Inspect search and problem statistics. <br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="nested-classes"></a>
Classes</h2></td></tr>
<tr class="memitem:"><td class="memItemLeft" align="right" valign="top">struct  </td><td class="memItemRight" valign="bottom"><a class="el" href="structclingo__part.html">clingo_part</a></td></tr>
<tr class="memdesc:"><td class="mdescLeft"> </td><td class="mdescRight">Struct used to specify the program parts that have to be grounded. <a href="structclingo__part.html#details">More...</a><br /></td></tr>
<tr class="separator:"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:gaf008e9db9dbb37b0b7ef039bb9d582f0"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaf008e9db9dbb37b0b7ef039bb9d582f0"></a>
typedef struct clingo_control </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a></td></tr>
<tr class="memdesc:gaf008e9db9dbb37b0b7ef039bb9d582f0"><td class="mdescLeft"> </td><td class="mdescRight">Control object holding grounding and solving state. <br /></td></tr>
<tr class="separator:gaf008e9db9dbb37b0b7ef039bb9d582f0"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga3cf33a34a4f98a6e455fd7a8ea37b495"><td class="memItemLeft" align="right" valign="top">typedef struct <a class="el" href="structclingo__part.html">clingo_part</a> </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga3cf33a34a4f98a6e455fd7a8ea37b495">clingo_part_t</a></td></tr>
<tr class="memdesc:ga3cf33a34a4f98a6e455fd7a8ea37b495"><td class="mdescLeft"> </td><td class="mdescRight">Struct used to specify the program parts that have to be grounded. <a href="#ga3cf33a34a4f98a6e455fd7a8ea37b495">More...</a><br /></td></tr>
<tr class="separator:ga3cf33a34a4f98a6e455fd7a8ea37b495"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga4abe18b31ed3f61b1889700f63110ee4"><td class="memItemLeft" align="right" valign="top">typedef bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga4abe18b31ed3f61b1889700f63110ee4">clingo_symbol_callback_t</a>(<a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> const *symbols, size_t symbols_size, void *data)</td></tr>
<tr class="memdesc:ga4abe18b31ed3f61b1889700f63110ee4"><td class="mdescLeft"> </td><td class="mdescRight">Callback function to inject symbols. <a href="#ga4abe18b31ed3f61b1889700f63110ee4">More...</a><br /></td></tr>
<tr class="separator:ga4abe18b31ed3f61b1889700f63110ee4"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa6dc8ed22a316ff37bc88c4d7686467c"><td class="memItemLeft" align="right" valign="top">typedef bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaa6dc8ed22a316ff37bc88c4d7686467c">clingo_ground_callback_t</a>(<a class="el" href="group__BasicTypes.html#ga07e91950463516bb999ed021ca8f73c4">clingo_location_t</a> location, char const *name, <a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> const *arguments, size_t arguments_size, void *data, <a class="el" href="group__Control.html#ga4abe18b31ed3f61b1889700f63110ee4">clingo_symbol_callback_t</a> *symbol_callback, void *symbol_callback_data)</td></tr>
<tr class="memdesc:gaa6dc8ed22a316ff37bc88c4d7686467c"><td class="mdescLeft"> </td><td class="mdescRight">Callback function to implement external functions. <a href="#gaa6dc8ed22a316ff37bc88c4d7686467c">More...</a><br /></td></tr>
<tr class="separator:gaa6dc8ed22a316ff37bc88c4d7686467c"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad666e6b4fba4d652351592937ccdc287"><td class="memItemLeft" align="right" valign="top">typedef bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gad666e6b4fba4d652351592937ccdc287">clingo_model_callback_t</a>(<a class="el" href="group__Model.html#gaaf9a93819f023f3cb8aa80598c46556b">clingo_model_t</a> *model, void *data, bool *goon)</td></tr>
<tr class="memdesc:gad666e6b4fba4d652351592937ccdc287"><td class="mdescLeft"> </td><td class="mdescRight">Callback function to intercept models. <a href="#gad666e6b4fba4d652351592937ccdc287">More...</a><br /></td></tr>
<tr class="separator:gad666e6b4fba4d652351592937ccdc287"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaaffc6a39822645d3d869cd1b9aeb33e7"><td class="memItemLeft" align="right" valign="top">typedef bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaaffc6a39822645d3d869cd1b9aeb33e7">clingo_finish_callback_t</a>(<a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a> result, void *data)</td></tr>
<tr class="memdesc:gaaffc6a39822645d3d869cd1b9aeb33e7"><td class="mdescLeft"> </td><td class="mdescRight">Callback function called at the end of an asynchronous solve operation. <a href="#gaaffc6a39822645d3d869cd1b9aeb33e7">More...</a><br /></td></tr>
<tr class="separator:gaaffc6a39822645d3d869cd1b9aeb33e7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gae917a23b0591d181004ec88c4e3291c1"><td class="memItemLeft" align="right" valign="top">typedef unsigned </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a></td></tr>
<tr class="memdesc:gae917a23b0591d181004ec88c4e3291c1"><td class="mdescLeft"> </td><td class="mdescRight">Corresponding type to <a class="el" href="group__Control.html#gacebb1a43c095d4a36294a5de7191b2e4" title="Enumeration of bit masks for solve call results. ">clingo_solve_result</a>. <a href="#gae917a23b0591d181004ec88c4e3291c1">More...</a><br /></td></tr>
<tr class="separator:gae917a23b0591d181004ec88c4e3291c1"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="enum-members"></a>
Enumerations</h2></td></tr>
<tr class="memitem:gacebb1a43c095d4a36294a5de7191b2e4"><td class="memItemLeft" align="right" valign="top">enum  </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gacebb1a43c095d4a36294a5de7191b2e4">clingo_solve_result</a> { <a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4ae71ed354490afbb3b9c6d6ea9d20910d">clingo_solve_result_satisfiable</a> = 1,
<a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4a313b2d51ea0b84abc2cd28e44d98be77">clingo_solve_result_unsatisfiable</a> = 2,
<a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4a9f6904e39554c1bb16e2339fd534eafd">clingo_solve_result_exhausted</a> = 4,
<a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4a9f32a002b3f8a88c6ca4e347e91af1eb">clingo_solve_result_interrupted</a> = 8
}<tr class="memdesc:gacebb1a43c095d4a36294a5de7191b2e4"><td class="mdescLeft"> </td><td class="mdescRight">Enumeration of bit masks for solve call results. <a href="group__Control.html#gacebb1a43c095d4a36294a5de7191b2e4">More...</a><br /></td></tr>
</td></tr>
<tr class="separator:gacebb1a43c095d4a36294a5de7191b2e4"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ga46254f92ddf864a5214cf1572402e2bc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga46254f92ddf864a5214cf1572402e2bc">clingo_control_new</a> (char const *const *arguments, size_t arguments_size, <a class="el" href="group__BasicTypes.html#gaff11abc056335394295ce2ffdc88daac">clingo_logger_t</a> *logger, void *logger_data, unsigned message_limit, <a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> **control)</td></tr>
<tr class="memdesc:ga46254f92ddf864a5214cf1572402e2bc"><td class="mdescLeft"> </td><td class="mdescRight">Create a new control object. <a href="#ga46254f92ddf864a5214cf1572402e2bc">More...</a><br /></td></tr>
<tr class="separator:ga46254f92ddf864a5214cf1572402e2bc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad1c4e8f6be76e1d3d8e34d71363dd067"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gad1c4e8f6be76e1d3d8e34d71363dd067">clingo_control_free</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control)</td></tr>
<tr class="memdesc:gad1c4e8f6be76e1d3d8e34d71363dd067"><td class="mdescLeft"> </td><td class="mdescRight">Free a control object created with <a class="el" href="group__Control.html#ga46254f92ddf864a5214cf1572402e2bc" title="Create a new control object. ">clingo_control_new()</a>. <a href="#gad1c4e8f6be76e1d3d8e34d71363dd067">More...</a><br /></td></tr>
<tr class="separator:gad1c4e8f6be76e1d3d8e34d71363dd067"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Grounding Functions</h2></td></tr>
<tr class="memitem:gabc5f948a61cd17e25c86f6037f1ae29e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gabc5f948a61cd17e25c86f6037f1ae29e">clingo_control_load</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, char const *file)</td></tr>
<tr class="memdesc:gabc5f948a61cd17e25c86f6037f1ae29e"><td class="mdescLeft"> </td><td class="mdescRight">Extend the logic program with a program in a file. <a href="#gabc5f948a61cd17e25c86f6037f1ae29e">More...</a><br /></td></tr>
<tr class="separator:gabc5f948a61cd17e25c86f6037f1ae29e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab65cc073ff9dbf71e53b71fb14bc9ec7"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gab65cc073ff9dbf71e53b71fb14bc9ec7">clingo_control_add</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, char const *name, char const *const *parameters, size_t parameters_size, char const *program)</td></tr>
<tr class="memdesc:gab65cc073ff9dbf71e53b71fb14bc9ec7"><td class="mdescLeft"> </td><td class="mdescRight">Extend the logic program with the given non-ground logic program in string form. <a href="#gab65cc073ff9dbf71e53b71fb14bc9ec7">More...</a><br /></td></tr>
<tr class="separator:gab65cc073ff9dbf71e53b71fb14bc9ec7"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gad0d95c5766649ff2f00e4ee3507a679f"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f">clingo_control_ground</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Control.html#ga3cf33a34a4f98a6e455fd7a8ea37b495">clingo_part_t</a> const *parts, size_t parts_size, <a class="el" href="group__Control.html#gaa6dc8ed22a316ff37bc88c4d7686467c">clingo_ground_callback_t</a> *ground_callback, void *ground_callback_data)</td></tr>
<tr class="memdesc:gad0d95c5766649ff2f00e4ee3507a679f"><td class="mdescLeft"> </td><td class="mdescRight">Ground the selected <a class="el" href="structclingo__part.html">parts </a> of the current (non-ground) logic program. <a href="#gad0d95c5766649ff2f00e4ee3507a679f">More...</a><br /></td></tr>
<tr class="separator:gad0d95c5766649ff2f00e4ee3507a679f"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Solving Functions</h2></td></tr>
<tr class="memitem:ga32ecc4f42257562dde343621597a596d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga32ecc4f42257562dde343621597a596d">clingo_control_solve</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Control.html#gad666e6b4fba4d652351592937ccdc287">clingo_model_callback_t</a> *model_callback, void *model_callback_data, <a class="el" href="group__Symbols.html#ga710f79cb0bc2da63015465aa7eabf265">clingo_symbolic_literal_t</a> const *assumptions, size_t assumptions_size, <a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a> *result)</td></tr>
<tr class="memdesc:ga32ecc4f42257562dde343621597a596d"><td class="mdescLeft"> </td><td class="mdescRight">Solve the currently <a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f">grounded </a> logic program. <a href="#ga32ecc4f42257562dde343621597a596d">More...</a><br /></td></tr>
<tr class="separator:ga32ecc4f42257562dde343621597a596d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab23442dc7576126b78422fc0554bf11d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gab23442dc7576126b78422fc0554bf11d">clingo_control_solve_iteratively</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Symbols.html#ga710f79cb0bc2da63015465aa7eabf265">clingo_symbolic_literal_t</a> const *assumptions, size_t assumptions_size, <a class="el" href="group__SolveIter.html#gaa3c0489d80175f3f2a51a2a8f7cb9d03">clingo_solve_iteratively_t</a> **handle)</td></tr>
<tr class="memdesc:gab23442dc7576126b78422fc0554bf11d"><td class="mdescLeft"> </td><td class="mdescRight">Solve the currently <a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f">grounded </a> logic program enumerating models iteratively. <a href="#gab23442dc7576126b78422fc0554bf11d">More...</a><br /></td></tr>
<tr class="separator:gab23442dc7576126b78422fc0554bf11d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaf105fbe7cc2557c55ab5aad9a401846e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaf105fbe7cc2557c55ab5aad9a401846e">clingo_control_solve_async</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Control.html#gad666e6b4fba4d652351592937ccdc287">clingo_model_callback_t</a> *model_callback, void *model_callback_data, <a class="el" href="group__Control.html#gaaffc6a39822645d3d869cd1b9aeb33e7">clingo_finish_callback_t</a> *finish_callback, void *finish_callback_data, <a class="el" href="group__Symbols.html#ga710f79cb0bc2da63015465aa7eabf265">clingo_symbolic_literal_t</a> const *assumptions, size_t assumptions_size, <a class="el" href="group__SolveAsync.html#ga9e82f5fc0f4925fdd2ab68a0563226f8">clingo_solve_async_t</a> **handle)</td></tr>
<tr class="memdesc:gaf105fbe7cc2557c55ab5aad9a401846e"><td class="mdescLeft"> </td><td class="mdescRight">Solve the currently <a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f">grounded </a> logic program asynchronously in the background. <a href="#gaf105fbe7cc2557c55ab5aad9a401846e">More...</a><br /></td></tr>
<tr class="separator:gaf105fbe7cc2557c55ab5aad9a401846e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga26e10ca86d2bedbcfa8fb2bc6a6f8006"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga26e10ca86d2bedbcfa8fb2bc6a6f8006">clingo_control_cleanup</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control)</td></tr>
<tr class="memdesc:ga26e10ca86d2bedbcfa8fb2bc6a6f8006"><td class="mdescLeft"> </td><td class="mdescRight">Clean up the domains of clingo's grounding component using the solving component's top level assignment. <a href="#ga26e10ca86d2bedbcfa8fb2bc6a6f8006">More...</a><br /></td></tr>
<tr class="separator:ga26e10ca86d2bedbcfa8fb2bc6a6f8006"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga6399db2e472e3b94c02654aabe17bf4e"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga6399db2e472e3b94c02654aabe17bf4e">clingo_control_assign_external</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> atom, <a class="el" href="group__BasicTypes.html#gaa0ab8583c1ef07fe6bc362277506b867">clingo_truth_value_t</a> value)</td></tr>
<tr class="memdesc:ga6399db2e472e3b94c02654aabe17bf4e"><td class="mdescLeft"> </td><td class="mdescRight">Assign a truth value to an external atom. <a href="#ga6399db2e472e3b94c02654aabe17bf4e">More...</a><br /></td></tr>
<tr class="separator:ga6399db2e472e3b94c02654aabe17bf4e"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gab16f8599e6b774f211339d852bb3fa60"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gab16f8599e6b774f211339d852bb3fa60">clingo_control_release_external</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> atom)</td></tr>
<tr class="memdesc:gab16f8599e6b774f211339d852bb3fa60"><td class="mdescLeft"> </td><td class="mdescRight">Release an external atom. <a href="#gab16f8599e6b774f211339d852bb3fa60">More...</a><br /></td></tr>
<tr class="separator:gab16f8599e6b774f211339d852bb3fa60"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga892f0ba05190ec3816eabc65710e14d1"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga892f0ba05190ec3816eabc65710e14d1">clingo_control_register_propagator</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Propagator.html#gabac80b6c8427075a53e25c7e6dab4c89">clingo_propagator_t</a> propagator, void *data, bool sequential)</td></tr>
<tr class="memdesc:ga892f0ba05190ec3816eabc65710e14d1"><td class="mdescLeft"> </td><td class="mdescRight">Register a custom propagator with the control object. <a href="#ga892f0ba05190ec3816eabc65710e14d1">More...</a><br /></td></tr>
<tr class="separator:ga892f0ba05190ec3816eabc65710e14d1"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga987efeea8e90b82cc4582612bca39d2d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga987efeea8e90b82cc4582612bca39d2d">clingo_control_statistics</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Statistics.html#gaaba3981b0eb26dcf3e1b2043245e2516">clingo_statistics_t</a> **statistics)</td></tr>
<tr class="memdesc:ga987efeea8e90b82cc4582612bca39d2d"><td class="mdescLeft"> </td><td class="mdescRight">Get a statistics object to inspect solver statistics. <a href="#ga987efeea8e90b82cc4582612bca39d2d">More...</a><br /></td></tr>
<tr class="separator:ga987efeea8e90b82cc4582612bca39d2d"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga51161772b6a928b1963bc6f98da9c92c"><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga51161772b6a928b1963bc6f98da9c92c">clingo_control_interrupt</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control)</td></tr>
<tr class="memdesc:ga51161772b6a928b1963bc6f98da9c92c"><td class="mdescLeft"> </td><td class="mdescRight">Interrupt the active solve call (or the following solve call right at the beginning). <a href="#ga51161772b6a928b1963bc6f98da9c92c">More...</a><br /></td></tr>
<tr class="separator:ga51161772b6a928b1963bc6f98da9c92c"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Configuration Functions</h2></td></tr>
<tr class="memitem:ga30f904f6f93e1f200aa6774efd018517"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga30f904f6f93e1f200aa6774efd018517">clingo_control_configuration</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__Configuration.html#gabf3ac9f48abde87a53cdba386f21bc2f">clingo_configuration_t</a> **configuration)</td></tr>
<tr class="memdesc:ga30f904f6f93e1f200aa6774efd018517"><td class="mdescLeft"> </td><td class="mdescRight">Get a configuration object to change the solver configuration. <a href="#ga30f904f6f93e1f200aa6774efd018517">More...</a><br /></td></tr>
<tr class="separator:ga30f904f6f93e1f200aa6774efd018517"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa597abe95a9c36527d9ecca975fa53dc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaa597abe95a9c36527d9ecca975fa53dc">clingo_control_use_enumeration_assumption</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, bool enable)</td></tr>
<tr class="memdesc:gaa597abe95a9c36527d9ecca975fa53dc"><td class="mdescLeft"> </td><td class="mdescRight">Configure how learnt constraints are handled during enumeration. <a href="#gaa597abe95a9c36527d9ecca975fa53dc">More...</a><br /></td></tr>
<tr class="separator:gaa597abe95a9c36527d9ecca975fa53dc"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Program Inspection Functions</h2></td></tr>
<tr class="memitem:ga49ee6ccde8b6206a4def2b95d1202dff"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga49ee6ccde8b6206a4def2b95d1202dff">clingo_control_get_const</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, char const *name, <a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> *symbol)</td></tr>
<tr class="memdesc:ga49ee6ccde8b6206a4def2b95d1202dff"><td class="mdescLeft"> </td><td class="mdescRight">Return the symbol for a constant definition of form: <code>#const name = symbol</code>. <a href="#ga49ee6ccde8b6206a4def2b95d1202dff">More...</a><br /></td></tr>
<tr class="separator:ga49ee6ccde8b6206a4def2b95d1202dff"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga15e9cb2f34df10d65b1ee7fbb2a6a264"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga15e9cb2f34df10d65b1ee7fbb2a6a264">clingo_control_has_const</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, char const *name, bool *exists)</td></tr>
<tr class="memdesc:ga15e9cb2f34df10d65b1ee7fbb2a6a264"><td class="mdescLeft"> </td><td class="mdescRight">Check if there is a constant definition for the given constant. <a href="#ga15e9cb2f34df10d65b1ee7fbb2a6a264">More...</a><br /></td></tr>
<tr class="separator:ga15e9cb2f34df10d65b1ee7fbb2a6a264"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gac1c7e54de01e03c4595446d6fe5632cc"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gac1c7e54de01e03c4595446d6fe5632cc">clingo_control_symbolic_atoms</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__SymbolicAtoms.html#ga48f4026c13a49553efce213e76ab32aa">clingo_symbolic_atoms_t</a> **atoms)</td></tr>
<tr class="memdesc:gac1c7e54de01e03c4595446d6fe5632cc"><td class="mdescLeft"> </td><td class="mdescRight">Get an object to inspect symbolic atoms (the relevant Herbrand base) used for grounding. <a href="#gac1c7e54de01e03c4595446d6fe5632cc">More...</a><br /></td></tr>
<tr class="separator:gac1c7e54de01e03c4595446d6fe5632cc"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:ga74bff4326102693d2701053d0d8ddd8d"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga74bff4326102693d2701053d0d8ddd8d">clingo_control_theory_atoms</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__TheoryAtoms.html#gab49a73a85ca5a2448e2c7ddcdb489eeb">clingo_theory_atoms_t</a> **atoms)</td></tr>
<tr class="memdesc:ga74bff4326102693d2701053d0d8ddd8d"><td class="mdescLeft"> </td><td class="mdescRight">Get an object to inspect theory atoms that occur in the grounding. <a href="#ga74bff4326102693d2701053d0d8ddd8d">More...</a><br /></td></tr>
<tr class="separator:ga74bff4326102693d2701053d0d8ddd8d"><td class="memSeparator" colspan="2"> </td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="member-group"></a>
Program Modification Functions</h2></td></tr>
<tr class="memitem:ga001eca3c6f6a0542cf04597d5e4ec58a"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#ga001eca3c6f6a0542cf04597d5e4ec58a">clingo_control_backend</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__ProgramBuilder.html#ga5e9458723e4631599ada46f8748ca577">clingo_backend_t</a> **backend)</td></tr>
<tr class="memdesc:ga001eca3c6f6a0542cf04597d5e4ec58a"><td class="mdescLeft"> </td><td class="mdescRight">Get an object to add ground directives to the program. <a href="#ga001eca3c6f6a0542cf04597d5e4ec58a">More...</a><br /></td></tr>
<tr class="separator:ga001eca3c6f6a0542cf04597d5e4ec58a"><td class="memSeparator" colspan="2"> </td></tr>
<tr class="memitem:gaa3df82717137933584acfbbc80219b97"><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="group__Control.html#gaa3df82717137933584acfbbc80219b97">clingo_control_program_builder</a> (<a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> *control, <a class="el" href="group__ProgramBuilder.html#gaf3ea2b021e93cdcc0f6c7b4219e4a06d">clingo_program_builder_t</a> **builder)</td></tr>
<tr class="memdesc:gaa3df82717137933584acfbbc80219b97"><td class="mdescLeft"> </td><td class="mdescRight">Get an object to add non-ground directives to the program. <a href="#gaa3df82717137933584acfbbc80219b97">More...</a><br /></td></tr>
<tr class="separator:gaa3df82717137933584acfbbc80219b97"><td class="memSeparator" colspan="2"> </td></tr>
</table>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="gaaffc6a39822645d3d869cd1b9aeb33e7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef bool clingo_finish_callback_t(<a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a> result, void *data)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Callback function called at the end of an asynchronous solve operation. </p>
<p>If a (non-recoverable) clingo API function fails in this callback, its error code shall be returned. In case of errors not related to clingo, this function can return <a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af0ac62d4f86f97849bc7fd25dbbfb676" title="errors unrelated to clingo ">clingo_error_unknown</a> to stop solving with an error.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">result</td><td>result of the solve call </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>user data of the callback </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#gaf105fbe7cc2557c55ab5aad9a401846e" title="Solve the currently grounded logic program asynchronously in the background. ">clingo_control_solve_async()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="solve-async_8c-example.html#a12">solve-async.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa6dc8ed22a316ff37bc88c4d7686467c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef bool clingo_ground_callback_t(<a class="el" href="group__BasicTypes.html#ga07e91950463516bb999ed021ca8f73c4">clingo_location_t</a> location, char const *name, <a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> const *arguments, size_t arguments_size, void *data, <a class="el" href="group__Control.html#ga4abe18b31ed3f61b1889700f63110ee4">clingo_symbol_callback_t</a> *symbol_callback, void *symbol_callback_data)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Callback function to implement external functions. </p>
<p>If an external function of form <code>@name(parameters)</code> occurs in a logic program, then this function is called with its location, name, parameters, and a callback to inject symbols as arguments. The callback can be called multiple times; all symbols passed are injected.</p>
<p>If a (non-recoverable) clingo API function fails in this callback, for example, the symbol callback, its error code shall be returned. In case of errors not related to clingo, this function can return <a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af0ac62d4f86f97849bc7fd25dbbfb676" title="errors unrelated to clingo ">clingo_error_unknown</a> to stop grounding with an error.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">location</td><td>location from which the external function was called </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>name of the called external function </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arguments</td><td>arguments of the called external function </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arguments_size</td><td>number of arguments </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>user data of the callback </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">symbol_callback</td><td>function to inject symbols </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">symbol_callback_data</td><td>user data for the symbol callback (must be passed untouched) </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful </dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f" title="Ground the selected parts of the current (non-ground) logic program. ">clingo_control_ground()</a></dd></dl>
<p>The following example implements the external function <code>@f()</code> returning 42. </p><div class="fragment"><div class="line"><span class="keywordtype">bool</span></div><div class="line">ground_callback(<a class="code" href="structclingo__location.html">clingo_location_t</a> location,</div><div class="line"> <span class="keywordtype">char</span> <span class="keyword">const</span> *name,</div><div class="line"> <a class="code" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> <span class="keyword">const</span> *arguments,</div><div class="line"> <span class="keywordtype">size_t</span> arguments_size,</div><div class="line"> <span class="keywordtype">void</span> *data,</div><div class="line"> <a class="code" href="group__Control.html#ga4abe18b31ed3f61b1889700f63110ee4">clingo_symbol_callback_t</a> *symbol_callback,</div><div class="line"> <span class="keywordtype">void</span> *symbol_callback_data) {</div><div class="line"> <span class="keywordflow">if</span> (strcmp(name, <span class="stringliteral">"f"</span>) == 0 && arguments_size == 0) {</div><div class="line"> <a class="code" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> sym;</div><div class="line"> <a class="code" href="group__Symbols.html#gae0043cb62260f0f47b520137a7225713">clingo_symbol_create_number</a>(42, &sym);</div><div class="line"> <span class="keywordflow">return</span> symbol_callback(&sym, 1, symbol_callback_data);</div><div class="line"> }</div><div class="line"> <a class="code" href="group__BasicTypes.html#ga861bc86ccee813d744920ac0de35ee11">clingo_set_error</a>(<a class="code" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221">clingo_error_runtime</a>, <span class="stringliteral">"function not found"</span>);</div><div class="line"> <span class="keywordflow">return</span> <span class="keyword">false</span>;</div><div class="line">}</div></div><!-- fragment -->
</div>
</div>
<a class="anchor" id="gad666e6b4fba4d652351592937ccdc287"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef bool clingo_model_callback_t(<a class="el" href="group__Model.html#gaaf9a93819f023f3cb8aa80598c46556b">clingo_model_t</a> *model, void *data, bool *goon)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Callback function to intercept models. </p>
<p>The model callback is invoked once for each model found by clingo (<a class="el" href="group__SolveAsync.html">asynchronously</a>).</p>
<p>If a (non-recoverable) clingo API function fails in this callback, its error code shall be returned. In case of errors not related to clingo, <a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af0ac62d4f86f97849bc7fd25dbbfb676" title="errors unrelated to clingo ">clingo_error_unknown</a>, this function can return <a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af0ac62d4f86f97849bc7fd25dbbfb676" title="errors unrelated to clingo ">clingo_error_unknown</a> to stop solving with an error.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">model</td><td>the current model </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">data</td><td>user data of the callback </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">goon</td><td>whether to continue search </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#ga32ecc4f42257562dde343621597a596d" title="Solve the currently grounded logic program. ">clingo_control_solve()</a> </dd>
<dd>
<a class="el" href="group__Control.html#gaf105fbe7cc2557c55ab5aad9a401846e" title="Solve the currently grounded logic program asynchronously in the background. ">clingo_control_solve_async()</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="model_8c-example.html#a20">model.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga3cf33a34a4f98a6e455fd7a8ea37b495"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef struct <a class="el" href="structclingo__part.html">clingo_part</a> <a class="el" href="group__Control.html#ga3cf33a34a4f98a6e455fd7a8ea37b495">clingo_part_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Struct used to specify the program parts that have to be grounded. </p>
<p>Programs may be structured into parts, which can be grounded independently with <a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f" title="Ground the selected parts of the current (non-ground) logic program. ">clingo_control_ground</a>. Program parts are mainly interesting for incremental grounding and multi-shot solving. For single-shot solving, program parts are not needed.</p>
<dl class="section note"><dt>Note</dt><dd>Parts of a logic program without an explicit <code>#program</code> specification are by default put into a program called <code>base</code> without arguments.</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f" title="Ground the selected parts of the current (non-ground) logic program. ">clingo_control_ground()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gae917a23b0591d181004ec88c4e3291c1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__Control.html#gae917a23b0591d181004ec88c4e3291c1">clingo_solve_result_bitset_t</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Corresponding type to <a class="el" href="group__Control.html#gacebb1a43c095d4a36294a5de7191b2e4" title="Enumeration of bit masks for solve call results. ">clingo_solve_result</a>. </p>
</div>
</div>
<a class="anchor" id="ga4abe18b31ed3f61b1889700f63110ee4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">typedef bool clingo_symbol_callback_t(<a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> const *symbols, size_t symbols_size, void *data)</td>
</tr>
</table>
</div><div class="memdoc">
<p>Callback function to inject symbols. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">symbols</td><td>array of symbols </td></tr>
<tr><td class="paramname">symbols_size</td><td>size of the symbol array </td></tr>
<tr><td class="paramname">data</td><td>user data of the callback </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a> </li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#gaa6dc8ed22a316ff37bc88c4d7686467c" title="Callback function to implement external functions. ">clingo_ground_callback_t</a> </dd></dl>
</div>
</div>
<h2 class="groupheader">Enumeration Type Documentation</h2>
<a class="anchor" id="gacebb1a43c095d4a36294a5de7191b2e4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">enum <a class="el" href="group__Control.html#gacebb1a43c095d4a36294a5de7191b2e4">clingo_solve_result</a></td>
</tr>
</table>
</div><div class="memdoc">
<p>Enumeration of bit masks for solve call results. </p>
<dl class="section note"><dt>Note</dt><dd>Neither <a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4ae71ed354490afbb3b9c6d6ea9d20910d" title="The last solve call found a solution. ">clingo_solve_result_satisfiable</a> nor <a class="el" href="group__Control.html#ggacebb1a43c095d4a36294a5de7191b2e4a9f6904e39554c1bb16e2339fd534eafd" title="The last solve call completely exhausted the search space. ">clingo_solve_result_exhausted</a> is set if the search is interrupted and no model was found. </dd></dl>
<table class="fieldtable">
<tr><th colspan="2">Enumerator</th></tr><tr><td class="fieldname"><a class="anchor" id="ggacebb1a43c095d4a36294a5de7191b2e4ae71ed354490afbb3b9c6d6ea9d20910d"></a>clingo_solve_result_satisfiable </td><td class="fielddoc">
<p>The last solve call found a solution. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggacebb1a43c095d4a36294a5de7191b2e4a313b2d51ea0b84abc2cd28e44d98be77"></a>clingo_solve_result_unsatisfiable </td><td class="fielddoc">
<p>The last solve call did not find a solution. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggacebb1a43c095d4a36294a5de7191b2e4a9f6904e39554c1bb16e2339fd534eafd"></a>clingo_solve_result_exhausted </td><td class="fielddoc">
<p>The last solve call completely exhausted the search space. </p>
</td></tr>
<tr><td class="fieldname"><a class="anchor" id="ggacebb1a43c095d4a36294a5de7191b2e4a9f32a002b3f8a88c6ca4e347e91af1eb"></a>clingo_solve_result_interrupted </td><td class="fielddoc">
<p>The last solve call was interrupted. </p>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#ga51161772b6a928b1963bc6f98da9c92c" title="Interrupt the active solve call (or the following solve call right at the beginning). ">clingo_control_interrupt()</a> </dd></dl>
</td></tr>
</table>
</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="gab65cc073ff9dbf71e53b71fb14bc9ec7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_add </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const *const * </td>
<td class="paramname"><em>parameters</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>parameters_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>program</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Extend the logic program with the given non-ground logic program in string form. </p>
<p>This function puts the given program into a block of form: <code>#program name(parameters).</code></p>
<p>After extending the logic program, the corresponding program parts are typically grounded with <a class="el" href="group__Control.html#gad0d95c5766649ff2f00e4ee3507a679f" title="Ground the selected parts of the current (non-ground) logic program. ">clingo_control_ground</a>.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>name of the program block </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">parameters</td><td>string array of parameters of the program block </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">parameters_size</td><td>number of parameters </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">program</td><td>string representation of the program </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if parsing fails </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="backend_8c-example.html#a9">backend.c</a>, <a class="el" href="configuration_8c-example.html#a14">configuration.c</a>, <a class="el" href="control_8c-example.html#a9">control.c</a>, <a class="el" href="model_8c-example.html#a17">model.c</a>, <a class="el" href="propagator_8c-example.html#a30">propagator.c</a>, <a class="el" href="solve-async_8c-example.html#a9">solve-async.c</a>, <a class="el" href="solve-iteratively_8c-example.html#a9">solve-iteratively.c</a>, <a class="el" href="statistics_8c-example.html#a24">statistics.c</a>, <a class="el" href="symbolic-atoms_8c-example.html#a6">symbolic-atoms.c</a>, and <a class="el" href="theory-atoms_8c-example.html#a9">theory-atoms.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga6399db2e472e3b94c02654aabe17bf4e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_assign_external </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> </td>
<td class="paramname"><em>atom</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__BasicTypes.html#gaa0ab8583c1ef07fe6bc362277506b867">clingo_truth_value_t</a> </td>
<td class="paramname"><em>value</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Assign a truth value to an external atom. </p>
<p>If the atom does not exist or is not external, this is a noop.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">atom</td><td>atom to assign </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">value</td><td>the truth value </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a> </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ast_8c-example.html#a48">ast.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga001eca3c6f6a0542cf04597d5e4ec58a"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_backend </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__ProgramBuilder.html#ga5e9458723e4631599ada46f8748ca577">clingo_backend_t</a> ** </td>
<td class="paramname"><em>backend</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get an object to add ground directives to the program. </p>
<p>See the <a class="el" href="group__ProgramBuilder.html">Program Building</a> module for more information.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">backend</td><td>the backend object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a> </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="backend_8c-example.html#a17">backend.c</a>, and <a class="el" href="theory-atoms_8c-example.html#a17">theory-atoms.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga26e10ca86d2bedbcfa8fb2bc6a6f8006"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_cleanup </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Clean up the domains of clingo's grounding component using the solving component's top level assignment. </p>
<p>This function removes atoms from domains that are false and marks atoms as facts that are true. With multi-shot solving, this can result in smaller groundings because less rules have to be instantiated and more simplifications can be applied.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a> </li>
</ul>
</dd></dl>
</div>
</div>
<a class="anchor" id="ga30f904f6f93e1f200aa6774efd018517"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_configuration </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Configuration.html#gabf3ac9f48abde87a53cdba386f21bc2f">clingo_configuration_t</a> ** </td>
<td class="paramname"><em>configuration</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get a configuration object to change the solver configuration. </p>
<p>See the <a class="el" href="group__Configuration.html">Solver Configuration</a> module for more information.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">configuration</td><td>the configuration object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="configuration_8c-example.html#a9">configuration.c</a>, and <a class="el" href="statistics_8c-example.html#a20">statistics.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gad1c4e8f6be76e1d3d8e34d71363dd067"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void clingo_control_free </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Free a control object created with <a class="el" href="group__Control.html#ga46254f92ddf864a5214cf1572402e2bc" title="Create a new control object. ">clingo_control_new()</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
</table>
</dd>
</dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ast_8c-example.html#a53">ast.c</a>, <a class="el" href="backend_8c-example.html#a24">backend.c</a>, <a class="el" href="configuration_8c-example.html#a19">configuration.c</a>, <a class="el" href="control_8c-example.html#a14">control.c</a>, <a class="el" href="model_8c-example.html#a23">model.c</a>, <a class="el" href="propagator_8c-example.html#a35">propagator.c</a>, <a class="el" href="solve-async_8c-example.html#a16">solve-async.c</a>, <a class="el" href="solve-iteratively_8c-example.html#a16">solve-iteratively.c</a>, <a class="el" href="statistics_8c-example.html#a31">statistics.c</a>, <a class="el" href="symbolic-atoms_8c-example.html#a18">symbolic-atoms.c</a>, and <a class="el" href="theory-atoms_8c-example.html#a22">theory-atoms.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga49ee6ccde8b6206a4def2b95d1202dff"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_get_const </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Symbols.html#ga6c75c60fa57c3b97505265ff08f6f951">clingo_symbol_t</a> * </td>
<td class="paramname"><em>symbol</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the symbol for a constant definition of form: <code>#const name = symbol</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>the name of the constant </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">symbol</td><td>the resulting symbol </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful </dd></dl>
</div>
</div>
<a class="anchor" id="gad0d95c5766649ff2f00e4ee3507a679f"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_ground </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Control.html#ga3cf33a34a4f98a6e455fd7a8ea37b495">clingo_part_t</a> const * </td>
<td class="paramname"><em>parts</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>parts_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Control.html#gaa6dc8ed22a316ff37bc88c4d7686467c">clingo_ground_callback_t</a> * </td>
<td class="paramname"><em>ground_callback</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>ground_callback_data</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Ground the selected <a class="el" href="structclingo__part.html">parts </a> of the current (non-ground) logic program. </p>
<p>After grounding, logic programs can be solved with <a class="el" href="group__Control.html#ga32ecc4f42257562dde343621597a596d" title="Solve the currently grounded logic program. ">clingo_control_solve</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Parts of a logic program without an explicit <code>#program</code> specification are by default put into a program called <code>base</code> without arguments.</dd></dl>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">parts</td><td>array of parts to ground </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">parts_size</td><td>size of the parts array </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ground_callback</td><td>callback to implement external functions </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">ground_callback_data</td><td>user data for ground_callback </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li>error code of ground callback</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="structclingo__part.html" title="Struct used to specify the program parts that have to be grounded. ">clingo_part</a> </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ast_8c-example.html#a46">ast.c</a>, <a class="el" href="backend_8c-example.html#a10">backend.c</a>, <a class="el" href="configuration_8c-example.html#a15">configuration.c</a>, <a class="el" href="control_8c-example.html#a10">control.c</a>, <a class="el" href="model_8c-example.html#a18">model.c</a>, <a class="el" href="propagator_8c-example.html#a31">propagator.c</a>, <a class="el" href="solve-async_8c-example.html#a10">solve-async.c</a>, <a class="el" href="solve-iteratively_8c-example.html#a10">solve-iteratively.c</a>, <a class="el" href="statistics_8c-example.html#a25">statistics.c</a>, <a class="el" href="symbolic-atoms_8c-example.html#a7">symbolic-atoms.c</a>, and <a class="el" href="theory-atoms_8c-example.html#a10">theory-atoms.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga15e9cb2f34df10d65b1ee7fbb2a6a264"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_has_const </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>name</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool * </td>
<td class="paramname"><em>exists</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Check if there is a constant definition for the given constant. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">name</td><td>the name of the constant </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">exists</td><td>whether a matching constant definition exists </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if constant definition does not exist</li>
</ul>
</dd></dl>
<dl class="section see"><dt>See also</dt><dd><a class="el" href="group__Control.html#ga49ee6ccde8b6206a4def2b95d1202dff" title="Return the symbol for a constant definition of form: #const name = symbol. ">clingo_control_get_const()</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga51161772b6a928b1963bc6f98da9c92c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void clingo_control_interrupt </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Interrupt the active solve call (or the following solve call right at the beginning). </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
</table>
</dd>
</dl>
</div>
</div>
<a class="anchor" id="gabc5f948a61cd17e25c86f6037f1ae29e"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_load </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">char const * </td>
<td class="paramname"><em>file</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Extend the logic program with a program in a file. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>path to the file </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if parsing or checking fails </li>
</ul>
</dd></dl>
</div>
</div>
<a class="anchor" id="ga46254f92ddf864a5214cf1572402e2bc"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_new </td>
<td>(</td>
<td class="paramtype">char const *const * </td>
<td class="paramname"><em>arguments</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">size_t </td>
<td class="paramname"><em>arguments_size</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__BasicTypes.html#gaff11abc056335394295ce2ffdc88daac">clingo_logger_t</a> * </td>
<td class="paramname"><em>logger</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">void * </td>
<td class="paramname"><em>logger_data</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned </td>
<td class="paramname"><em>message_limit</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> ** </td>
<td class="paramname"><em>control</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create a new control object. </p>
<p>A control object has to be freed using <a class="el" href="group__Control.html#gad1c4e8f6be76e1d3d8e34d71363dd067" title="Free a control object created with clingo_control_new(). ">clingo_control_free()</a>.</p>
<dl class="section note"><dt>Note</dt><dd>Only gringo options (without <code>--text</code>) and clasp's search options are supported as arguments. Furthermore, a control object is blocked while a search call is active; you must not call any member function during search.</dd></dl>
<p>If the logger is NULL, messages are printed to stderr.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">arguments</td><td>C string array of command line arguments </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">arguments_size</td><td>size of the arguments array </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">logger</td><td>callback functions for warnings and info messages </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">logger_data</td><td>user data for the logger callback </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">message_limit</td><td>maximum number of times the logger callback is called </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">control</td><td>resulting control object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful; might set one of the following error codes:<ul>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6aa14a0926eb3e653fcc13299b33d8d348" title="memory could not be allocated ">clingo_error_bad_alloc</a></li>
<li><a class="el" href="group__BasicTypes.html#gga5adba1f5e366e7489ac4a3fb5266dba6af43eebc9503fef8d1b2b85f99bb63221" title="wrong usage of the clingo API or invalid input ">clingo_error_runtime</a> if argument parsing fails </li>
</ul>
</dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ast_8c-example.html#a30">ast.c</a>, <a class="el" href="backend_8c-example.html#a8">backend.c</a>, <a class="el" href="configuration_8c-example.html#a8">configuration.c</a>, <a class="el" href="control_8c-example.html#a8">control.c</a>, <a class="el" href="model_8c-example.html#a16">model.c</a>, <a class="el" href="propagator_8c-example.html#a28">propagator.c</a>, <a class="el" href="solve-async_8c-example.html#a8">solve-async.c</a>, <a class="el" href="solve-iteratively_8c-example.html#a8">solve-iteratively.c</a>, <a class="el" href="statistics_8c-example.html#a19">statistics.c</a>, <a class="el" href="symbolic-atoms_8c-example.html#a5">symbolic-atoms.c</a>, and <a class="el" href="theory-atoms_8c-example.html#a8">theory-atoms.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="gaa3df82717137933584acfbbc80219b97"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">bool clingo_control_program_builder </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__Control.html#gaf008e9db9dbb37b0b7ef039bb9d582f0">clingo_control_t</a> * </td>
<td class="paramname"><em>control</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__ProgramBuilder.html#gaf3ea2b021e93cdcc0f6c7b4219e4a06d">clingo_program_builder_t</a> ** </td>
<td class="paramname"><em>builder</em> </td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get an object to add non-ground directives to the program. </p>
<p>See the <a class="el" href="group__ProgramBuilder.html">Program Building</a> module for more information.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">control</td><td>the target </td></tr>
<tr><td class="paramdir">[out]</td><td class="paramname">builder</td><td>the program builder object </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>whether the call was successful </dd></dl>
<dl><dt><b>Examples: </b></dt><dd><a class="el" href="ast_8c-example.html#a31">ast.c</a>.</dd>
</dl>
</div>
</div>
<a class="anchor" id="ga892f0ba05190ec3816eabc65710e14d1"></a>