:- expects_dialect(lps). %0.531 seconds cpu time %?- dumplps initially menu(spring_rolls), menu(dumplings), menu(peking_duck), menu(fried_rice), menu(chow_mein), menu(mapo_tofu), portion(spring_rolls,10), portion(dumplings,10), portion(peking_duck,10), portion(fried_rice,10), portion(chow_mein,10), portion(mapo_tofu,0), biggest_table(id8,8), table(id1,2), table(id2,2), table(id3,3), table(id4,4), table(id5,4), table(id6,5), table(id7,6), table(id8,8), is_free(id1), is_free(id2), is_free(id3), is_free(id4), is_free(id5), is_free(id6), is_free(id7), is_free(id8), waiting_staff(andy), waiting_staff(becca), waiting_staff(charlie), waiting_staff(danni), errand_boy(jim). observe([sign_in(andy),sign_in(becca)],11). observe([arrive([person_1,personO,person_3]),arrive([person_4,personT_S,person_6])],12). observe([],13). observe([],14). observe([],15). lps_number(People,Size):- my_length(People,Size). lps_same(X,Y):- X==Y. lps_diff(X,Y):- X\==Y. lps_less(X,Y):- XY. lps_leq(X,Y):- X==Y. lps_inc(X,X1):- X1 is X+1. lps_dec(X,X1):- X1 is X-1. lps_write(X):- write(X),nl. action(report_duty(_)). action(leave_duty(_)). action(guide(_,_,_)). action(reject(_)). action(reserve(_,_,_)). action(update_no_show(_,_)). action(send_errand_boy(_,_)). action(cook(_)). action(get_serving(_,_)). action(bring(_,_,_)). event(sign_in(_)). event(sign_out(_)). event(arrive(_)). event(book(_,_,_)). event(order(_,_,_)). event(return_errand_boy(_,_,_)). fluent(menu(_)). fluent(portion(_,_)). fluent(biggest_table(_,_)). fluent(table(_,_)). fluent(is_free(_)). fluent(waiting_staff(_)). fluent(errand_boy(_)). fluent(on_duty(_)). fluent(staff_status(_,_)). fluent(blacklisted(_)). fluent(no_show(_,_)). fluent(reserved(_,_,_)). fluent(raw_ing(_)). leave_duty(Staff)from T1 to _T2 terminates on_duty(Staff) if on_duty(Staff)at T1. leave_duty(Staff)from T1 to _T2 terminates staff_status(Staff,_Status) if staff_status(Staff,available)at T1. guide(What,T_S954,Table)from T_S946 to T_S948 terminates is_free(Table) if table(Table,T_S978)at T_S946. guide(Staff,_People,_TId)from _T1 to _T2 terminates staff_status(Staff,available). reserve(What,T_S954,Table)from T_S946 to T_S948 terminates is_free(T_S954) if table(T_S954,T_S978)at T_S946. update_no_show(Person,_N)from _T1 to _T2 terminates no_show(Person,_X). update_no_show(What,T_S954)from T_S946 to T_S948 terminates reserved(T_S958,What,T_S962). return_errand_boy(What,T_S954,Table)from T_S946 to T_S948 terminates portion(T_S954,T_S962) if portion(T_S954,T_S980)at T_S946, lps_less(T_S980,1). get_serving(What,T_S954)from T_S946 to T_S948 terminates portion(What,T_S960). if sign_in(Staff)from _T1 to T2,waiting_staff(Staff)at T2 then report_duty(Staff)from T3 to _T4, tc(T2= ?- godc(Timeline). */