Skip to content

Commit

Permalink
fixed bug in operation parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
nmacedo committed Nov 7, 2013
1 parent 8aa87b5 commit ddc75f5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<details key="acyclic_inheritance" value="not self->closure(super)->includes(self)"/>
<details key="unique_names" value="self.attributes->forAll(x | self.attributes->forAll(y | x = y or x.name &lt;> y.name))"/>
</eAnnotations>
<eAnnotations source="Echo/Gen">
<eAnnotations source="Echo/Gen_">
<details key="gen_linear" value="self.attributes->forAll(x | x.name = self.name)"/>
<details key="gen_linear" value="not self.persistent implies (self.attributes->isEmpty() and self.child->one(x | x.persistent) and (self.child->one(x | not x.persistent) or (not self.child->exists(x | not x.persistent))))"/>
<details key="gen_linear" value="self.persistent implies (self.attributes->one(x | true) and self.child->isEmpty())"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,9 @@ public void dispose() {
*/
public void drawGraph() {
EchoRunner runner = EchoPlugin.getInstance().getRunner();
A4Solution sol = ((AlloyTuple) runner.getAInstance().getContents()).getSolution();
if (runner == null) return;
AlloyTuple tuple = ((AlloyTuple) runner.getAInstance().getContents());
A4Solution sol = tuple.getSolution();
try {
if (sol != null && sol.satisfiable()) {
sol.writeXML(".dummy.xml");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,7 @@ private void processOperations(List<EOperation> operations) throws ErrorTransfor

OCL2Alloy converter = new OCL2Alloy(sd,posstatevars,prestatevars);
for (EAnnotation ea : operation.getEAnnotations())
if(ea.getSource().equals("http://www.eclipse.org/emf/2002/Ecore/OCL/Pivot")) {
if(ea.getSource().equals("http://www.eclipse.org/emf/2002/Ecore/OCL")) {
Expr oclalloy = Sig.NONE.no();
for(String sExpr: ea.getDetails().values()) {
try{
Expand Down

0 comments on commit ddc75f5

Please sign in to comment.