I read this many years ago. As far as I remember, the judge was fascinated by spiders and an AI computer did play a role as well. I think it was rather a short story and not a novel, but I'm not sure.
"The Venetian Court" (1982) by Charles L. Harness
The Plaintiff Universal Patents Inc. was heartless.
The judge Rex "Spider" Speyer was merciless.
Ellen Welles' case seemed hopeless.
Unless her lawyer could locate the mad creator of FAUST - the robot-inventor who'd given Universal Patents its stranglehold on the world economy - she was sure to die for patent infringement a capital crime in the twenty-first century.
Quentin Thomas Ellen's lawyer already knew that the judge was a psychopath and he quickly learned just how dirty Universal could play...
As has been mentioned in a comment by user14111 it is possible you read the initial short story version published in Analog in 1981.
I found this by Googling
"short story" with death sentences for patent infringements (part of the title of the question) which turned up this review. From there I was 99% sure it was correct but I checked Goodreads and a couple of other links for the work to be sure.