units_compute_expression2(boolean_true,_Type,_Info,_LocalState,_State,boolean(_)) :- !.
units_compute_expression2(boolean_false,_Type,_Info,_LocalState,_State,boolean(_)) :- !.
units_compute_expression2(min_int,_Type,_Info,_LocalState,_State,integer(_)) :- !.
units_compute_expression2(max_int,_Type,_Info,_LocalState,_State,integer(_)) :- !.
units_compute_expression2(empty_set,Type,Info,_LocalState,_State,Result) :-
!, b_type_to_internal_type(Type,Info,Result).
units_compute_expression2(bool_set,_Type,_Info,_LocalState,_State,set(boolean(_))) :- !.
units_compute_expression2(string_set,_Type,_Info,_LocalState,_State,set(string(_))) :- !.
units_compute_expression2(convert_bool(Arg1),_Type,_Info,LocalState,State,boolean(_)) :-
!, units_check_boolean_expression(Arg1,LocalState,State).
units_compute_expression2(add(Arg1,Arg2),integer,Info,LocalState,State,integer(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,integer(SV1)),
units_compute_expression(Arg2,LocalState,State,integer(SV2)),
units_compute_expression(Arg2,LocalState,State,integer(SV2)),
(
member(conversion,Info)
-> (
(var(SV1)
-> units_domain_addition_conversion(Arg1,SV2,Value), !
; units_domain_addition_conversion(Arg2,SV1,Value), !
)
; !, member(nodeid(Position),Info),
current_state_id(ID),
translate_bexpression(b(add(Arg1,Arg2),integer,Info), PPExpr),
units:units_error_context(Context),
store_state_error(ID,abort_error(well_definedness_error,
'Wrong usage of conversion',PPExpr,
span_context(Position,Context)),_)
)
; lub(SV1,SV2,Value)
).
units_compute_expression2(minus(Arg1,Arg2),integer,Info,LocalState,State,integer(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,integer(SV1)),
units_compute_expression(Arg2,LocalState,State,integer(SV2)),
(
member(conversion,Info)
-> (
(var(SV1)
-> units_domain_subtraction_conversion(Arg1,SV2,Value), !
; units_domain_subtraction_conversion(Arg2,SV1,Value), !
)
; !, member(nodeid(Position),Info),
current_state_id(ID),
translate_bexpression(b(minus(Arg1,Arg2),integer,Info), PPExpr),
units:units_error_context(Context),
store_state_error(ID,abort_error(well_definedness_error,
'Wrong usage of conversion',PPExpr,
span_context(Position,Context)),_)
)
; lub(SV1,SV2,Value)
).
units_compute_expression2(unary_minus(Arg1),integer,_Info,LocalState,State,Arg2) :-
!, units_compute_expression(Arg1,LocalState,State,Arg2).
units_compute_expression2(multiplication(Arg1,Arg2),integer,Info,LocalState,State,integer(Value)) :-
!,
units_compute_expression(Arg1,LocalState,State,integer(SV1)),
units_compute_expression(Arg2,LocalState,State,integer(SV2)),
(
member(conversion,Info)
-> (
(var(SV1)
-> units_domain_multiplication_conversion(Arg1,SV2,Value), !
; units_domain_multiplication_conversion(Arg2,SV1,Value), !
)
; !, member(nodeid(Position),Info),
current_state_id(ID),
translate_bexpression(b(multiplication(Arg1,Arg2),integer,Info), PPExpr),
units:units_error_context(Context),
store_state_error(ID,abort_error(well_definedness_error,
'Wrong usage of conversion',PPExpr,
span_context(Position,Context)),_)
)
; units_domain_multiplication(SV1,SV2,Value)
).
units_compute_expression2(cartesian_product(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(C1), SV2 = set(C2), Value = set(couple(C1,C2)).
units_compute_expression2(div(Arg1,Arg2),integer,Info,LocalState,State,integer(Value)) :-
!,
units_compute_expression(Arg1,LocalState,State,integer(SV1)),
units_compute_expression(Arg2,LocalState,State,integer(SV2)),
(
member(conversion,Info)
-> (
(var(SV1)
-> units_domain_division_conversion(Arg1,SV2,Value), !
; units_domain_division_conversion(Arg2,SV1,Value), !
)
; !, member(nodeid(Position),Info),
current_state_id(ID),
translate_bexpression(b(div(Arg1,Arg2),integer,Info), PPExpr),
units:units_error_context(Context),
store_state_error(ID,abort_error(well_definedness_error,
'Wrong usage of conversion',PPExpr,
span_context(Position,Context)),_)
)
; units_domain_division(SV1,SV2,Value)
).
units_compute_expression2(modulo(Arg1,_Arg2),integer,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(power_of(Arg1,Arg2),integer,_Info,LocalState,State,integer(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,integer(SV1)),
units_domain_power_of(SV1,Arg2,Value).
units_compute_expression2(min(Arg1),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(Value).
units_compute_expression2(max(Arg1),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(Value).
units_compute_expression2(card(_Arg1),integer,_Info,_LocalState,_State,integer([])) :- !.
units_compute_expression2(couple(Arg1,Arg2),_Type,_Info,LocalState,State,couple(SV1,SV2)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2).
units_compute_expression2(pow_subset(Arg1),_X,_Info,LocalState,State,set(SV1)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(pow1_subset(Arg1),_X,_Info,LocalState,State,set(SV1)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(fin_subset(Arg1),_X,_Info,LocalState,State,set(SV1)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(fin1_subset(Arg1),_X,_Info,LocalState,State,set(SV1)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(interval(Arg1,Arg2),set(integer),_Info,LocalState,State,set(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,SV2,Value).
units_compute_expression2(union(Arg1,Arg2),set(_X),_Info,LocalState,State,set(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,set(SV1)),
units_compute_expression(Arg2,LocalState,State,set(SV2)),
lub(SV1,SV2,Value).
units_compute_expression2(intersection(Arg1,Arg2),set(_X),_Info,LocalState,State,set(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,set(SV1)),
units_compute_expression(Arg2,LocalState,State,set(SV2)),
lub(SV1,SV2,Value).
units_compute_expression2(set_subtraction(Arg1,Arg2),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,SV2,Value).
units_compute_expression2(general_union(Arg1),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(set(A)), Value = set(A).
units_compute_expression2(general_intersection(Arg1),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(set(A)), Value = set(A).
units_compute_expression2(relations(Arg1,Arg2),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(reverse(Arg1),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(A,B)),
Value = set(couple(B,A)).
units_compute_expression2(concat(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,SV2,Value).
units_compute_expression2(insert_front(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(set(couple(integer(_),SV1)),SV2,Value).
units_compute_expression2(insert_tail(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,set(couple(integer(_),SV2)),Value).
units_compute_expression2(general_concat(Arg1),_X,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(integer(_),set(couple(integer(_),A)))), Value = set(couple(integer(_),A)).
units_compute_expression2(composition(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A,B1)), SV2 = set(couple(B2,C)),
same_units(B1,B2), Value = set(couple(A,C)).
units_compute_expression2(direct_product(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A1,B)), SV2 = set(couple(A2,C)),
lub(A1,A2,A3),
Value = set(couple(A3,couple(B,C))).
units_compute_expression2(parallel_product(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A,B)), SV2 = set(couple(C,D)),
Value = set(couple(couple(A,C),couple(B,D))).
units_compute_expression2(domain(Arg1),_Type,_Info,LocalState,State,set(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(Value,_X)).
units_compute_expression2(range(Arg1),_Type,_Info,LocalState,State,set(Value)) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(_X,Value)).
units_compute_expression2(image(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A1,Image)), SV2 = set(A2),
same_units(A1,A2), Value=set(Image).
units_compute_expression2(domain_restriction(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(A1), SV2 = set(couple(A2,B)),
lub(A1,A2,A3), Value=set(couple(A3,B)).
units_compute_expression2(domain_subtraction(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(A1), SV2 = set(couple(A2,B)),
lub(A1,A2,A3), Value=set(couple(A3,B)).
units_compute_expression2(range_restriction(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A,B1)), SV2 = set(B2),
lub(B1,B2,B3), Value=set(couple(A,B3)).
units_compute_expression2(range_subtraction(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
SV1 = set(couple(A,B1)), SV2 = set(B2),
lub(B1,B2,B3), Value=set(couple(A,B3)).
units_compute_expression2(overwrite(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,SV2,Value).
units_compute_expression2(partial_function(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_function(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(partial_injection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_injection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(partial_surjection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_surjection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_bijection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(partial_bijection(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_relation(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(surjection_relation(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(total_surjection_relation(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
units_domain_relation(SV1,SV2,Value).
units_compute_expression2(seq(Arg1),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(seq1(Arg1),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(iset(couple(integer(_),Arg1)),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(iseq(Arg1),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(iseq1(Arg1),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(perm(Arg1),_Type,_Info,LocalState,State,set(set(couple(integer(_),V)))) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(V).
units_compute_expression2(empty_sequence,Type,Info,_LocalState,_State,Result) :-
!, b_type_to_internal_type(Type,Info,Result).
units_compute_expression2(size(_Arg1),_Type,_Info,_LocalState,_State,integer([])) :- !.
units_compute_expression2(first(Arg1),_Type,_Info,LocalState,State,V) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(integer(_),V)).
units_compute_expression2(last(Arg1),_Type,_Info,LocalState,State,V) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
SV1 = set(couple(integer(_),V)).
units_compute_expression2(front(Arg1),_Type,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(tail(Arg1),_Type,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(rev(Arg1),_Type,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(concat(Arg1,Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
units_compute_expression(Arg2,LocalState,State,SV2),
lub(SV1,SV2,Value).
units_compute_expression2(function(Function,Arg),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Function,LocalState,State,FValue),
units_compute_expression(Arg,LocalState,State,ArgValue),
FValue = set(couple(ArgValue,Value)).
units_compute_expression2(set_extension(Ex),set(_X),_Info,LocalState,State,set(Merged)) :-
!, units_compute_expressions(Ex,LocalState,State,ExValue),
merge_expression_list(ExValue,Merged).
units_compute_expression2(sequence_extension(Ex),_X,_Info,LocalState,State,set(couple(integer(_),Merged))) :-
!, units_compute_expressions(Ex,LocalState,State,ExValue),
merge_expression_list(ExValue,Merged).
units_compute_expression2(comprehension_set(ListOfIDs,Pred),_Type,_Info,LocalState,State,set(Merged)) :-
!,
units_set_up_localstate(ListOfIDs,_Bindings,ParameterState),
append(ParameterState,LocalState,NewLocalState),
units_check_boolean_expression(Pred,NewLocalState,State),
units_compute_expressions(ListOfIDs,NewLocalState,State,ExValues),
%format('#### ExValues in Comprehension Set: ~w~n', [ExValues]),
couplise_list(ExValues, Merged).
units_compute_expression2(general_sum(ListOfIDs,Pred,Stmt),_Type,_Info,LocalState,State,Value) :-
!,
units_set_up_localstate(ListOfIDs,_Bindings,ParameterState),
append(ParameterState,LocalState,NewLocalState),
units_check_boolean_expression(Pred,NewLocalState,State),
units_compute_expression(Stmt,NewLocalState,State,Value).
units_compute_expression2(general_product(ListOfIDs,Pred,Stmt),_Type,_Info,LocalState,State,Value) :-
!,
units_set_up_localstate(ListOfIDs,_Bindings,ParameterState),
append(ParameterState,LocalState,NewLocalState),
units_check_boolean_expression(Pred,NewLocalState,State),
units_compute_expression(Stmt,NewLocalState,State,Value).
units_compute_expression2(closure(Arg1),_X,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(closure1(Arg1),_X,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(reflexive_closure(Arg1),_X,_Info,LocalState,State,SV1) :-
!, units_compute_expression(Arg1,LocalState,State,SV1).
units_compute_expression2(integer(_Int),_T,Info,_LS,_S,Res) :- !,
(member(unit(Unit),Info) -> unit_args_to_list(Unit, V), Res=integer(V); Res=integer(_)).
units_compute_expression2(identifier(Id),_Type,_Info,LocalState,State,Value) :-
!, units_lookup_value(Id,LocalState,State,Value).
units_compute_expression2(first_of_pair(Pair),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Pair,LocalState,State,SV1),
SV1 = couple(Value,_Second).
units_compute_expression2(second_of_pair(Pair),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Pair,LocalState,State,SV1),
SV1 = couple(_First,Value).
units_compute_expression2(iteration(Arg1,_Arg2),_Type,_Info,LocalState,State,Value) :-
!, units_compute_expression(Arg1,LocalState,State,SV1),
Value = SV1.
units_compute_expression2(integer_set(_),Type,Info,_LocalState,_State,Result) :-
!, b_type_to_internal_type(Type,Info,Result).
units_compute_expression2(string(_),_Type,_Info,_LocalState,_State,string(_)) :- !.
units_compute_expression2(external_function_call(_FunName,Arguments),Type,Info,LocalState,State,Result) :-
%format('Function: ~w~nArguments: ~w~nType: ~w~nInfo:~w~n', [FunName,Arguments,Type,Info]),
!, units_compute_expressions(Arguments,LocalState,State,_EvaluatedArgs),
b_type_to_internal_type(Type,Info,Result).
units_compute_expression2(identity(X),_Type,_Info,LocalState,State,Result) :-
!, units_compute_expression(X,LocalState,State,set(XExpr)),
Result = set(couple(XExpr,XExpr)).
units_compute_expression2(value(_),Type,Info,_LocalState,_State,Result) :-
!, b_type_to_internal_type(Type,Info,Result).
units_compute_expression2(let_expression(Ids,Assignments,Expr),_Type,_Infos,LocalState,State,Result) :-
!, units_compute_expressions(Assignments,LocalState,State,Assignments2),
assign_vars(Ids,Assignments2,LocalState,State,NewVars,NewVals),
assign_vals_to_vars(NewVars,NewVals,StoreList),
append(StoreList,LocalState,LetState),
units_compute_expression(Expr,LetState,State,Result).
units_compute_expression2(rec(Fields),_Type,_Infos,LocalState,State,rec(Result)) :-
!, units_compute_record_fields(Fields,LocalState,State,Result).
units_compute_expression2(record_field(Record,Field),_Type,_Infos,LocalState,State,Result) :-
!, units_compute_expression(Record,LocalState,State,rec(Fields)),
member(field(Field,Result),Fields).
units_compute_expression2(struct(Rec),_Type,_Infos,LocalState,State,set(Result)) :-
!, units_compute_expression(Rec,LocalState,State,Result).
units_compute_expression2(X,T,I,LS,S,_V) :-
!, add_error_fail(units_compute_expression2, 'Expression not implemented: ', [X,T,I,LS,S]).