According to Article 1, Section 9 of the U.S. Constitution, bills of attainder and ex post facto laws are unconstitutional. Bills of attainder declare an individual or a group of individuals guilty of crime and assess punishment without a trial. Ex post facto laws make an activity illegal retroactively.
England used bills of attainder commonly during the 18th century, applying them to both Great Britain and the British colonies. It was anger over some of these acts that motivated the colonists to begin the American Revolution. The writers of the constitution made it illegal for Congress to enact such bills in the new nation. James Madison believed bills of attainder and ex post facto laws to be contrary to the new country's underlying social compact and that the people of the United States were wary of public policy that so easily fluctuated.
Ex post facto laws are bills that change the legal status of an activity with retroactive results. In declaring the activity illegal, such laws give the government the right to convict a person of the crime, even though it was committed before the activity became illegal. Other ex post facto laws increase the penalty for a crime, allowing the government to try the individual with the new, stricter law rather than the one in effect when he committed the crime. The Constitution protects citizens from such laws.