clingo 0.8.0

Rust idiomatic bindings to the clingo library
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
use clingo::*;

fn main() {
    let loc = ast::Location::default();
    let sym = Symbol::create_id("test", true).unwrap();
    let term1: ast::Term = ast::symbolic_term(&loc, &sym).unwrap().into();
    let atom1 = ast::symbolic_atom(term1).unwrap();
    let body = [];
    let ext = ast::external(&loc, atom1, &body, ExternalType::Free).unwrap();
    let stmt : ast::Statement = ext.into();

    drop(ext);
    let _end = stmt;
}