...
 
Commits (2)
...@@ -30,8 +30,8 @@ use strs::io; ...@@ -30,8 +30,8 @@ use strs::io;
use strs::factory::ATermFactory; use strs::factory::ATermFactory;
use strs::error::{Error, Result}; use strs::error::{Error, Result};
use strs::ctree; use strs::ctree;
use strs::preprocess::full_ctree as preprocess_ext; use strs::ir_v1::full_ctree as ir_v1_ext;
use strs::preprocess; use strs::ir_v1;
// TODO: Remove single variable matches when the variable isn't used afterwards // TODO: Remove single variable matches when the variable isn't used afterwards
...@@ -77,7 +77,7 @@ fn exec(program: &str, output: &str, debug: bool) -> Result<()> { ...@@ -77,7 +77,7 @@ fn exec(program: &str, output: &str, debug: bool) -> Result<()> {
let factory = ATermFactory::new(); let factory = ATermFactory::new();
let program = io::read_aterm(&factory, &program)?; let program = io::read_aterm(&factory, &program)?;
let program: ctree::Module = (&program).try_into()?; let program: ctree::Module = (&program).try_into()?;
let program: preprocess_ext::Module = program.try_into()?; let program: ir_v1_ext::Module = program.try_into()?;
let program = if !debug { let program = if !debug {
program.optimize(&mut ()) program.optimize(&mut ())
...@@ -177,7 +177,7 @@ impl<'s> Scope<'s> { ...@@ -177,7 +177,7 @@ impl<'s> Scope<'s> {
fn from_let_defs<'a, I>(no_of_scopes: usize, defs: I) -> Self fn from_let_defs<'a, I>(no_of_scopes: usize, defs: I) -> Self
where where
I: IntoIterator<Item = &'a preprocess::Def<'s>>, I: IntoIterator<Item = &'a ir_v1::Def<'s>>,
's: 'a, 's: 'a,
{ {
Scope { Scope {
...@@ -310,11 +310,11 @@ impl<'s> Scopes<'s> { ...@@ -310,11 +310,11 @@ impl<'s> Scopes<'s> {
} }
} }
impl<'s> CTreeOptimize for preprocess_ext::Module<'s> { impl<'s> CTreeOptimize for ir_v1_ext::Module<'s> {
type Context = (); type Context = ();
fn optimize(self, _: &mut Self::Context) -> Self { fn optimize(self, _: &mut Self::Context) -> Self {
use preprocess_ext::Module::*; use ir_v1_ext::Module::*;
// eprintln!("CTreeOptimize::optimize(Module, _)"); // eprintln!("CTreeOptimize::optimize(Module, _)");
...@@ -340,11 +340,11 @@ impl<'s> CTreeOptimize for preprocess_ext::Module<'s> { ...@@ -340,11 +340,11 @@ impl<'s> CTreeOptimize for preprocess_ext::Module<'s> {
} }
} }
impl<'s> CTreeOptimize for preprocess_ext::Decl<'s> { impl<'s> CTreeOptimize for ir_v1_ext::Decl<'s> {
type Context = (); type Context = ();
fn optimize(self, _: &mut Self::Context) -> Self { fn optimize(self, _: &mut Self::Context) -> Self {
use preprocess_ext::Decl::*; use ir_v1_ext::Decl::*;
// eprintln!("CTreeOptimize::optimize(Decl, _)"); // eprintln!("CTreeOptimize::optimize(Decl, _)");
...@@ -362,11 +362,11 @@ impl<'s> CTreeOptimize for preprocess_ext::Decl<'s> { ...@@ -362,11 +362,11 @@ impl<'s> CTreeOptimize for preprocess_ext::Decl<'s> {
} }
} }
impl<'s> CTreeOptimize for preprocess_ext::Def<'s> { impl<'s> CTreeOptimize for ir_v1_ext::Def<'s> {
type Context = (); type Context = ();
fn optimize(self, _: &mut Self::Context) -> Self { fn optimize(self, _: &mut Self::Context) -> Self {
use preprocess_ext::Def::*; use ir_v1_ext::Def::*;
// eprintln!("CTreeOptimize::optimize(Def, _)"); // eprintln!("CTreeOptimize::optimize(Def, _)");
...@@ -385,7 +385,7 @@ impl<'s> CTreeOptimize for preprocess_ext::Def<'s> { ...@@ -385,7 +385,7 @@ impl<'s> CTreeOptimize for preprocess_ext::Def<'s> {
} }
} }
impl<'s> CTreeOptimize for preprocess::Def<'s> { impl<'s> CTreeOptimize for ir_v1::Def<'s> {
type Context = (Option<InternedString<'s>>, Scopes<'s>); type Context = (Option<InternedString<'s>>, Scopes<'s>);
fn optimize(mut self, c: &mut Self::Context) -> Self { fn optimize(mut self, c: &mut Self::Context) -> Self {
...@@ -394,7 +394,7 @@ impl<'s> CTreeOptimize for preprocess::Def<'s> { ...@@ -394,7 +394,7 @@ impl<'s> CTreeOptimize for preprocess::Def<'s> {
let no_of_scopes = (c.1).0.len(); let no_of_scopes = (c.1).0.len();
// TODO: reevaluate this from_args call. // TODO: reevaluate this from_args call.
// It give an empty set of influenced variable to the sargs, which probably not correct at // It gives an empty set of influenced variable to the sargs, which probably not correct at
// this point. The closure given as sarg to this strategy could be made before this one, // this point. The closure given as sarg to this strategy could be made before this one,
// which would make it able to change variables that this Def would be able to observe. // which would make it able to change variables that this Def would be able to observe.
c.1.push_scope(Scope::from_args(no_of_scopes, self.sargs.iter().map(|&s| s), self.targs.iter().map(|&s| s))); c.1.push_scope(Scope::from_args(no_of_scopes, self.sargs.iter().map(|&s| s), self.targs.iter().map(|&s| s)));
...@@ -431,13 +431,13 @@ where ...@@ -431,13 +431,13 @@ where
} }
// Pay attention, this is where the optimizing starts // Pay attention, this is where the optimizing starts
impl<'s> CTreeOptimize for preprocess::Strategy<'s> { impl<'s> CTreeOptimize for ir_v1::Strategy<'s> {
type Context = (Option<InternedString<'s>>, Scopes<'s>); type Context = (Option<InternedString<'s>>, Scopes<'s>);
fn optimize(self, mut c: &mut Self::Context) -> Self { fn optimize(self, mut c: &mut Self::Context) -> Self {
use preprocess::Strategy; use ir_v1::Strategy;
use preprocess::MatchTerm; use ir_v1::MatchTerm;
use preprocess::BuildTerm; use ir_v1::BuildTerm;
match self { match self {
Strategy::Let(defs, body) => { Strategy::Let(defs, body) => {
...@@ -733,8 +733,8 @@ impl<'s> CTreeOptimize for preprocess::Strategy<'s> { ...@@ -733,8 +733,8 @@ impl<'s> CTreeOptimize for preprocess::Strategy<'s> {
} }
} }
fn all_vars_bound<'s>(bt: &preprocess::BuildTerm<'s>, m: &Scopes<'s>) -> bool { fn all_vars_bound<'s>(bt: &ir_v1::BuildTerm<'s>, m: &Scopes<'s>) -> bool {
use preprocess::BuildTerm::*; use ir_v1::BuildTerm::*;
let mut stack = vec![bt]; let mut stack = vec![bt];
let mut combined_value = Value::Bound; let mut combined_value = Value::Bound;
...@@ -767,11 +767,11 @@ fn all_vars_bound<'s>(bt: &preprocess::BuildTerm<'s>, m: &Scopes<'s>) -> bool { ...@@ -767,11 +767,11 @@ fn all_vars_bound<'s>(bt: &preprocess::BuildTerm<'s>, m: &Scopes<'s>) -> bool {
combined_value.le(&Value::Bound) combined_value.le(&Value::Bound)
} }
impl<'s> CTreeOptimize for preprocess::MatchTerm<'s> { impl<'s> CTreeOptimize for ir_v1::MatchTerm<'s> {
type Context = (Option<InternedString<'s>>, Scopes<'s>); type Context = (Option<InternedString<'s>>, Scopes<'s>);
fn optimize(self, mut c: &mut Self::Context) -> Self { fn optimize(self, mut c: &mut Self::Context) -> Self {
use preprocess::MatchTerm::*; use ir_v1::MatchTerm::*;
match self { match self {
Var(v) => { Var(v) => {
...@@ -805,11 +805,11 @@ impl<'s> CTreeOptimize for preprocess::MatchTerm<'s> { ...@@ -805,11 +805,11 @@ impl<'s> CTreeOptimize for preprocess::MatchTerm<'s> {
} }
} }
impl<'s> CTreeOptimize for preprocess::BuildTerm<'s> { impl<'s> CTreeOptimize for ir_v1::BuildTerm<'s> {
type Context = (Option<InternedString<'s>>, Scopes<'s>); type Context = (Option<InternedString<'s>>, Scopes<'s>);
fn optimize(self, mut c: &mut Self::Context) -> Self { fn optimize(self, mut c: &mut Self::Context) -> Self {
use preprocess::BuildTerm::*; use ir_v1::BuildTerm::*;
match self { match self {
Var(v) => { Var(v) => {
...@@ -839,9 +839,9 @@ impl<'s> CTreeOptimize for preprocess::BuildTerm<'s> { ...@@ -839,9 +839,9 @@ impl<'s> CTreeOptimize for preprocess::BuildTerm<'s> {
struct DynamicCall; struct DynamicCall;
fn match_vars_in_strategy<'s>( fn match_vars_in_strategy<'s>(
strat: &preprocess::Strategy<'s>, strat: &ir_v1::Strategy<'s>,
) -> ::std::result::Result<FnvHashSet<InternedString<'s>>, DynamicCall> { ) -> ::std::result::Result<FnvHashSet<InternedString<'s>>, DynamicCall> {
use preprocess::Strategy; use ir_v1::Strategy;
match *strat { match *strat {
Strategy::Let(_, ref body) => match_vars_in_strategy(body), Strategy::Let(_, ref body) => match_vars_in_strategy(body),
...@@ -896,8 +896,8 @@ fn match_vars_in_strategy<'s>( ...@@ -896,8 +896,8 @@ fn match_vars_in_strategy<'s>(
} }
} }
fn match_vars<'s>(term: &preprocess::MatchTerm<'s>) -> FnvHashSet<InternedString<'s>> { fn match_vars<'s>(term: &ir_v1::MatchTerm<'s>) -> FnvHashSet<InternedString<'s>> {
use preprocess::MatchTerm; use ir_v1::MatchTerm;
let mut result = FnvHashSet::default(); let mut result = FnvHashSet::default();
let mut stack = vec![term]; let mut stack = vec![term];
...@@ -946,7 +946,7 @@ mod test { ...@@ -946,7 +946,7 @@ mod test {
.expect("ATerm representation of CTree") .expect("ATerm representation of CTree")
.0; .0;
let program: ctree::Module = (&program).try_into().expect("Typed CTree"); let program: ctree::Module = (&program).try_into().expect("Typed CTree");
let program: preprocess_ext::Module = program.try_into().expect("Preprocessed CTree"); let program: ir_v1_ext::Module = program.try_into().expect("Preprocessed CTree");
let program = program.optimize(&mut ()); let program = program.optimize(&mut ());
......
use error::{Result, Error}; use error::{Result, Error};
use factory::{ATermFactory, ATerm, ATermRef}; use factory::{ATermFactory, ATerm, ATermRef};
use preprocess::{Def, StrategyDef}; use preprocess::ir_v1::{Def, StrategyDef};
use primitives::{Primitives, eval_prim_ref}; use primitives::{Primitives, eval_prim_ref};
use primitives::ssl::State; use primitives::ssl::State;
...@@ -28,7 +28,7 @@ pub struct MutContext<'d, 'f: 'd> { ...@@ -28,7 +28,7 @@ pub struct MutContext<'d, 'f: 'd> {
impl<'d, 'f: 'd> MutContext<'d, 'f> { impl<'d, 'f: 'd> MutContext<'d, 'f> {
pub fn new( pub fn new(
factory: &'f ATermFactory, factory: &'f ATermFactory,
strat_scopes: Vec<StrategyScope<'d, 'f>>, strat_scope: StrategyScope<'d, 'f>,
primitives: Vec<&'static Primitives>, primitives: Vec<&'static Primitives>,
) -> MutContext<'d, 'f> { ) -> MutContext<'d, 'f> {
MutContext { MutContext {
...@@ -37,7 +37,7 @@ impl<'d, 'f: 'd> MutContext<'d, 'f> { ...@@ -37,7 +37,7 @@ impl<'d, 'f: 'd> MutContext<'d, 'f> {
primitives: primitives, primitives: primitives,
term: RefCell::new(Vec::new()), term: RefCell::new(Vec::new()),
overlays: RefCell::new(Vec::new()), overlays: RefCell::new(Vec::new()),
strategy: RefCell::new(strat_scopes), strategy: RefCell::new(vec![strat_scope]),
ssl_state: RefCell::new(State::new()), ssl_state: RefCell::new(State::new()),
} }
} }
......
use context::MutContext; use context::MutContext;
use error::{Result, Error}; use error::{Result, Error};
use factory::{ATermFactory, ATermRef}; use factory::{ATermFactory, ATermRef};
use preprocess; use preprocess::ir_v1;
use preprocess::{StrategyDef, preprocess}; use preprocess::ir_v1::{StrategyDef, preprocess};
use primitives::Primitives; use primitives::Primitives;
use aterm::{ATerm as A, ATermFactory as ATF}; use aterm::{ATerm as A, ATermFactory as ATF};
...@@ -97,20 +97,18 @@ pub fn interpret<'f>( ...@@ -97,20 +97,18 @@ pub fn interpret<'f>(
Ok(v) => v, Ok(v) => v,
Err(e) => return Err(TracedError(e, String::new())), Err(e) => return Err(TracedError(e, String::new())),
}; };
let libs = match libraries let defs = match libraries
.libs .libs
.into_iter() .into_iter()
.map(|l| match_(&l).and_then(preprocess)) .map(|l| match_(&l).and_then(preprocess))
.chain(iter::once(Ok(program)))
.collect::<Result<Vec<_>>>() .collect::<Result<Vec<_>>>()
{ {
Ok(v) => v, Ok(v) => v,
Err(e) => return Err(TracedError(e, String::new())), Err(e) => return Err(TracedError(e, String::new())),
}; };
let base_scopes = libs.iter() let flat_defs: Vec<_> = defs.into_iter().flat_map(|v| v).collect();
.map(Scope::from_defs) let context = MutContext::new(factory, Scope::from_defs(&flat_defs), libraries.prims);
.chain(iter::once(Scope::from_defs(&program)))
.collect();
let context = MutContext::new(factory, base_scopes, libraries.prims);
let main = match context.get_strategy(strategy) { let main = match context.get_strategy(strategy) {
Ok(v) => v, Ok(v) => v,
Err(e) => { Err(e) => {
...@@ -134,9 +132,9 @@ pub trait Eval<'d, 'f> { ...@@ -134,9 +132,9 @@ pub trait Eval<'d, 'f> {
fn eval(&'d self, context: &MutContext<'d, 'f>, current: ATermRef<'f>) -> Result<ATermRef<'f>>; fn eval(&'d self, context: &MutContext<'d, 'f>, current: ATermRef<'f>) -> Result<ATermRef<'f>>;
} }
impl<'d, 'f: 'd> Eval<'d, 'f> for preprocess::Strategy<'f> { impl<'d, 'f: 'd> Eval<'d, 'f> for ir_v1::Strategy<'f> {
fn eval(&'d self, context: &MutContext<'d, 'f>, current: ATermRef<'f>) -> Result<ATermRef<'f>> { fn eval(&'d self, context: &MutContext<'d, 'f>, current: ATermRef<'f>) -> Result<ATermRef<'f>> {
use preprocess::Strategy::*; use preprocess::ir_v1::Strategy::*;
use context; use context;
match *self { match *self {
Let(ref defs, ref body) => { Let(ref defs, ref body) => {
...@@ -297,11 +295,11 @@ impl<'d, 'f: 'd> Eval<'d, 'f> for preprocess::Strategy<'f> { ...@@ -297,11 +295,11 @@ impl<'d, 'f: 'd> Eval<'d, 'f> for preprocess::Strategy<'f> {
fn eval_match<'d, 'f: 'd>( fn eval_match<'d, 'f: 'd>(
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
match_term: &'d preprocess::MatchTerm<'f>, match_term: &'d ir_v1::MatchTerm<'f>,
current: &ATermRef<'f>, current: &ATermRef<'f>,
) -> Result<()> { ) -> Result<()> {
use preprocess::MatchTerm::*; use preprocess::ir_v1::MatchTerm::*;
use preprocess::C; use preprocess::ir_v1::C;
match *match_term { match *match_term {
Var(s) => context.match_term(s, current), Var(s) => context.match_term(s, current),
...@@ -436,7 +434,7 @@ fn eval_match<'d, 'f: 'd>( ...@@ -436,7 +434,7 @@ fn eval_match<'d, 'f: 'd>(
} }
mod build_term { mod build_term {
use preprocess::BuildTerm; use preprocess::ir_v1::BuildTerm;
use context::MutContext; use context::MutContext;
use error::{Error, Result}; use error::{Error, Result};
use factory::ATermRef; use factory::ATermRef;
...@@ -456,8 +454,8 @@ mod build_term { ...@@ -456,8 +454,8 @@ mod build_term {
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
annos: Option<Vec<ATermRef<'f>>>, annos: Option<Vec<ATermRef<'f>>>,
) -> Result<ATermRef<'f>> { ) -> Result<ATermRef<'f>> {
use preprocess::BuildTerm::*; use preprocess::ir_v1::BuildTerm::*;
use preprocess::C; use preprocess::ir_v1::C;
match *term { match *term {
Var(s) => { Var(s) => {
...@@ -575,7 +573,7 @@ mod build_term { ...@@ -575,7 +573,7 @@ mod build_term {
} }
fn eval_<'d, 'f: 'd, F1, F2>( fn eval_<'d, 'f: 'd, F1, F2>(
strat: &'d preprocess::Strategy<'f>, strat: &'d ir_v1::Strategy<'f>,
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
current: ATermRef<'f>, current: ATermRef<'f>,
children_fun: F1, children_fun: F1,
...@@ -583,7 +581,7 @@ fn eval_<'d, 'f: 'd, F1, F2>( ...@@ -583,7 +581,7 @@ fn eval_<'d, 'f: 'd, F1, F2>(
) -> Result<ATermRef<'f>> ) -> Result<ATermRef<'f>>
where where
F1: Fn(&[ATermRef<'f>], F1: Fn(&[ATermRef<'f>],
&'d preprocess::Strategy<'f>, &'d ir_v1::Strategy<'f>,
&MutContext<'d, 'f>) &MutContext<'d, 'f>)
-> Result<Box<[ATermRef<'f>]>>, -> Result<Box<[ATermRef<'f>]>>,
F2: Fn(ATermRef<'f>) -> Result<ATermRef<'f>>, F2: Fn(ATermRef<'f>) -> Result<ATermRef<'f>>,
...@@ -625,7 +623,7 @@ where ...@@ -625,7 +623,7 @@ where
fn one_rec<'d, 'f: 'd>( fn one_rec<'d, 'f: 'd>(
r: &[ATermRef<'f>], r: &[ATermRef<'f>],
strat: &'d preprocess::Strategy<'f>, strat: &'d ir_v1::Strategy<'f>,
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
) -> Result<Box<[ATermRef<'f>]>> { ) -> Result<Box<[ATermRef<'f>]>> {
let mut result = Vec::with_capacity(r.len()); let mut result = Vec::with_capacity(r.len());
...@@ -650,7 +648,7 @@ fn one_rec<'d, 'f: 'd>( ...@@ -650,7 +648,7 @@ fn one_rec<'d, 'f: 'd>(
fn some_rec<'d, 'f: 'd>( fn some_rec<'d, 'f: 'd>(
r: &[ATermRef<'f>], r: &[ATermRef<'f>],
strat: &'d preprocess::Strategy<'f>, strat: &'d ir_v1::Strategy<'f>,
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
) -> Result<Box<[ATermRef<'f>]>> { ) -> Result<Box<[ATermRef<'f>]>> {
let mut result = Vec::with_capacity(r.len()); let mut result = Vec::with_capacity(r.len());
...@@ -672,7 +670,7 @@ fn some_rec<'d, 'f: 'd>( ...@@ -672,7 +670,7 @@ fn some_rec<'d, 'f: 'd>(
fn all_rec<'d, 'f: 'd>( fn all_rec<'d, 'f: 'd>(
r: &[ATermRef<'f>], r: &[ATermRef<'f>],
strat: &'d preprocess::Strategy<'f>, strat: &'d ir_v1::Strategy<'f>,
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
) -> Result<Box<[ATermRef<'f>]>> { ) -> Result<Box<[ATermRef<'f>]>> {
r.into_iter() r.into_iter()
...@@ -748,9 +746,9 @@ pub fn strategy_def_from_strategy<'d, 'f: 'd>( ...@@ -748,9 +746,9 @@ pub fn strategy_def_from_strategy<'d, 'f: 'd>(
context: &MutContext<'d, 'f>, context: &MutContext<'d, 'f>,
name: InternedString<'f>, name: InternedString<'f>,
number: usize, number: usize,
body: &'d preprocess::Strategy<'f>, body: &'d ir_v1::Strategy<'f>,
) -> Result<StrategyDef<'d, 'f>> { ) -> Result<StrategyDef<'d, 'f>> {
use preprocess::Strategy; use preprocess::ir_v1::Strategy;
let term_scope_offset = context.term.borrow().len(); let term_scope_offset = context.term.borrow().len();
let strat_scope_offset = context.strategy.borrow().len(); let strat_scope_offset = context.strategy.borrow().len();
// NOTE: this is not an optimisation but a necessary semantic distinction to allow // NOTE: this is not an optimisation but a necessary semantic distinction to allow
......
...@@ -10,7 +10,9 @@ pub mod io; ...@@ -10,7 +10,9 @@ pub mod io;
pub mod error; pub mod error;
pub mod factory; pub mod factory;
pub mod interpreter; pub mod interpreter;
pub mod ctree; mod preprocess;
mod context; mod context;
pub mod preprocess;
mod primitives; mod primitives;
pub use preprocess::ctree;
pub use preprocess::ir_v1;
pub use preprocess::ir_v2;
...@@ -25,11 +25,12 @@ mod io; ...@@ -25,11 +25,12 @@ mod io;
mod error; mod error;
mod factory; mod factory;
mod interpreter; mod interpreter;
mod ctree;
mod context;
mod preprocess; mod preprocess;
mod context;
mod primitives; mod primitives;
use preprocess::ctree;
#[derive(Debug, StructOpt)] #[derive(Debug, StructOpt)]
struct Opt { struct Opt {
// #[structopt(short = "d", long = "debug", help = "Activate debug mode")] // #[structopt(short = "d", long = "debug", help = "Activate debug mode")]
......
This diff is collapsed.
pub mod ctree;
pub mod ir_v1;
pub mod ir_v2;
\ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
use context::MutContext; use context::MutContext;
use error::Result; use error::Result;
use factory::ATermRef; use factory::ATermRef;
use preprocess::StrategyDef; use preprocess::ir_v1::StrategyDef;
use phf; use phf;
......
...@@ -2,7 +2,7 @@ macro_rules! primitive { ...@@ -2,7 +2,7 @@ macro_rules! primitive {
($name:ident, ($context:ident, $current:ident) => $body:block) => { ($name:ident, ($context:ident, $current:ident) => $body:block) => {
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
$context: &::context::MutContext<'d, 'f>, $context: &::context::MutContext<'d, 'f>,
_sargs: &[::preprocess::StrategyDef<'d, 'f>], _sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
_targs: &[::factory::ATermRef<'f>], _targs: &[::factory::ATermRef<'f>],
$current: ::factory::ATermRef<'f>, $current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
...@@ -12,7 +12,7 @@ macro_rules! primitive { ...@@ -12,7 +12,7 @@ macro_rules! primitive {
($name:ident, $targs_no:expr, ($context:ident, $targs:ident, $current:ident) => $body:block) => { ($name:ident, $targs_no:expr, ($context:ident, $targs:ident, $current:ident) => $body:block) => {
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
$context: &::context::MutContext<'d, 'f>, $context: &::context::MutContext<'d, 'f>,
_sargs: &[::preprocess::StrategyDef<'d, 'f>], _sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
$targs: &[::factory::ATermRef<'f>], $targs: &[::factory::ATermRef<'f>],
$current: ::factory::ATermRef<'f>, $current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
...@@ -25,7 +25,7 @@ macro_rules! primitive { ...@@ -25,7 +25,7 @@ macro_rules! primitive {
($name:ident, $sargs_no:expr, 0, ($context:ident, $sargs:ident, $current:ident) => $body:block) => { ($name:ident, $sargs_no:expr, 0, ($context:ident, $sargs:ident, $current:ident) => $body:block) => {
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
$context: &::context::MutContext<'d, 'f>, $context: &::context::MutContext<'d, 'f>,
$sargs: &[::preprocess::StrategyDef<'d, 'f>], $sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
_targs: &[::factory::ATermRef<'f>], _targs: &[::factory::ATermRef<'f>],
$current: ::factory::ATermRef<'f>, $current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
...@@ -38,7 +38,7 @@ macro_rules! primitive { ...@@ -38,7 +38,7 @@ macro_rules! primitive {
($name:ident, $sargs_no:expr, $targs_no:expr, ($context:ident, $sargs:ident, $targs:ident, $current:ident) => $body:block) => { ($name:ident, $sargs_no:expr, $targs_no:expr, ($context:ident, $sargs:ident, $targs:ident, $current:ident) => $body:block) => {
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
$context: &::context::MutContext<'d, 'f>, $context: &::context::MutContext<'d, 'f>,
$sargs: &[::preprocess::StrategyDef<'d, 'f>], $sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
$targs: &[::factory::ATermRef<'f>], $targs: &[::factory::ATermRef<'f>],
$current: ::factory::ATermRef<'f>, $current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
...@@ -55,7 +55,7 @@ macro_rules! primitive { ...@@ -55,7 +55,7 @@ macro_rules! primitive {
#[inline] #[inline]
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
context: &::context::MutContext<'d, 'f>, context: &::context::MutContext<'d, 'f>,
sargs: &[::preprocess::StrategyDef<'d, 'f>], sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
targs: &[::factory::ATermRef<'f>], targs: &[::factory::ATermRef<'f>],
current: ::factory::ATermRef<'f>, current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
...@@ -65,7 +65,7 @@ macro_rules! primitive { ...@@ -65,7 +65,7 @@ macro_rules! primitive {
($name:ident, ($context:ident, $sargs:ident, $targs:ident, $current:ident) => $body:block) => { ($name:ident, ($context:ident, $sargs:ident, $targs:ident, $current:ident) => $body:block) => {
pub fn $name<'d, 'f: 'd>( pub fn $name<'d, 'f: 'd>(
$context: &::context::MutContext<'d, 'f>, $context: &::context::MutContext<'d, 'f>,
$sargs: &[::preprocess::StrategyDef<'d, 'f>], $sargs: &[::preprocess::ir_v1::StrategyDef<'d, 'f>],
$targs: &[::factory::ATermRef<'f>], $targs: &[::factory::ATermRef<'f>],
$current: ::factory::ATermRef<'f>, $current: ::factory::ATermRef<'f>,
) -> ::error::Result<::factory::ATermRef<'f>> { ) -> ::error::Result<::factory::ATermRef<'f>> {
......