For the dishwasher, you are going to want to put a spacer at the wall end, otherewise, the edge of the door will be so close to the wall it could scrape, or catch your fingers, etc. An inch or so is all that is needed. So, that would also give you a space to add a ledger board to support the slab. You may want to do something like that at the sink end, too to balance that space off. Many DW allow you to move the top support clips to the sides, and then that would also give you something to screw them into. Some DW have enough room at top to epoxy a wood strip across to allow you to screw into, but that may limit your future choices of DW.