]> Repositorios git - scryer-prolog.git/commitdiff
add tests, remove extraneous instructions.
authorMark Thom <[email protected]>
Thu, 3 Aug 2017 17:28:15 +0000 (11:28 -0600)
committerMark Thom <[email protected]>
Thu, 3 Aug 2017 17:28:15 +0000 (11:28 -0600)
src/main.rs
src/prolog/machine.rs

index a4df500cca99b480b2b6c6565635d585143450c8..e11b6fb7dd0cc09b38a3bcb1b770aa254972ce56 100644 (file)
@@ -655,6 +655,7 @@ mod tests {
         assert_eq!(submit(&mut wam, "?- call(call(p), X, Y), call(call(call(p)), X, Y)."), true);
         assert_eq!(submit(&mut wam, "?- call(call(p), X, Y), call(call(call(p(X))), Y)."), true);
         assert_eq!(submit(&mut wam, "?- call(call(p), X, Y), call(call(call(p(X))), X, Y)."), false);
+        assert_eq!(submit(&mut wam, "?- call(call(p), X, Y), call(call(call(p(X))), X)."), true);
         
         submit(&mut wam, "f(call(f, undefined)). f(undefined).");
         submit(&mut wam, "call_var(P) :- P.");
index f0ea0c5b4fb450897a89eea7ea3ec7ecf93b92dd..2f42b6317045331bafd8e062b330d8b84f77e446 100644 (file)
@@ -97,8 +97,7 @@ impl Index<CodePtr> for Machine {
 impl Machine {
     pub fn new() -> Self {
         let mut code_dir = HashMap::new();
-        let code = vec![Line::BuiltIn(BuiltInInstruction::InternalCallN),
-                        Line::Control(ControlInstruction::Proceed)];                        
+        let code = vec![Line::BuiltIn(BuiltInInstruction::InternalCallN)];                        
 
         // there are 64 registers in the VM, so call/N is defined for all 0 <= N <= 63
         // (an extra register is needed for the predicate name)