In-Memory Computing Using Formal Methods And Paths-Based Logic