The invention discloses a real-time inconsistency detection and positioning method and
system for CPS (
Clock Constraint Standard) requirements, and the method comprises the steps: firstly, accurately describing the CPS requirements through a real-
time model language RTNL capable of expressing time constraints, then detecting and
processing composite conditional statements and conditional conflicts in the RTNL, then converting the composite conditional statements and conditional conflicts into constraints of a
clock constraint
specification language CCSL, and finally, carrying out the real-time inconsistency detection and positioning of the CPS requirements. And then converting into a real-time
clock graph expressing time constraints between clocks, summarizing rules allowing nodes to occur in the graph, detecting real-time inconsistency in the real-time
clock graph according to the rules, and positioning inconsistent parts in requirements expressed by a real-time mode language according to a detection result. The invention further provides a
system for detecting and positioning the real-time inconsistency of the CPS requirements. According to the method provided by the invention, lightweight automatic detection and error positioning of the real-time inconsistency are realized, the detection time of the real-time inconsistency is shortened, the demand
verification efficiency is improved, and a demand engineer and other users are helped to quickly verify and modify the demand.