community. OT for bilingual grammar presupposes that there is a com¬
 munity grammar of bilingual speakers that is understood and shared by
 the members of the community.
 
OT is based on the empirical observation of emerging patterns of code¬
 switched outputs represented in an algorithmic system.
 
The code-switched outputs emerge through the interaction of universal
 but community specific hierarchical set of constraints.
 
The language-pair specific ranking of constraints is based on the algo¬
 rithmic computation of empirically collected output realizations. The
 wider range of data provides a more solid ground for setting up the
 ranking, though it does not require a certain number of empirical data
 and a given number of algorithmic computations. However, ample data
 have to be provided and represented in algorithmic tableaux to set up
 the ranking of each candidate in relation to one another.
 
The constraints are arranged in a strict dominance order. The inputs
 (candidates) are competing with each other to become the optimal can¬
 didate, the surface realization. The inputs (candidates) undergo a uni¬
 versal set of constraints and the optimal candidate will be the one, most
 harmonic with the constraints, violating the least ranked constraint and
 complying with the highest ranked in a particular linguistic situation.
 The constraints are soft, which means that they are violable. The only
 inviolable rule is that no candidate violating the highest constraint in a
 given linguistic situation can be the optimal one. It is always the actual
 community-specific ranking of constraints which determines which
 candidate is the optimal in a particular linguistic situation complying
 with the rules of well-formedness in the examined community.
 
The interaction of the violable constraints in a particular situation is
 activated by the underlying socio-pragmatic function or meaning that
 the competing candidates are meant to fulfill and index. The optimal
 candidate, out of the monolingual and code-switched one(s), will be
 the one fulfilling the particular socio-pragmatic function or indexing a
 socio-pragmatic meaning the most optimally.
 
Although in OT the number of candidates is infinite, in the OT frame¬
 work for bilingual use, it is reduced to only the number of codes that can
 potentially be involved in the act of switching.
 
The candidate, either the monolingual or the code-switched one(s), that
 violates the lowest ranked socio-cognitive constraint(s) and complies
 with the highest one, activated in that particular linguistic situation,
 will be the optimal one.
 
As the framework focuses on the meaning-making mechanism of code¬
 switching, it discusses only those instances of code-switches which in¬
 dex or construct a socio-pragmatically meaningful function. All other