Programming Languages

Access Control in Feature-Oriented Programming

by Sven Apel, Sergiy Kolesnikov, Jörg Liebig, Chris­t­ian Kästner, Mar­tin Kuh­le­mann, and Thomas Leich

In Sci­ence of Com­puter Pro­gram­ming (Spe­cial Issue on Fea­ture-Ori­ented Soft­ware De­vel­op­ment) 77(3): . El­se­vier, 2012.

Ab­stract

In fea­ture-ori­ented pro­gram­ming (FOP) a pro­gram­mer de­com­poses a pro­gram in terms of fea­tures. Ide­ally, fea­tures are im­ple­mented mod­u­larly so that they can be de­vel­oped in iso­la­tion. Ac­cess con­trol is an im­por­tant in­gre­di­ent to at­tain fea­ture mod­u­lar­ity as it pro­vides mech­a­nisms to hide and ex­pose in­ter­nal de­tails of a mod­ule’s im­ple­men­ta­tion. But de­vel­op­ers of con­tem­po­rary fea­ture-ori­ented lan­guages have not con­sid­ered ac­cess con­trol mech­a­nisms so far. The ab­sence of a well-de­fined ac­cess con­trol model for FOP breaks en­cap­su­la­tion of fea­ture code and leads to un­ex­pected pro­gram be­hav­iors and in­ad­ver­tent type er­rors. We raise aware­ness of this prob­lem, pro­pose three fea­ture-ori­ented ac­cess mod­i­fiers, and pre­sent a cor­re­spond­ing ac­cess mod­i­fier model. We offer an im­ple­men­ta­tion of the model on the basis of a fully-fledged fea­ture-ori­ented com­piler. Fi­nally, by an­a­lyz­ing ten fea­ture-ori­ented pro­grams, we ex­plore the po­ten­tial of fea­ture-ori­ented mod­i­fiers in FOP.