Giter Site home page Giter Site logo

algosup / 2023-2024-project-3-virtual-processor-team-2 Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 4.84 MB

Third project of 2023-2024 year which aims creating our own assembly language, with an interpreter to be able to read and run our programs. 📎

License: MIT License

CMake 1.49% C 83.51% C++ 15.00%
aop asm assembly interpreter language-model virtual-processor aop-interpreter at2 vcpu

2023-2024-project-3-virtual-processor-team-2's Introduction

[2024] - IAT2️⃣

Assembly Team 2

🫂 Who are we ?

Picture Name Role GitHub LinkedIn
Mathias GAGNEPAIN Project Manager GitHub Logo LinkedIn
Guillaume DESPAUX Program Manager GitHub Logo LinkedIn
Guillaume DERAMCHI Technical Leader GitHub Logo LinkedIn
Maxime CARON Software Engineer GitHub Logo LinkedIn
Paul NOWAK Software Engineer GitHub Logo LinkedIn
Enzo GUILLOUCHE Quality Assurance GitHub Logo LinkedIn

Read the list of contributors to see who helped with the project!


📚 What is this project ?

This project (IAT2) involves the creation of a new assembly language for enhanced understanding and usability, we introduce the AT2, accompanied by its dedicated assembler (2AT2) and virtual Processor (VAT2).

🕵️‍♂️ What is AT2 ?

AT2 stands for Assembly Team 2, representing our proprietary assembly language. You can also refer to the documentation.

⚙️ What is 2AT2 ?

2AT2 stands for Assembler for Assembly Team 2, serving as the exclusive assembler capable of reading and converting .aop files written in our AT2 language into machine code (Binary).

💻 What is VAT2 ?

VAT2 stands for Virtual Processor for Assembly Team 2, serving as a virtual processor able to execute our binary generated by 2AT2.

📦 What is IAT2 ?

IAT2 stands for Integral Assembler Team 2, it's the name of the whole project (2AT2 + VAT2).

💾 Why did we choose .aop as extension ?

We selected the .aop extension to signify Aop Original Program, embodying an infinite recursive loop inspired by ZWEI's name.

🔎 How does it work ?

To assemble your code in .aop, here is some commands related to 2AT2 usage.

  1. Compile you AT2's code: 2at2 <path/file.aop>
  2. Display the commands list: 2at2 -help or 2at2 -h
  3. Compile + run your AT2's code with VAT2: iat2 <path/file.aop>

You can also refer to the entire user manual and AT2 documentation.

🔗 Requires

To use IAT2 you need:

  • A computer (Windows Recommended)
  • GCC installed, you can install it here

💽 Installation

Step By Step:

  1. Clone the repository: git clone https://github.com/algosup/2023-2024-project-3-virtual-processor-team-2.git
  2. Go at the project root
  3. Build the project
    • How to use with mingw: (Windows)
      1. Execute cmake -S . -B Build -G "MinGW Makefiles"
      2. Execute cd Build
      3. Execute mingw32-make
    • How to use with msys2: (Windows)
      1. Execute cmake -S . -B Build -G "MSYS Makefiles"
      2. Execute cd Build
      3. Execute make

It will generate a bin folder containing our runners to use it refers to How does it work

You can also refer to user manual.

🛠️ Made with

  • C99 - C programming Language.
  • C++ - C++ Language used for unit tests.
  • Visual Studio Code - IDE (Integrated Developement Environement).
  • CMake - Software Build System for C & C++ code.
  • GoogleTest - Google's internal systems for continuous integration.
  • GCC - Used to compile C language.
  • G++ - Used to compile C++ language

🤝 Contributing

If you want to contribute please take a look to CONTRIBUTING.md.

🗃️ Versions

⚖️ License

This project is under license MIT - see the LICENSE file for more information.

ALGOSUP Logo

2023-2024-project-3-virtual-processor-team-2's People

Contributors

enzoguillouche avatar guillaume18100 avatar guillaumedespaux avatar mathiasgagnepain avatar maximealgosup avatar paulnowak36 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

2023-2024-project-3-virtual-processor-team-2's Issues

[SOW] Typo and confusing sentence structure

Factors: "we will need a lot of personal investment and to not lose project time".

Firstly, the verb to loose contains 2 'o's. Then, the sentence structure is kinda weird.

Here's how you can change it:
" We will need a lot of personal investment; and shouldn't loose project time replaced by . . ."
" We will need considerable personal commitment. We must ensure that project time is not compromised by . . ."

Potential areas of improvements for the code

1. 2at2.c File

  • Initialization of errData: Ensure proper handling and freeing of errData to avoid memory leaks.

  • Argument Checking: Robust handling of arguments and flags is crucial. It's good practice to validate the arguments and handle any incorrect or malicious inputs.

2. ast.c File

  • Memory Management: Ensure that memory allocated for various lists (like varList, labelList) is properly managed and freed to avoid leaks.

  • Error Handling: Consistent error handling across all functions is crucial.

3. ast.h File

  • Struct Definitions and Enums: Well-defined and clear. Enums and structs are well-organized and appear to cover the necessary components.

4. binExporter.c File

  • File Handling: Ensure the file is closed in all branches, especially in error scenarios to avoid resource leaks.

  • Error Handling: Proper error handling in case of conversion failures or file issues.

5. builder.c File

  • Function Length: Some functions are quite lengthy and could be broken down into smaller, more manageable functions.

  • Error Handling: Ensure that errors are handled consistently and that resources are managed correctly in error scenarios.

6. debug.c File

File Handling: Ensure files are closed in every possible branch of the code.

Logging: Logging is well-implemented. Ensure the log file is accessible and managed correctly.

7. error.c File

Error Reporting: Comprehensive error reporting mechanism. Ensure that the error log file is handled properly, and consider potential issues with file access.

8. parser.c File

Robustness: Ensure robust parsing, especially in edge cases. Properly handle unexpected input formats and potential parsing errors.

Memory Management: Monitor allocations during parsing and ensure they are appropriately freed.

9. stringPlus.c File

Memory Management: Watch out for potential memory leaks. Ensure allocated memory is freed properly.

Input Validation: Validate inputs to functions like strToBin, strToOct, etc., to handle unexpected or incorrect strings.

10. vProc.c File

Global Variables: Usage of global variables could lead to issues in scalability and testability. Consider alternatives like passing structs.

Function Decomposition: Some functions are lengthy and could be broken down for clarity and maintainability.

11. vTerminal.c File

System Calls: Usage of system("clear") is not portable. Consider alternatives for different operating systems.

Command Handling: Robust handling of user input commands is necessary to prevent potential security vulnerabilities.

12. vat2.c File

Resource Cleanup: Ensure that all resources, especially error data, are cleaned up before the program exits.

Error Handling: Validate that all possible error scenarios are handled appropriately.

General Observations

Consistency: Maintain consistent coding styles, naming conventions, and error handling throughout all files.

Unit test of of getInst - check the '-' operand

The existing unit test to check the '-' operand checks if the the operand is not equal to '+'.
It returns the same value if you change the operand to another symbol.

  • Need to rename the unit test -> serves as "check if the operand is invalid"
  • Need to create a real unit test for the '-' operand

Typos Weekly 6

image

"reworking" should be "rework". It's better in this situation.
"developement" is misspelled. If it's "each error messages", there should have been no 's' to 'message'.
If it's "all our unit test", there should have been an 's' to 'tests'.
You should have written "and make them succeed", because the way you wrote the sentence is not understandable.

[SOW] Typo with useless words

Performance: "Our KPIs can be seen at on our spreadsheet"

You used 2 different words for the same thing.

Instead, use "on". In this case, it's better 👍

(Careful, at the end of the sentence, there's no dot 👀)

[SOW] Typo tense used

Abstract: "until we discuss about it with the customer".

Just before this sentence, you used the preterit.
You should keep the preterit to this sentence.
Or you can modify the sentence: " until a discussion with . . ."

Not understandable sentence Weekly 6

"The focus on enhancing the assembler, with achievements such as the completion of the Test Plan."

This sentence makes no sense. If you meant this sentence is linked to the previous one ("This week marked significant progress in our project's evolution."), you should have but a comma, and not a point to make a break in the sentence.

[SOW] Typo

OKRs: "executable machine code throught the converter."

"Through" and "thought" are 2 different words.
You meant " executable machine code through the converter."

Add technical schemas to the wiki

Add technical schemas to explain the links between the different elements and files of the project.
You can also add other schemas and parts to explain the development way.

[SOW] Typo tense used

Payment: "we will not get pay".

You cannot use multiple verbs in infinitive.
"Paid" is better in that case.

[SOW] Confusing sentence

Introduction: "The SOW typically also includes".

This sentence is pretty confusing, with 2 adverbs in a row.
You should put "moreover" at the beginning of the sentence:
" Moreover, the SOW also includes . . ."

[SOW] Typo

Type: "professional environnement".

In English, the word is " environment ".

[SOW] Confusing and incorrect sentence

Payment: "no payment has planned and will not be planned for now."

First of all, there's a tense mistake. You should use: "No payment has been planned."

And for the rest of the sentence, it's not that relevant.
I think you can mix the sentence like that: " No payment has been planned for now. "

[SOW] Typo article

Abstract: "to create the related assembler and his virtual processor."

The assembler is not a person, so "his" is incorrect. You should use "its" (with no single quote 👍) instead.

[SOW] Typo tense used

Value: "The project will costs around".

You used the future tense, with "will". Even if it's in the 3rd person singular, you do not need to put an 's'.

[SOW] Typo plural form

Scope: "our team of 6 person".

Because of the plural form, you need to put an 's' at the end, or even change the word to "people".
It's up to you 👍

Unit test checkLineSize

We have 5 unit tests regarding checkLineSize.
The lineInstructionInvalid one isn't working. There's already an issue about this one.
Although, the 5 aren't working actually.

When you change the ASSERT (in the test.cc), it still "works" -> for all the 5 tests.

Typo in the README

In the 2AT2 description, there is "2AT2 stands for AAssembler for Assembly Team 2".

[SOW] Useless word

OKRs: "parsing techniques and tools by."

Why is there a "by" at the end?

Github Wiki: several remarks

-Control flow instruction part could be entirely merged into a single chart

-Each example of the control flow functions should be more detailed

-What “ngr” abbrevation come from btw ?

-ob1 shouldn’t be here, he couldn’t even prevent AnaKeyn to fall to the dark side

-less equal instead of less= you should type

-the additions examples should start with mov rg1, num1 and mov rg2, num2 + mov var1, num3

-”Mov instruction” is too sober for a chapter title

-Couldn’t we also merge “mov instructions” with “control flow instructions and “stack operations” ?

-Are “mov instructions” examples necessary at this point ?

-Perhaps a guide on how to use/install cmake to run the program ?!

-For pusha, in which order are pushed each register ?

-Can we even push the register 3 ?

-Maybe one big and clear example with the pusha and popa functions ?

-Project architecture: builder has a mistake

-What does the first schema represent ?

-”var management” part merged with another chapter ?

-No Lifo explanation ?

[SOW] Typo tense used

Scope: "it's will be short".

You used 2 verbs: is (present) and will (future mark).

Regarding what you meant, you should remove the "is": " it will be short . . ."

Unit test IntOR

test.cc - line 421

The test checks if the op "or" is recognized as an ' OP_INT ' . We expect true, but it's actually false.

I think it's because "or" is already used, and recognized as an ' OP_B_OR ' .

[SOW] Typo

Scope: "we chose to work the more closer".

You already used a comparative word, which is "closer".
With this kind of comparative, you do not need to add a "more" before.

[SOW] Typo

Type: "train ourself".

Since we are few people, you need to use "ourselves" instead.

not/! argument invalid

The opCode not/! wait a second argument from the .aop file, it should await only one argument
image

builder.c useless warning

In builder.c you have a warning at compiling and in IDE for you switch can I can recommend to do case OP_B_XOR: case OP_MOD: to avoid a useless warning, it's minor but more clear in the cmd when we avoid useless warnings

image

isFloat function unsigned float

The isFloat function do not take in account negative values
e.g. -10.00 == Invalid
Group name : isFloat
Unit test name : SignedFloat

Technical Specifications - Typos

Typos:

  • line 111 -> "a international"
  • line 211 -> "ongoind"
  • line 221 -> "will processe"
  • line 223 -> "will be ran"
  • line 258 -> "code, Our"
  • line 482 -> "Each function and the structure in parser.h provide"
  • line 509 -> "ensuring no duplicate labels"
  • line 526 -> "if/else statement construction"
  • line 592 -> "This approach providES"

Typo in README

"Why we choose .aop as extension ?"
Use correct questions structures, use "Why did we choose .aop as extension?"

Technical Specifications - Content

line 367 -> lines are indeed limited to 64 characters. The 64th char should be empty or equal to \n though. You should precise that.
line 401 -> The image doesn't work.

You also should put 'IDE' in the glossary.

In the version I reviewed, many parts remain to be done.

Weekly Report 5

The convention in the document is sometimes not respected:

  • line 13 -> no '.'
  • line 17-20 -> no '.'
  • line 31/32 -> no '.'

Also, the team mood rate is not implemented.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.