Coder Social home page Coder Social logo

Comments (6)

francomazzanti avatar francomazzanti commented on June 16, 2024

The problem occurs only when running itstools from the inside of Eclipse (macOS version).
Re-executing in the terminal the same command that appears on the console:
"Eclipse.app/Contents/Eclipse/plugins/fr.lip6.move.gal.itstools.binaries_1.0.0.201806011319/bin/its-lts-Darwin -i new_file.gal -t CGAL ... ... " produces the normally expected results !!!

from itstools.

francomazzanti avatar francomazzanti commented on June 16, 2024

The problems is caused by the fact that the original source model:
gal model{
int AA = 0;
int BB = 0;
transition aabb [ AA < 6 ] {
AA = ( AA + 2 ) ;
BB = AA ;
}
}
main model;

is wrongly (?!?!) traslated by eclipse inside the private "work" directory as:

gal model_flat{
int AA = 0;
int BB = 0;
transition aabb [ AA< 6 ] {
AA = ( AA + 2 ) ;
BB = ( AA + 2 ) ;
}
}
main model_flat ;

from itstools.

yanntm avatar yanntm commented on June 16, 2024

Hi,
Sorry this looks like a bug or regression in the toolchain. I'll track the problem and patch it tomorrow. I'll post here when it's fixed.

from itstools.

yanntm avatar yanntm commented on June 16, 2024

ok I've tracked it down,

* This function attempts to imporve commutativity of statements (assignments).
* The rationale is thus :
* s1 :a = x;
* s2 :b = a;
* We have s1 < s2, since write(s1) inter read(s2) non empty. But, if a is only assigned a value once, we could equivalently write
* s1 :a = x;
* s2 :b = x;
* and have s1 <> s2 (commutative). The trick is that between s1 and s2, no variable read in x can written to.
* x is an arbitrary expression.
* This function works pretty well on some very specific patterns, but is a bit weak overall.
* TODO : Not sure it handles "if" statements gracefully.
* @param spec the spec whose action we are going to "improve" in place
*/

this rewriting is missing on the fact that "x" depends on A.

from itstools.

yanntm avatar yanntm commented on June 16, 2024

so line 286 should read : x is arbitrary but depends neither on A nor on B.

from itstools.

yanntm avatar yanntm commented on June 16, 2024

So this should fix your problem if you update to the latest version (help-> check for updates) .

Thank you for reporting this problem in such audible fashion, please ask if you find any other issues or have feature requests/workflows that could be improved. LTL counter-examples are pretty tricky to interpret right now for instance.

As a side note, you might like to use : Ctrl-Shift-F shortcut to "Source->Format" to indent your gal files (it's not perfect but it's decent).

from itstools.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.