A fifth-generation programming language (5GL) is any programming language based on problem-solving using constraints given to the program, rather than using an algorithm written by a programmer. Most constraint-based and logic programming languages and some other declarative languages are fifth-generation languages.