ling538-26$ ls apbp.prolog apbp.prolog ling538-26$ more apbp.prolog s --> [a],b. b --> [a],b. b --> [b],c. b --> [b]. c --> [b],c. c --> [b]. ling538-26$ swipl Welcome to SWI-Prolog (threaded, 64 bits, version 10.0.2) SWI-Prolog comes with ABSOLUTELY NO WARRANTY. This is free software. Please run ?- license. for legal details. For online help and background, visit https://www.swi-prolog.org For built-in help, use ?- help(Topic). or ?- apropos(Word). 52 ?- [apbp]. true. 53 ?- s([a,a,b,b],[]). true . 54 ?- s([a,a,b,b],[]). true ; false. 54 ?- s([a,a,b,b,a],[]). false. 55 ?- s([],[]). false. 56 ?- s([a],[]). false. 57 ?- s([b],[]). false. 58 ?- s([a,b],[]). true. 59 ?- s([a,b,b,b],[]). true ; false. 60 ?- s(String,[]). ^C^C WARNING: By typing Control-C twice, you have forced an asynchronous WARNING: interrupt. Your only SAFE operations are: c(ontinue), p(id), WARNING: s(stack) and e(xit). Notably a(abort) often works, but WARNING: leaves the system in an UNSTABLE state Action (h for help) ? abort ^C^CAction (h for help) ? abort % Execution Aborted 61 ?-