Skip to content

Commit

Permalink
create special case for osx arm
Browse files Browse the repository at this point in the history
shortcut when store/select are distinct

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
  • Loading branch information
NikolajBjorner committed Aug 3, 2022
1 parent 42f5047 commit 774ce3d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
5 changes: 4 additions & 1 deletion scripts/mk_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1830,8 +1830,11 @@ def mk_makefile(self, out):
if IS_WINDOWS: # On Windows, CL creates a .lib file to link against.
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)libz3java$(SO_EXT) $(SLINK_FLAGS) %s$(OBJ_EXT) libz3$(LIB_EXT)\n' %
os.path.join('api', 'java', 'Native'))
elif IS_OSX and IS_ARCH_ARM64:
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)libz3java$(SO_EXT) $(SLINK_FLAGS) -arch arm64 %s$(OBJ_EXT) libz3$(SO_EXT)\n' %
os.path.join('api', 'java', 'Native'))
else:
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)libz3java$(SO_EXT) $(SLINK_FLAGS) $(SLINK_EXTRA_FLAGS) %s$(OBJ_EXT) libz3$(SO_EXT)\n' %
out.write('\t$(SLINK) $(SLINK_OUT_FLAG)libz3java$(SO_EXT) $(SLINK_FLAGS) %s$(OBJ_EXT) libz3$(SO_EXT)\n' %
os.path.join('api', 'java', 'Native'))
out.write('%s.jar: libz3java$(SO_EXT) ' % self.package_name)
deps = ''
Expand Down
4 changes: 2 additions & 2 deletions src/smt/theory_array.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ namespace smt {
d->m_parent_selects.push_back(s);
TRACE("array", tout << v << " " << mk_pp(s->get_expr(), m) << " " << mk_pp(get_enode(v)->get_expr(), m) << "\n";);
m_trail_stack.push(push_back_trail<enode *, false>(d->m_parent_selects));
for (enode* n : d->m_stores) {
for (enode* n : d->m_stores)
instantiate_axiom2a(s, n);
}

if (!m_params.m_array_delay_exp_axiom && d->m_prop_upward) {
for (enode* store : d->m_parent_stores) {
SASSERT(is_store(store));
Expand Down
6 changes: 6 additions & 0 deletions src/smt/theory_array_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,12 @@ namespace smt {
conseq_expr = ctx.bool_var2expr(conseq.var());
}

if (m.are_distinct(idx1->get_expr(), idx2->get_expr())) {
ctx.mark_as_relevant(conseq);
assert_axiom(conseq);
continue;
}

literal ante = mk_eq(idx1->get_expr(), idx2->get_expr(), true);
ctx.mark_as_relevant(ante);
// ctx.force_phase(ante);
Expand Down

0 comments on commit 774ce3d

Please sign in to comment.