<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">On 2/5/20 10:39 AM, Carter Schonwald
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAHYVw0wwiHwdkmMkcU=v09b6iON4HXrHq-1dzPCmX92nwfNTZw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">Try using clash, its its own thing, and
overanalysis might be more challenging than just trying it out <br>
</div>
<br>
</blockquote>
<p>Fair point.</p>
<p><br>
</p>
<blockquote type="cite"
cite="mid:CAHYVw0wwiHwdkmMkcU=v09b6iON4HXrHq-1dzPCmX92nwfNTZw@mail.gmail.com">
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div bgcolor="#FFFFFF">
<p>- There is another Functional HDL that solves this using
some unsafe reference trick to keep track of the sharing.
I believe it is CλaSH but I'm not sure. I believe you can
get away with this because the semantics is pure so in
practice doesn't cause any inconsistencies, but it really
doesn't sound like something I would do without some kind
of proof that it is actually ok. If it is ok, it would
probably make sense to abstract this in a library. Maybe
someone has done that already?<br>
</p>
</div>
</blockquote>
</div>
</blockquote>
<p>I was able to recover some information from my notes. I ran into
this a while ago, then decided to keep the implementation simple
and just use Monads:<br>
</p>
<p>A survey in Andy Gill's presentation on observable sharing:</p>
<p><a class="moz-txt-link-freetext" href="http://www.ittc.ku.edu/~andygill/talks/20090903-hask.pdf">http://www.ittc.ku.edu/~andygill/talks/20090903-hask.pdf</a></p>
<p>Just checked the Clash website and there is a link to Christiaan
Baaij's master thesis, which has a description of the sharing
problem in Appendix C:<br>
</p>
<p><a class="moz-txt-link-freetext" href="https://essay.utwente.nl/59482/1/scriptie_C_Baaij.pdf">https://essay.utwente.nl/59482/1/scriptie_C_Baaij.pdf</a></p>
<p><br>
</p>
<p>I think there is probably a use for a generic library that can do
this kind of sharing recovery. Still I'm not quite happy with the
"can be unsafe in some cases" remarks and would like to learn
more. However there might be a tradeoff to use this as a
simplified interface to something that is implemented in a safe
monadic style under the hood.</p>
<br>
</body>
</html>