
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
mlog-arithmetic-runner
Advanced tools
An Mindustry Logic emulator built for automated testing of compilers.
A Mindustry Logic emulator built for automated testing of compilers (like MlogEvo).
pip install https://github.com/UMRnInside/MlogArithmeticRunner
or
pip install mlog_arithmetic_runner
$ python3 -m mlog_arithmetic_runner --help
usage: mlog_arithmetic_runner [-h] [--limit LIMIT] [--continue-if-past-the-end] [--ipt IPT]
[--memory-banks MEMORY_BANKS] [--memory-cells MEMORY_CELLS]
[--json-indent JSON_INDENT] [--json-dump-memory-blocks]
Reads some mlog code from stdin, runs it, and generates JSON report
optional arguments:
-h, --help show this help message and exit
--limit LIMIT Max instructions/cycles allowed, something like TimeLimit
--continue-if-past-the-end
--ipt IPT Instructions per tick. 2 for micro-processor, 8 for logic-processor,
25 for hyper-processor
--memory-banks MEMORY_BANKS
Memory bank count
--memory-cells MEMORY_CELLS
Memory cell count
--json-indent JSON_INDENT
JSON indent, set 0 to disable
--json-dump-memory-blocks
dump all memory content in JSON report
set
jump
end
op
s since Mindustry V7 Beta (beta 140), except op noise
read
and write
memory cells and banksgetlink
to get memory blocks (cells/banks)set @counter
or op @counter
as unconditional jumps@tick
and @time
increases with processor runs@counter
past the end@this
yet, so do @thisx
and @thisy
from mlog_arithmetic_runner import MlogProcessor
processor = MlogProcessor(ipt=2, memory_cells=0, memory_banks=0)
code = """\
set a 90
op sin b a 0
"""
processor.assemble_code(code)
processor.run_with_limit(1000)
# When comparing 2 float-point numbers, remember there could be float precision errors.
# Use abs(a-b) < 1e-6 instead of a == b
print("a =", processor.get_variable("a"))
print("b =", processor.get_variable("b"))
set a 1
set a 2
set b @tick
set c @time
This generates:
{
"cycles": 4,
"success": true,
"reason": "",
"variables": {
"a": 2.0,
"b": 1,
"c": 0.016666666666666666
},
"memory_blocks": {}
}
FAQs
An Mindustry Logic emulator built for automated testing of compilers.
We found that mlog-arithmetic-runner demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.