<p>I know there is a Jackpot API <a href="http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html" rel="nofollow noreferrer">http://jackpot.netbeans.org/docs/org-netbeans-modules-jackpot/overview-summary.html</a> for programmatic access the the rules engine, has anyone had success seperating this from NetBeans itself? So it can operate on any Java source files?</p>

[{'answer_id': 74899, 'author': 'Mostlyharmless', 'author_id': 12881, 'author_profile': 'https://Stackoverflow.com/users/12881', 'pm_score': 0, 'selected': False, 'text': '<p>@Just in case: I is. But from what i learnt, doing so for a non trivial algorithm is a major pain. I leave that sort of a thing for brainier people. I learnt what i know from  Parallel Program Design: A Foundation (1988)\nby K M Chandy, J Misra </p>\n'}, {'answer_id': 75060, 'author': 'Chris Vest', 'author_id': 13251, 'author_profile': 'https://Stackoverflow.com/users/13251', 'pm_score': 4, 'selected': False, 'text': "<p>It is impossible to prove anything without building upon guarentees, so the first thing you want to do is to get familiar with the memory model of your target platform; Java and x86 both have solid and standardized memory models - I'm not so sure about CLR, but if all else fails, you'll have build upon the memory model of your target CPU architecture. The exception to this rule is if you intend to use a language that does does not allow any shared mutable state at all - I've heard Erlang is like that.</p>\n\n<p>The first problem of concurrency is shared mutable state.</p>\n\n<p>That can be fixed by:</p>\n\n<ul>\n<li>Making state immutable</li>\n<li>Not sharing state</li>\n<li>Guarding shared mutable state by the <em>same</em> lock (two different locks cannot guard the same piece of state, unless you <em>always</em> use exactly these two locks)</li>\n</ul>\n\n<p>The second problem of concurrency is safe publication. How do you make data available to other threads? How do you perform a hand-over? You'll the solution to this problem in the memory model, and (hopefully) in the API. Java, for instance, has many ways to publish state and the java.util.concurrent package contains tools specifically designed to handle inter-thread communication.</p>\n\n<p>The third (and harder) problem of concurrency is locking. Mismanaged lock-ordering is the source of dead-locks. You can analytically prove, building upon the memory model guarentees, whether or not dead-locks are possible in your code. However, you need to design and write your code with that in mind, otherwise the complexity of the code can quickly render such an analysis impossible to perform in practice.</p>\n\n<p>Then, once you have, or before you do, prove the correct use of concurrency, you will have to prove single-threaded correctness. The set of bugs that can occur in a concurrent code base is equal to the set of single-threaded program bugs, plus all the possible concurrency bugs.</p>\n"}, {'answer_id': 75832, 'author': 'dckc', 'author_id': 7963, 'author_profile': 'https://Stackoverflow.com/users/7963', 'pm_score': 2, 'selected': False, 'text': '<p>Short answer: it\'s hard.</p>\n\n<p>There was some really good work in the DEC SRC Modula-3 and larch stuff from the late 1980\'s.</p>\n\n<p>e.g.</p>\n\n<ul>\n<li><p><a href="ftp://gatekeeper.dec.com/pub/DEC/SRC/research-reports/SRC-020.ps.Z" rel="nofollow noreferrer">Thread synchronization: A formal specification</a> (1991)\nby A D Birrell, J V Guttag, J J Horning, R Levin\nSystem Programming with Modula-3, chapter 5 </p></li>\n<li><p><a href="http://gatekeeper.dec.com/pub/DEC/SRC/research-reports/SRC-159.pdf" rel="nofollow noreferrer">Extended static checking</a> (1998)\nby David L. Detlefs, David L. Detlefs, K. Rustan, K. Rustan, M. Leino, M. Leino, Greg Nelson, Greg Nelson, James B. Saxe, James B. Saxe</p></li>\n</ul>\n\n<p>Some of the good ideas from Modula-3 are making it into the Java world, e.g.\nJML, though "JML is currently limited to sequential specification" says the <a href="http://www.eecs.ucf.edu/~leavens/JML/jmlrefman/jmlrefman_1.html" rel="nofollow noreferrer">intro</a>.</p>\n'}, {'answer_id': 88368, 'author': 'mweerden', 'author_id': 4285, 'author_profile': 'https://Stackoverflow.com/users/4285', 'pm_score': 1, 'selected': False, 'text': "<p>I don't have any concrete references, but you might want to look into the Owicki-Gries theory (if you like theorem proving) or process theory/algebra (for which there are also various model-checking tools available).</p>\n"}, {'answer_id': 88393, 'author': 'Apocalisp', 'author_id': 3434, 'author_profile': 'https://Stackoverflow.com/users/3434', 'pm_score': 2, 'selected': False, 'text': '<p><a href="http://books.google.com/books?id=WR828X_7488C&amp;dq=pi-calculus&amp;pg=PP1&amp;ots=C2uWpHm7fN&amp;sig=H_cJSbWkK6TzKTe3x89BtTDYSyw&amp;hl=en&amp;sa=X&amp;oi=book_result&amp;resnum=1&amp;ct=result" rel="nofollow noreferrer">The Pi-Calculus, A Theory of Mobile Processes</a> is a good place to begin.</p>\n'}, {'answer_id': 93424, 'author': 'jdkoftinoff', 'author_id': 32198, 'author_profile': 'https://Stackoverflow.com/users/32198', 'pm_score': 2, 'selected': False, 'text': '<p>"Principles of Concurrent and Distributed Programming", M. Ben-Ari<br>\nISBN-13: 978-0-321-31283-9<br>\nThey have in on safari books online for reading:<br>\n<a href="http://my.safaribooksonline.com/9780321312839" rel="nofollow noreferrer">http://my.safaribooksonline.com/9780321312839</a></p>\n'}]
['https://Stackoverflow.com/questions/74392', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/11858/']