What are the limits of software licensing? For example, GPL states (AFAIK) that if your software uses GPL licensed software, your software has to be made open-source. So, if you trick someone into using GPL software in their closed-source project without them realising, after lots of time and money invested you can make them disclose all of their work. That's pretty wicked. How far can you go? Could I make something like this: This software cannot be used in operating systems that use a Linux kernel or a kernel derived from Linux kernel. Can you also include something like: If the user of this software violates its license, all the belongings of the user are transferred to XYZ corporation. Can you just change the assembly code (insert a few NOP instructions) so that no one is able to prove you're using infringing code?
Your GPL example detracts from the question: see this recent answer. Setting aside GPL-specific conditions, the legal underpinning of software licensing is copyright law, whereby copying source code or an executable is only allowed with the permission of the copyright holder. There are two partial exceptions: "fair use" (generally not relevant to software), and a specific statutory permission to copy software in particular ways (making a backup, plus the act of executing software which requires copying from disk to memory). The latter permission only applies if you have legally acquired a copy of the software. Which explains why nobody sells copies of software, they sell a license to use software (a subtle, legalistic distinction, which is essential to modern software qua business). The terms of the license say what you may and may not do: if you violate the terms, you do not have permission to copy the software, and are liable for copyright infringement. One limit on the terms is that they cannot take away a right that you already have by copyright law (e.g. "fair use" cannot be negated by a license term). Another limit is that the terms have to be consistent with contract law, hence the license cannot include a human centipede obligation – or, "all your stuff belong to us". When a contract is ambiguous, the ambiguity is construed against the writer, and that is also so with software licenses. Also like the situation with contracts, the terms have to be legal, that is, cannot deny some right or requirement encoded in law. There is a legal requirement that disclaimers have to be "prominent", and that holds of license terms. As for "tricking" a person, that's not supposed to happen, with a proper license. If you put stuff out there and say nothing, nobody has been given permission to copy the item. You can make it available to a specific named person, but that is limited to one person, thus a license includes language allowing anyone to copy, but also requiring that the license be retained with any subsequent copies. Hence B copies from A, and sees the license; B may share with C (assuming a decent license) but must include that or substantially equivalent license; and so on. A problem arises if B redistributes without original license, substituting a bogus license. When C copies, that copying is not done with the permission (implied or express) of A, and C could be open to legal consequences. B is also clearly open to consequences, since re-distribution with the self-perpetuating license is a violation of the terms of A's condition grant of permission. Ignorance of the true ownership of copyright is no excuse, and there is no general innocent-infringement exception to copyright law in the US. However, the part of copyright law that talks about remedies for infringement, 17 USC 504(b)(2) lessens the burden on the innocent infringer: In a case where the infringer sustains the burden of proving, and the court finds, that such infringer was not aware and had no reason to believe that his or her acts constituted an infringement of copyright, the court in its discretion may reduce the award of statutory damages to a sum of not less than $200. Still, not zero. I don't see how adding some NOPs would make it impossible to prove that you have a copy of someone else's IP. Perhaps it's not a trivial, but still quite possible.
When you license your IP (like a song) you can specify the terms and conditions of its use by the licensee, including revenue shares from any derived work. However, if, as your comment suggests, you grant an "informal" license, and later decide that you want to "firm things up" with a license having different terms, that's a matter you would have to either negotiate or litigate with your counterparty. If you want a common reference point for negotiation of this sort of license, you might have a look at compulsory license terms.
Your question mixes up two different aspects of intellectual property. From a copyright point of view, it is perfectly legal to reproduce the features of a one piece of software in another. The functionlity of the software is not copyright (although the detailed look and feel of the user interface might be). However you ask if you, as an employee, can do this by &quot;looking into the code of software X&quot;. Presumably by doing this learn something of the organisation and algorithms used. Even if you avoid direct copying, you are likely to have learned trade secrets of your employer, and publishing these is at least a civil tort in the US, and in some states a crime.
We can't really know until the ruling is made. The Supreme Court might issue a ruling that encompasses all software APIs, or may predicate its ruling on this more specific situation, e.g. that because Oracle's library is so extensive its structure can be copyrighted even if that does not necessarily mean that any individual function signature can be copyrighted. They could also decide based on something unrelated to the heart of the copyright question - skimming through the petition for a writ of certiorari, they could make a decision based on the original implied license from Sun, for example. Hopefully their decision will answer the copyright question of function declarations completely, but it isn't required to.
No, you cannot ever legally use copyrighted property without a valid license from the copyright owner. It is understandable that when government restrictions prevent people from licensing intellectual property, people will turn to piracy and black markets to obtain them. However, whenever you find yourself in a region where you can legally license the property, you are (presumably) also in a region where intellectual property rights are respected, and it is illegal to use the property without a proper license from the owner. I.e., the fact that you paid a pirate for a copy – even where that was the only option to obtain one – does not give you a license. You have to obtain a license from the owner.
You can write anything you want (basic First Amendment protections): the question is whether one would be liable for damage that arises from what you're written, or whether you can distribute what you've written. Distribution may be restricted, thanks to the Commerce Clause (hence FDA regulations, which figure prominently in the analysis). Most software writers are not medical practitioners, and vice versa, and what the software writer does is implement something described by a competent medical practitioner. It is logically possible that a med. practitioner might also try to write software (no problem) and distribute it (possibly a problem); or, a software writer might read up on something on Wikipedia and try to implement it (again, no problem) or distribute it (possible problem). Damages can be sorted into two categories, implementation errors and scientific errors, and having ruled out deliberate sabotage, we are left with negligence. If the software writer failed to use suitable care in writing code that sums a set of numbers, the software writer has been negligent. If the person purporting to have the qualified scientific knowledge mis-states the formula, that person has been negligent. It is possible for many parties to be negligent (the programmer failed to be diligent in understanding the software requirements; the medical professional failed to adequately explain what was required of the program). The FDA does regulate medical devices, and "device" is construed pretty broadly (condoms are non-exempt class 2 medical devices). There is FDA guidance on medical software which makes it clear that the device manufacturer shoulders the regulatory burden. Anytime you manufacture a tangible thing (which is within the scope of FDA regulation for medical devices), you have to have the thing approved. Many (most?) medical devices implement software, and are thus within the scope of FDA scrutiny. It is not illegal to write software that ends up being implemented in an unapproved medical device, but the unapproved medical device itself is illegal. It is reasonably likely that purported medical software (not a gadget with software build in) would be held to be a non-exempt device. To know if something is exempt, you would look at the exemptions list, and determine that your program (or thing) is not on or implied by anything on that list. The visual acuity eye chart is a class 1 exempt item, as is the manual toothbrush. There is no way to specifically look for things that are only software, or that contain software, so the search through the list would have to be guided by knowledge of the subject area. Canada is helpful in explaining when software is a regulated medical device. This is non-probative w.r.t. US law but gives you an idea what is likely to be considered a "device". Under Canadian law, the software would be clearly a regulated medical device. The FDA has a power-point that attempts to say something about the matter which warns you that you are on your own and "You will need to go back to study and use the source regulatory documents" to make the determination. Eventually, slide 13, they hint that if you intend the software to be used in diagnosis, prevention, or treatment, then it is a device (so, yes, the aforementioned software would be a device, and probably not exempt from regulations). General purpose software (word processors, web browsers, communications software, etc.) are not indented to be used for a regulated purpose, although they can be so used, and thus they are probably not subject to FDA regulation. There is a murky relationship between regulatory approval and liability. Being approved by the government does not convey immunity to negligence suits (see Wyeth v. Levine), but being approved can have weight in determining whether a party was negligent, since regulatory scrutiny ostensibly filters out errors that could have been caught. Federal approval does not preempt state tort law, as the court ruled. Regulations pertaining to medical devices hold for anything that qualifies as a device, and is not defined (negatively) in terms of disclaimers. If you sell a medical device but label it saying "this is not a medical device, it is not created by a competent medical practitioner", that doesn't make it not a medical device. Unfortunately, what counts as a regulated device is based on intended use, and there is an obvious connection between disclaimers and intentions. Taking MS Word as an example, MS does not as far as I know say that "Word is not intended to be used as a medical device". It can certainly be used to diagnose, teat, and prevent medical conditions, but so too can a screw driver or pretty much anything else. The number of non-medical uses vastly outweigh the medical uses, so it would be deemed not to be a regulated device. A program which prescribed a set of prayers to be uttered in case of illness would be subject to First Amendment override of any FDA regulations. Quack medical devices are prohibited (that's why there is regulation of devices in the first place), but discerning the fine line between permitted actions based on nutty beliefs and forbidden actions is not easy. The FDA also has guidance on the distinction between "Complementary and Alternative Medicine", which does not clearly state that, for example, a software reading of your cakra-energies based on a computer program's questions is not a medical device. They do say of mind-body medicine (mentioning yoga, biofeedback and tai chi as examples) that "CAM practices in this domain would not be subject to our jurisdiction under the Act or the PHS Act", but then say "any equipment or other products used as part of the practice of mind-body medicine may be subject to FDA regulation, depending on the nature of the product and its intended use" (hence a yoga-enabling program may be subject to regulation).
There are a tangle of issues going on in this question. First, distribution of hardware-related code in commerce might very well void any right you have to patent the software and might bring it into the public domain for purposes of patent law. Publicly disclosed inventions, even if protected by copyright, are part of the &quot;prior art&quot; and can't be protected by patents. Second, you have to disclose the material ideas in an invention in order to patent it, in your patent application. The bargain of a patent is that you get protection for about two decades in exchange for contributing your idea to the public domain when it expires. Third, usually people protect software with copyright rather than patent, although there are pros and cons to each approach. Fourth, if someone knows enough about your invention to subpoena the place where you store it, you have probably disclosed too much information pre-application to patent it. Fifth, usually the &quot;real&quot; target of a subpoena gets notice of it and an opportunity to defend against the subpoena (e.g. for improperly disclosing a trade secret) before it is carried out, but the same does not apply, for example, to National Security Letters under the Patriot Act (which are supposed to be used only in national security investigations or counter-terrrorism operations, but might be abused). Certainly, an ordinary person can't issue a National Security Letter for private commercial gain without corrupt government assistance. Sixth, to issue a subpoena, there must be some pending case to which someone can claim the subpoena is relevant. A random person can't just subpoena information because they want to. Seventh, even if a server host isn't based in the United States, that doesn't mean that there isn't some means by which a court might assert subpoena power over information on server host. There are many legal &quot;hooks&quot; that could apply. Eighth, defending an isolated subpoena isn't terribly expensive. Typically, you'd be looking at a legal fee in the $1000 to $5,000 (U.S.) range, which is much, much less than the dollar cost of patenting an invention in any country. In short, while there are pros and cons of using a U.S. based server host, people in the IT industry routinely attach far too much importance to this fact which is only very rarely an important one legally. There are many other issues which are much more important in this fact pattern to your ultimate goal.
The difference between commercial and non-commercial software use is about as clear as it gets, outlined by the definitions in the license above. One makes money, the other doesn't. There is no gray area. Your intent or expectations for a project may seem to alter the difference between the two and add a gray area in your mind, but they don't. Once you are a commercial user, buy a commercial license and/or upgrade the non-commercial license to commercial. That's the legal angle; and what is illegal and what is unethical are not always the same. If you still feel like your intent does make a difference and you feel unethical about using a non-commercial license - because you are building a community and hoping/planning on making money - buy the commercial license to begin with.