2020-01-25 12:55:23 +01:00
|
|
|
pub struct ScopedFormula
|
2020-01-24 13:32:43 +01:00
|
|
|
{
|
2020-01-25 12:55:23 +01:00
|
|
|
free_variable_declarations: foliage::VariableDeclarations,
|
|
|
|
formula: foliage::Formula,
|
2020-01-24 13:32:43 +01:00
|
|
|
}
|
|
|
|
|
2020-01-25 12:55:23 +01:00
|
|
|
pub struct Context
|
2020-01-24 13:32:43 +01:00
|
|
|
{
|
2020-01-25 12:55:23 +01:00
|
|
|
scoped_formulas: Vec<ScopedFormula>,
|
|
|
|
}
|
|
|
|
|
|
|
|
impl Context
|
|
|
|
{
|
|
|
|
pub fn new() -> Self
|
|
|
|
{
|
|
|
|
Self
|
|
|
|
{
|
|
|
|
scoped_formulas: vec![],
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
pub fn translate_body ...
|
|
|
|
|
|
|
|
pub fn read(rule: &clingo::ast::Rule, context: &mut Context)
|
|
|
|
{
|
|
|
|
let mut variable_declaration_stack: foliage::VariableDeclarationStack;
|
|
|
|
|
|
|
|
println!("{:?}", rule.head());
|
|
|
|
println!("{:?}", rule.body());
|
2020-01-24 13:32:43 +01:00
|
|
|
}
|