Skip to content

Commit

Permalink
Arreglo de fallos de featureide_writter
Browse files Browse the repository at this point in the history
  • Loading branch information
Enriquelp committed Jan 26, 2024
1 parent 4e10ff2 commit 1414886
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 215 deletions.
214 changes: 1 addition & 213 deletions rhea-backend/pruebaFeatureIDE.xml
Original file line number Diff line number Diff line change
@@ -1,213 +1 @@
<featureModel>
<struct>
<and mandatory="true" name="JHipster">
<alt mandatory="true" name="Generator">
<alt mandatory="true" name="Server">
<feature name="MicroserviceApplication" />
<feature name="UaaServer" />
</alt>
<alt mandatory="true" name="Application">
<feature name="MicroserviceGateway" />
<feature name="Monolithic" />
</alt>
</alt>
<alt mandatory="true" name="Authentication">
<feature name="HTTPSession" />
<feature name="OAuth2" />
<feature name="Uaa" />
<feature name="JWT" />
</alt>
<feature name="SocialLogin" />
<alt mandatory="true" name="Database">
<and mandatory="true" name="SQL">
<alt mandatory="true" name="Hibernate2ndLvlCache">
<feature name="HazelCast" />
<feature name="EhCache" />
</alt>
<alt mandatory="true" name="Development">
<alt mandatory="true" name="H2">
<feature name="DiskBased" />
<feature name="InMemory" />
</alt>
<feature name="PostgreSQLDev" />
<feature name="MariaDBDev" />
<feature name="MySql" />
</alt>
<alt mandatory="true" name="Production">
<feature name="MySQL" />
<feature name="MariaDB" />
<feature name="PostgreSQL" />
</alt>
<feature name="ElasticSearch" />
</and>
<feature name="Cassandra" />
<feature name="MongoDB" />
</alt>
<feature name="SpringWebSockets" />
<feature name="Libsass" />
<feature name="ClusteredSession" />
<alt mandatory="true" name="BackEnd">
<feature name="Gradle" />
<feature name="Maven" />
</alt>
<feature name="InternationalizationSupport" />
<feature name="Docker" />
<and mandatory="true" name="TestingFrameworks">
<feature name="Protractor" />
<feature name="Gatling" />
<feature name="Cucumber" />
</and>
</and>
</struct>
<constraints>
<rule>
<imp>
<conj>
<conj>
<var>OAuth2</var>
<not>
<var>SocialLogin</var>
</not>
</conj>
<not>
<var>MicroserviceApplication</var>
</not>
</conj>
<disj>
<var>SQL</var>
<var>MongoDB</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<var>SocialLogin</var>
<conj>
<conj>
<disj>
<var>HTTPSession</var>
<var>JWT</var>
</disj>
<var>Monolithic</var>
</conj>
<disj>
<var>SQL</var>
<var>MongoDB</var>
</disj>
</conj>
</imp>
</rule>
<rule>
<imp>
<var>UaaServer</var>
<var>Uaa</var>
</imp>
</rule>
<rule>
<imp>
<conj>
<conj>
<not>
<var>OAuth2</var>
</not>
<not>
<var>SocialLogin</var>
</not>
</conj>
<not>
<var>MicroserviceApplication</var>
</not>
</conj>
<disj>
<disj>
<var>SQL</var>
<var>MongoDB</var>
</disj>
<var>Cassandra</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<var>Server</var>
<not>
<var>Protractor</var>
</not>
</imp>
</rule>
<rule>
<imp>
<not>
<var>Server</var>
</not>
<var>Protractor</var>
</imp>
</rule>
<rule>
<imp>
<var>MySQL</var>
<disj>
<var>H2</var>
<var>MySql</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<disj>
<var>MicroserviceApplication</var>
<var>MicroserviceGateway</var>
</disj>
<disj>
<var>JWT</var>
<var>Uaa</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<var>Monolithic</var>
<disj>
<disj>
<var>JWT</var>
<var>HTTPSession</var>
</disj>
<var>OAuth2</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<var>MariaDB</var>
<disj>
<var>H2</var>
<var>MariaDBDev</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<var>PostgreSQL</var>
<disj>
<var>H2</var>
<var>PostgreSQLDev</var>
</disj>
</imp>
</rule>
<rule>
<imp>
<disj>
<var>SpringWebSockets</var>
<var>ClusteredSession</var>
</disj>
<var>Application</var>
</imp>
</rule>
<rule>
<imp>
<var>Libsass</var>
<var>Application</var>
</imp>
</rule>
</constraints>
</featureModel>
<featureModel><struct><and name="JHipster"><alt mandatory="true" name="Generator"><alt name="Server"><feature name="MicroserviceApplication" /><feature name="UaaServer" /></alt><alt name="Application"><feature name="MicroserviceGateway" /><feature name="Monolithic" /></alt></alt><alt mandatory="true" name="Authentication"><feature name="HTTPSession" /><feature name="OAuth2" /><feature name="Uaa" /><feature name="JWT" /></alt><feature name="SocialLogin" /><alt name="Database"><and name="SQL"><alt name="Hibernate2ndLvlCache"><feature name="HazelCast" /><feature name="EhCache" /></alt><alt mandatory="true" name="Development"><alt name="H2"><feature name="DiskBased" /><feature name="InMemory" /></alt><feature name="PostgreSQLDev" /><feature name="MariaDBDev" /><feature name="MySql" /></alt><alt mandatory="true" name="Production"><feature name="MySQL" /><feature name="MariaDB" /><feature name="PostgreSQL" /></alt><feature name="ElasticSearch" /></and><feature name="Cassandra" /><feature name="MongoDB" /></alt><feature name="SpringWebSockets" /><feature name="Libsass" /><feature name="ClusteredSession" /><alt mandatory="true" name="BackEnd"><feature name="Gradle" /><feature name="Maven" /></alt><feature name="InternationalizationSupport" /><feature name="Docker" /><and mandatory="true" name="TestingFrameworks"><feature name="Protractor" /><feature mandatory="true" name="Gatling" /><feature mandatory="true" name="Cucumber" /></and></and></struct><constraints><rule><imp><conj><conj><var>OAuth2</var><not><var>SocialLogin</var></not></conj><not><var>MicroserviceApplication</var></not></conj><disj><var>SQL</var><var>MongoDB</var></disj></imp></rule><rule><imp><var>SocialLogin</var><conj><conj><disj><var>HTTPSession</var><var>JWT</var></disj><var>Monolithic</var></conj><disj><var>SQL</var><var>MongoDB</var></disj></conj></imp></rule><rule><imp><var>UaaServer</var><var>Uaa</var></imp></rule><rule><imp><conj><conj><not><var>OAuth2</var></not><not><var>SocialLogin</var></not></conj><not><var>MicroserviceApplication</var></not></conj><disj><disj><var>SQL</var><var>MongoDB</var></disj><var>Cassandra</var></disj></imp></rule><rule><imp><var>Server</var><not><var>Protractor</var></not></imp></rule><rule><imp><not><var>Server</var></not><var>Protractor</var></imp></rule><rule><imp><var>MySQL</var><disj><var>H2</var><var>MySql</var></disj></imp></rule><rule><imp><disj><var>MicroserviceApplication</var><var>MicroserviceGateway</var></disj><disj><var>JWT</var><var>Uaa</var></disj></imp></rule><rule><imp><var>Monolithic</var><disj><disj><var>JWT</var><var>HTTPSession</var></disj><var>OAuth2</var></disj></imp></rule><rule><imp><var>MariaDB</var><disj><var>H2</var><var>MariaDBDev</var></disj></imp></rule><rule><imp><var>PostgreSQL</var><disj><var>H2</var><var>PostgreSQLDev</var></disj></imp></rule><rule><imp><disj><var>SpringWebSockets</var><var>ClusteredSession</var></disj><var>Application</var></imp></rule><rule><imp><var>Libsass</var><var>Application</var></imp></rule></constraints></featureModel>
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ def _create_tree(parentElement: Element, relations: list[Relation]):

def _get_attributes(feature: Feature):
atributes = {}
if feature.is_mandatory and not feature.is_leaf(): atributes['mandatory'] ='true'
if feature.is_mandatory(): atributes['mandatory'] ='true'
atributes['name'] = feature.name
return atributes

Expand Down Expand Up @@ -125,7 +125,6 @@ def _get_ctc_info(ast_node: Node) -> dict[str, Any]:
ctc_info['operands'] = [ast_node.data]
else:
ctc_info['type'] = FeatureIDEWriter.CTC_TYPES[ast_node.data]
# if ast_node.data si es EXCLUDES entonces hay que crear dos nodos, un impl y un negado en la derecha.
operands = []
left = _get_ctc_info(ast_node.left)
operands.append(left)
Expand Down

0 comments on commit 1414886

Please sign in to comment.