<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="https://wiki.weizmann.ac.il/playgo/skins/common/feed.css?303"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>https://wiki.weizmann.ac.il/playgo/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages</id>
		<title>WeizmannWiki - New pages [en]</title>
		<link rel="self" type="application/atom+xml" href="https://wiki.weizmann.ac.il/playgo/index.php?feed=atom&amp;namespace=0&amp;title=Special%3ANewPages"/>
		<link rel="alternate" type="text/html" href="https://wiki.weizmann.ac.il/playgo/index.php?title=Special:NewPages"/>
		<updated>2026-06-10T05:50:13Z</updated>
		<subtitle>From WeizmannWiki</subtitle>
		<generator>MediaWiki 1.22.4</generator>

	<entry>
		<id>https://wiki.weizmann.ac.il/playgo/index.php?title=The_Latex_to_LSC_Compiler</id>
		<title>The Latex to LSC Compiler</title>
		<link rel="alternate" type="text/html" href="https://wiki.weizmann.ac.il/playgo/index.php?title=The_Latex_to_LSC_Compiler"/>
				<updated>2017-04-20T11:02:51Z</updated>
		
		<summary type="html">&lt;p&gt;Achiya: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This page explains how to write Contextul LSCs (Con-LSC) in Latex, compile them into PlayGo LSC instances, and finally execute them.&lt;br /&gt;
&lt;br /&gt;
In nutshell, these are the required steps:&lt;br /&gt;
&lt;br /&gt;
#Download the PlayGo Environment.&lt;br /&gt;
#Add Latex Con-LSCs to LSC.tex.&lt;br /&gt;
#Execute the Latex2PlayGo compiler.&lt;br /&gt;
#Import the compiled file in PlayGo and execute it.&lt;br /&gt;
&lt;br /&gt;
= The PlayGo Environment =&lt;br /&gt;
&lt;br /&gt;
First you need to download ([https://weizmann.box.com/s/vze4kqq5gbf01cw92lx5dwijjju1pddb here]) a PlayGo version that includes a template project and the Latex2PlayGo compiler.&lt;br /&gt;
&lt;br /&gt;
After extracting the zip file you will find the following directory structure (the structure includes only directories relevant to this tutorial). Directories are marked with (D) and files with (F):&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(D)&amp;amp;nbsp;PlayGo_4.0_19042017&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(D) playgo&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(F) playgo.exe&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(D)&amp;amp;nbsp;workspace&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(D)&amp;amp;nbsp;Latex2Lsc&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 120px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 120px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(F)&amp;amp;nbsp;LSC.tex&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 120px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(F)&amp;amp;nbsp;GeneratedLSC.lsc&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 120px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(D)&amp;amp;nbsp;src&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 160px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;|&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 160px;&amp;quot;&amp;gt;&amp;lt;span style=&amp;quot;font-family:courier new,courier,monospace;&amp;quot;&amp;gt;(F) Latex2PlayGoCompiler.java&amp;lt;/span&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;Executin playgo.exe will start PlayGo.&lt;br /&gt;
&lt;br /&gt;
== General links: ==&lt;br /&gt;
&lt;br /&gt;
[https://weizmann.box.com/s/irjrbvlipdol1vm64v0kf7uju00lqzn1 PlayGo userguide].&lt;br /&gt;
&lt;br /&gt;
[http://wiki.weizmann.ac.il/playgo/index.php/Main_Page PlayGo homepage]&amp;amp;nbsp;- more information and tutorials.&lt;br /&gt;
&lt;br /&gt;
= Latex Con-LSC =&lt;br /&gt;
&lt;br /&gt;
== The Latex Con-LSC Language ==&lt;br /&gt;
&lt;br /&gt;
Our group has developed a dedicated Latex package for easily creating diagrams with a simple textual notation, and presenting them graphically.&lt;br /&gt;
&lt;br /&gt;
The package, called '''pgf-playgo-lsc''', is built upon the ''pgf&amp;lt;ref&amp;gt;T. Tantau and C. Feuersnger, “pgf—Create PostScript and PDF graphics in TEX,” Version 3.01a, 08 2015. [Online]. Available: https://www.ctan.org/pkg/pgf&amp;lt;/ref&amp;gt;'' and ''pgf-uml''&amp;lt;ref&amp;gt;X. Yuan, “pgf-umlsd—Draw UML Sequence Diagrams,” Version 0.7, 02 2014. [Online]. Available: https://www.ctan.org/pkg/pgf-umlsd&amp;lt;/ref&amp;gt; packages. The package imlements only part of the PlayGo LSC idioms. The complete list of the supported idioms in Latex Con-LSC is given in the package manual. The language semantics is defined in the&amp;amp;nbsp;[https://weizmann.box.com/s/irjrbvlipdol1vm64v0kf7uju00lqzn1 PlayGo userguide], except for the context idioms that are given in the paper.&lt;br /&gt;
&lt;br /&gt;
The package repository and download link can be found at [http://github.com/eggsterino/pgf-playgo-lsc http://github.com/eggsterino/pgf-playgo-lsc].&lt;br /&gt;
&lt;br /&gt;
Here we present an example for creating an LSC chart using pgf-playgo-lsc:&lt;br /&gt;
&lt;br /&gt;
{| cellspacing=&amp;quot;1&amp;quot; cellpadding=&amp;quot;1&amp;quot; style=&amp;quot;border-top: 1px solid; border-left: 0px; border-right: 0px; border-bottom: 1px solid;width: 600px&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
| style=&amp;quot;vertical-align: top; width: 520px; border:none;&amp;quot; | &amp;lt;div&amp;gt;\begin{LSCnameddiagram}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;[title width=p{65px}]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;{Turn lights off when motion has stopped}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 80px;&amp;quot;&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;\newlifeline {light} {light}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;\newlifeline {office} {office}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;\newlifeline {mSensor} {mSensor}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;\coldmonitor {mSensor} {motionStopped()} {office}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;\hotexecute {office} {setOff()} {light}&amp;lt;/div&amp;gt;&amp;lt;div style=&amp;quot;margin-left: 40px;&amp;quot;&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;\end{LSCnameddiagram}&amp;lt;/div&amp;gt;&lt;br /&gt;
| style=&amp;quot;border: none; vertical-align: middle;&amp;quot; | &lt;br /&gt;
[[File:Latex-LSC.jpg|200px|Compiled pgf-playgo-lsc chart]]&lt;br /&gt;
&lt;br /&gt;
Figure 1 - The compiled Latex representation of the code on the left.&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Please note that the LSC.tex file must have at least one LSC diagram. Also, no Latex command should appear outside the \begin \end scope.&amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== The Latex2PlayGo Compiler ==&lt;br /&gt;
&lt;br /&gt;
The&amp;amp;nbsp;Latex2PlayGo Compiler takes the Latex charts given in the LSC.tex file and compiles them to a PlayGo LSC file named GeneratedLSC.lsc. The compiler source code is the Latex2PlayGoCompiler.java file. Executing the compiler can be done in two ways:&lt;br /&gt;
&lt;br /&gt;
#Compiling the file using ''javac'' and running it with ''java''.&lt;br /&gt;
#In PlayGo - Right click the source file and choose &amp;quot;Run as &amp;gt; Java Application&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= PlayGo =&lt;br /&gt;
&lt;br /&gt;
== Preparing the PlayGo Project ==&lt;br /&gt;
&lt;br /&gt;
Before we can execcute the generated LSCs, we need to prepare the project:&lt;br /&gt;
&lt;br /&gt;
#Start PlayGo by executing playgo.exe.&lt;br /&gt;
#Refresh the project (Select the project root and press F5).&lt;br /&gt;
#On the right panel you have a window called &amp;quot;System Model&amp;quot;.&lt;br /&gt;
#Locate the red X button.&lt;br /&gt;
#Press the button on the left to generate a system model from the scenarios.&lt;br /&gt;
#On the file selection window select GeneratedLSC.lsc.&lt;br /&gt;
#Click the button on the right of the red X button.&lt;br /&gt;
#Refresh the project (In the Package Explorer window: Right click on project name&amp;amp;nbsp;and then select Refresh)&lt;br /&gt;
&lt;br /&gt;
The project is ready for a run.&lt;br /&gt;
&lt;br /&gt;
== Running the Project ==&lt;br /&gt;
&lt;br /&gt;
Required steps:&lt;br /&gt;
&lt;br /&gt;
#Main menu: PlayGo -&amp;gt; Play-Out -&amp;gt; Play-Out....&lt;br /&gt;
#Delete any model under Behaviour Unit.&lt;br /&gt;
#Now press the add model and select GeneratedLSC.&lt;br /&gt;
#Press OK&lt;br /&gt;
&lt;br /&gt;
Now you will notice that nothing happens. The reason is that due to a language requirement, each diagram starts with a monitor event. In the above example: the motionStopped() will be triggered only if the system (i.e. the sensor) will trigger the event. For the purpose of simulations and testings, PlayGo allows simulating system and user events from one lifeline to another. &lt;br /&gt;
&lt;br /&gt;
For example, let us assume that we want to trigger the motionStopped event. In order to do so we neet to:&lt;br /&gt;
&lt;br /&gt;
#Run the project.&lt;br /&gt;
#In the System Model window -&amp;gt; Objects:&lt;br /&gt;
##Right click mSensor and select &amp;quot;Call other object&amp;quot;.&lt;br /&gt;
##Right click&amp;amp;nbsp;office and select &amp;quot;motionStopperd&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Smadar</name></author>	</entry>

	<entry>
		<id>https://wiki.weizmann.ac.il/playgo/index.php?title=How_to_parse_requirements_using_a_trained_statistical_model</id>
		<title>How to parse requirements using a trained statistical model</title>
		<link rel="alternate" type="text/html" href="https://wiki.weizmann.ac.il/playgo/index.php?title=How_to_parse_requirements_using_a_trained_statistical_model"/>
				<updated>2014-11-09T07:09:08Z</updated>
		
		<summary type="html">&lt;p&gt;Smadar: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;You may have chosen to create a grammar file based on previously created LSC examples (as described in [[How to train a model for statistical play-in]]). In order to use this grammar for parsing your requirements document, you should upload the file and tune several meta-parameters. To do this follow these steps:&lt;br /&gt;
&lt;br /&gt;
#Upload the newly created grammar file:&lt;br /&gt;
##Select the LSC project and choose Properties -&amp;gt; PlayGo --&amp;gt; Play-In.&lt;br /&gt;
##Select the 'Statistical NL' tab and choose the newly created statistical grammar file:&amp;lt;br&amp;gt;[[File:properties.playin.statisticalNL.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
##Choose whether or not you would like the sentence context to be taken into account (default: with context).&lt;br /&gt;
##Choose the number of candidates for each sentence you would like the statistical model to consider (default: 16 candidates).&amp;lt;br&amp;gt;&lt;br /&gt;
Now, when you [http://wiki.weizmann.ac.il/harelgroup/index.php/How_to_Play-In#Uploading_a_requirements_document  upload a requirements document], the newly created grammar will be used.&lt;/div&gt;</summary>
		<author><name>Smadar</name></author>	</entry>

	<entry>
		<id>https://wiki.weizmann.ac.il/playgo/index.php?title=How_to_train_a_model_for_statistical_play-in</id>
		<title>How to train a model for statistical play-in</title>
		<link rel="alternate" type="text/html" href="https://wiki.weizmann.ac.il/playgo/index.php?title=How_to_train_a_model_for_statistical_play-in"/>
				<updated>2014-11-09T07:04:59Z</updated>
		
		<summary type="html">&lt;p&gt;Smadar: Created page with &amp;quot;For NL play-in, one can improve the performance of the statistical parser by adding training examples. A training example is a file with an '''.st''' suffix that contains the ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;For NL play-in, one can improve the performance of the statistical parser by adding training examples. A training example is a file with an '''.st''' suffix that contains the parse trees of previously-defined LSC examples.&amp;lt;br/&amp;gt;For existing LSC files created using NL play-in, you can generate the corresponding .st file by selecting the relevant .lsc file, right-clicking it, and choosing &amp;quot;export syntax tree&amp;quot;.&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;To train the statistical model, follow these steps:&lt;br /&gt;
&lt;br /&gt;
#Click the 'Train' toolbar button:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[[File:TrainAction.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click the 'Browse' button to select the full path and choose a name for the statistical grammar file you are about to create:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[[File:TrainDialogBrowse.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click the 'Add' button to select .st files for the model to be trained on. You can add (and remove) as many .st files as you wish:&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;[[File:TrainDialogAdd.png]]&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;Note that .st files for training, can be generated from LSCs created using NL play-in, by right-clicking a .lsc file and choosing 'Export Syntax Tree'. Examples for LSCs created using NL play-in can be found [[How to Play-In#Learn from Examples | here]].&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#When training a new model using user defined examples, we allow the user to interpolate the weights of the parameters learned from the user specified sample with previously learned weights from our set of 10000 randomly generated examples. Use the text boxes to define the weights of the parameters learned from the user examples and those previously learned by the system from random examples. By default, we assign 99% of the parameter weight for the parameters learned from user specified examples.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;[[File:TrainDialogWeights.png]]&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
#Click 'OK'.&lt;/div&gt;</summary>
		<author><name>Smadar</name></author>	</entry>

	</feed>