update README.md
This commit is contained in:
19
README.md
19
README.md
@@ -7,6 +7,25 @@ programming, which is itself written in a high-level language.
|
|||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
# Rebis Development Branch
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
This is the Rebis Development Branch (rebis-dev). This iteration of
|
||||||
|
Rebis contains sweeping changes to the instruction dispatch loop
|
||||||
|
alongside a compacted heap representation. These changes are to
|
||||||
|
enhance the performance and robustness of Scryer Prolog and to prepare
|
||||||
|
for the introduction of a mark-compacting garbage collector.
|
||||||
|
|
||||||
|
Several performance enhancing changes are due before rebis-dev will be
|
||||||
|
considered ready for merging into master, among them:
|
||||||
|
|
||||||
|
* Replacing choice points pivoting on inlined deterministic predicates
|
||||||
|
(`atom`, `var`, etc) with if/else ladders
|
||||||
|
* Inlining all built-ins and system call instructions
|
||||||
|
* Greatly reducing the number of instructions used to compile disjunctives
|
||||||
|
* Storing short atoms to heap cells without writing them to the atom table
|
||||||
|
|
||||||
## Phase 1
|
## Phase 1
|
||||||
|
|
||||||
Produce an implementation of the Warren Abstract Machine in Rust, done
|
Produce an implementation of the Warren Abstract Machine in Rust, done
|
||||||
|
|||||||
BIN
logo/art_card.jpg
Normal file
BIN
logo/art_card.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 152 KiB |
@@ -499,13 +499,6 @@ impl MachineState {
|
|||||||
}
|
}
|
||||||
|
|
||||||
let mut singleton_var_set: IndexMap<Ref, bool> = IndexMap::new();
|
let mut singleton_var_set: IndexMap<Ref, bool> = IndexMap::new();
|
||||||
let mut var_list = vec![];
|
|
||||||
|
|
||||||
let list_of_var_eqs = push_var_eq_functors(
|
|
||||||
&mut self.heap,
|
|
||||||
term_write_result.var_dict.iter(),
|
|
||||||
&mut self.atom_tbl,
|
|
||||||
);
|
|
||||||
|
|
||||||
for addr in stackful_preorder_iter(&mut self.heap, term) {
|
for addr in stackful_preorder_iter(&mut self.heap, term) {
|
||||||
let addr = unmark_cell_bits!(addr);
|
let addr = unmark_cell_bits!(addr);
|
||||||
@@ -513,7 +506,6 @@ impl MachineState {
|
|||||||
if let Some(var) = addr.as_var() {
|
if let Some(var) = addr.as_var() {
|
||||||
if !singleton_var_set.contains_key(&var) {
|
if !singleton_var_set.contains_key(&var) {
|
||||||
singleton_var_set.insert(var, true);
|
singleton_var_set.insert(var, true);
|
||||||
var_list.push(addr);
|
|
||||||
} else {
|
} else {
|
||||||
singleton_var_set.insert(var, false);
|
singleton_var_set.insert(var, false);
|
||||||
}
|
}
|
||||||
@@ -532,6 +524,23 @@ impl MachineState {
|
|||||||
&mut self.atom_tbl,
|
&mut self.atom_tbl,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let mut var_list = Vec::with_capacity(singleton_var_set.len());
|
||||||
|
|
||||||
|
for (var_name, addr) in term_write_result.var_dict {
|
||||||
|
if let Some(var) = addr.as_var() {
|
||||||
|
let idx = singleton_var_set.get_index_of(&var).unwrap();
|
||||||
|
var_list.push((var_name, addr, idx));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var_list.sort_by(|(_,_,idx_1),(_,_,idx_2)| idx_1.cmp(idx_2));
|
||||||
|
|
||||||
|
let list_of_var_eqs = push_var_eq_functors(
|
||||||
|
&mut self.heap,
|
||||||
|
var_list.iter().map(|(var_name, var,_)| (var_name,var)),
|
||||||
|
&mut self.atom_tbl,
|
||||||
|
);
|
||||||
|
|
||||||
let singleton_addr = self.registers[3];
|
let singleton_addr = self.registers[3];
|
||||||
let singletons_offset = heap_loc_as_cell!(
|
let singletons_offset = heap_loc_as_cell!(
|
||||||
iter_to_heap_list(&mut self.heap, singleton_var_list.into_iter())
|
iter_to_heap_list(&mut self.heap, singleton_var_list.into_iter())
|
||||||
@@ -545,7 +554,7 @@ impl MachineState {
|
|||||||
|
|
||||||
let vars_addr = self.registers[4];
|
let vars_addr = self.registers[4];
|
||||||
let vars_offset = heap_loc_as_cell!(
|
let vars_offset = heap_loc_as_cell!(
|
||||||
iter_to_heap_list(&mut self.heap, var_list.into_iter())
|
iter_to_heap_list(&mut self.heap, var_list.into_iter().map(|(_,cell,_)| cell))
|
||||||
);
|
);
|
||||||
|
|
||||||
unify_fn!(*self, vars_offset, vars_addr);
|
unify_fn!(*self, vars_offset, vars_addr);
|
||||||
|
|||||||
Reference in New Issue
Block a user