Prolog Roman Numerals (Attribute Grammars)
问题 I am working on an assignment in prolog that scans a list of numerals and should return whether the list is a valid roman numeral and the decimal value of the numerals. Ex) 1 ?- roman(N, ['I'], []). N = 1 true. 2 ?- When I run the program that I feel should work, the decimal value is always right, so I'm guessing I got the synthesized attributes part right, but it always returns false for numeral lists that should return true. I'd also like to add that it aborts when it is supposed to if more