revamp evaluable functors, add missing evaluable functors

This commit is contained in:
Mark Thom
2019-05-12 20:14:00 -04:00
parent f988b67403
commit f344150322
19 changed files with 1083 additions and 308 deletions

View File

@@ -3,7 +3,8 @@ use prolog_parser::parser::*;
use prolog::machine::*;
use prolog::machine::machine_indices::HeapCellValue;
use prolog::num::*;
use prolog::rug::Integer;
use prolog::rug::ops::Pow;
use std::cell::Cell;
use std::collections::VecDeque;
@@ -306,7 +307,7 @@ impl MachineState {
// names in the pre-expansion term. This formula ensures that all generated "numbervars"-
// style variable names will be longer than the keys of the var_dict, and therefore
// not equal to any of them.
printer.numbervars_offset = pow(BigInt::from(10), max_var_length) * 26;
printer.numbervars_offset = Integer::from(10).pow(max_var_length as u32) * 26;
printer.drop_toplevel_spec();
printer.see_all_locs();