{"id":13295,"date":"2018-11-01T11:46:49","date_gmt":"2018-11-01T18:46:49","guid":{"rendered":"https:\/\/blogs.mentor.com\/verificationhorizons\/?p=13295"},"modified":"2026-03-27T08:39:02","modified_gmt":"2026-03-27T12:39:02","slug":"how-to-reduce-the-complexity-of-formal-analysis-part-6-leveraging-data-independence-and-non-determinism","status":"publish","type":"post","link":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/2018\/11\/01\/how-to-reduce-the-complexity-of-formal-analysis-part-6-leveraging-data-independence-and-non-determinism\/","title":{"rendered":"How to Reduce the Complexity of Formal Analysis &#8211; Part 6 \u2013 Leveraging Data Independence and Non-Determinism"},"content":{"rendered":"<p>If you know the dependencies \u2013 or lack thereof \u2013 in your design, you can exploit two very fundamental characteristics of formal analysis that will really simplify things for the formal algorithms; giving you significantly better wall clock run time and memory usage performance: Data Independence and Non-Determinism. Along with a little design knowledge and some forethought, leveraging either of these can cut down your formal analysis to a matter of minutes vs. days. Let\u2019s start with some definitions:<\/p>\n<p><strong>Data Independence (DI):<\/strong> your property\/assertion does NOT depend on the specific values of the data.<\/p>\n<p><strong>Non-Determinism (ND):<\/strong> this is a technique that uses \u201cfree variables\u201d implemented as un-driven wires or extra inputs in a checker to tell the formal engines they are free to consider any cases involving all possible values of the variables at once.<\/p>\n<p>Taking advantage of Data Independence is as simple as reducing the width of a data path in a property, as long as the property\/assertion does NOT depend on the specific values of the data. For example, for verifying the data integrity of a FIFO, you only need to check that data written in will be read out correctly and in the right order &#8212; whether the FIFO width is 32 bits, 8 bits, or just 1 bit. A property that captures this intent is effectively data independent! Consequently, you can go ahead and reduce the width of the FIFO to 1 bit in the property code and the result of the formal analysis will still be valid.<\/p>\n<p>Non-Determinism is about another form of freedom \u2013 the freedom not to care what a given input signal\u2019s value is a-priori. Consider the following: if the variable \u201clatency\u201d is really big, this assertion can introduce a lot of extra cycles into the analysis.<\/p>\n<p><a href=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2018\/10\/HRTCOFA-Part-6-code-example1.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13294 aligncenter\" src=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2018\/10\/HRTCOFA-Part-6-code-example1.jpg\" alt=\"\" width=\"498\" height=\"74\" \/><\/a><\/p>\n<p>Fortunately, we can recode it as follows where \u201ccnt\u201d has (log2 latency) bits that reduces the number of states. We only check the latency between one \u201creq\u201d and one \u201cack\u201d, while introducing a new free variable, \u201cstart\u201d, to let formal consider all random start times for \u201creq\u201d, thus consider all \u201creq\u201d<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13293 alignleft\" src=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2018\/10\/HRTCOFA-Part-6-code-example2.jpg\" alt=\"\" width=\"1042\" height=\"566\" \/><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>Still unclear?\u00a0 The state diagram below corresponds to the ND-exploiting \u201cstart\u201d free variable:<\/p>\n<p><a href=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2018\/10\/HRTCOFA-Part-6-state-diagram.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-13292 alignnone\" src=\"https:\/\/blogs.sw.siemens.com\/wp-content\/uploads\/sites\/54\/2018\/10\/HRTCOFA-Part-6-state-diagram.jpg\" alt=\"\" width=\"851\" height=\"552\" \/><\/a><\/p>\n<p>As you can see, the addition of the \u201cstart\u201d signal limits the check to only one pair of \u201creq\u201d and \u201cack\u201d. However due to the non-deterministic feature of the free \u201cstart\u201d, formal considers all possibles, and the result is valid for both proof and firing.<\/p>\n<p>Recall that assertions are essentially synthesized to logic. Hence, when the latency is 128, the logic introduced by the original assertion \u201cCheck_ack\u201d has 128 flops that are a pipeline to remember the value of \u201creq\u201d, In contrast, the logic introduced by the assertion using the ND technique only has 10 flops (2 for \u201cstate\u201d and 8 for \u201ccnt\u201d).\u00a0 Clearly, the ND version\u2019s dramatically lower flop count means the complexity for formal analysis is significantly reduced, which will directly translate to faster run times and lower memory usage.<\/p>\n<p>Once you get the hang of applying DI and ND, before you know it you will start to see opportunities to apply these principals everywhere. Your colleagues will marvel at your formal analysis expertise as you get more and more proofs or CEXs, fast.<\/p>\n<p>&nbsp;<\/p>\n<p>We trust that the various techniques to resolve Inconclusives that we have reviewed in this six part series will make your more productive. Please let us know in the Comments below, or offline via email!<\/p>\n<p>May your state spaces be shallow, and your analyses be conclusive!<\/p>\n<p>Jin Hou, Joe Hupcey III<br \/>\nfor the Questa Formal Team<\/p>\n<p>&nbsp;<\/p>\n<p><strong>Reference Links:<\/strong><\/p>\n<p><a href=\"https:\/\/blogs.mentor.com\/verificationhorizons\/blog\/2018\/08\/08\/how-to-reduce-the-complexity-of-formal-analysis-part-1-finding-where-formal-got-stuck-and-some-initial-corrective-steps-to-take\/\" target=\"_blank\" rel=\"noopener\">Part 1: Finding Where Formal Got Stuck and Some Initial Corrective Steps to Take<\/a><\/p>\n<p><a href=\"https:\/\/blogs.mentor.com\/verificationhorizons\/blog\/2018\/08\/22\/how-to-reduce-the-complexity-of-formal-analysis-part-2-reducing-the-complexity-of-your-assumptions\/\" target=\"_blank\" rel=\"noopener\">Part 2: Reducing the Complexity of Your Assumptions<\/a><\/p>\n<p><a href=\"https:\/\/blogs.mentor.com\/verificationhorizons\/blog\/2018\/09\/11\/how-to-reduce-the-complexity-of-formal-analysis-part-3-assertion-decomposition\/\" target=\"_blank\" rel=\"noopener\">Part 3: Assertion Decomposition<\/a><\/p>\n<p><a href=\"https:\/\/blogs.mentor.com\/verificationhorizons\/blog\/2018\/09\/28\/how-to-reduce-the-complexity-of-formal-analysis-part-4-counter-abstraction\/\" target=\"_blank\" rel=\"noopener\">Part 4: Counter Abstraction<\/a><\/p>\n<p><a href=\"https:\/\/blogs.mentor.com\/verificationhorizons\/blog\/2018\/10\/23\/how-to-reduce-the-complexity-of-formal-analysis-part-5-memory-abstraction\/\" target=\"_blank\" rel=\"noopener\">Part 5: Memory Abstraction<\/a><\/p>\n<p><a href=\"https:\/\/verificationacademy.com\/courses\/handling-inconclusive-assertions-in-formal-verification\" target=\"_blank\" rel=\"noopener\">Verification Academy: Handling Inconclusive Assertions in Formal Verification<\/a><\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you know the dependencies \u2013 or lack thereof \u2013 in your design, you can exploit two very fundamental characteristics&#8230;<\/p>\n","protected":false},"author":71594,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spanish_translation":"","french_translation":"","german_translation":"","italian_translation":"","polish_translation":"","japanese_translation":"","chinese_translation":"","footnotes":""},"categories":[1],"tags":[412,487,493,544,611],"industry":[],"product":[],"coauthors":[],"class_list":["post-13295","post","type-post","status-publish","format-standard","hentry","category-news","tag-data-independence","tag-formal-analysis","tag-formal-verification","tag-inconclusives","tag-non-determinism"],"_links":{"self":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/13295","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/users\/71594"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/comments?post=13295"}],"version-history":[{"count":1,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/13295\/revisions"}],"predecessor-version":[{"id":19865,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/posts\/13295\/revisions\/19865"}],"wp:attachment":[{"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/media?parent=13295"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/categories?post=13295"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/tags?post=13295"},{"taxonomy":"industry","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/industry?post=13295"},{"taxonomy":"product","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/product?post=13295"},{"taxonomy":"author","embeddable":true,"href":"https:\/\/blogs.sw.siemens.com\/verificationhorizons\/wp-json\/wp\/v2\/coauthors?post=13295"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}