Skip to content
Permalink
Browse files

[compiler][AST] Remove the LocalDrop meta statement and the analysis …

…adding drop.
  • Loading branch information...
ptal committed Jan 5, 2019
1 parent d3650ab commit d94ddd06b4ce8f3e86cf469a31dbf22efff0fa27
@@ -7,7 +7,7 @@
-->

Spacetime programming is a programming language on top of Java to describe search strategies exploring combinatorial state-space such as in constraint satisfaction problems.
Please consult the [Spacetime manual](http://hyc.io/spacetime) for more information.
Please consult the [spacetime manual](http://hyc.io/spacetime) for more information.

## Build the manual

@@ -306,8 +306,6 @@ pub enum StmtKind {
QFUniverse(Box<Stmt>), // Queue-free universe
Universe(Variable, Box<Stmt>), // Queue-free universe
Nothing,
// Meta statement not appearing in the spacetime syntax.
LocalDrop(VarPath)
}

impl StmtKind {
@@ -62,7 +62,6 @@ fn lift_stmt(stmt: Stmt) -> Stmt {
ProcCall(target, name, args) => ProcCall(target, name, args),
ExprStmt(e) => ExprStmt(e),
Nothing => Nothing,
LocalDrop(path) => LocalDrop(path)
};
Stmt::new(stmt.span, node)
}

This file was deleted.

@@ -100,7 +100,6 @@ impl CausalStmt {
DelayStmt(_) => self.visit_delay(model, continuation),
Space(_)
| Prune
| LocalDrop(_)
| Nothing => continuation.call(self, model),
Seq(branches) => self.visit_seq(branches, model, continuation),
Let(stmt) => self.visit_let(stmt, model, continuation),
@@ -269,7 +269,6 @@ impl SymbolicExecution
QFUniverse(body) => self.next_states_qf_universe(*body),
Space(_)
| Prune
| LocalDrop(_)
| Nothing
| ExprStmt(_)
| Tell(_, _) => StatesSet::terminated_state(),
@@ -355,7 +354,6 @@ impl SymbolicExecution
QFUniverse(body) => self.reduce_qf_universe(*body, state),
Space(_)
| Prune
| LocalDrop(_)
| Nothing
| ExprStmt(_)
| Tell(_, _) => ResidualStmt::Terminated,
@@ -24,7 +24,6 @@ mod causality;
mod recursive_call;
mod search_tree_wf;
mod rewrite_reincarnation;
// mod add_local_drop;

use context::*;
use session::*;
@@ -40,7 +39,6 @@ use middle::causality::*;
use middle::recursive_call::*;
use middle::search_tree_wf::*;
use middle::rewrite_reincarnation::*;
// use middle::add_local_drop::*;

pub fn analyse_bonsai(env: Env<Context>) -> Env<Context> {
env
@@ -55,6 +53,5 @@ pub fn analyse_bonsai(env: Env<Context>) -> Env<Context> {
.and_then(recursive_call)
.and_next(instantaneous_analysis)
.and_next(search_tree_wf)
// .and_next(where_is_the_drop)
.and_next(causality_analysis)
}
@@ -112,8 +112,6 @@ pub trait Visitor<H>
self.visit_stmt(child)
}

fn visit_drop(&mut self, _var_path: VarPath) {}

fn visit_binding(&mut self, binding: Binding) {
walk_binding(self, binding)
}
@@ -203,7 +201,6 @@ pub fn walk_stmt<H, V: ?Sized>(visitor: &mut V, stmt: Stmt) where
QFUniverse(body) => visitor.visit_qf_universe(*body),
Universe(queue, body) => visitor.visit_universe(queue, *body),
Nothing => visitor.visit_nothing(),
LocalDrop(var_path) => visitor.visit_drop(var_path),
}
}

@@ -371,8 +368,6 @@ pub trait VisitorMut<H>
self.visit_stmt(child)
}

fn visit_drop(&mut self, _var_path: &mut VarPath) {}

fn visit_binding(&mut self, binding: &mut Binding) {
walk_binding_mut(self, binding);
}
@@ -462,7 +457,6 @@ pub fn walk_stmt_mut<H, V: ?Sized>(visitor: &mut V, stmt: &mut Stmt) where
&mut QFUniverse(ref mut body) => visitor.visit_qf_universe(&mut **body),
&mut Universe(ref mut queue, ref mut body) => visitor.visit_universe(queue, &mut **body),
&mut Nothing => visitor.visit_nothing(),
&mut LocalDrop(ref mut var_path) => visitor.visit_drop(var_path),
}
}

0 comments on commit d94ddd0

Please sign in to comment.
You can’t perform that action at this time.