1. A control program generation device, comprising: a control module memory that stores a plurality of control modules that control an operation of hardware; a pattern information memory that stores a plurality of pattern information that indicates an architecture pattern, which is a program structure that is common with architectures of control programs that are composed of one or more of the plurality of control modules; a pattern selection information acquirer that acquires pattern selection information for selecting the stored pattern information; a constraint information acquirer that acquires constraint information that indicates a time constraint that is imposed on an execution time of a control program including the architecture pattern that is indicated by the pattern information selected according to the pattern selection information, the constraint information further indicating a constraint on a total execution time of a plurality of control modules of the control program; an execution time estimator that estimates an execution time for each of the plurality of control modules on which the constraint, which is indicated by the constraint information for the total execution time, is imposed; a surplus time calculator that calculates a surplus time with respect to the constraint based on the constraint on the total execution time that is indicated by the constraint information, and the execution time that is estimated by the execution time estimator; a display controller that causes the architecture pattern indicated by the selected pattern information, the program structure of the control program including the architecture pattern, the estimated execution times of the control modules of the control program, the time constraint indicated by the acquired constraint information, and the surplus time that is calculated by the surplus time calculator to be correlated and displayed on a display; a description information acquirer that acquires description information that describes changes to the program structure of the control program; a program structure editor that edits the program structure of the control program based on the acquired description information; and a program generator that generates a control program for controlling hardware by connecting control modules that are stored in the control module memory based on the edited program structure.