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
//! Tools for creating FRAT proofs by using dispatches.
//!
//! Full specification of the FRAT format is documented in:
//! - *A Flexible Proof Format for SAT Solver-Elaborator Communication* (2022) Baek, Carneiro, and Heule.
//! - [10.46298/lmcs-18(2:3)2022](https://doi.org/10.46298/lmcs-18(2:3)2022) ([arXiv](https://arxiv.org/abs/2109.09665v3) | [LMCS](https://lmcs.episciences.org/9357))
//!
//! Steps:
//! - Original
//! - Addition
//! - Deletion
//! - Finalisation
//!
//! <div class="warning">
//!
//! - Transcription is sensitive to the order in which dispatches are received.
//!
//! - Further, transcription is not supported for solves which make use of subsumption.
//! + More generally, unless noted it is safe to assume transcription is not supported for any solve which makes use of clause derivation/mutation techniques other than resolution.
//! </div>
//!
//! # Use
//! Use by creating a listener for dispatches from a context and passing each dispatch to the transcriber.
//!
//! # Notes
//!
//! For the moment the transcriber automatically syncronises resolution information with new clauses by…
//! - Storing a clause after resolution has completed and before any other instance of resolution begins
//! Specifically, the channel is FIFO and resolution information is stored in a FIFO queue.
//! So, the contents of some buffered resolution information can always be associated with the relevant stored clause.
//!
//! # Complications
//!
//! A few decisions make this a little more delicate than it otherwise could be
//!
//! - On-the-fly self-subsumption
//! + For formulas, specifically, means it's important to record an origial formula before subsumption is applied.
//! Rather than do anything complex this is addressed by writing the original formula at the start of a proof.
//!
//! - Atom renaming
//! + … when mixed with 0 as a delimiter in the format requires (i think) translating a clause back to it's DIMACS representation
//! - The context stores a translation, but to avoid interacting (and introducing mutexes) the transcriber listens for atoms being //! added to the context and keeps an internal map of their external string
//!
//! - Multiple clause databases
//! + Requires disambiguating indicies.
//! As there are no explicit limits on indicies in the FRAT document, simple ASCII prefixes are used.
use ;
use crate::;
/// An intermediate struct to support transforming dispatches from a context to steps in an FRAT proof.