let add i =
let a = id_to_atom i in
Trace.call "rule" "Add" a Atom.pp;
let result = match Context.add (top()) a with
| Context.Status.Valid ->
(let (s, al) = Stack.pop stack in
push (s, a :: al);
1)
| Context.Status.Inconsistent -> 0
| Context.Status.Ok(s) ->
(let (_, al) = Stack.pop stack in
push (s, a :: al);
1)
in
Trace.call "rule" "Add" result Pretty.number;
result