FAMILIAR-project / familiar-language

FAMILIAR language and API
13 stars 3 forks source link

Another bug with sunion #26

Open surli opened 11 years ago

surli commented 11 years ago

Not sure if this bug is related to the #25

I execute the following script: s1 = FM(Source: TI Criteria; TI: Forecast; Forecast: Weather2; Criteria: Date Location;) s2 = FM(Source: TI Criteria; TI: Ephem; Criteria: Date; Date: Beginning; Beginning: Now;) s3 = FM(Source: TI Criteria; TI: Calendar; Criteria: Location Duration Date;)

smerge = merge sunion s* c = configuration smerge select Forecast in c println c

Given the FM s1 where all is mandatory I expect to obtain selected [Source, TI, Criteria, Forecast, Weather2, Date, Location] deselected: [Duration, Beginning, Now, Calendar, Ephem]

However I obtain that : selected: [Source, Date, TI, Weather2, Forecast, Criteria] deselected: [Duration, Beginning, Now, Calendar, Ephem]

Date and Location remain optional

FAMILIAR-project commented 11 years ago

Location is not in fm2, so that seems normal, no ?

No problem for Data.

I commited a fix for your test (using FeatureIDE configuration facilities, always because of the problem with SAT4J -- in my setup, we use SAT4J 2.3.2 and so FeatureIDE)

surli commented 11 years ago

After the merge the feature Location is in a group optional and that is ok. But, there should be a constraint standing that if Forecast is selected, Location must be selected too, as Location is a mandatory feature in FM1 and Forecast appears only there.

So, in the end, when I select Forecast, Location should be automatically selected.

FAMILIAR-project commented 11 years ago

Fully agree. I will try to fix it ASAP.

FAMILIAR-project commented 11 years ago

I implement a BDD-based implementation See FMLConfigurationBDDTest

It seems working

surli commented 11 years ago

I have another issue with another FM with this implementation. I add a unit test.

FAMILIAR-project commented 11 years ago

Fixed.

surli commented 11 years ago

New unit tests : isValid seems not work with the new implementation.

surli commented 11 years ago

Another bug found between internal and syntactic representation. Sorry I didn't found a simple example for the unit test...