Skip to main content

yapy-arm64

PyPI

🐍 Yet Another (ARM) Plagiarism, plagiarism detector for ARM64 source code with Lark

yapy is a tool used to detect and discourage the punishable copying of student exercise programs written in ARM64 (AArch64) for the Fundamentals of Computer Systems and Computer Architecture course units of the Bachelor in Informatics and Computing Engineering at Faculdade de Engenharia da Universidade do Porto.

Installation with the PyPI package

pip install yapy-arm64

Overview

yapy uses Lark to build an abstract syntax tree to ARM64 code.

The grammar built only provides the rules necessary for parsing code used with the instructions available for the two courses lectured.

After build the abstract syntax tree, the tree is transformed into a bag of tokens represented as an hash table with the key being each valuable token and the value the number of occurrences of that token.

Finally, the similarity between two files is calculated with Sørensen–Dice coefficient.

What doest it prevent?

  • Comments
  • Label name changes
  • Register allocation changes
  • Adding of redundant instructions
  • Switching the order of instructions
  • Switching the order of whole block of instructions

Usage

from yapy import PlagiarismCompare
from yapy.score.similarity_score import sorensen_dice_coefficient

# You could either pass an argument path specifying the path to look for files or pass a list of files with files=[...]
# If no threshold is set the comparison will return the similarity between all files found
p_compare = PlagiarismCompare(path='test/resources/directory', threshold=0.965)
p_compare.compare(sorensen_dice_coefficient)

json_result = p_compare.json_formatter.format_suspicious()
html_result = p_compare.html_formatter.format_suspicious()
csv_result = p_compare.csv_formatter.format_suspicious()

print(json_result) # will actually print all pairs of files with similarity above 0.965

License

MIT

Release files for yapy-arm64 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for yapy-arm64 1.0
File Size Uploaded
yapy-arm64-1.0.tar.gz 8.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yapy-arm64 1.0
File Interpreter ABI Platform
yapy_arm64-1.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / yapy-arm64-1.0.tar.gz

Download URL yapy-arm64-1.0.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0fa1a7cbd488abc30c554bb1bd284feca996a8cd0f129bd5c62306d71cb6b0e8
BLAKE2b-256 checksum
How to use checksums
adc605efd57d0d0af46ce3ac693139b5660c7191d015e0e9e563f2ed644d18b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release files / yapy_arm64-1.0-py3-none-any.whl

Download URL yapy_arm64-1.0-py3-none-any.whl
Size 10.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f99e79f1067008944219e6c462f0fefc11bcd3b5e946df747c062835378dd13
BLAKE2b-256 checksum
How to use checksums
8a62f33e1cb9afd5d3e877c5bcdecdcec33c6fd40d6ff2cafb9cadd56c54ddb3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.2

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page