TVL is a text-based (as opposed to diagrammatic) language for feature models with a C-like syntax. The goal of the language is to be scalable, by being concise and by offering mechanisms for modularity, and to be comprehensive so as to cover most of the feature model dialects proposed in the literature. The advantage of a text-based language is that there are many well-accepted applications (that is, text editors, source control systems, diff tools, and so on) that will support modelling out of the box. Furthermore, choosing a C-like syntax means lowering learning curves for most IT professionals. We hope that this will lead to an easier adoption of feature models in an industrial context.
More information about TVL can be found in the papers listed below.
At the moment, TVL is a language proposal, and we are requesting feedback from the variability modelling research community. We are in the process of conducting a number of case studies. We are also developing a reference implementation for TVL in Java, more details below.
Example TVL models and other files can be found in the file repository.
The BNF grammar of the TVL language can be downloaded here. This grammar is derived from the annotated grammar we feed to CUP. The grammar is a conflict-free LALR grammar and can thus be fed into most LR parser generators out there.
The same grammar in the SDF format can be downloaded here.
You can download the current version (v20100804) of the reference implementation here. The library requires Java 1.6. Please note that this is a research prototype and (more importantly) that it is work in progress. If you are interested in using the library, please contact us so that we can provide you with additional pointers and explanations.
To simply run the parser (make sure that the Java runtime is installed on your machine), extract the archive and open a command line interface and type:
java -jar TVLParser.jar path/to/input/file.tvl
This command will cause the file to be parsed and checked for validity.
Other command-line options of the parser are:
Note that all semantical analyses (-sat, -prods, -uprods) currently only work for TVL models without numeric (int and real) attributes. The options -bf and -dimacs will always work for such models only.
The library has two components (although not as such packages in the library code). The syntactic component is a parser implemented with the CUP parser generator. It checks well-formedness, type correctness, and can simplify a model by translating syntactic sugar and advanced constructs into more basic constructs. Among other things, the syntactic component can be used to add TVL support to existing feature modelling tools.
The semantic component of the library implements the semantics defined in the technical report cited above. TVL models without numeric attributes are first normalised and then translated into a Boolean CNF formula. To analyse the model, the CNF formula is fed to the Sat4J SAT solver. We emphasise that this translation can deal with the whole language save for numeric attributes, which means that it takes boolean and enum attributes into account and allows efficient feature model analysis even in the presence of enumerated attributes. For TVL models with numeric attributes we use the CHOCO CSP solver. The translation is very similar, except that now also constraints on numeric attributes are taken into account. The CSP part of the library is still in development.
The library serves as a reference implementation for TVL in Java. The information on this page is sufficient to re-implement TVL from scratch. We are currently doing this using the term rewriting language ASF+SDF which is very natural for implementing model normalisation. The TVL grammar in the SDF (as opposed to EBNF) format is here.
The JAR does contain the source code. If you want to dive into the code start with the Launcher class. This is the class being used in the command above, its sole purpose is to make "executable" what is otherwise an API. The starting point of the parser API itself is the TVLParser class, the API for treatment of a parsed TVL model are the classes in the util package. The library has four main packages:
We have some packages for syntax highlighting in text editors:
The team developing the TVL language consists of the following persons, most are members of the PReCISE research centre at the Faculty of Computer Science at the University of Namur (FUNDP) in Namur, Belgium:
Do not hesitate to contact Andreas Classen at email@example.com in case of questions or other requests.