From 676107a48fbf002f8fcadc2ba97b77acf2c159ec Mon Sep 17 00:00:00 2001 From: MrTipson Date: Thu, 11 Jul 2024 00:05:50 +0200 Subject: [PATCH] Help popups: improve readability and explain new functionalities --- src/components/Controls.tsx | 19 ++++++++++++++++--- src/components/HeapView.tsx | 25 +++++++++++++++++-------- src/components/ProgramView.tsx | 32 +++++++++++++++++++------------- src/components/StackView.tsx | 16 ++++++++-------- 4 files changed, 60 insertions(+), 32 deletions(-) diff --git a/src/components/Controls.tsx b/src/components/Controls.tsx index 832b853..478502c 100644 --- a/src/components/Controls.tsx +++ b/src/components/Controls.tsx @@ -132,11 +132,24 @@ export default function Controls({ className, machine, step, setStep, breakpoint

The control panel contains controls for stepping the simulation.


-

It also displays the next rule which will be applied, both as a short - description, but also as a more formal operational semantics rule.

+ Timeline: +

As the execution progresses, the timeline grows. Use it to + jump back to previous steps. Markers can be added using the flag + icon, and allow you to jump to the marked step. +


+ Next rule: +

+ Displays the next rule which will be applied, both as a short + description, but also as a more formal operational semantics rule. +


+ Controls: +

+ Arrows step the simulation by one, while the continue goes forward for + step_limit steps and stops at breakpoints. +


- + ); } diff --git a/src/components/HeapView.tsx b/src/components/HeapView.tsx index f213b17..7b92d74 100644 --- a/src/components/HeapView.tsx +++ b/src/components/HeapView.tsx @@ -147,23 +147,32 @@ export default function HeapView({ className, machine, settings }: {

Heap view

-

Heap view displays all allocated objects on the heap.


-

If garbage collection is enabled, objects with no references are deleted.


-

Some objects may be additionally marked, such as:

-
    +

    Heap view displays all allocated objects on the heap.


    + Garbage collection: +

    If garbage collection is enabled, objects with no references are deleted.


    + + Marked objects: +

    Some objects may be additionally marked, such as:

    +
    • to-be updated object: - TEST + TEST
    • updated object: - TEST + TEST
    • newly allocated object: - TEST + TEST
    • -
    +

+ + Indrections: +

When thunks are updated, they are replaced by an indirection, + which points to the new value (i.e. big value model). For + better clarity, indirections are collapsed by default and replaced with a tag above the connection. +

diff --git a/src/components/ProgramView.tsx b/src/components/ProgramView.tsx index 1877a5d..76e7ba9 100644 --- a/src/components/ProgramView.tsx +++ b/src/components/ProgramView.tsx @@ -336,6 +336,25 @@ export default function ProgramView({ className, machine, setMachine, step, setS

Program view

+ +

Program view allows you to import examples, edit programs and change settings. + Basic syntax highlighting and error handling is also available.


+ + Runtime: +

During runtime, additional info is displayed in the program code:

+
    +
  • + values of bindings in the enviroment: + TEST +
  • +
  • current expression: 1 +# 2
  • +
  • expression result: 1 +# 2
  • +

+ + Breakpoints: +

When a program is loaded, + you can set breakpoints on the left side of the program code.

+
- -

Program view allows you to import examples, edit programs and change settings.


-

Basic syntax highlighting and error handling is also available.


-

During runtime, additional info is displayed in the program code:

-
    -
  • - values of bindings in the enviroment: - TEST -
  • -
  • current expression: 1 +# 2
  • -
  • expression result: 1 +# 2
  • -
-
diff --git a/src/components/StackView.tsx b/src/components/StackView.tsx index c926322..2aa01df 100644 --- a/src/components/StackView.tsx +++ b/src/components/StackView.tsx @@ -10,27 +10,27 @@ export default function StackView({ className, machine }: { className?: string,

Stack view

-

Stack view displays the current state of the stack.


-

+

Stack view displays the current state of the stack.


+

Most of the time it's populated with update frames ( Update - 0x5 + 0x5 ) and case continuations (Case continuation - + Saved locals: x 5 ), while arguments for the push-enter ( Argument - 0x10 + 0x10 ) and eval-apply ( Arguments - 3 - 2 - 0x10 + 3 + 2 + 0x10 ) also appear for short periods of time.