Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

VEVOS Simulation v2.0.0 #19

Merged
merged 37 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
ad3cd6d
logging: minor adjustments to log messages
AlexanderSchultheiss Mar 16, 2023
37c0d2d
logging: exchanged custom logger with tinylog
AlexanderSchultheiss Mar 16, 2023
cc94ff7
logging: minor change in log level
AlexanderSchultheiss Mar 17, 2023
4504a08
logging: minor change in log level
AlexanderSchultheiss Mar 17, 2023
88a594c
feat: add loading of presence conditions before and after a change
AlexanderSchultheiss May 4, 2023
621487b
gitignore: ignore eclipse-related project files
AlexanderSchultheiss May 4, 2023
40b6eea
fix: parents without a ground truth are correctly handled
AlexanderSchultheiss May 5, 2023
490f686
Add logging
AlexanderSchultheiss Aug 29, 2023
00a03fd
logging: minor adjustments to log messages
AlexanderSchultheiss Mar 16, 2023
2ead35c
logging: exchanged custom logger with tinylog
AlexanderSchultheiss Mar 16, 2023
9debcdd
logging: minor change in log level
AlexanderSchultheiss Mar 17, 2023
88ff700
logging: minor change in log level
AlexanderSchultheiss Mar 17, 2023
d78958e
Add logging
AlexanderSchultheiss Aug 29, 2023
cb27f5d
Merge remote-tracking branch 'origin/gt-loading' into gt-loading
AlexanderSchultheiss Aug 29, 2023
ea26750
Merge branch 'ground-truth-loading' into gt-loading
AlexanderSchultheiss Aug 29, 2023
144ffb6
Update version
AlexanderSchultheiss Aug 29, 2023
acb1dfd
remove duplicate dependency
AlexanderSchultheiss Aug 29, 2023
f8ab168
feat: improve robustness when loading ground truth
AlexanderSchultheiss Sep 1, 2023
f2d310b
feat: add additional logging
AlexanderSchultheiss Sep 6, 2023
003b2dd
fix: correctly initialize path to fallback PCs
AlexanderSchultheiss Oct 18, 2023
10374f8
feat: implement loading of code matching from ground truth
AlexanderSchultheiss Oct 19, 2023
d0befa4
feat: implement loading of ground truth without data because there we…
AlexanderSchultheiss Nov 2, 2023
6473116
tests: update test PCs
AlexanderSchultheiss Nov 2, 2023
5e4fe29
tests: add test files for checking new GT processing
AlexanderSchultheiss Nov 6, 2023
0488fad
tests: implement tests for variant generation using the new ground truth
AlexanderSchultheiss Nov 6, 2023
306ebe5
fix(tests): correct feature names
AlexanderSchultheiss Nov 6, 2023
4392764
feat: update ground truth loading to new format
AlexanderSchultheiss Nov 6, 2023
003627a
fix(tests): update test cases
AlexanderSchultheiss Nov 6, 2023
c20b795
tests: update test files in preparation for new GT format
AlexanderSchultheiss Nov 6, 2023
06f880c
feat: revise ground truth loading and variant generation for new grou…
AlexanderSchultheiss Nov 7, 2023
78e40ce
Merge remote-tracking branch 'origin/gt-loading' into gt-loading
AlexanderSchultheiss Nov 7, 2023
a9b75e8
feat: update simplification and document deprecation
AlexanderSchultheiss Nov 8, 2023
647de04
fix: remove duplicate generation of annotations
AlexanderSchultheiss Nov 8, 2023
b37f82d
misc: update version in pom
AlexanderSchultheiss Nov 8, 2023
6f71e4d
docs: update README
AlexanderSchultheiss Nov 8, 2023
a82ca94
misc: add license
AlexanderSchultheiss Nov 8, 2023
d3b3e9b
Merge pull request #18 from VariantSync/gt-loading
AlexanderSchultheiss Nov 8, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,7 @@ __pycache__
*/latex/*.out
*/latex/*.synctex.gz

/src/test/resources/variantgeneration/gen/
/src/test/resources/variantgeneration/gen/
/log.txt
.classpath
.project
165 changes: 165 additions & 0 deletions LICENSE.LGPL3
Original file line number Diff line number Diff line change
@@ -0,0 +1,165 @@
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007

Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.


This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.

0. Additional Definitions.

As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.

"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.

An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.

A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".

The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.

The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.

1. Exception to Section 3 of the GNU GPL.

You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.

2. Conveying Modified Versions.

If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:

a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or

b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.

3. Object Code Incorporating Material from Library Header Files.

The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:

a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the object code with a copy of the GNU GPL and this license
document.

4. Combined Works.

You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:

a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.

b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.

c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.

d) Do one of the following:

0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.

1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.

e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)

5. Combined Libraries.

You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:

a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.

b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.

6. Revised Versions of the GNU Lesser General Public License.

The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.

Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.

If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,19 @@
VEVOS is a tool suite for the simulation of the evolution of clone-and-own projects and consists of two main components: The ground truth extraction, called VEVOS/Extraction and the variant simulation called VEVOS/Simulation.

This repository contains VEVOS/Simulation and thus the second part of the replication package for the paper _Simulating the Evolution of Clone-and-Own Projects with VEVOS_ published at the International Conference on Evaluation and Assessment in Software Engineering (EASE) 2022 ([doi](https://doi.org/10.1145/3530019.3534084)).
VEVOS/Simulation is a java library for generating variants with ground truth from an input software product line and dataset extracted with VEVOS/Extraction.
VEVOS/Simulation is a java library for generating variants with ground truth from an input software product line and dataset extracted with [VEVOS/Extraction](https://github.com/VariantSync/VEVOS_Extraction).

![Simulation Overview](docs/generation.png)

## Version 2.0.0 Update
With the latest version, VEVOS - Variant Simulation ensures compatability with ground truths extracted by VEVOS Extraction v2.0.0. It can therefore no longer be used for ground truths extracted with older VEVOS Extraction versions.

There were no major interface changes besides the compatability with the new ground truth format.

## Example Usage and Main Features

VEVOS/Simulation is supposed to be used by your research prototype on clone-and-own or variability in software systems.
In the following we give a step by step example in how the library can be used to
In the following we give a step-by-step example in how the library can be used to
- parse the ground truth dataset extracted by VEVOS/Extraction,
- traverse the datasets' evolution history,
- sample variants randomly, or use a predefined set of variants for simulation,
Expand Down Expand Up @@ -74,6 +79,7 @@ In particular, the `VariabilityDataset` provides:
- _success commits_ for which the extraction of feature mappings and feature model succeeded,
- _partial success_ commits for which part of the extraction failed; Usually, a partial success commit has feature mappings but no file presence condition and no feature model,
- _error commits_ for which the extraction failed.
- _empty commits_ for which there were no files for which an extraction was performed

To generate variants, we have to specify which variants should be generated.
Therefore, a `Sampler` is used that returns the set of variants to use for a certain feature model.
Expand Down Expand Up @@ -112,6 +118,8 @@ final SPLRepository splRepository = new SPLRepository(splRepositoryPath.path());
/// for Busybox:
final SPLRepository splRepository = new BusyboxRepository(splRepositoryPath.path());
```

> VEVOS Extraction 1.x.x:
Note that Busybox has a special subclass called `BusyboxRepository` that performs some necessary pre- and postprocessing on the product line's source code.

We are now ready to traverse the evolution history to generate variants:
Expand Down
11 changes: 8 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<groupId>org.variantsync.vevos</groupId>
<!-- Adjust the generateVariant name -->
<artifactId>simulation</artifactId>
<version>1.1.2</version>
<version>2.0.0</version>

<properties>
<!-- Adjust your java version here -->
Expand Down Expand Up @@ -105,7 +105,7 @@
<dependency>
<groupId>org.eclipse.jgit</groupId>
<artifactId>org.eclipse.jgit</artifactId>
<version>6.2.0.202206071550-r</version>
<version>6.6.0.202305301015-r</version>
</dependency>

<dependency>
Expand All @@ -120,5 +120,10 @@
<artifactId>zip4j</artifactId>
<version>2.11.3</version>
</dependency>
<dependency>
<groupId>org.tinylog</groupId>
<artifactId>tinylog-impl</artifactId>
<version>2.6.1</version>
</dependency>
</dependencies>
</project>
</project>
3 changes: 1 addition & 2 deletions src/main/java/org/variantsync/vevos/simulation/VEVOS.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import de.ovgu.featureide.fm.core.configuration.*;
import de.ovgu.featureide.fm.core.io.sxfm.SXFMFormat;
import de.ovgu.featureide.fm.core.io.xml.XmlFeatureModelFormat;
import org.variantsync.vevos.simulation.util.Logger;
import org.tinylog.Logger;

public final class VEVOS {
private static boolean initialized = false;
Expand All @@ -31,7 +31,6 @@ private static void InitFeatureIDE() {

public static void Initialize() {
if (!initialized) {
Logger.initConsoleLogger();
InitFeatureIDE();
initialized = true;
Logger.debug("Finished initialization");
Expand Down
Loading