The main problems would be combination of attack enforcement/meta-combatants with cards that limit number of attackers or blockers like
Dueling Grounds -- to implement that properly, cards would have to count their individual number of enforcements.
I wrote about this before -- the perfect system would check all combinations and allow only those that have maximum number of requirements obeyed. However, such a system consumes too much time (not only for AI, but also for human players).
Instead, there could be a system that will take a set of attackers or blockers and try some basic operations. If maximum amount of obeyed requirements increases for any of those, the original set is flagged as illegal.
The operations would be adding or removing attacker or blocking assignment, but also switching an attacker to different player/planeswalker, switching a blocking assignment to different attacker or removing an attacker or blocker and adding another. The replacement operation is necessary in cases such as two creatures that must attack plus
Dueling Grounds. If one creature has two requirements while the other one has only one, the system would flag attack with second creature as invalid since it can be replaced by the first creature which increases the total requirements.
This could take care of
Ekundu Cyclops (requirement on
Ekundu Cyclops is obeyed if it attacks OR if no creature attacks),
Magnetic Web (each creature with magnet counter has a requirement that is obeyed if that creature attacks OR if no creatures with magnet counter attack),
Viashino Bey (each creature has a requirement that is obeyed if that creature attacks OR if
Viashino Bey doesn't attack) and
War's Toll (each creature has a requirement that is obeyed if that creature attacks OR if no creature controlled by that player attacks). Possibly also
Nacatl War-Pride.
(I hope I interpret those cards correctly. I find the term "must attack if able" very vague since in corner cases the fact that a creature MUST attack can affect whether it, in fact, CAN.)
The next problem are "interim" assignments which are not legal by themselves, but can be made legal by additional declarations. This covers
Okk,
Orcish Conscripts and
Scarred Puma, as well as various "can be only blocked by 2/3 creatures", "can't attack/block alone" etc. If these occur, either during normal declaration or during the legality check, it would be immediately checked whether further declarations can make them legal. If it's not possible or if any such combination would have lower amount of obeyed requirements than something that's already known, the interim assignment is not allowed.
This is just a suggestion, but the advantage would be that there would be no sticking in an infinite loop. If the legality check would be run after AI declares attackers, it could be corrected to a version with higher amount of requirements, so there would be no loops, only possible suboptimal attacks if AI doesn't realize that they are going to get corrected.
Another card that would become possible would be
Season of the Witch since the legality check could easily set "could attack" flag on every creature that is a part of a legal set of attackers.