<div dir="ltr">Brandon,<div><br></div><div>I was away from e-mail and just read your message... As Christopher explained already, it sounds like backward type inference should be of help to you. If you have more questions about this, feel free to contact me directly.</div><div><br></div><div>Marten</div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><br>--<br>Marten Lohstroh, Msc. | Graduate Student Researcher<br>University of California | 545Q Cory Hall<br>Berkeley, CA 94720 | +1 510 282 9135</div></div>
<br><div class="gmail_quote">On Mon, Dec 15, 2014 at 6:44 PM, Christopher Brooks <span dir="ltr"><<a href="mailto:cxh@eecs.berkeley.edu" target="_blank">cxh@eecs.berkeley.edu</a>></span> wrote:<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#000000">
<div>Hi Brandon,<br>
<br>
Backward type inference can help with these JSONToToken models,
see<br>
<br>
<a href="http://chess.eecs.berkeley.edu/pubs/1035.html" target="_blank">http://chess.eecs.berkeley.edu/pubs/1035.html</a> - a poster<br>
<br>
<a href="http://ptolemy.eecs.berkeley.edu/books/Systems/chapters/TheTypeSystem.pdf" target="_blank">http://ptolemy.eecs.berkeley.edu/books/Systems/chapters/TheTypeSystem.pdf</a><br>
<br>
In Ptolemy II, to enable backward type conversion in Vergil, right
click on the canvas, select Customize, then Configure, then check
the enableBackwardTypeInference box.<br>
<br>
In Kepler, it might be necessary to do something different, see
<a href="http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/2013-October/002542.html" target="_blank">http://lists.nceas.ucsb.edu/kepler/pipermail/kepler-users/2013-October/002542.html</a><br>
<br>
For the JSON actor and Backward Type Conversion, see Marten's
poster at <a href="http://chess.eecs.berkeley.edu/pubs/1035.html" target="_blank">http://chess.eecs.berkeley.edu/pubs/1035.html</a><br>
<br>
See also
<a href="http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/conversions/json/JSONToToken.html" target="_blank">http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/conversions/json/JSONToToken.html</a>
and
<a href="http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/conversions/json/TokenToJSON.html" target="_blank">http://sisyphus.eecs.berkeley.edu:8079/hudson/job/ptII/javadoc/ptolemy/actor/lib/conversions/json/TokenToJSON.html</a>
though there is not much there.<br>
<br>
Martin's tech report "Maximally Permissive Composition of Actors
in Ptolemy II" at
<a href="http://www.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-19.html" target="_blank">http://www.eecs.berkeley.edu/Pubs/TechRpts/2013/EECS-2013-19.html</a>
also has some info about JSONToToken.<br>
<br>
<br>
<br>
In a multicontributor environment, I suggest the following:<br>
<br>
- Where you can, use actor oriented classes to define models.
This means that people can "own" blocks of functionality and
others can instantiate them. If the original definition changes,
then the users will see those changes.<br>
<br>
- A nightly build with a test suite goes a long way to helping
find problems early. There is a Test actor that can be used in
models to create regression tests. $PTII/doc/coding/testing.htm
has details.<br>
<br>
- In your version control system, always work at the head,
branching can consume resources when doing a merge.<br>
<br>
_Christopher<div><div class="h5"><br>
<br>
On 12/10/14 7:58 PM, Edward A. Lee wrote:<br>
</div></div></div><div><div class="h5">
<blockquote type="cite">
<br>
In the underlying Ptolemy system, we have a JavaScript actor that
would be ideal for this...
<br>
Not sure whether this is exposed in the Kepler libraries...
<br>
<br>
Edward
<br>
<br>
On 12/10/14, 2:16 PM, Brandon Kuczenski wrote:
<br>
<blockquote type="cite">Hi all,
<br>
<br>
I'm new to Kepler and I'm trying to build a minimal demo to show
my
<br>
research group how the tool works. I have two questions, and
the first
<br>
is a two-parter.
<br>
<br>
1a- My first application is to pull down data from a web service
(using
<br>
RESTService) and display it. In the WebService demo (Getting
Started
<br>
06) I see the XMLDisassembler actor is used. However, my data
come back
<br>
in JSON format- It does not appear that there is a JSON analog
for
<br>
XMLDisassembler. Any recommendations on how I could parse the
data?
<br>
<br>
1b- One thing I tried was JSONToToken, thinking that a token was
<br>
something that might be more easily manipulated; it did not turn
out to
<br>
be. In fact, I can't really find anything that I can connect to
the
<br>
output of a JSONToToken actor. Is there a way for me to find
actorsI
<br>
with input ports that are valid terminals for a given output
port, or
<br>
vice-versa?
<br>
<br>
2- The team I'm working with includes about 14 people across
several
<br>
academic departments. Are there any documents or helpful
resources that
<br>
give practical advice on working with Kepler in a
multi-contributor
<br>
environment? None of us has used the tool before.
<br>
<br>
BTW it seems some actors (RESTService and JSON-anything, for
instance)
<br>
are missing from the Actor Reference.
<br>
<br>
Thanks in advance,
<br>
Brandon
<br>
<br>
<br>
</blockquote>
<br>
_______________________________________________
<br>
Kepler-users mailing list
<br>
<a href="mailto:Kepler-users@kepler-project.org" target="_blank">Kepler-users@kepler-project.org</a>
<br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a>
<br>
</blockquote>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888"><pre cols="72">--
Christopher Brooks, PMP University of California
Academic Program Manager & Software Engineer US Mail: 337 Cory Hall
CHESS/iCyPhy/Ptolemy/TerraSwarm Berkeley, CA 94720-1774
<a href="mailto:cxh@eecs.berkeley.edu" target="_blank">cxh@eecs.berkeley.edu</a>, <a href="tel:707.332.0670" value="+17073320670" target="_blank">707.332.0670</a> (Office: 545Q Cory)
</pre>
</font></span></div>
<br>_______________________________________________<br>
Kepler-users mailing list<br>
<a href="mailto:Kepler-users@kepler-project.org">Kepler-users@kepler-project.org</a><br>
<a href="http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users" target="_blank">http://lists.nceas.ucsb.edu/kepler/mailman/listinfo/kepler-users</a><br>
<br></blockquote></div></div>