Skip to content

Commit

Permalink
remove vestigial prolog/ directory (#444)
Browse files Browse the repository at this point in the history
  • Loading branch information
mthom committed Jun 13, 2020
1 parent 5ffb459 commit 33325f1
Show file tree
Hide file tree
Showing 89 changed files with 344 additions and 315 deletions.
4 changes: 2 additions & 2 deletions build.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
extern crate indexmap;

use indexmap::IndexSet;
use crate::indexmap::IndexSet;

use std::env;
use std::fs::{File, copy, read_dir};
Expand All @@ -15,7 +15,7 @@ fn main()
let mut libraries = File::create(&dest_path).unwrap();
let mut library_index = IndexSet::new();

let paths = read_dir("./src/prolog/lib").unwrap();
let paths = read_dir("./src/lib").unwrap();

for item in paths {
let item = item.unwrap().path();
Expand Down
10 changes: 5 additions & 5 deletions src/prolog/allocator.rs → src/allocator.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::fixtures::*;
use crate::prolog::forms::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::targets::*;
use crate::fixtures::*;
use crate::forms::*;
use crate::machine::machine_indices::*;
use crate::targets::*;

use std::cell::Cell;
use std::rc::Rc;
Expand Down
24 changes: 12 additions & 12 deletions src/prolog/arithmetic.rs → src/arithmetic.rs
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::clause_types::*;
use crate::prolog::fixtures::*;
use crate::prolog::forms::*;
use crate::prolog::instructions::*;
use crate::prolog::iterators::*;
use crate::clause_types::*;
use crate::fixtures::*;
use crate::forms::*;
use crate::instructions::*;
use crate::iterators::*;

use crate::prolog::machine::heap::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::machine_indices::*;
use crate::machine::heap::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;

use crate::prolog::ordered_float::*;
use crate::prolog::rug::ops::PowAssign;
use crate::prolog::rug::{Assign, Integer, Rational};
use crate::ordered_float::*;
use crate::rug::ops::PowAssign;
use crate::rug::{Assign, Integer, Rational};

use std::cell::Cell;
use std::cmp::{max, min, Ordering};
Expand Down
10 changes: 5 additions & 5 deletions src/prolog/clause_types.rs → src/clause_types.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::forms::Number;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::rug::rand::RandState;
use crate::forms::Number;
use crate::machine::machine_indices::*;
use crate::rug::rand::RandState;

use ref_thread_local::RefThreadLocal;
use crate::ref_thread_local::RefThreadLocal;

use std::collections::BTreeMap;

Expand Down
28 changes: 14 additions & 14 deletions src/prolog/codegen.rs → src/codegen.rs
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
use prolog_parser::ast::*;

use crate::prolog::allocator::*;
use crate::prolog::arithmetic::*;
use crate::prolog::clause_types::*;
use crate::prolog::fixtures::*;
use crate::prolog::forms::*;
use crate::prolog::indexing::*;
use crate::prolog::instructions::*;
use crate::prolog::iterators::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::targets::*;

use indexmap::{IndexMap, IndexSet};
use crate::prolog_parser::ast::*;

use crate::allocator::*;
use crate::arithmetic::*;
use crate::clause_types::*;
use crate::fixtures::*;
use crate::forms::*;
use crate::indexing::*;
use crate::instructions::*;
use crate::iterators::*;
use crate::machine::machine_indices::*;
use crate::targets::*;

use crate::indexmap::{IndexMap, IndexSet};

use std::cell::Cell;
use std::rc::Rc;
Expand Down
14 changes: 7 additions & 7 deletions src/prolog/debray_allocator.rs → src/debray_allocator.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
use indexmap::IndexMap;
use crate::indexmap::IndexMap;

use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::allocator::*;
use crate::prolog::fixtures::*;
use crate::prolog::forms::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::targets::*;
use crate::allocator::*;
use crate::fixtures::*;
use crate::forms::*;
use crate::machine::machine_indices::*;
use crate::targets::*;

use std::cell::Cell;
use std::collections::BTreeSet;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
10 changes: 5 additions & 5 deletions src/prolog/fixtures.rs → src/fixtures.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::forms::*;
use crate::prolog::instructions::*;
use crate::prolog::iterators::*;
use crate::forms::*;
use crate::instructions::*;
use crate::iterators::*;

use indexmap::{IndexMap, IndexSet};
use crate::indexmap::{IndexMap, IndexSet};

use std::cell::Cell;
use std::collections::BTreeSet;
Expand Down
18 changes: 9 additions & 9 deletions src/prolog/forms.rs → src/forms.rs
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
use prolog_parser::ast::*;
use prolog_parser::parser::OpDesc;
use prolog_parser::tabled_rc::*;
use crate::prolog_parser::ast::*;
use crate::prolog_parser::parser::OpDesc;
use crate::prolog_parser::tabled_rc::*;

use crate::prolog::clause_types::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::ordered_float::OrderedFloat;
use crate::prolog::rug::{Integer, Rational};
use crate::clause_types::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;
use crate::ordered_float::OrderedFloat;
use crate::rug::{Integer, Rational};

use indexmap::IndexMap;
use crate::indexmap::IndexMap;

use std::cell::Cell;
use std::collections::VecDeque;
Expand Down
6 changes: 3 additions & 3 deletions src/prolog/heap_iter.rs → src/heap_iter.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::machine_state::*;
use crate::machine::machine_indices::*;
use crate::machine::machine_state::*;

use indexmap::IndexSet;
use crate::indexmap::IndexSet;

use std::cmp::Ordering;
use std::ops::Deref;
Expand Down
26 changes: 13 additions & 13 deletions src/prolog/heap_print.rs → src/heap_print.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
use prolog_parser::ast::*;

use crate::prolog::clause_types::*;
use crate::prolog::forms::*;
use crate::prolog::heap_iter::*;
use crate::prolog::machine::heap::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::machine_state::*;
use crate::prolog::machine::streams::*;
use crate::prolog::ordered_float::OrderedFloat;
use crate::prolog::rug::{Integer, Rational};

use indexmap::{IndexMap, IndexSet};
use crate::prolog_parser::ast::*;

use crate::clause_types::*;
use crate::forms::*;
use crate::heap_iter::*;
use crate::machine::heap::*;
use crate::machine::machine_indices::*;
use crate::machine::machine_state::*;
use crate::machine::streams::*;
use crate::ordered_float::OrderedFloat;
use crate::rug::{Integer, Rational};

use crate::indexmap::{IndexMap, IndexSet};

use std::cell::Cell;
use std::convert::TryFrom;
Expand Down
10 changes: 5 additions & 5 deletions src/prolog/indexing.rs → src/indexing.rs
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use prolog_parser::ast::*;
use prolog_parser::tabled_rc::*;
use crate::prolog_parser::ast::*;
use crate::prolog_parser::tabled_rc::*;

use crate::prolog::instructions::*;
use crate::prolog::rug::Integer;
use crate::instructions::*;
use crate::rug::Integer;

use indexmap::IndexMap;
use crate::indexmap::IndexMap;

use std::collections::VecDeque;
use std::convert::TryFrom;
Expand Down
16 changes: 8 additions & 8 deletions src/prolog/instructions.rs → src/instructions.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::clause_types::*;
use crate::prolog::forms::*;
use crate::prolog::machine::heap::*;
use crate::prolog::machine::machine_errors::MachineStub;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::rug::Integer;
use crate::clause_types::*;
use crate::forms::*;
use crate::machine::heap::*;
use crate::machine::machine_errors::MachineStub;
use crate::machine::machine_indices::*;
use crate::rug::Integer;

use indexmap::IndexMap;
use crate::indexmap::IndexMap;

use std::collections::VecDeque;
use std::rc::Rc;
Expand Down
8 changes: 4 additions & 4 deletions src/prolog/iterators.rs → src/iterators.rs
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::clause_types::*;
use crate::prolog::forms::*;
use crate::prolog::machine::machine_indices::*;
use crate::clause_types::*;
use crate::forms::*;
use crate::machine::machine_indices::*;

use std::cell::Cell;
use std::collections::VecDeque;
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ use crate::divrem::*;

use crate::prolog_parser::ast::*;

use crate::prolog::arithmetic::*;
use crate::prolog::clause_types::*;
use crate::prolog::forms::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::machine_state::*;
use crate::prolog::ordered_float::*;
use crate::prolog::rug::{Integer, Rational};
use crate::arithmetic::*;
use crate::clause_types::*;
use crate::forms::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;
use crate::machine::machine_state::*;
use crate::ordered_float::*;
use crate::rug::{Integer, Rational};

use std::cmp;
use std::convert::TryFrom;
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::prolog::heap_iter::*;
use crate::prolog::machine::*;
use crate::heap_iter::*;
use crate::machine::*;

use crate::indexmap::IndexSet;

Expand Down
20 changes: 10 additions & 10 deletions src/prolog/machine/code_repo.rs → src/machine/code_repo.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
use crate::prolog::clause_types::*;
use crate::prolog::codegen::*;
use crate::prolog::debray_allocator::*;
use crate::prolog::forms::*;
use crate::prolog::instructions::*;
use crate::prolog::machine::compile::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::machine_indices::*;

use indexmap::IndexSet;
use crate::clause_types::*;
use crate::codegen::*;
use crate::debray_allocator::*;
use crate::forms::*;
use crate::instructions::*;
use crate::machine::compile::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;

use crate::indexmap::IndexSet;

use std::collections::VecDeque;
use std::mem;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::prolog::instructions::*;
use crate::instructions::*;

use std::collections::VecDeque;

Expand Down
39 changes: 20 additions & 19 deletions src/prolog/machine/compile.rs → src/machine/compile.rs
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
use prolog_parser::ast::*;
use prolog_parser::parser::get_desc;
use prolog_parser::tabled_rc::TabledData;

use crate::prolog::codegen::*;
use crate::prolog::debray_allocator::*;
use crate::prolog::forms::*;
use crate::prolog::instructions::*;
use crate::prolog::iterators::*;
use crate::prolog::machine::code_walker::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::term_expansion::ExpansionAdditionResult;
use crate::prolog::machine::toplevel::*;
use crate::prolog::machine::*;

use indexmap::{IndexMap, IndexSet};

use ref_thread_local::RefThreadLocal;
use crate::prolog_parser::ast::*;
use crate::prolog_parser::parser::get_desc;
use crate::prolog_parser::tabled_rc::TabledData;

use crate::codegen::*;
use crate::debray_allocator::*;
use crate::forms::*;
use crate::instructions::*;
use crate::iterators::*;
use crate::machine::code_walker::*;
use crate::machine::machine_errors::*;
use crate::machine::machine_indices::*;
use crate::machine::term_expansion::ExpansionAdditionResult;
use crate::machine::toplevel::*;
use crate::machine::*;

use crate::indexmap::{IndexMap, IndexSet};

use crate::ref_thread_local::RefThreadLocal;

use std::cell::Cell;
use std::collections::VecDeque;
Expand Down Expand Up @@ -469,6 +469,7 @@ impl ClauseCodeGenerator {
vec![Box::new(head.clone()), Box::new(tail.clone())],
None,
);

PredicateClause::Fact(clause, 0, 0)
})
.collect(),
Expand Down
4 changes: 2 additions & 2 deletions src/prolog/machine/copier.rs → src/machine/copier.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::prolog::machine::machine_indices::*;
use crate::prolog::machine::stack::*;
use crate::machine::machine_indices::*;
use crate::machine::stack::*;

use std::mem;
use std::ops::IndexMut;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
use prolog_parser::ast::*;
use crate::prolog_parser::ast::*;

use crate::prolog::heap_print::*;
use crate::prolog::machine::*;
use crate::prolog::machine::compile::*;
use crate::prolog::machine::machine_errors::*;
use crate::prolog::machine::streams::*;
use crate::heap_print::*;
use crate::machine::*;
use crate::machine::compile::*;
use crate::machine::machine_errors::*;
use crate::machine::streams::*;

use std::convert::TryFrom;

Expand Down
Loading

0 comments on commit 33325f1

Please sign in to comment.