خلاصه ماشینی:
From this discussion, we reach the conclusion that Article 6 of the General Penal Code, which means the principle of the necessity of the legality of crime and punishment, is so strong that even the legislator must observe it, and the legislator cannot enact a law whose concept is retroactive or explicitly states the possibility of retroactivity, whereas Article 4 of the Civil Code is only binding for the judge, not for the legislator.
1- The first case: Conflict between previous and subsequent laws before the issuance of a verdict In this case, according to the principles previously mentioned, if the subsequent law considers an act to be a crime which the previous law did not consider a crime, or if it has increased the punishment for an act compared to the previous law, the previous law shall be applied, because the new law cannot be retroactive to acts committed before its enactment for the sake of preserving individual liberties.
However, in some countries, including Italy and Portugal, a specific rule has been established for these cases, such that if the subsequent law completely eliminates the criminality of an act that was subject to punishment under the old law has placed it, should be completely eliminated, the aforementioned verdict should not be executed; but if it has mitigated the punishment, the verdict issued according to the previous law must be executed.
The last point that must be mentioned is that the rule of non-retroactivity of law does not apply to precautionary measures, because the execution of a precautionary measure does not relate to the crime and punishment, but rather to the existence of a dangerous state in the criminal at the time the verdict is issued.