Add support for indexing register array #81
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Isla doesn't support pmpcfg and pmpaddr in the constraints because their type is
both
ir::Val::Vector<_>
, which falls into the default failure match arm offunction
smt_value
in file primop_until.rs.There are two ways to fix it: extract the element from the vector before passing
it to
smt_value
, or provide the new matching pattern for vector insmt_value
. Considering Z3's array theory is for an infinite array, we must addmany constraints to imitate the extensional behavior of fixed-size array. In the
meantime, seq theory is not supported in Isla at all. We choose the first
option.
We extract the option in the
get_loc_and_initialize
because the arguments ofsmt_value
are got from the result of this function. We add additional Loc typein smt_parser.lalrpop to combine the index and array together.
In the linearization.rc file, the ssa number is always -1 for the new Loc type because
the index is not variable and not assignable.