ask-dracula-rs/src/project.rs

43 lines
645 B
Rust
Raw Normal View History

2019-11-07 05:42:42 +01:00
#[derive(Clone, Copy, Eq, Hash, PartialEq)]
pub enum ProofDirection
{
Forward,
Backward,
}
2019-11-07 04:20:06 +01:00
#[derive(Eq, Hash, PartialEq)]
pub enum CompletionTarget
{
Predicate(foliage::PredicateDeclaration),
Constraint,
}
#[derive(Eq, Hash, PartialEq)]
2019-11-07 08:12:26 +01:00
pub enum FormulaStatementKind
2019-11-02 02:13:45 +01:00
{
Axiom,
2019-11-07 04:20:06 +01:00
Completion(CompletionTarget),
2019-11-07 05:42:42 +01:00
Lemma(Option<ProofDirection>),
Assumption,
Assertion,
2019-11-02 02:13:45 +01:00
}
2019-11-07 08:12:26 +01:00
pub struct FormulaStatement
2019-11-02 02:13:45 +01:00
{
2019-11-07 08:12:26 +01:00
pub kind: FormulaStatementKind,
pub original_text: String,
pub formula: foliage::Formula,
pub proven: bool,
}
pub enum Block
{
2019-11-07 08:12:26 +01:00
FormulaStatement(FormulaStatement),
Whitespace(String),
}
pub struct Project
{
pub blocks: Vec<Block>,
2019-11-02 02:13:45 +01:00
}