Menu

#145 Initialization of Pointer Analysis Module

Feature request
pending
ptranal (2)
5
2014-06-26
2014-06-25
az bro
No

I would like to be able to call the pointer analysis multiple
times. Edits are below.

In ptranal.mli:

val initialize: unit -> unit
val analyze_global : Cil.global -> unit

In ptranal.ml:

let initialize (u:unit) = (
   A.initialize ();
   found_undefined := false;
   current_fundec := None;
   fun_varinfo_map := F.empty;
   current_ret := None;
   Hashtbl.clear lvalue_hash;
   Hashtbl.clear expressions;
   Hashtbl.clear lvalues;
   all_globals  := [];
   all_functions := [];
   count := 0;
)

In golf.mli:

val initialize : unit -> unit

In golf.ml:

let initialize (u:unit) = (
   Q.clear eq_worklist;
   Q.clear leq_worklist;
   Q.clear path_worklist;
   PH.clear path_hash;
   toplev_count := 0;
   H.clear cached_aliases;
   H.clear join_cache;
)

Related

Bugs: #145

Discussion

  • Gabriel Kerneis

    Gabriel Kerneis - 2014-06-26

    I'm ok with the change in principle, but it also needs implementing for Of.

     
  • Gabriel Kerneis

    Gabriel Kerneis - 2014-06-26

    And count is hidden in fresh_index so cannot be reset directly like this. Do you actually use this change? Do you have a clean patch of it? I can work on it a bit, but I'm afraid to miss some globals to reset.

     
    • az bro

      az bro - 2014-06-26

      Yeah, I use it, but it hasn't been extensively tested, so I may
      well have missed some globals.

      I never used Olf, so I didn't add an initializer to it.

      On Thu, Jun 26, 2014 at 2:03 PM, Gabriel Kerneis kerneis@users.sf.net
      wrote:

      And count is hidden in fresh_index so cannot be reset directly like this.
      Do you actually use this change? Do you have a clean patch of it? I can
      work on it a bit, but I'm afraid to miss some globals to reset.


      Status: open
      Group: Feature request
      Labels: ptranal
      Created: Wed Jun 25, 2014 12:42 PM UTC by az bro
      Last Updated: Thu Jun 26, 2014 11:00 AM UTC
      Owner: Gabriel Kerneis

      I would like to be able to call the pointer analysis multiple
      times. Edits are below.

      In ptranal.mli:

      val initialize: unit -> unit
      val analyze_global : Cil.global -> unit

      In ptranal.ml:

      let initialize (u:unit) = (
      A.initialize ();
      found_undefined := false;
      current_fundec := None;
      fun_varinfo_map := F.empty;
      current_ret := None;
      Hashtbl.clear lvalue_hash;
      Hashtbl.clear expressions;
      Hashtbl.clear lvalues;
      all_globals := [];
      all_functions := [];
      count := 0;)

      In golf.mli:

      val initialize : unit -> unit

      In golf.ml:

      let initialize (u:unit) = (
      Q.clear eq_worklist;
      Q.clear leq_worklist;
      Q.clear path_worklist;
      PH.clear path_hash;
      toplev_count := 0;
      H.clear cached_aliases;
      H.clear join_cache;)


      Sent from sourceforge.net because you indicated interest in
      https://sourceforge.net/p/cil/bugs/145/

      To unsubscribe from further messages, please visit
      https://sourceforge.net/auth/subscriptions/

      --
      sɐpıɯ ƃuıʞ ǝsɹǝʌuı

       

      Related

      Bugs: #145

      • az bro

        az bro - 2014-06-26

        Interesting:
        ( Hashtbl.clear fun_access_map; )

        Clearly, at some point, I did, but commented it out. Not sure
        why... /-: It looks like it doesn't matter - the table entries should be
        defined before used.

        On Thu, Jun 26, 2014 at 2:12 PM, az bro azbro@users.sf.net wrote:

        Yeah, I use it, but it hasn't been extensively tested, so I may
        well have missed some globals.

        I never used Olf, so I didn't add an initializer to it.

        On Thu, Jun 26, 2014 at 2:03 PM, Gabriel Kerneis kerneis@users.sf.net
        wrote:

        And count is hidden in fresh_index so cannot be reset directly like this.

        Do you actually use this change? Do you have a clean patch of it? I can
        work on it a bit, but I'm afraid to miss some globals to reset.


        Status: open
        Group: Feature request
        Labels: ptranal
        Created: Wed Jun 25, 2014 12:42 PM UTC by az bro
        Last Updated: Thu Jun 26, 2014 11:00 AM UTC
        Owner: Gabriel Kerneis

        I would like to be able to call the pointer analysis multiple
        times. Edits are below.

        In ptranal.mli:

        val initialize: unit -> unit
        val analyze_global : Cil.global -> unit

        In ptranal.ml:

        let initialize (u:unit) = (
        A.initialize ();
        found_undefined := false;
        current_fundec := None;
        fun_varinfo_map := F.empty;
        current_ret := None;
        Hashtbl.clear lvalue_hash;
        Hashtbl.clear expressions;
        Hashtbl.clear lvalues;
        all_globals := [];
        all_functions := [];
        count := 0;)

        In golf.mli:

        val initialize : unit -> unit

        In golf.ml:

        let initialize (u:unit) = (
        Q.clear eq_worklist;
        Q.clear leq_worklist;
        Q.clear path_worklist;
        PH.clear path_hash;
        toplev_count := 0;
        H.clear cached_aliases;
        H.clear join_cache;)


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/cil/bugs/145/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        sɐpıɯ ƃuıʞ ǝsɹǝʌuı


        Status: open
        Group: Feature request
        Labels: ptranal
        Created: Wed Jun 25, 2014 12:42 PM UTC by az bro
        Last Updated: Thu Jun 26, 2014 11:03 AM UTC
        Owner: Gabriel Kerneis

        I would like to be able to call the pointer analysis multiple
        times. Edits are below.

        In ptranal.mli:

        val initialize: unit -> unit
        val analyze_global : Cil.global -> unit

        In ptranal.ml:

        let initialize (u:unit) = (
        A.initialize ();
        found_undefined := false;
        current_fundec := None;
        fun_varinfo_map := F.empty;
        current_ret := None;
        Hashtbl.clear lvalue_hash;
        Hashtbl.clear expressions;
        Hashtbl.clear lvalues;
        all_globals := [];
        all_functions := [];
        count := 0;)

        In golf.mli:

        val initialize : unit -> unit

        In golf.ml:

        let initialize (u:unit) = (
        Q.clear eq_worklist;
        Q.clear leq_worklist;
        Q.clear path_worklist;
        PH.clear path_hash;
        toplev_count := 0;
        H.clear cached_aliases;
        H.clear join_cache;)


        Sent from sourceforge.net because you indicated interest in
        https://sourceforge.net/p/cil/bugs/145/

        To unsubscribe from further messages, please visit
        https://sourceforge.net/auth/subscriptions/

        --
        sɐpıɯ ƃuıʞ ǝsɹǝʌuı

         

        Related

        Bugs: #145

        • Gabriel Kerneis

          Gabriel Kerneis - 2014-06-26

          On Thu, Jun 26, 2014 at 11:28:40AM +0000, az bro wrote:

          Clearly, at some point, I did, but commented it out. Not sure
          why... /-: It looks like it doesn't matter - the table entries should be
          defined before used.

          Ack. I'll reset nonetheless.

          One more question: you are resetting count in Ptranal but not
          appsite_index, counter and stamp in Golf.ml. Is this on purpose?

          I'll then try and write initialize for Olf and push the change, it looks
          good.

           
          • az bro

            az bro - 2014-06-26

            No, didn;'t even notice them since they're declared inside
            functions... They should be reset too, of course. Again,
            won't matter.

            Thanks!

            C

            On Thu, Jun 26, 2014 at 2:34 PM, Gabriel Kerneis kerneis@users.sf.net
            wrote:

            On Thu, Jun 26, 2014 at 11:28:40AM +0000, az bro wrote:

            Clearly, at some point, I did, but commented it out. Not sure
            why... /-: It looks like it doesn't matter - the table entries should be
            defined before used.

            Ack. I'll reset nonetheless.

            One more question: you are resetting count in Ptranal but not
            appsite_index, counter and stamp in Golf.ml. Is this on purpose?

            I'll then try and write initialize for Olf and push the change, it looks
            good.


            Status: open
            Group: Feature request
            Labels: ptranal
            Created: Wed Jun 25, 2014 12:42 PM UTC by az bro
            Last Updated: Thu Jun 26, 2014 11:18 AM UTC
            Owner: Gabriel Kerneis

            I would like to be able to call the pointer analysis multiple
            times. Edits are below.

            In ptranal.mli:

            val initialize: unit -> unit
            val analyze_global : Cil.global -> unit

            In ptranal.ml:

            let initialize (u:unit) = (
            A.initialize ();
            found_undefined := false;
            current_fundec := None;
            fun_varinfo_map := F.empty;
            current_ret := None;
            Hashtbl.clear lvalue_hash;
            Hashtbl.clear expressions;
            Hashtbl.clear lvalues;
            all_globals := [];
            all_functions := [];
            count := 0;)

            In golf.mli:

            val initialize : unit -> unit

            In golf.ml:

            let initialize (u:unit) = (
            Q.clear eq_worklist;
            Q.clear leq_worklist;
            Q.clear path_worklist;
            PH.clear path_hash;
            toplev_count := 0;
            H.clear cached_aliases;
            H.clear join_cache;)


            Sent from sourceforge.net because you indicated interest in
            https://sourceforge.net/p/cil/bugs/145/

            To unsubscribe from further messages, please visit
            https://sourceforge.net/auth/subscriptions/

            --
            sɐpıɯ ƃuıʞ ǝsɹǝʌuı

             

            Related

            Bugs: #145

  • Gabriel Kerneis

    Gabriel Kerneis - 2014-06-26

    In ptranal.ml, why don't you clear fun_access_map too?

     
  • Gabriel Kerneis

    Gabriel Kerneis - 2014-06-26

    OK, tentative patches pushed to branch ptanal-fixes. Let me know if it works for you. Thanks for the report.

     
  • Gabriel Kerneis

    Gabriel Kerneis - 2014-06-26
    • status: open --> pending
     

Log in to post a comment.

MongoDB Logo MongoDB