Hi
These days we are working with use on my university.
Since we use different schemas and stuff, I tend to use only the shell part to validate it (that is, without the GUI). Also, I'm wondering if there's some script that validates different schemas one after another. In such case, GUI would slow down the process.
Is it possible to launch use without the GUI with something like -nogui or something like that?
Thank you very much
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You answered the question already :-) It is indeed the argument -nogui that starts USE without the GUI. For a complete overview of the command line arguments you can use -h.
I don't know, if I exactly got what you want to do, but you can for example use command files that open one schema, execute commands and queries and afterwards opens another schema and executes different commands, ...
A simple test.cmd could look like:
open Schema1.use
!create ...
!set ...
!valid := ComeBooleanQuery
!valid := valid and ComeBooleanQuery
!open Schema2.use
!create ...
Best regards!
Lars
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
another approach for your second question would be the argument `-q'. From the help page:
-q reads spec_file, executes cmd_file, and checks constraints
exit code is 1 if constraints fail, otherwise 0
With this command you can write a shell/batch script to iterate over your schema files, load a system state and check the invariants. Whether the invariants are satisfied is returned by USE via the exit code (see help).
regards,
Frank
Last edit: Frank 2013-12-05
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
When you enter an unknown option use gives a hint ($ is the shell):
$ use -?
invalid argument ?', tryuse -h' for help.
The argument /? is interpreted as a filepath, at least on my Linux workstation here:
$ use /?
use version 3.0.6, Copyright (C) 1999-2011 University of Bremen
Error: File `/?' not found.
I am going to assume that is the same for Windows.
best regards
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Well, just a last little thing, does -q works when the paths contains spaces and i set the files between "" like:
use -q "C:/user folder/mySpecFile.txt" "C:/user folder/myCmdFile.txt"
with throw a error message while if i remove that space from user wont..
Thnks in advance
PS: This may be a windows problem but i have no idea
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
at first the easy solution would be using relative paths and naming the files without spaces.
On Linux the problem with spaces is a quirk with the wrapper files located in the USE/bin directory. The script takes your quoted file names and understands them correctly (with spaces). Though it fails to hand this information (the quotes) over to the java virtual machine.
I have added a ticket for this issue.
I have also tested the behavior on Windows XP where this process seems to work fine. Though on my virtual machine I do not have java installed and therefore was only able to verify the command.
What was the exact error message, when you tried spaces in the paths?
best regards,
Frank
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ah, okay. Ich hatte bei meinen Tests direkt start_use.bat verwendet,
aber bei Leos Post ist mir aufgefallen, dass die ja nochmal von use.bat
gewrapped wird. Dadurch werden sicherlich die Argumente kaputt gehen wie
auf meinem Linux System.
Hast du das für alle Plattformen gefixt?
Viele Grüße,
Frank
Am 09.12.2013 13:41, schrieb Lars Hamann:
Hi Frank,
das Problem habe ich in 3.1 gelöst.
Schreibe ich gleich ins Forum.
BTW: Ich bin morgen in Bremen.
Viele Grüße
Lars
Am 09.12.2013 11:56, schrieb Frank:
Hey again,
at first the easy solution would be using relative paths and
naming the files without spaces.
On Linux the problem with spaces is a quirk with the wrapper files
located in the USE/bin directory. The script takes your quoted
file names and understands them correctly (with spaces). Though it
fails to hand this information (the quotes) over to the java
virtual machine.
I have added a ticket
<https://sourceforge.net/apps/mantisbt/useocl/view.php?id=171> for
this issue.
I have also tested the behavior on Windows XP where this process
seems to work fine. Though on my virtual machine I do not have
java installed and therefore was only able to verify the command.
What was the exact error message, when you tried spaces in the paths?
best regards,
Frank
------------------------------------------------------------------------
Launch use without GUI
<https://sourceforge.net/p/useocl/discussion/928881/thread/35f4f0fb/?limit=25#b55f>
------------------------------------------------------------------------
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/useocl/discussion/928881/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
--
Lars Hamann
Technologie-Zentrum Informatik und Informationstechnik
Bibliothekstrasse 1
D-28359 Bremen
Linux hab ich nicht getestet, ich denke aber schon.
Problem war folgendes:
cmdOpen schaut nach " am Anfang eines Token und erkennt den Rest dann
als den Filename.
Bei der Übergabe eines Dateinamens über die Shell entfernt zumindest
Windows die Anführungszeichen. Daher quote ich den Dateinamen jetzt vor
dem Aufruf von cmdOpen.
Kannst ja mal bei Dir schauen, ab das geht.
Viele Grüße
Lars
Am 09.12.2013 14:00, schrieb Frank:
Ah, okay. Ich hatte bei meinen Tests direkt start_use.bat verwendet,
aber bei Leos Post ist mir aufgefallen, dass die ja nochmal von use.bat
gewrapped wird. Dadurch werden sicherlich die Argumente kaputt gehen wie
auf meinem Linux System.
Hast du das für alle Plattformen gefixt?
Viele Grüße,
Frank
Am 09.12.2013 13:41, schrieb Lars Hamann:
Hi Frank,
das Problem habe ich in 3.1 gelöst.
Schreibe ich gleich ins Forum.
BTW: Ich bin morgen in Bremen.
Viele Grüße
Lars
Am 09.12.2013 11:56, schrieb Frank:
Hey again,
at first the easy solution would be using relative paths and
naming the files without spaces.
On Linux the problem with spaces is a quirk with the wrapper files
located in the USE/bin directory. The script takes your quoted
file names and understands them correctly (with spaces). Though it
fails to hand this information (the quotes) over to the java
virtual machine.
I have added a ticket
<https://sourceforge.net/apps/mantisbt/useocl/view.php?id=171> for
this issue.
I have also tested the behavior on Windows XP where this process
seems to work fine. Though on my virtual machine I do not have
java installed and therefore was only able to verify the command.
What was the exact error message, when you tried spaces in the paths?
best regards,
Frank
------------------------------------------------------------------------
Launch use without GUI
<https://sourceforge.net/p/useocl/discussion/928881/thread/35f4f0fb/?limit=25#b55f>
------------------------------------------------------------------------
Sent from sourceforge.net because you indicated interest in
https://sourceforge.net/p/useocl/discussion/928881/
To unsubscribe from further messages, please visit
https://sourceforge.net/auth/subscriptions/
--
Lars Hamann
Technologie-Zentrum Informatik und Informationstechnik
Bibliothekstrasse 1
D-28359 Bremen
This is it:
C:\Programari\use-3.0.6\bin>use -q "C:\Drive folder\my Schema.txt" "C:\Drive folder\stuff.cmd"
Error: File `C:\Drive' could not be found!
Exception in thread "Thread-0" java.util.EmptyStackException
at java.util.Stack.peek(Unknown Source)
at org.tzi.use.main.shell.ReadlineStack.getCurrentReadline(ReadlineStack.java:60)
at org.tzi.use.main.shell.Shell.run(Shell.java:234)
at java.lang.Thread.run(Unknown Source)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Ok. The Exception has nothing to do with the problem. That is a bug in the shutdown process of USE I already fixed in Version 3.1. So don't worry about that.
Can you try to use the file "start_use.bat" directly? So the commant would look like:
Hi
These days we are working with use on my university.
Since we use different schemas and stuff, I tend to use only the shell part to validate it (that is, without the GUI). Also, I'm wondering if there's some script that validates different schemas one after another. In such case, GUI would slow down the process.
Is it possible to launch use without the GUI with something like -nogui or something like that?
Thank you very much
Hi!
You answered the question already :-) It is indeed the argument -nogui that starts USE without the GUI. For a complete overview of the command line arguments you can use -h.
I don't know, if I exactly got what you want to do, but you can for example use command files that open one schema, execute commands and queries and afterwards opens another schema and executes different commands, ...
A simple test.cmd could look like:
open Schema1.use
!create ...
!set ...
!valid := ComeBooleanQuery
!valid := valid and ComeBooleanQuery
!open Schema2.use
!create ...
Best regards!
Lars
Hi Leo,
another approach for your second question would be the argument `-q'. From the help page:
With this command you can write a shell/batch script to iterate over your schema files, load a system state and check the invariants. Whether the invariants are satisfied is returned by USE via the exit code (see help).
regards,
Frank
Last edit: Frank 2013-12-05
Well, thank you very much, that will do for sure.
Shame on me for just not testing to do a -h, had a windows mind and used /?...
Btw, why i didnt found that stuff on the use documentation, it should be over there imo, maybe i was blind...
Thanks again
When you enter an unknown option use gives a hint ($ is the shell):
$ use -?
invalid argument
?', try
use -h' for help.The argument /? is interpreted as a filepath, at least on my Linux workstation here:
$ use /?
use version 3.0.6, Copyright (C) 1999-2011 University of Bremen
Error: File `/?' not found.
I am going to assume that is the same for Windows.
best regards
Well, just a last little thing, does -q works when the paths contains spaces and i set the files between "" like:
use -q "C:/user folder/mySpecFile.txt" "C:/user folder/myCmdFile.txt"
with throw a error message while if i remove that space from user wont..
Thnks in advance
PS: This may be a windows problem but i have no idea
Hey again,
at first the easy solution would be using relative paths and naming the files without spaces.
On Linux the problem with spaces is a quirk with the wrapper files located in the USE/bin directory. The script takes your quoted file names and understands them correctly (with spaces). Though it fails to hand this information (the quotes) over to the java virtual machine.
I have added a ticket for this issue.
I have also tested the behavior on Windows XP where this process seems to work fine. Though on my virtual machine I do not have java installed and therefore was only able to verify the command.
What was the exact error message, when you tried spaces in the paths?
best regards,
Frank
Ah, okay. Ich hatte bei meinen Tests direkt start_use.bat verwendet,
aber bei Leos Post ist mir aufgefallen, dass die ja nochmal von use.bat
gewrapped wird. Dadurch werden sicherlich die Argumente kaputt gehen wie
auf meinem Linux System.
Hast du das für alle Plattformen gefixt?
Viele Grüße,
Frank
Am 09.12.2013 13:41, schrieb Lars Hamann:
Linux hab ich nicht getestet, ich denke aber schon.
Problem war folgendes:
cmdOpen schaut nach " am Anfang eines Token und erkennt den Rest dann
als den Filename.
Bei der Übergabe eines Dateinamens über die Shell entfernt zumindest
Windows die Anführungszeichen. Daher quote ich den Dateinamen jetzt vor
dem Aufruf von cmdOpen.
Kannst ja mal bei Dir schauen, ab das geht.
Viele Grüße
Lars
Am 09.12.2013 14:00, schrieb Frank:
--
Lars Hamann
Technologie-Zentrum Informatik und Informationstechnik
Bibliothekstrasse 1
D-28359 Bremen
Fon: +49 421 218-63983
E-Mail: lhamann@tzi.de
http://www.tzi.de
This is it:
C:\Programari\use-3.0.6\bin>use -q "C:\Drive folder\my Schema.txt" "C:\Drive folder\stuff.cmd"
Error: File `C:\Drive' could not be found!
Exception in thread "Thread-0" java.util.EmptyStackException
at java.util.Stack.peek(Unknown Source)
at org.tzi.use.main.shell.ReadlineStack.getCurrentReadline(ReadlineStack.java:60)
at org.tzi.use.main.shell.Shell.run(Shell.java:234)
at java.lang.Thread.run(Unknown Source)
Ok. The Exception has nothing to do with the problem. That is a bug in the shutdown process of USE I already fixed in Version 3.1. So don't worry about that.
Can you try to use the file "start_use.bat" directly? So the commant would look like:
As of my tests on the Windows platform, this should work.
OK, I found a solution for USE 3.0.6. It is a little bit uncommon, but works.
Please incldue the filename in three(!) double quotes("):
use -q "D:\Some Directory\model.use" """D:\Some Directory\instance.cmd"""
In USE 3.1 (http://ci.db.informatik.uni-bremen.de:8080/job/USE_3.1.0/lastSuccessfulBuild/artifact/build/release/use-3.1.0.zip) it now works with a single double quote.
Best regards
Lars