Loading ...
Sorry, an error occurred while loading the content.
 

Finding functions that have a parameter of type t

Expand Messages
  • Boris Hollas
    Hello, is there a tool or an Emacs-function that shows me all functions in a source directory tree that have a parameter of type t? For example, I want to do
    Message 1 of 10 , Feb 20, 2012
      Hello,

      is there a tool or an Emacs-function that shows me all functions in a
      source directory tree that have a parameter of type t?

      For example, I want to do something with a Cil_types.varinfo and I have
      a directory tree with ml-files. How do I get all functions that have a
      parameter of type Cil_types.varinfo?
      --
      Best regards,
      Boris
    • Francois Berenger
      Can you compile these sources? If yes, try to generate the .annot files (by passing -annot to the compiler), then maybe greping through these .annot files will
      Message 2 of 10 , Feb 20, 2012
        Can you compile these sources?

        If yes, try to generate the .annot files (by passing -annot to the
        compiler), then maybe greping through these .annot files will
        allow you to find what you are looking for.

        Maybe someone will propose a better way.

        Regards,
        F.

        On 02/20/2012 08:02 PM, Boris Hollas wrote:
        > Hello,
        >
        > is there a tool or an Emacs-function that shows me all functions in a
        > source directory tree that have a parameter of type t?
        >
        > For example, I want to do something with a Cil_types.varinfo and I have
        > a directory tree with ml-files. How do I get all functions that have a
        > parameter of type Cil_types.varinfo?
      • Boris Hollas
        ... yes, that s an idea. I didn t think of the .annot files yet. -- Best regards, Boris
        Message 3 of 10 , Feb 20, 2012
          On Tue, 2012-02-21 at 10:51 +0900, Francois Berenger wrote:
          > Can you compile these sources?
          >
          > If yes, try to generate the .annot files (by passing -annot to the
          > compiler), then maybe greping through these .annot files will
          > allow you to find what you are looking for.

          yes, that's an idea. I didn't think of the .annot files yet.
          --
          Best regards,
          Boris
        • Virgile Prevosto
          Hello Boris, ... There s ocamlbrowser, which is included in the ocaml distribution (provided you have tk and labltk enabled). You can search by type, and have
          Message 4 of 10 , Feb 21, 2012
            Hello Boris,

            2012/2/20 Boris Hollas <hollas@...-dresden.de>:
            > Hello,
            >
            > is there a tool or an Emacs-function that shows me all functions in a
            > source directory tree that have a parameter of type t?
            >
            > For example, I want to do something with a Cil_types.varinfo and I have
            > a directory tree with ml-files. How do I get all functions that have a
            > parameter of type Cil_types.varinfo?

            There's ocamlbrowser, which is included in the ocaml distribution
            (provided you have tk and labltk enabled). You can search by type, and
            have some type variables in your request
            (your example would be varinfo -> 'a). The main issue with it is that
            its 'path editor' menu does not have a recursive option for inspecting
            all sub-directories of a given directory. However, you can use -I
            options on the command line to add directories directly, so it only
            requires a little shell scripting to get that working.

            Best regards,
            --
            E tutto per oggi, a la prossima volta
            Virgile
          • Gabriel Scherer
            There is also Xavier Clerc s custom ocamldoc generator, Argot, that provides a search capability: http://argot.x9c.fr/ On Tue, Feb 21, 2012 at 9:09 AM, Virgile
            Message 5 of 10 , Feb 21, 2012
              There is also Xavier Clerc's custom ocamldoc generator, Argot, that
              provides a search capability:
              http://argot.x9c.fr/

              On Tue, Feb 21, 2012 at 9:09 AM, Virgile Prevosto
              <virgile.prevosto@...> wrote:
              > Hello Boris,
              >
              > 2012/2/20 Boris Hollas <hollas@...-dresden.de>:
              >> Hello,
              >>
              >> is there a tool or an Emacs-function that shows me all functions in a
              >> source directory tree that have a parameter of type t?
              >>
              >> For example, I want to do something with a Cil_types.varinfo and I have
              >> a directory tree with ml-files. How do I get all functions that have a
              >> parameter of type Cil_types.varinfo?
              >
              > There's ocamlbrowser, which is included in the ocaml distribution
              > (provided you have tk and labltk enabled). You can search by type, and
              > have some type variables in your request
              > (your example would be varinfo -> 'a). The main issue with it is that
              > its 'path editor' menu does not have a recursive option for inspecting
              > all sub-directories of a given directory. However, you can use -I
              > options on the command line to add directories directly, so it only
              > requires a little shell scripting to get that working.
              >
              > Best regards,
              > --
              > E tutto per oggi, a la prossima volta
              > Virgile
              >
              >
              > ------------------------------------
              >
              > Archives up to December 31, 2011 are also downloadable at http://www.connettivo.net/cntprojects/ocaml_beginners
              > The archives of the very official ocaml list (the seniors' one) can be found at http://caml.inria.fr
              > Attachments are banned and you're asked to be polite, avoid flames etc.Yahoo! Groups Links
              >
              >
              >
            • Boris Hollas
              ... Putting this in .bashrc does the trick: alias ob= ocamlbrowser $(find . -type d | tr n | sed s/ ./ -I ./g ) -- Best
              Message 6 of 10 , Feb 24, 2012
                On Tue, 2012-02-21 at 09:09 +0100, Virgile Prevosto wrote:
                > There's ocamlbrowser, which is included in the ocaml distribution
                > (provided you have tk and labltk enabled). You can search by type, and
                > have some type variables in your request
                > (your example would be varinfo -> 'a). The main issue with it is that
                > its 'path editor' menu does not have a recursive option for inspecting
                > all sub-directories of a given directory. However, you can use -I
                > options on the command line to add directories directly, so it only
                > requires a little shell scripting to get that working.

                Putting this in .bashrc does the trick:

                alias ob='ocamlbrowser $(find . -type d | tr '"'"'\n'"'"' '"'"' '"'"' |
                sed '"'"'s/\./ -I \./g'"'"')'
                --
                Best regards,
                Boris
              • Adrien
                ... Hi, I typically use my shell history and this is currently the last entry for ocamlbrowser: ocamlbrowser -I $(ocamlfind query gtk-extras)& And I change
                Message 7 of 10 , Feb 24, 2012
                  On 24/02/2012, Boris Hollas <hollas@...-dresden.de> wrote:
                  > On Tue, 2012-02-21 at 09:09 +0100, Virgile Prevosto wrote:
                  >> There's ocamlbrowser, which is included in the ocaml distribution
                  >> (provided you have tk and labltk enabled). You can search by type, and
                  >> have some type variables in your request
                  >> (your example would be varinfo -> 'a). The main issue with it is that
                  >> its 'path editor' menu does not have a recursive option for inspecting
                  >> all sub-directories of a given directory. However, you can use -I
                  >> options on the command line to add directories directly, so it only
                  >> requires a little shell scripting to get that working.
                  >
                  > Putting this in .bashrc does the trick:
                  >
                  > alias ob='ocamlbrowser $(find . -type d | tr '"'"'\n'"'"' '"'"' '"'"' |
                  > sed '"'"'s/\./ -I \./g'"'"')'

                  Hi,

                  I typically use my shell history and this is currently the last entry
                  for ocamlbrowser:

                  ocamlbrowser -I $(ocamlfind query gtk-extras)&

                  And I change "gtk-extras" to what I want (note that "ocamlbrowser
                  $(ocamlfind query -i-format gtk-extras)" would probably be better
                  since it would allow to specify several packages at once).

                  Regards,
                  Adrien Nader
                • Boris Hollas
                  ... This seems to work for sources installed as packages only. However, the sources I want to browse haven t been installed through the packaging system. --
                  Message 8 of 10 , Feb 24, 2012
                    On Fri, 2012-02-24 at 11:45 +0100, Adrien wrote:

                    > ocamlbrowser -I $(ocamlfind query gtk-extras)&
                    >
                    > And I change "gtk-extras" to what I want (note that "ocamlbrowser
                    > $(ocamlfind query -i-format gtk-extras)" would probably be better
                    > since it would allow to specify several packages at once).

                    This seems to work for sources installed as packages only. However, the
                    sources I want to browse haven't been installed through the packaging
                    system.
                    --
                    Best regards,
                    Boris
                  • Adrien
                    ... Yes, this will only work for libraries installed through ocamlfind. The best fix when this for other cases is to install the library through ocamlfind
                    Message 9 of 10 , Feb 24, 2012
                      On 24/02/2012, Boris Hollas <hollas@...-dresden.de> wrote:
                      > On Fri, 2012-02-24 at 11:45 +0100, Adrien wrote:
                      >
                      >> ocamlbrowser -I $(ocamlfind query gtk-extras)&
                      >>
                      >> And I change "gtk-extras" to what I want (note that "ocamlbrowser
                      >> $(ocamlfind query -i-format gtk-extras)" would probably be better
                      >> since it would allow to specify several packages at once).
                      >
                      > This seems to work for sources installed as packages only. However, the
                      > sources I want to browse haven't been installed through the packaging
                      > system.

                      Yes, this will only work for libraries installed through ocamlfind.
                      The "best" fix when this for other cases is to install the library
                      through ocamlfind instead. :-)

                      This mostly require a corresponding META file.

                      I believe that currently, every library ought to install through
                      ocamlfind. What is this library that is not working?

                      --
                      Adrien Nader
                    • Boris Hollas
                      ... It is Frama-C. There are godi and Ubuntu packages for it, but I downloaded the source tarball to have the latest sources. -- Best regards, Boris
                      Message 10 of 10 , Feb 24, 2012
                        On Fri, 2012-02-24 at 13:57 +0100, Adrien wrote:

                        > I believe that currently, every library ought to install through
                        > ocamlfind. What is this library that is not working?

                        It is Frama-C. There are godi and Ubuntu packages for it, but I
                        downloaded the source tarball to have the latest sources.

                        --
                        Best regards,
                        Boris
                      Your message has been successfully submitted and would be delivered to recipients shortly.