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

Import of recent FeatureIDE Model #54

Open
cpwnd opened this issue Jul 17, 2018 · 2 comments
Open

Import of recent FeatureIDE Model #54

cpwnd opened this issue Jul 17, 2018 · 2 comments

Comments

@cpwnd
Copy link

cpwnd commented Jul 17, 2018

I want to import a recent feature model, produced with the FeatureIDE eclipse plugin.

FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning)  version 1.2 (beta)
http://familiar-project.github.com/
fml> fm = FM ("fmodel.m")
Exception in thread "main" java.lang.NoClassDefFoundError: guidsl/ParseException
        at fr.familiar.operations.featureide.FeatureIDEReader.parseFeatureModel(FeatureIDEReader.java:41)
        at fr.familiar.operations.featureide.FeatureIDEReader.writeToString(FeatureIDEReader.java:58)
        at fr.familiar.parser.FMBuilder.eval(FMBuilder.java:143)
        at fr.familiar.parser.FMLAbstractCommandAnalyzer.parse(FMLAbstractCommandAnalyzer.java:103)
        at fr.familiar.parser.FMAnalyzer.eval(FMAnalyzer.java:105)
        at fr.familiar.parser.FMLAbstractCommandAnalyzer.parse(FMLAbstractCommandAnalyzer.java:103)
        at fr.familiar.parser.FMLCommandInterpreter.parseFMCommand(FMLCommandInterpreter.java:793)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:502)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:445)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:1035)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:950)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:817)
        at fr.familiar.parser.FMLCommandInterpreter.parseCommand(FMLCommandInterpreter.java:378)
        at fr.familiar.interpreter.FMLShell.parse(FMLShell.java:685)
        at fr.familiar.interpreter.FMLShell.switchToInterativeMode(FMLShell.java:580)
        at fr.familiar.interpreter.FMLShell.runPrompt(FMLShell.java:326)
        at fr.familiar.interpreter.FMLShell.launch(FMLShell.java:429)
        at fr.familiar.standalone.FML.main(FML.java:161)
Caused by: java.lang.ClassNotFoundException: guidsl.ParseException
        at java.net.URLClassLoader.findClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
        at java.lang.ClassLoader.loadClass(Unknown Source)
        ... 18 more

I assume recent changes in FeatureIDE feature model structuring breaks the FAMILIAR import process?
This repo seems to be not maintained anymore, are there any plans to update the (import) code?

@FAMILIAR-project
Copy link
Owner

FAMILIAR-project commented Jul 17, 2018

Hi,

Thanks for your report and possible issue!
Which jar do you use? Can you send me "fmodel.m"?

I can have a look and try to fix the importing process

@cpwnd
Copy link
Author

cpwnd commented Jul 18, 2018

Thanks for the quick response!
I'm using the 1.2 Jar from the github release page.

My fmodel.m, which produces the below mentioned error trace, looks like this:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<featureModel>
    <properties/>
    <struct>
        <and abstract="true" mandatory="true" name="FAMILIARtest">
            <or name="Base">
                <feature name="NewFeature1"/>
                <feature name="NewFeature2"/>
            </or>
        </and>
    </struct>
    <constraints/>
    <calculations Auto="true" Constraints="true" Features="true" Redundant="true" Tautology="true"/>
    <comments/>
    <featureOrder userDefined="false"/>
</featureModel>

I also double checked with importing the example model in FAMILIAR notation as a file:
https://github.com/FAMILIAR-project/familiar-documentation/blob/master/scriptsRepository/starting/foo.fml

fm1 = FM (A: [D] B C ; (D -> C); )
fm3 = FM (R: S [T] U ; (!U -> !S); )
fm2 = FM (W: [X] Y Z ; (X <-> Y); )

it failed with the following trace:

FAMILIAR (for FeAture Model scrIpt Language for manIpulation and Automatic Reasoning)  version 1.2 (beta)
http://familiar-project.github.com/
fml> model = FM ("foo.fml")
Exception in thread "main" java.lang.RuntimeException: Cannot create a resource for 'file:C:\Ablage\Code\FAMILIAR\foo.fml'; a registered resource factory is needed
        at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.getResource(ResourceSetImpl.java:403)
        at fr.familiar.fm.basic.FMLFeatureModelReader.parseFile(FMLFeatureModelReader.java:148)
        at fr.familiar.parser.FMBuilder.parseFile(FMBuilder.java:576)
        at fr.familiar.parser.FMBuilder.eval(FMBuilder.java:281)
        at fr.familiar.parser.FMLAbstractCommandAnalyzer.parse(FMLAbstractCommandAnalyzer.java:103)
        at fr.familiar.parser.FMAnalyzer.eval(FMAnalyzer.java:105)
        at fr.familiar.parser.FMLAbstractCommandAnalyzer.parse(FMLAbstractCommandAnalyzer.java:103)
        at fr.familiar.parser.FMLCommandInterpreter.parseFMCommand(FMLCommandInterpreter.java:793)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:502)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:445)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:1035)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:950)
        at fr.familiar.parser.FMLCommandInterpreter.parse(FMLCommandInterpreter.java:817)
        at fr.familiar.parser.FMLCommandInterpreter.parseCommand(FMLCommandInterpreter.java:378)
        at fr.familiar.interpreter.FMLShell.parse(FMLShell.java:685)
        at fr.familiar.interpreter.FMLShell.switchToInterativeMode(FMLShell.java:580)
        at fr.familiar.interpreter.FMLShell.runPrompt(FMLShell.java:326)
        at fr.familiar.interpreter.FMLShell.launch(FMLShell.java:429)
        at fr.familiar.standalone.FML.main(FML.java:161)

When inserting the FAMILIAR commands manually into the command line, everything is fine and no errors are thrown. Probably this is another issue.

I followed the commands on p.112 of M.Acher's dissertation for importing a featureide model.
http://www.mathieuacher.com/PhDAcher2011-revised.pdf

And also the installation instructions for using familiar cli
https://github.com/FAMILIAR-project/familiar-documentation/tree/master/installation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants