Back to Blog

Generative AI and Software Rewriting: A Step Towards Overcoming Copyleft?

Can AI rewrite copyleft code and free it from license constraints? A legal analysis of copyright, derivative works, human creativity, and Text and Data Mining.

Andrea Coccoโ€ข๐Ÿ“… April 3, 2026
Generative AI and copyleft

An interesting discussion has recently emerged from multiple sources regarding the use of artificial intelligence as a potential tool for "freeing" software from copyleft โ€” or more precisely, from the constraints imposed by copyleft licenses.

The starting premise is as follows: developers and less experienced users could โ€” by providing generative AI tools with the source code of software released under a copyleft license โ€” have the AI create new code that enables the resulting software to achieve the same functionalities as the original, while differing from it substantially. In this way, the "new" software could be released under a more permissive license (such as an MIT license), thereby freeing its "author" from the obligation to release it under a license analogous to the one applied to the original software (e.g., a GNU GPL license).


Free Software Licenses

The term "free software" commonly refers to programs released by their authors under various types of licenses that allow users to access the source code and modify it within more or less stringent limits. In practice, standardized licenses have developed, typically categorized as:

  • Copyleft licenses, further distinguished as:
    • Strong copyleft: the user has the right to study and modify the code, creating derivative software. However, the derivative must necessarily be released to the public under a license with analogous terms (the main example being the GNU General Public License โ€“ GPL).
    • Weak copyleft: derivative software must also be released under an analogous license. However, linking with non-free software is permitted (the main such license being the LGPL โ€“ Lesser General Public License).
  • Non-copyleft licenses, generally more permissive toward users, who are typically allowed to modify the code without the obligation to release the derivative under an analogous license (examples: Apache 2.0, MIT, BSD licenses).

Derivative Works and the Right of Adaptation

The need to regulate derivative software arises from general principles of copyright law. Italian copyright law (Law 633/1941, "lda") recognizes creative adaptations of pre-existing works as entitled to a differentiated form of protection. While "original" works receive full and autonomous protection, derivative works require the consent of the original author for their use.

Consent may be granted:

  • through a rights assignment agreement, whereby the original author transfers ownership of all rights or only certain rights;
  • through a license, whereby the original author "authorizes" the adapter to use the resulting work within the terms of the agreement.

In the software domain, the law establishes that the original author's consent is necessary not only for economic exploitation of derivative software, but also merely for modifying or adapting the pre-existing software (art. 64-bis lda).

An exception to the consent rule exists for variations "constituting an original work in their own right": when the result of the adaptation departs from the original work to the point of qualifying as a new work, that result no longer requires the original author's consent.


AI as a Tool for "Freeing" Software?

The technical capabilities provided by AI amplify certain critical aspects: the exponentially greater speed at which code rewriting operations are possible, and the fact that AI can operate with a high level of autonomy even following relatively simple instructions (prompts). This makes such operations accessible even to individuals without technical programming expertise.

What Does Copyright Protect?

To attempt to answer the initial question, one must start from the cardinal distinction between ideas and the expressive form of an intellectual work. Ideas and general concepts underlying a work are not subject to copyright protection. Copyright recognizes legal protection exclusively for the expressive form of a work.

"Expressive form" refers not only to the external form โ€” the final form in which the work is presented โ€” but also the so-called internal form, meaning the work's expository structure, when such organization assumes a sufficiently creative and original character.

In the software domain, computer programs are protected "as literary works." Protection cannot extend to the functionalities achieved by the program, but exclusively to the way the code is expressed. Multiple programs may therefore perform identical functionalities, provided they are expressed in different forms.

The key point

When the result of AI rewriting substantially departs from the original code, one should be able to conclude that the use of such result may disregard the original author's consent, and consequently the copyleft license conditions. When instead the new code qualifies as a simple adaptation of the pre-existing software, compliance with the license conditions remains essential.


The Human Creativity Question

Copyright law expressly requires, as a condition for protection, that the work be the result of the intellectual labor of a human author. This principle has been made explicit by Law 132/2025, which amended art. 1 of Law 633/1941 to specify that protection is reserved for "works of human intellect."

The same provision specifies that works "created with the assistance of artificial intelligence tools" may also be protected, provided they are the "result of the author's intellectual labor."

AI-driven code rewriting raises a fundamental question: in cases where the user simply feeds the original code to the AI with a simple prompt, without providing any specific creative contribution, the absence of human creative input should lead to the new software being considered lacking the minimum requirements for copyright protection.

โš ๏ธ The paradox

Such solutions would result not so much in "freeing" the software from copyleft license constraints alone, but rather in excluding any copyright recognition whatsoever. The code, being unprotected, would be freely usable by anyone, and the user who requested its "creation" from AI would not even be entitled to dispose of it through any type of license.


Text and Data Mining: An Upstream Constraint

The use of any protected work (including software) for AI training purposes is legitimate only under the conditions established by art. 70-septies lda regarding Text and Data Mining, insofar as the original author has not reserved all usage rights.

If the license conditions on the original software include an express rights reservation (opt-out), the very operation of "feeding" generative AI with the original program's code would be illegitimate, consequently making any resulting output unlawful.

Current copyleft licenses do not contain an express rights reservation clause. It has been held that the content of standard copyleft licenses cannot be interpreted as implying such a reservation. Adding a reservation clause would also appear incompatible with the copyleft model, given that its underlying principles imply a prohibition on additional restrictions.

The possibility of integrating major copyleft licenses with a specific opt-out clause is being discussed: a topic that would require dedicated treatment, but worthy of at least a brief mention here.


This article is a guest contribution by Andrea Cocco, a lawyer specializing in technology law, intellectual property, and data protection. The views expressed are those of the author.

Need support on AI and compliance?

Our team helps you navigate the intersections of artificial intelligence, intellectual property, and regulation.

Contact Us