clean up support for recursive calls, add support for (and protection of) built-in predicates.

This commit is contained in:
Mark Thom
2017-08-02 17:38:12 -06:00
parent 3aa8780086
commit 315c748c31
6 changed files with 131 additions and 110 deletions

View File

@@ -292,6 +292,10 @@ impl IndexedChoiceInstruction {
}
}
pub enum BuiltInInstruction {
InternalCallN
}
pub enum ControlInstruction {
Allocate(usize),
Call(Atom, usize, usize),
@@ -359,6 +363,7 @@ pub type CompiledFact = Vec<FactInstruction>;
pub type CompiledQuery = Vec<QueryInstruction>;
pub enum Line {
BuiltIn(BuiltInInstruction),
Choice(ChoiceInstruction),
Control(ControlInstruction),
Cut(CutInstruction),