<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Frank and Wolfgang,<div><br></div><div>Looks right. Are you using the latest codes or 5.2.0.M1? The latest codes in git are not working properly.</div><div>If you get the same result with any of the the Drools release jars please open a Jira and I will take a look.</div><div><br></div><div><blockquote type="cite">"Gaps" is not something a verifier would detect. It does not try to<br>"understand" your rules. What do you expect?</blockquote></div><div>The verifier can actually find some gaps from rule sets. For example uncovered checks for number values.</div><div>If you have&nbsp;</div><div>Person( age &lt;18 )</div><div>it gives a warning that you might want to cover Person( age &gt;= 18 ).</div><div><br></div><div>Toni Rikkola</div><div><br></div><div><div>On Mar 15, 2011, at 11:58 AM, Wolfgang Laun wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">Try a rule with an empty consequence. (rule x when Object() then end).<br><br>The .DRL file must compile for the Verifier to do its task.<br>Duplicate rules (rule names) do not compile.<br><br>"Gaps" is not something a verifier would detect. It does not try to<br>
"understand" your rules. What do you expect?<br><br>-W<br><br><br><div class="gmail_quote">On 15 March 2011 09:21, FrankVhh <span dir="ltr">&lt;<a href="mailto:frank.vanhoenshoven@agserv.eu">frank.vanhoenshoven@agserv.eu</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi all,<br>
<br>
Triggered by a post on this forum, I decided to try a testcase<br>
implementation of Drool Verifiier.<br>
<br>
I manage to write some code that does not produce any errors at runtime,<br>
which is good. Unfortunately, it doesn't produce any errors/warnings/notes<br>
on my rulefile either, which isn't good.<br>
<br>
The drl file consists of some duplicate rules, and since the file is only<br>
part of a ruleset, there might be some gaps as well.<br>
<br>
I pasted the java-code below. Does anyone see where I am going wrong?<br>
<br>
Thanks in advance!<br>
<br>
Regards,<br>
Frank<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VerifierBuilder vBuilder =<br>
VerifierBuilderFactory.newVerifierBuilder();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Verifier verifier = vBuilder.newVerifier();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;String ruleText &nbsp;=<br>
"C:<a href="smb://Users//Frank//Documents//DroolsWorkSpaces//EmpiricalExperiments//Financial">\\Users\\Frank\\Documents\\DroolsWorkSpaces\\EmpiricalExperiments\\Financial</a><br>
Rules\\src\\main\\rules\\clearancerules.drl";<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;verifier.addResourcesToVerify( ResourceFactory.newReaderResource(<br>
new StringReader( ruleText ) ), ResourceType.DRL );<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;verifier.fireAnalysis();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;VerifierReport result = verifier.getResult();<br>
<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(VerifierMessageBase base: result.getBySeverity(<br>
Severity.ERROR ) ){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( base );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(VerifierMessageBase base: result.getBySeverity(<br>
Severity.WARNING ) ){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( base );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;for(VerifierMessageBase base: result.getBySeverity( Severity.NOTE )<br>
){<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println( base );<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;}<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://drools-java-rules-engine.46999.n3.nabble.com/Drools-verifier-tp2681002p2681002.html" target="_blank">http://drools-java-rules-engine.46999.n3.nabble.com/Drools-verifier-tp2681002p2681002.html</a><br>

Sent from the Drools - User mailing list archive at <a href="http://Nabble.com">Nabble.com</a>.<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br>
_______________________________________________<br>rules-users mailing list<br><a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>https://lists.jboss.org/mailman/listinfo/rules-users<br></blockquote></div><br></body></html>