Menu

#4 Add a "AobjectcontainsBresult" flag to temporal rules

1.4
wont-fix
None
2014-10-13
2014-10-09
No

CAUTION: This may be a kludge to artificially maintain our event structure! This may need to be re-evaluated in the long-term.

The Result field may contain filenames of files downloaded from URLs which are themselves in the object field of a preceding event. We need to be able to detect that match.

Discussion

  • Lubna Mahmoud Abu Zohair

    I have questions Dr. ,

    if what I need is the following:

    if (EvtB.Result = "HTML") // where I am planning to make result field as a file type instead of file name,
    for only cache items.
    &&
    if (evtB.Action="cache" && evtA.Action="History")
    Then
    EvtA.Object==EvtB.object;

    So its corresponding XML rule might be :

    <temporalrule serialversionuid="7">
    <samesubject>true</samesubject>
    <sameobject>true</sameobject>
    <asubjectbobject>false</asubjectbobject>
    <aobjectbsubject>false</aobjectbsubject>
    <aispreconditionalforb>False<aispreconditionalforb> <!-- Question : Most of cache item has A as a precondition but in some cases, the URL might be opened from the cached HTML, so B migh happen her before A , so if I say false it will not check this condition , true ???>
    <eventa serialversionuid="6" eventid="0">
    <subject><subject>
    <object></object>
    <action>History</action>
    <result></result>
    </subject></subject></eventa>
    <eventb serialversionuid="6" eventid="0">
    <subject><subject>
    <object></object>
    <action>Cache</action>
    <result>HTML</result>
    </subject></subject></eventb>
    </aispreconditionalforb></aispreconditionalforb></temporalrule>

    And my question is here: if the above rule can achieve my need , why we have to Add new "AobjectcontainsBresult" flag to temporal rules ????

     
    • Andrew Marrington

      Hi Lubna,

      I think because in this case you specifically want <result> to match to <object> don't you?

      As for the precondtion question - A can happen-before B without being a pre-requisite if B can happen without A happening at all. Sometimes B can happen without A happening at all, but if both happen, then A must happen-before B. Does that explain it better?

      If you want to see whether your rules will work or not, you can try now with the latest version (1.3) to load your rules in XML.

      </object></result>
       
  • Andrew Marrington

    • status: open --> accepted
    • Milestone: 1.3 --> 1.4
     
  • Lubna Mahmoud Abu Zohair

    Hello Dr. ,

    I may not need that function as what I need only to check if in result field file type is HTML, where action field is Cache, then the cache Object , i.e. URL, must exist in History event object.

    In another way :

    if
    EvtA (EvtID, timestamp, subject, Object (URL), Action (Cache), Result(HTML))
    EvtB (EvtID, timestamp, subject, Object (URL), Action (History), Result)

    Then

    EvtA.Object=EvtB.Object..

     
    • Andrew Marrington

      In this case then you shouldn't need it especially now that we have regular expression support for you to match filenames ending with a particular extension. I'm not 100% though as I think you've written the rule backwards.

      Let:
      EvtA = ID, tA, sub, url, Cache, somefile.html
      EvtB = ID, tB, sub, url, History, result
      if the rule is:
      A happened-before B

      then the cache should have somefile.html in it before the history entry's timestamp? Or is it backwards. Either way, it sounds like you are right and won't need this feature. The code then should support everything you need it to do right now, so you can try to implement your rules in the XML file and see :)

       
  • Lubna Mahmoud Abu Zohair

    Regarding the Precondition question..

    For example I want to say if its a cache item and its file type is HTML, then the URL of that cache item is exist in history, regardless of when it happen either before of after the caching of that html page..

    So by setting AispreconditionalB to false , I will achieve above condition, true ?

     
    • Andrew Marrington

      These rules require a "happened-before" relationship so you can't do any rule regardless of whether it happens before or after.

      But, if you are saying that there must be an event for a URL with "History" as the action if there is also an event for the same URL with "Cache" as the action, then it sounds like one of them is a precondition for the other, because you want to detect the "missing" event.

       
  • Andrew Marrington

    Since this was not necessary for Lubna's web history project, I won't implement this request at this time.

    The project so far has made it clear that we may need to consider a different event structure.

     
  • Andrew Marrington

    • status: accepted --> wont-fix
     

Log in to post a comment.

MongoDB Logo MongoDB