Skip to content

Commit

Permalink
Merge branch 'next' into phklive-standardise-make-ci
Browse files Browse the repository at this point in the history
  • Loading branch information
phklive committed Jul 16, 2024
2 parents e8871f1 + d7955d3 commit 0d06803
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 21 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Changelog

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
check-changelog:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0

- name: Check if CHANGELOG.md is modified
run: |
# Get the list of changed files in the PR
changed_files=$(git diff --name-only origin/${{ github.event.pull_request.base.ref }}...${{ github.sha }})
# Check if CHANGELOG.md is in the list of changed files
if echo "$changed_files" | grep -q '^CHANGELOG.md$'; then
echo "CHANGELOG.md has been modified."
else
echo $'::warning file=CHANGELOG.md::CHANGELOG.md has not been modified.\n This warning can be ignored if is has been explicitely decided not to log changes.\n Except in this situation, make sure to add log changes.'
exit 1
fi
2 changes: 1 addition & 1 deletion processor/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub struct VmStateIterator {
}

impl VmStateIterator {
pub(super) fn new<H>(process: Process<H>, result: Result<StackOutputs, ExecutionError>) -> Self
pub fn new<H>(process: Process<H>, result: Result<StackOutputs, ExecutionError>) -> Self
where
H: Host,
{
Expand Down
44 changes: 25 additions & 19 deletions processor/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,17 @@ where
// PROCESS
// ================================================================================================

/// A [Process] is the underlying execution engine for a Miden [Program].
///
/// Typically, you do not need to worry about, or use [Process] directly, instead you should prefer
/// to use either [execute] or [execute_iter], which also handle setting up the process state,
/// inputs, as well as compute the [ExecutionTrace] for the program.
///
/// However, for situations in which you want finer-grained control over those steps, you will need
/// to construct an instance of [Process] using [Process::new], invoke [Process::execute], and then
/// get the execution trace using [ExecutionTrace::new] using the outputs produced by execution.
#[cfg(not(any(test, feature = "internals")))]
struct Process<H>
pub struct Process<H>
where
H: Host,
{
Expand All @@ -177,6 +186,21 @@ where
enable_tracing: bool,
}

#[cfg(any(test, feature = "internals"))]
pub struct Process<H>
where
H: Host,
{
pub system: System,
pub decoder: Decoder,
pub stack: Stack,
pub range: RangeChecker,
pub chiplets: Chiplets,
pub host: RefCell<H>,
pub max_cycles: u32,
pub enable_tracing: bool,
}

impl<H> Process<H>
where
H: Host,
Expand Down Expand Up @@ -645,21 +669,3 @@ impl<H: Host> ProcessState for Process<H> {
self.chiplets.get_mem_state_at(ctx, self.system.clk())
}
}

// INTERNALS
// ================================================================================================

#[cfg(any(test, feature = "internals"))]
pub struct Process<H>
where
H: Host,
{
pub system: System,
pub decoder: Decoder,
pub stack: Stack,
pub range: RangeChecker,
pub chiplets: Chiplets,
pub host: RefCell<H>,
pub max_cycles: u32,
pub enable_tracing: bool,
}
2 changes: 1 addition & 1 deletion processor/src/trace/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ impl ExecutionTrace {
// CONSTRUCTOR
// --------------------------------------------------------------------------------------------
/// Builds an execution trace for the provided process.
pub(super) fn new<H>(process: Process<H>, stack_outputs: StackOutputs) -> Self
pub fn new<H>(process: Process<H>, stack_outputs: StackOutputs) -> Self
where
H: Host,
{
Expand Down

0 comments on commit 0d06803

Please sign in to comment.