Skip to content

Commit

Permalink
[Cider 2.0] Partial checkpoint (#1868)
Browse files Browse the repository at this point in the history
* add some more doc strings

* mod changes

* typo

* partial checkpoint

* words and stuff

* sketch out the next_node search

* delete

* integrate partial use of the next_node fn

* partial checkpoint

* correct macro after changing names

* change the primitive trait

* it kinda simulates now

* use bitor

* Some basics

* everything is extremely broken and I need to make new error types

* we're compiling again
  • Loading branch information
EclecticGriffin authored Jan 24, 2024
1 parent b38ee54 commit 8ace995
Show file tree
Hide file tree
Showing 17 changed files with 1,613 additions and 1,119 deletions.
23 changes: 22 additions & 1 deletion interp/src/errors.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
use crate::utils::assignment_to_string;
use crate::values::Value;
use crate::{
flatten::flat_ir::prelude::AssignedValue, utils::assignment_to_string,
};
use calyx_ir::{self as ir, Assignment, Id};
use calyx_utils::Error as CalyxError;
use rustyline::error::ReadlineError;
Expand Down Expand Up @@ -99,6 +101,17 @@ pub enum InterpreterError {
a2: String,
},

#[error(
"conflicting assigns
1. {a1}
2. {a2}
"
)]
FlatConflictingAssignments {
a1: AssignedValue,
a2: AssignedValue,
},

#[error("unable to find component named \"{0}\"")]
UnknownComponent(String),

Expand Down Expand Up @@ -155,6 +168,14 @@ pub enum InterpreterError {

#[error(transparent)]
IOError(#[from] std::io::Error),

//TODO Griffin: Make this more descriptive
#[error("Attempted to write an undefined value to register or memory")]
UndefinedWrite,

//TODO Griffin: Make this more descriptive
#[error("Attempted to write an undefined memory address")]
UndefinedWriteAddr,
}

impl InterpreterError {
Expand Down
Loading

0 comments on commit 8ace995

Please sign in to comment.