GithubHelp home page GithubHelp logo

rems-project / linksem Goto Github PK

View Code? Open in Web Editor NEW
41.0 41.0 6.0 42.24 MB

Semantic model for aspects of ELF static linking and DWARF debug information

License: Other

Makefile 0.33% Coq 7.37% Standard ML 31.98% Isabelle 30.98% Shell 0.14% HTML 11.65% CSS 0.02% Python 0.01% OCaml 10.46% TeX 0.04% C 2.62% Batchfile 0.19% Ruby 2.79% Yacc 0.17% Lex 0.12% Gnuplot 0.02% Assembly 1.11%

linksem's People

Contributors

bacam avatar bauereiss avatar dominicpm avatar emersion avatar fshaked avatar ojno avatar petersewell avatar rmn30 avatar stephenrkell avatar tperami avatar vzaliva avatar xrchz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linksem's Issues

natural_nat_shift

In dwarf.lem there are some "missing pervasives" called natural_nat_shift_left and natural_nat_shift_right with no definition but with OCaml bindings. Are these equivalent to multiplication and division by a power of 2? If so, could they be defined that way, at least for the HOL backend?

Optimize write_natural_field

The next perf bottleneck is write_natural_field. I thought byte_sequence was used in memory images, but it turns out this is used instead:

type byte_pattern_element = maybe byte
type byte_pattern = list byte_pattern_element

(* An element might have an address/offset, and it has some contents. *)
type element = <| startpos : maybe natural
                ; length   : maybe natural
                ; contents : byte_pattern
                |>

Is there a reason why we use maybe byte instead of byte here?

Since element is used 140 times in the whole codebase, replacing it with something else is possible but definitely not trivial.

Byte_sequence.length in Archive is slow

In Archive.accum_archive_contents, the first line computes the byte sequence length:

if Byte_sequence.length whole_seq <> whole_seq_length then

This is a performance bottleneck: by removing it, execution time goes from 17s to 11s on a glibc-linked hello world.

I wonder what's the best way to deal with it:

  • Make the ocaml target omit the check somehow? Maybe there's a way to disable asserts with release builds?
  • Switch Byte_sequence to be backed by an array instead of a list for the ocaml target. This will probably increase performance on the whole codebase, not sure how tricky it is.

auto_generated hol directory name

Why does auto_generated/hol specify -kananaskis-10? Is there something specific about the process which fixes it to that release? I can't see any such thing. I notice that the coq and isabelle directories are simply named without a version, and I would suggest the same convention for hol.

Cannot build linksem with OCaml < 4.06.0

Up until a few days ago everything worked with OCaml 4.02.3, which is the OCaml version supported by rmem.

When I try to build linksem (make LEM=<path_to_lem>) with OCaml 4.02.3 I get this:
[..]
File "byte_sequence_wrapper.ml", line 77, characters 2-11:
Error: Unbound value List.init
[..]

(List.init was introduced in 4.06.0)

Best,
Shaked

Cannot generate HOL output

Doing make hol-extraction under src produces the following error:

File "dwarf.lem", line 131, character 19 to line 131, character 31
  Type error: unbound variable for targets {hol}: print_endline
lem.mk:165: recipe for target 'hol-extraction' failed

This seems to be a debugging feature, so perhaps it could be excluded from the extraction to provers?
From the Lem library:

(* debugging functions; these should *not* be used in production code,
   but are invaluable in debugging the OCaml extraction, as long as

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.