1. A method for detecting an error in a design that may be caused due to a soft error, the method comprising: obtaining the design, wherein the design comprising a plurality of variables and a transition relation from a state to a next state based on at least one input signal; computing a set of states of the design in respect to a variable of the plurality of variables, wherein for each state of the set of states, in case a value of the variable is changed due to the soft error, there exists one or more consecutive values to the at least one input signal that result in an error in the design; synthesizing a target identification logic configured to detect if a current state of the design is comprised by the set of states; simulating the design and the target identification logic, wherein said simulating is performed by a processor; said simulating comprising in response to a detection by the target identification logic, changing a value of the variable to simulate the soft error; and determining whether the error in the design occurred during said simulating.