Skip to content

Commit

Permalink
Simplify the logic
Browse files Browse the repository at this point in the history
  • Loading branch information
junghee committed Nov 7, 2024
1 parent 3636f5e commit 1327529
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions src/datalog/symbolization.dl
Original file line number Diff line number Diff line change
Expand Up @@ -955,28 +955,8 @@ symbolic_expr_symbol_minus_symbol(EA,Size,SymbolName1,SymbolName2,Scale,FinalOff
FinalOffset = Offset1
),
(
boundary_sym_expr(EA,NewSymbol1),
// NewSymbol1 is a section beginning and
// NewSymbol2 is in the same section.
loaded_section(NewSymbol1,SectionEnd,_),
NewSymbol2 > NewSymbol1,
NewSymbol2 <= SectionEnd,
Symbol1Loc = "Beg"
;
boundary_sym_expr(EA,NewSymbol1),
// NewSymbol1 is the next section beginning and
// NewSymbol2 is in this section.
loaded_section(NewSymbol1,_,_),
loaded_section(ThisSectionBeg,NewSymbol1,_),
NewSymbol2 >= ThisSectionBeg,
NewSymbol2 <= NewSymbol1,
Symbol1Loc = "End"
;
boundary_sym_expr(EA,NewSymbol1),
!loaded_section(NewSymbol1,_,_),
Symbol1Loc = "Beg"
;
!boundary_sym_expr(EA,NewSymbol1), Symbol1Loc = "Beg"
NewSymbol1 = NewSymbol2, Symbol1Loc = Symbol2Loc;
NewSymbol1 != NewSymbol2, Symbol1Loc = "Beg"
),
best_symexpr_symbol(NewSymbol1,SymbolName1,Symbol1Loc),
(
Expand Down

0 comments on commit 1327529

Please sign in to comment.