luhsra / minimaxsimulator Goto Github PK
View Code? Open in Web Editor NEWPlatform independent GUI-based Minimax simulator
Home Page: https://luhsra.github.io/MinimaxSimulator/
License: MIT License
Platform independent GUI-based Minimax simulator
Home Page: https://luhsra.github.io/MinimaxSimulator/
License: MIT License
There is a bug with the special character used for value assignment when exporting the signal table.
Running the application using gtk3 in Linux works, but has strange effects on the menubar.
Starting with OpenJDK 11 GTK3 is enabled by default; the gtk2-startparameter mentioned in the readme does help with this, though I did not receive warnings or errors on the commandline.
Finally found it. This is the upstream bug.
Running the application in gtk2 does apparently work, as no gtk3-exclusive features were used in this project:
java -Djdk.gtk.version=2 -jar minimax_simulator-2.0.0-jar-with-dependencies.jar
But as this project requires JDK11, a hint for (Open?)JDK11 users might be worthwhile.
I currently have no way of reproducing this on other setups.
There are several mentions of https://srahub.github.io in the pages of this project,
which are all dead links as well.
Apparently the organization is now hosted as luhsra, which results in https://luhsra.github.io.
The references should get an update.
This is tied to #43, but is an own issue to be fixed, due to the chosen branch model.
❯ MacBook Pro (15 Zoll, 2019)
❯ OS: MacOs Monterey
❯ java -version
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
A single Test is failing, preventing the building of a jar file, here's the output
[ERROR] Tests run: 2, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.023 s <<< FAILURE! - in de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest
[ERROR] testGetStringDimension(de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest) Time elapsed: 0.002 s <<< FAILURE!
java.lang.AssertionError: dimension of "Test" expected:<[36,13]> but was:<[31,13]>
at de.uni_hannover.sra.minimax_simulator.model.machine.minimax.TextRenderShapeTest.testGetStringDimension(TextRenderShapeTest.java:62)
Steps to reproduce:
I guess pressing the stop button overwrites the new memory with the old one resulting into unwanted behavior
When importing data from a file to the machines memory, if one of the last three bytes of an integer begins with 1 in binary representation, the integer value will be wrong (0xFFFFB000 instead of 0x0000B000 for instance).
This does not happen in the benchmarks, as they don't have a single byte that starts with 1 in binary representation (as far as I'm aware), but it does render other files that I have constructed for the machine useless.
After renaming a register the simulation instance is not working correctly. Even though the correct value seems to be written to the register loading a value from the register returns zero.
I propose the following workaround until this is fixed:
What happens:
The Steuertabelle will gray-out and loses all of its contents. Adding new rows or trying to use any of the other
controls on the right is ineffective.
How it looks:
https://imgur.com/a/Z2GLbuj
How to reproduce:
I can not reproduce the Error easily. It usually happens when deleting rows from the Steuertabelle but not always.
I am on Linux cwm10 5.10.0-18-amd64 #1 SMP Debian 5.10.140-1 (2022-09-02) x86_64 GNU/Linux
Java version:
openjdk 17.0.4 2022-07-19
OpenJDK Runtime Environment (build 17.0.4+8-Debian-1deb11u1)
OpenJDK 64-Bit Server VM (build 17.0.4+8-Debian-1deb11u1, mixed mode, sharing)
terminal output:
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TableCell.tableColumnProperty()" because the return value of "javafx.scene.control.skin.TableCellSkin.getSkinnable()" is null
at javafx.scene.control.skin.TableCellSkin.tableColumnProperty(TableCellSkin.java:97)
at javafx.scene.control.skin.TableCellSkinBase.getTableColumn(TableCellSkinBase.java:123)
at javafx.scene.control.skin.TableCellSkinBase.dispose(TableCellSkinBase.java:136)
at javafx.scene.control.skin.TableCellSkin.dispose(TableCellSkin.java:88)
at javafx.scene.control.Control$2.invalidated(Control.java:267)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
at javafx.scene.control.Control$2.set(Control.java:250)
at javafx.scene.control.Control$2.set(Control.java:233)
at javafx.scene.control.Control.setSkin(Control.java:230)
at javafx.scene.control.skin.TableRowSkinBase.recreateCells(TableRowSkinBase.java:715)
at javafx.scene.control.skin.TableRowSkinBase.updateCells(TableRowSkinBase.java:505)
at javafx.scene.control.skin.TableRowSkinBase.checkState(TableRowSkinBase.java:649)
at javafx.scene.control.skin.TableRowSkinBase.computePrefHeight(TableRowSkinBase.java:588)
at javafx.scene.control.Control.computePrefHeight(Control.java:570)
at javafx.scene.Parent.prefHeight(Parent.java:1037)
at javafx.scene.layout.Region.prefHeight(Region.java:1559)
at javafx.scene.control.skin.VirtualFlow.resizeCellSize(VirtualFlow.java:1863)
at javafx.scene.control.skin.VirtualFlow.addLeadingCells(VirtualFlow.java:1948)
at javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1250)
at javafx.scene.Parent.layout(Parent.java:1204)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Scene.doLayoutPass(Scene.java:576)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2482)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:519)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:833)
Exception in thread "JavaFX Application Thread" java.lang.NullPointerException: Cannot invoke "javafx.scene.control.TableCell.tableColumnProperty()" because the return value of "javafx.scene.control.skin.TableCellSkin.getSkinnable()" is null
at javafx.scene.control.skin.TableCellSkin.tableColumnProperty(TableCellSkin.java:97)
at javafx.scene.control.skin.TableCellSkinBase.getTableColumn(TableCellSkinBase.java:123)
at javafx.scene.control.skin.TableCellSkinBase.dispose(TableCellSkinBase.java:136)
at javafx.scene.control.skin.TableCellSkin.dispose(TableCellSkin.java:88)
at javafx.scene.control.Control$2.invalidated(Control.java:267)
at javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:112)
at javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:147)
at javafx.css.StyleableObjectProperty.set(StyleableObjectProperty.java:82)
at javafx.scene.control.Control$2.set(Control.java:250)
at javafx.scene.control.Control$2.set(Control.java:233)
at javafx.scene.control.Control.setSkin(Control.java:230)
at javafx.scene.control.skin.TableRowSkinBase.recreateCells(TableRowSkinBase.java:715)
at javafx.scene.control.skin.TableRowSkinBase.updateCells(TableRowSkinBase.java:505)
at javafx.scene.control.skin.TableRowSkinBase.checkState(TableRowSkinBase.java:649)
at javafx.scene.control.skin.TableRowSkinBase.computePrefHeight(TableRowSkinBase.java:588)
at javafx.scene.control.Control.computePrefHeight(Control.java:570)
at javafx.scene.Parent.prefHeight(Parent.java:1037)
at javafx.scene.layout.Region.prefHeight(Region.java:1559)
at javafx.scene.control.skin.VirtualFlow.resizeCellSize(VirtualFlow.java:1863)
at javafx.scene.control.skin.VirtualFlow.addLeadingCells(VirtualFlow.java:1948)
at javafx.scene.control.skin.VirtualFlow.layoutChildren(VirtualFlow.java:1250)
at javafx.scene.control.skin.VirtualFlow$5.invalidated(VirtualFlow.java:837)
at javafx.beans.property.IntegerPropertyBase.markInvalid(IntegerPropertyBase.java:113)
at javafx.beans.property.IntegerPropertyBase.set(IntegerPropertyBase.java:148)
at javafx.scene.control.skin.VirtualFlow.setCellCount(VirtualFlow.java:855)
at javafx.scene.control.skin.TableViewSkinBase.updateItemCount(TableViewSkinBase.java:549)
at javafx.scene.control.skin.VirtualContainerBase.checkState(VirtualContainerBase.java:170)
at javafx.scene.control.skin.VirtualContainerBase.layoutChildren(VirtualContainerBase.java:145)
at javafx.scene.control.skin.TableViewSkinBase.layoutChildren(TableViewSkinBase.java:407)
at javafx.scene.control.Control.layoutChildren(Control.java:601)
at javafx.scene.Parent.layout(Parent.java:1204)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Parent.layout(Parent.java:1211)
at javafx.scene.Scene.doLayoutPass(Scene.java:576)
at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2482)
at com.sun.javafx.tk.Toolkit.lambda$runPulse$2(Toolkit.java:412)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:411)
at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:438)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:519)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:499)
at com.sun.javafx.tk.quantum.QuantumToolkit.pulseFromQueue(QuantumToolkit.java:492)
at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$11(QuantumToolkit.java:320)
at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
at com.sun.glass.ui.gtk.GtkApplication.lambda$runLoop$11(GtkApplication.java:277)
at java.base/java.lang.Thread.run(Thread.java:833)
... to make life easier.
The Simulator does not define a minimum version of maven, which might break the build process for you in the future.
Either just set it to a fixed version for now, where I'd recommend 3.3.9
due to your use of the plugin org.jacoco:jacoco-maven-plugin
, which could be updated to version 0.8.6
.
Currently you state maven 3.0.5
as prerequisite in the readme.
If you'd decide on which version you'd want you'd help a lot in getting rid of those Error messages during the build phase diagnostic targets in recent maven versions.
If one opens https://luhsra.github.io/MinimaxSimulator/ the head of the page contains two links, that are followed by some Unicode gibberish.
I'm not very familiar with Jekyll, but if checked out locally, the server greets with two warnings about missing css files.
If you
the "save" button will not activate
The requirements reference Java 8u40, which is not matching the actual requirement of Java 11 (Classfile v55 matching the most recent releases compiler).
Deleting or renaming a register may cause strange changes in the SignalTable. E.g. a different register is used for the operation.
The multiplexer connection of PC and ACCU are drawn on top of each other. Therefore the machine overview can not tell which register is connected to which multiplexer.
We are unable to reopen a project we were recently working on.
An error message appears when we attempt to open such a project:
"Die angegebene Datei ist beschädigt oder kein gültiges Projekt".
The MemoryTable update after a memory write access does not work the way it should. The value is updated. But the new value is not visible in the GUI.
I think it would be a huge improvement if one could control loading the project and memory chunks, running the project as well as exporting memory via commandline parameters.
This would greatly improve reliable testing as well as better documentation approaches and reproducibility.
Good starters would be:
Running the project would be an implicit step after loading and before exporting.
The MemoryChangeDialog seems to be opened several times. This bug first appears in v1.1.2.
@gerion0 or @wrenger Could you tell me who'd review/merge the PRs @prohde and I opened a little over 2.5 years ago?
I'd like to get rid of them in my pending PRs.
If PRs are not welcome or this repo is no longer in use, I'd suggest archiving it, which would resolve my problem as well.
Back then I found it inspiring of the SRA to maintain the software they used in their exercises.
After watching this since 2020 though, I'm not convinced it does itself a favor in doing so anymore.
Anyway. In case there's no further notice, I'll drop my Pull-Requests on the three year mark, which would be the fourteenth of December this year and gives you a headstart of another four months.
Thanks and have a nice week
Aiyion
If you save a project with an empty signaltable and then try to import it again you will be left with an error message.
The problem is that row
is a JSONObject when the exporter writes it to a file. Thus saving row
as row {}
and not as row []
.
The importer then assumes that row
is a JSONArray throwing an error message when row
is row {}
.
Due to the implementation it is not possible to create a constant using the full 32 bits (0xFFFFFFFF or 4294967295).
The maximum is instead limited to 0x7FFFFFFF or 2147483647 (Integer.MAX_VALUE).
Specifying a starting address when importing a binary file does not work.
The data ends up at address 0 regardless.
Currently the version of the maven-jar-plugin
is not set properly, due to the fact that it's only defined in order to not use it at all.
As the project currently relies on maven 3.0.5 it's safe to require version 3.2.0
of the plugin, as it's supported.
This should be future-proof for another few years.
When the simulation writres to the memory at the relative row (ROW mod 16) it will show the new value although its not the right address. For example: Writing a 0 to address 32 would show you a 0 at address 16 if your current view is 0 - 16. If you update the table by scrolling down and back up again it will be gone.
Is this intentional ?
There are several mentions of https://srahub.github.io in this project, which are all dead links.
Apparently the organization is now hosted as luhsra, which results in https://luhsra.github.io.
The references should get an update.
Changing the signaltable while having an active simulation will make the debug mode unusable unless you press the reset button. (Maybe cache the "old" simulation or terminate the "old" simulation when you update the signaltable?)
I would like to implement an iFetch instruction, but I cannot seem to find an option to execute the instruction stored in IR
.
Is it possible to add / unlock that functionality?
When trying to write 4 bytes in MAR (which is limited to 3 bytes) instead of truncating the simulator extends MAR to 4 bytes (seen in debug mode). Using MAR in another operation afterward results in an overflow exception.
For example:
MAR <- 0xff000000;
MDR <- 8;
M[MAR] <- MDR;
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.