IGL Course

Introduction au génie logiciel

IGL "Introduction au génie logiciel" is not an easy course. You will need strength and motivation to survive 👀. Joke aside, it's hard to learn something. You will have a lot of things used in graded homework that you haven't leaned during classes.

In 2021, the version of Papyrus in the school was 4.8.0, so even if there are newer versions, install Papyrus 4.8.0. If you need another version of papyrus that is not on the official website, look for the section Update sites on Papyrus Download Page.

Install Papyrus

Steps Notes
  • (If not done) Download and Install Java (Oracle JDK17, Windows > Installer)
  • Download Papyrus 4.8.0 or check Papyrus Download Page
  • (Optional) For some, you may need to do this (~source)
    • To find your Java folder (ex: C:\Program Files\Java\jdk-17\bin)
    • In Papyrus Config file, named papyrus.ini, add two lines before the line with -vmargs
    • -vm
    • C:\Program Files\Java\jdk-17\bin

We will work with Java 1.8, but you can use a newer version and configure that later.

It's a good practice to make backup, as losing everything (or Random bugs) may be a daily occurrence, especially if you are using SysML.

TD8 - activities

Once you created an activity, make sure that you are not creating a new one. Use the sync with editor / navigate to find it, then complete it.

Also, every call must be typed.

TD9 - Code Generation

We have to write some code, that will be able to generate Java and Documentation from our model. We will test a few ways of doing so.

Note: you need to run the second IDE again, each time you changed something in the first IDE.

TD10 - Tests

This TP is the hardest. You will have to write tests, on an incomplete, wrongly generated code. What I mean, is that the generated (either coming from the teacher or mine) is not taking into account

  • initial states: check the list of states, they aren't in
  • current state: the wrong value is used for current state (the initial value), I doubt any one was expecting this (but we can ignore this)
  • duplicate states: there is duplicates states in the HashSet. I my own opinion, this is not a problem (HashSet = Set of unique values) as this may allow us to be "on two states" at one time
  • current state (2): we used regions, but we are not able to have more than one current state, hence the tests should be either done on each region (2 more tests to do) or you may only do them on one. Anyway, there is a problem as this is not what we should had.
  • signals: did you see that your interfaces are empty. How do you even send signals. In my opinion, you should modify the generator to generate a method for each getter, allowing you to "send" signals on this class. But, must of use relied on transit to make tests.
  • transit: it's taking two states, but if things were "normal", we should be moving from one of our current states, to another state, right?
  • methods: their code is empty (or useless), but you can do your tests without hassle even with this (imo, you may need to add OpaqueBehavior to replace Activities trough).

Without further ado, let's get started.