* [Caml-list] [ANN] BAP 1.0.0
@ 2016-09-27 15:04 Ivan Gotovchits
2016-10-04 13:30 ` Anil Madhavapeddy
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
0 siblings, 2 replies; 9+ messages in thread
From: Ivan Gotovchits @ 2016-09-27 15:04 UTC (permalink / raw)
To: caml-list
[-- Attachment #1: Type: text/plain, Size: 1908 bytes --]
Dear list,
We are proud to announce a stable public release of Binary Analysis
Platform [1]. This is our tenth public release, but the first one with a
stabilized API, so now it is safe to start to use it.
Binary Analysis Platform is a framework for writing program analysis
tools, that target binary files. The framework consists of a plethora
of libraries, plugins, and frontends. The libraries provide code
reusability, the plugins facilitate extensibility, and the frontends
serve as entry points. Basically, BAP can be seen as Frama-C for binaries :)
BAP comes with a comprehensive searchable documentation [2], based on our
own fork of argot project. We also have a wiki and permanently manned chat,
where you can get help.
At the time of writing, BAP.1.0.0 didn't yet land up into the
opam-repository [3], so if you want to try it, you should use our
opam-repository,
opam repo add bap git://
github.com/BinaryAnalysisPlatform/opam-repository.git
So that you can install bap and its system dependencies with
opam depext --install bap
Alternatively, you can use Vagrantfile, shipped with the main repository to
build a virtual machine provisioned with bap. Or, you can use a docker
image, e.g.,
docker run binaryanalysisplatform/bap bap /bin/ls -dasm
Finally, if you really want to play with BAP on a daily basis, and do the
research in the field binary analysis and reverse engineering, then
consider applying to the CMU PhD program and join David Brumley's research
team. (You can apply to both ECE[4] and SCS[5] programs, even
simultaneously).
Best wishes,
Binary Analysis Platform Team
[1]: https://github.com/BinaryAnalysisPlatform/bap
[2]: http://binaryanalysisplatform.github.io/bap/api/v1.0.0/argot_index.html
[3]: https://github.com/ocaml/opam-repository/pull/7521
[4]: https://www.ece.cmu.edu/programs-admissions/phd/
[5]: https://www.cs.cmu.edu/doctoral-admissions
[-- Attachment #2: Type: text/html, Size: 2805 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] [ANN] BAP 1.0.0
2016-09-27 15:04 [Caml-list] [ANN] BAP 1.0.0 Ivan Gotovchits
@ 2016-10-04 13:30 ` Anil Madhavapeddy
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
1 sibling, 0 replies; 9+ messages in thread
From: Anil Madhavapeddy @ 2016-10-04 13:30 UTC (permalink / raw)
To: Ivan Gotovchits; +Cc: caml-list
On 27 Sep 2016, at 16:04, Ivan Gotovchits <ivg@ieee.org> wrote:
>
> Dear list,
>
> We are proud to announce a stable public release of Binary Analysis Platform [1]. This is our tenth public release, but the first one with a stabilized API, so now it is safe to start to use it.
>
> Binary Analysis Platform is a framework for writing program analysis
> tools, that target binary files. The framework consists of a plethora
> of libraries, plugins, and frontends. The libraries provide code
> reusability, the plugins facilitate extensibility, and the frontends
> serve as entry points. Basically, BAP can be seen as Frama-C for binaries :)
>
> BAP comes with a comprehensive searchable documentation [2], based on our own fork of argot project. We also have a wiki and permanently manned chat, where you can get help.
>
> At the time of writing, BAP.1.0.0 didn't yet land up into the opam-repository [3], so if you want to try it, you should use our opam-repository,
>
> opam repo add bap git://github.com/BinaryAnalysisPlatform/opam-repository.git
This has now been merged into OPAM repository and so should be available without the remote repository soon.
I just wanted to thank Ivan for going through a huge amount of testing effort before submitting the PR, as can be seen here: https://github.com/ocaml/opam-repository/pull/7521
If anyone finds any issues after the merge, please do feel free to raise an issue on https://github.com/ocaml/opam-repository/issues
regards,
Anil
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Caml-list] How to get the path of Filename.current_dir_name
2016-09-27 15:04 [Caml-list] [ANN] BAP 1.0.0 Ivan Gotovchits
2016-10-04 13:30 ` Anil Madhavapeddy
@ 2016-10-05 14:11 ` Gustave Nimant
2016-10-05 14:22 ` Gabriel Scherer
2016-10-05 14:35 ` Daniel Bünzli
1 sibling, 2 replies; 9+ messages in thread
From: Gustave Nimant @ 2016-10-05 14:11 UTC (permalink / raw)
To: caml-list
Dear list,
I would like to get the path of the current directory where the current
executed module is implemented.
Is there any builtin constant ?
I could not find.
Thanks,
Gustave
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] How to get the path of Filename.current_dir_name
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
@ 2016-10-05 14:22 ` Gabriel Scherer
2016-10-05 14:34 ` Pierrick Couderc
2016-10-05 14:35 ` Daniel Bünzli
1 sibling, 1 reply; 9+ messages in thread
From: Gabriel Scherer @ 2016-10-05 14:22 UTC (permalink / raw)
To: Gustave Nimant; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
Filename.current_dir_name is likely to be just ".", it indicates the
(location-agnosti) way to refer to the current directory on your system, to
make it easier to write code that is portable on other operating systems
with different path conventions.
You are probably looking for
Sys.getcwd : unit -> string
which when called returns the current working directory (as the `pwd`
command would do). It may of course change over the time of your program
execution, for example if you called Sys.chdir. There is also
Sys.executable_name : string
(or Sys.argv.(0)) which contains the path of the executable, but it may be
a relative path -- it depends on how the program was invoked.
On Wed, Oct 5, 2016 at 10:11 AM, Gustave Nimant <gustave.nimant@free.fr>
wrote:
> Dear list,
>
> I would like to get the path of the current directory where the current
> executed module is implemented.
> Is there any builtin constant ?
> I could not find.
>
> Thanks,
> Gustave
>
> --
> Caml-list mailing list. Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs
>
[-- Attachment #2: Type: text/html, Size: 1969 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] How to get the path of Filename.current_dir_name
2016-10-05 14:22 ` Gabriel Scherer
@ 2016-10-05 14:34 ` Pierrick Couderc
2016-10-10 8:47 ` Gustave Nimant
0 siblings, 1 reply; 9+ messages in thread
From: Pierrick Couderc @ 2016-10-05 14:34 UTC (permalink / raw)
To: Gabriel Scherer; +Cc: Gustave Nimant, caml-list
[-- Attachment #1: Type: text/plain, Size: 1957 bytes --]
>
> You are probably looking for
Sys.getcwd : unit -> string
If I understood correctly, it is more about the directory of the module at
compile time.
One (hackish) way to do it is with the value __FILE__ in Pervasives (see
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#6_Debugging
for some compile time constant used for debugging).
It simply returns the path of the .ml given to the compiler, not an
absolute path (except if you called the compiler on an absolute path, of
course).
I do not think there is any way to get the current directory of an
implementation at compile time otherwise.
2016-10-05 16:22 GMT+02:00 Gabriel Scherer <gabriel.scherer@gmail.com>:
> Filename.current_dir_name is likely to be just ".", it indicates the
> (location-agnosti) way to refer to the current directory on your system, to
> make it easier to write code that is portable on other operating systems
> with different path conventions.
>
> You are probably looking for
>
> Sys.getcwd : unit -> string
>
> which when called returns the current working directory (as the `pwd`
> command would do). It may of course change over the time of your program
> execution, for example if you called Sys.chdir. There is also
>
> Sys.executable_name : string
>
> (or Sys.argv.(0)) which contains the path of the executable, but it may be
> a relative path -- it depends on how the program was invoked.
>
> On Wed, Oct 5, 2016 at 10:11 AM, Gustave Nimant <gustave.nimant@free.fr>
> wrote:
>
>> Dear list,
>>
>> I would like to get the path of the current directory where the current
>> executed module is implemented.
>> Is there any builtin constant ?
>> I could not find.
>>
>> Thanks,
>> Gustave
>>
>> --
>> Caml-list mailing list. Subscription management and archives:
>> https://sympa.inria.fr/sympa/arc/caml-list
>> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
>> Bug reports: http://caml.inria.fr/bin/caml-bugs
>>
>
>
[-- Attachment #2: Type: text/html, Size: 3623 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] How to get the path of Filename.current_dir_name
2016-10-05 14:34 ` Pierrick Couderc
@ 2016-10-10 8:47 ` Gustave Nimant
2016-10-10 9:01 ` Pierrick Couderc
0 siblings, 1 reply; 9+ messages in thread
From: Gustave Nimant @ 2016-10-10 8:47 UTC (permalink / raw)
To: caml-list; +Cc: Pierrick Couderc
[-- Attachment #1: Type: text/plain, Size: 854 bytes --]
On 05/10/2016 16:34, Pierrick Couderc wrote:
>
> If I understood correctly, it is more about the directory of the
> module at compile time.
>
the absolute path of the module at compile time.
> One (hackish) way to do it is with the value __FILE__ in Pervasives
> (see
> http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#6_Debugging
> for some compile time constant used for debugging).
> It simply returns the path of the .ml given to the compiler, not an
> absolute path (except if you called the compiler on an absolute path,
> of course).
>
__FILE__ returns the name of the module, not the name and absolute path.
I do not understand what do you mean by "except if you called the
compiler on an absolute path, of course"
could you please give me more details about calling the compiler on an
absolute path ?
Thanks
Gustave
[-- Attachment #2: Type: text/html, Size: 1793 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] How to get the path of Filename.current_dir_name
2016-10-10 8:47 ` Gustave Nimant
@ 2016-10-10 9:01 ` Pierrick Couderc
2016-10-10 10:26 ` Gustave Nimant
0 siblings, 1 reply; 9+ messages in thread
From: Pierrick Couderc @ 2016-10-10 9:01 UTC (permalink / raw)
To: Gustave Nimant; +Cc: caml-list
[-- Attachment #1: Type: text/plain, Size: 1380 bytes --]
>
> __FILE__ returns the name of the module, not the name and absolute path.
Actually, it returns the exact path given to the compiler. For example :
$ cd /tmp
$ echo 'Printf.printf \"File path: %s\n%!" __FILE__;;' > t.ml
Then compiled and executed:
$ ocamlc t.ml && ./a.out
> File path: t.ml
$ ocamlc /tmp/t.ml && ./a.out
> File path: /tmp/t.ml
$ ocamlc ../tmp/../tmp/t.ml && ./a.out
> File path: ../tmp/../tmp/t.ml
2016-10-10 10:47 GMT+02:00 Gustave Nimant <gustave.nimant@free.fr>:
> On 05/10/2016 16:34, Pierrick Couderc wrote:
>
>
> If I understood correctly, it is more about the directory of the module at
> compile time.
>
> the absolute path of the module at compile time.
>
> One (hackish) way to do it is with the value __FILE__ in Pervasives (see
> http://caml.inria.fr/pub/docs/manual-ocaml/libref/
> Pervasives.html#6_Debugging for some compile time constant used for
> debugging).
> It simply returns the path of the .ml given to the compiler, not an
> absolute path (except if you called the compiler on an absolute path, of
> course).
>
> __FILE__ returns the name of the module, not the name and absolute path.
> I do not understand what do you mean by "except if you called the compiler
> on an absolute path, of course"
> could you please give me more details about calling the compiler on an
> absolute path ?
>
> Thanks
> Gustave
>
[-- Attachment #2: Type: text/html, Size: 3016 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [Caml-list] How to get the path of Filename.current_dir_name
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
2016-10-05 14:22 ` Gabriel Scherer
@ 2016-10-05 14:35 ` Daniel Bünzli
1 sibling, 0 replies; 9+ messages in thread
From: Daniel Bünzli @ 2016-10-05 14:35 UTC (permalink / raw)
To: Gustave Nimant; +Cc: caml-list
On Wednesday 5 October 2016 at 16:11, Gustave Nimant wrote:
> Dear list,
>
> I would like to get the path of the current directory where the current
> executed module is implemented.
> Is there any builtin constant ?
Your request is a little bit unclear. To what Gabriel said I will add that you may be interested in these magical values:
http://caml.inria.fr/pub/docs/manual-ocaml/libref/Pervasives.html#6_Debugging
Daniel
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2016-10-10 10:26 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-27 15:04 [Caml-list] [ANN] BAP 1.0.0 Ivan Gotovchits
2016-10-04 13:30 ` Anil Madhavapeddy
2016-10-05 14:11 ` [Caml-list] How to get the path of Filename.current_dir_name Gustave Nimant
2016-10-05 14:22 ` Gabriel Scherer
2016-10-05 14:34 ` Pierrick Couderc
2016-10-10 8:47 ` Gustave Nimant
2016-10-10 9:01 ` Pierrick Couderc
2016-10-10 10:26 ` Gustave Nimant
2016-10-05 14:35 ` Daniel Bünzli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox