Wednesday 22 April 2015

Using Active Rules on Fluent Editor

Active rules is the mechanism Fluent Editor provides for executing custom imperative code in C# upon meeting certain criteria described as SWRL rules. Considering that standard SWRL rule axioms consist of two parts, an antecedent (body) and consequent (head), the body part of active rules exactly follows the standard format of SWRL rules. The difference from standard SWRL lies on the head part, on which you can add your custom C# code as a set of execution commands. We provide some mechanism to deal with the nature of distributed environments through a set of core built-ins. Available functions to use in active rules are as follows:
 
  • KnowledgeInsert(string knowledge) : Inserts knowledge into your ontology.
  • KnowledgeDelete(string knowledge) : Deletes knowledge into your ontology.
  • WriteMessage(string msg) : Prints msg on Active Rules Output window. 



To illustrate the use of Active Rules, we will use 'Simple IT with Active Rules' template on File > New.

As shown below, there are two active rules defined in this ontology: the first rule inserts knowledge, and the second one deletes it. Let's start by running the first active rule. In order to run active rules,   the antecedent (body) part of rule axiom should be satisfied, just as in standard SWRL rules. For the active rule 1, the following two sentences will fulfill the condition :
  • Line 76: 'Powernode-1 connects Server-1.'  
  • Line 121: 'Powernode-1 has-status Inoperable.'.

Having a rule with a fulfilling condition, you can execute the rule by clicking 'Run Active Rules' button on Tools tab.


Before the rule output appears, you will see the below message. As in SWRL Debugger, execution of Active Rules is based on materialization, which will be performed only in OWL2-RL+ mode, and OWL-DL mode is not supported yet. Click 'OK' button,


Then the active rule 1 will be executed. As shown in below image, you will find two changes.
  1. A new knowledge is added on the bottom of ontology. The new knowledge is generated by the string format passed to the KnowledgeInsert() function. 
  2. 'Show Active Rules Output' window will show up with the printed messages. The messages are strings passed to the WriteMessage() function. 


Now let's try running the other active rule. The mechanism is the same, that the body part of the rule axiom should be fulfilling. We can make this by the following steps :
  • Keep line 76: 'Powernode-1 connects Server-1.'  
  • Delete or comment out line 121: 'Powernode-1 has-status Inoperable.'.
  • Add or uncomment line  124: 'Powernode-1 has-status Operable.'.

Then click 'Run Active Rules' again on the modified ontology.

This time active rule 2 will be executed and you will find two different changes.
  1. The new knowledge added on the bottom after executing active rule 1 is now deleted. This is because the function KnowledgeDelete() was executed, the knowledge of which to delete is actually equivalent to one for KnowledgeInsert() in active rule 1. 
  2. 'Show Active Rules Output' window will print messages. The messages are strings passed to the WriteMessage() function. 

An interesting point here is, whichever active rule is executed it will be also retrieved by SWRL debugger, since active rules are processed by the same materialization process. To check the output, click 'Run Active Rules' and open 'SWRL Debug' window.

To open the Active Rules Output window again after closing it or visiting other window tabs, click 'Active Rules' button on Tools tab.  

12 comments:

  1. This is quite interesting and That's some fantastic information. Accountant London

    ReplyDelete
  2. These Using Active Rules on Fluent Editor are also very structural and admiring lines in this post for me, but there are also very welcoming and effective cheap nursing assignment writing services from them so easily in all over the UK so efficiently.

    ReplyDelete
  3. Fluent Editor allows user to focus on actual meaning of the ontology being edited. Those two tools can nicely collaborate. And they mostly used by students. And there is also I'm sharing some great knowledge with you guys, there are many students who can facing issues in their education so they can get help with Do My Dissertation UK.

    ReplyDelete

  4. The editor's bio is filled with excellent and recent information. Come here for information of any kind if you need it. In any case, if you require assistance with your education, get in touch with the scholarship essays help service. Visit this website if you want to learn more about education. The first five-paragraph model was revolutionary when it was released in 1908

    ReplyDelete
  5. Hello! On our site you can find 30+ Dynamics CE Developer interview Questions to help you in conducting the right interview. Therefore, to find the best specialists, you definitely need to go to our website and read all the necessary questions for the Dynamics CE developer.

    ReplyDelete
  6. Hi all! Looking to expand your development team? Our company offers companies from all over the world to overcome skills and resource gaps in their internal teams and business requirements. We will help you find the best IT specialists and integrate them into your team! >> Team Workflow Optimization With Team Extension

    ReplyDelete
  7. Hey! You may recruit telecom headhunters in any one of the several IT outsourcing hotspots located across the world. But some nations provide better prospects than others, depending on your budget and employment requirements. Ukraine is one of the most well-liked locations worldwide for telecom outsourcing. Hire Telecom Recruiters in Ukraine. We have served as a middleman between telecom firms and both passive and active job searchers for many years.

    ReplyDelete
  8. Employing Active Rules within Fluent Editor mirrors the strategic playbook in Big USA Sports. Just as athletes follow game plans for success, users rely on these rules to optimize their tasks. Both emphasize a methodical approach, enhancing performance and efficiency in their respective domains.

    ReplyDelete
  9. This post about Using Active Rules on Fluent Editor is so relevant and authentic for all. Still, there are also very interesting and authorised nursing assignment UK writing services available to get from them so preciously all over the UK reflectively.

    ReplyDelete
  10. Exploring the utilization of active rules on Fluent Editor is a step towards efficient writing. Just as these rules enhance editing, a proficient ghostwriting agency refines content seamlessly. The more efficient editing, the more optimal results.

    ReplyDelete
  11. Active rules in Fluent Editor are a game-changer! The ability to dynamically adjust content based on context is immensely powerful. Kudos to Cognitum for this insightful implementation.
    New Jersey District Court Protective Order
    Domestic Violence Central Registry New Jersey
    Orden Protección Nueva Jersey

    ReplyDelete
  12. I've been using active rules on fluent editor to streamline my thesis writing process, and it's been a game changer! This tool helps maintain clarity and coherence, which is important for any educational document. However, I still rely on academic writing services online for thorough review and proofreading. They catch nuances that even the latest software might miss, ensuring the final product is polished and professional. Highly recommend using both for anyone juggling multiple academic commitments!

    ReplyDelete