Code Monkey home page Code Monkey logo

examiner's People

Contributors

valour01 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

examiner's Issues

The tool does not analyze whole conditions specified in the ASL code

The tool does not analyze whole conditions specified in the ASL code. For instance, the method isUnpredictable() of InstEncoding (in instrs2asl.py):

>>> all_encodings['aarch32_ADD_i_T3_A'].isUnpredictable('11110001000000100000110000100100')
if (d == 15 && !setflags) || n == 15 then UNPREDICTABLE
d == 15 Converted to: d == 15
n == 15 Converted to: n == 15
d == 15 Converted to: d == 15
 // Armv8-A removes UNPREDICTABLE for R13
whether 11110001000000100000110000100100 meets d == 15 Converted to: d == 15 for aarch32/ADD_i/T3_A
related variable d
init variable d = BitVec('d',32)
related variable Rd
True

In the above example the tool does not consider the value of the setflags variable at all.

Crashes on MRS and MSR instructions

When launching the generate_insts_from_asl() function of instrs2asl.py, the tool crashes on MRS and MSR instructions:

Traceback (most recent call last):
  File "<stdin>", line 8, in <module>
  File "/XXX/mra_tools/bin/instrs2asl.py", line 981, in generate_insts
    for condition in self.conditions:
  File "/XXX/mra_tools/bin/instrs2asl.py", line 1137, in solve
  File "<string>", line 1
    SYSm == SYSm<0>
SyntaxError: invalid syntax

Instruction streams incorrectly recognized as unpredictable

The method isUnpredictable() of InstEncoding (in instrs2asl.py) incorrectly recognizes instruction streams as unpredictable. For example:

>>> all_encodings['aarch32_ADD_i_T3_A'].isUnpredictable('11110001000000100000110000100100')
if (d == 15 && !setflags) || n == 15 then UNPREDICTABLE
d == 15 Converted to: d == 15
n == 15 Converted to: n == 15
d == 15 Converted to: d == 15
 // Armv8-A removes UNPREDICTABLE for R13
whether 11110001000000100000110000100100 meets d == 15 Converted to: d == 15 for aarch32/ADD_i/T3_A
related variable d
init variable d = BitVec('d',32)
related variable Rd
True  # <-- False expected

According to the ARM documentation, the stream 11110001000000100000110000100100 is a valid and predictable ADD (immediate) T3 instruction.

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.