<feed xmlns='http://www.w3.org/2005/Atom'>
<title>sail/editors, branch sail2</title>
<subtitle>Formal specification language for ISAs</subtitle>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/'/>
<entry>
<title>add else as keyword</title>
<updated>2021-03-18T12:35:46+00:00</updated>
<author>
<name>jp</name>
</author>
<published>2021-03-18T12:35:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=3ac7babbba68d64b8d54154b36d70a305955170b'/>
<id>3ac7babbba68d64b8d54154b36d70a305955170b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add add_symbol to the API of Process_file</title>
<updated>2020-04-14T16:29:15+00:00</updated>
<author>
<name>Alasdair</name>
</author>
<published>2020-04-14T16:16:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=26510d7798daac30a400e8d04278a86ea8b83983'/>
<id>26510d7798daac30a400e8d04278a86ea8b83983</id>
<content type='text'>
Allows clients of sail as a library to define custom symbols for $ifdef
and $ifndef

Iterate vector concat assignment and tuple assignment to handle unusual
nesting cases when compiling to C. These rewrites should really be one
rewrite anyway though!

Don't add type annotations when introducing tuple patterns during
rewriting. I guess not adding them could also cause an error in some
circumstances, but if that's the case it could probably be fixed by
tweaking some rules in the type-checker.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Allows clients of sail as a library to define custom symbols for $ifdef
and $ifndef

Iterate vector concat assignment and tuple assignment to handle unusual
nesting cases when compiling to C. These rewrites should really be one
rewrite anyway though!

Don't add type annotations when introducing tuple patterns during
rewriting. I guess not adding them could also cause an error in some
circumstances, but if that's the case it could probably be fixed by
tweaking some rules in the type-checker.
</pre>
</div>
</content>
</entry>
<entry>
<title>set vscode syntax highlighting extension up for publication</title>
<updated>2020-02-23T17:45:20+00:00</updated>
<author>
<name>jp</name>
</author>
<published>2020-02-23T17:45:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=219f8ef5aec4d6a4f918693bccc9dc548716ea41'/>
<id>219f8ef5aec4d6a4f918693bccc9dc548716ea41</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add vscode syntax highlighting mode</title>
<updated>2020-02-12T22:53:39+00:00</updated>
<author>
<name>jp</name>
</author>
<published>2020-02-12T22:53:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=df6732cc2206e6a2918e04ebb15c04fbc7d91f57'/>
<id>df6732cc2206e6a2918e04ebb15c04fbc7d91f57</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>improve syntax highlighting</title>
<updated>2020-02-12T17:46:43+00:00</updated>
<author>
<name>jp</name>
</author>
<published>2020-02-12T17:46:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=31a65c9b7383d2a87da0fbcf5c265d533146ac23'/>
<id>31a65c9b7383d2a87da0fbcf5c265d533146ac23</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>add simple html syntax highlighter based on prism.js</title>
<updated>2019-10-29T13:52:54+00:00</updated>
<author>
<name>jp</name>
</author>
<published>2019-10-29T13:52:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=2b2ab7a174384b87dc4bfda281383cad0058a1fa'/>
<id>2b2ab7a174384b87dc4bfda281383cad0058a1fa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'sail2' into separate_bv</title>
<updated>2019-06-04T15:37:48+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-06-04T15:37:48+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=6d3a6edcd616621eb40420cfb16a34762a32c5c1'/>
<id>6d3a6edcd616621eb40420cfb16a34762a32c5c1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Move Util.warn to Reporting, and make it take the location as a parameter</title>
<updated>2019-05-22T14:20:54+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-05-22T14:20:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=3e56cca75ea1e749fed71cda6a0c8b07659df611'/>
<id>3e56cca75ea1e749fed71cda6a0c8b07659df611</id>
<content type='text'>
Also add a $suppress_warnings directive that ensures that no warnings
are generated for a specific file.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also add a $suppress_warnings directive that ensures that no warnings
are generated for a specific file.
</pre>
</div>
</content>
</entry>
<entry>
<title>Experiment with making vector and bitvector distinct types</title>
<updated>2019-05-17T17:38:35+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-05-17T17:38:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=a1ef7946b96d95b3192f8db496f09d4bb23b775a'/>
<id>a1ef7946b96d95b3192f8db496f09d4bb23b775a</id>
<content type='text'>
Only change that should be needed for 99.9% of uses is to change
vector('n, 'ord, bit) to bitvector('n, 'ord), and adding

$ifndef FEATURE_BITVECTOR_TYPE
type bitvector('n, dec) = vector('n, dec, bit)
$endif

for to support any Sail before this

Currently I have all C, Typechecking, and SMT tests passing, as well
as the RISC-V spec building OCaml and C completely unmodified.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Only change that should be needed for 99.9% of uses is to change
vector('n, 'ord, bit) to bitvector('n, 'ord), and adding

$ifndef FEATURE_BITVECTOR_TYPE
type bitvector('n, dec) = vector('n, dec, bit)
$endif

for to support any Sail before this

Currently I have all C, Typechecking, and SMT tests passing, as well
as the RISC-V spec building OCaml and C completely unmodified.
</pre>
</div>
</content>
</entry>
<entry>
<title>SMT: Add property and counterexample directive</title>
<updated>2019-04-11T17:07:49+00:00</updated>
<author>
<name>Alasdair Armstrong</name>
</author>
<published>2019-04-11T17:02:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.0x7felf.com/sail/commit/?id=c6e9b167b43332464f8d066034bf4604cb37d182'/>
<id>c6e9b167b43332464f8d066034bf4604cb37d182</id>
<content type='text'>
Rather than generating SMT from a function called check_sat, now find
any function with a $property directive and generate SMT for it, e.g.

$property
function prop_cap_round_trip(cap: bits(128)) -&gt; bool = {
  let cap_rt = capToBits(capBitsToCapability(true, cap));
  cap == cap_rt
}

$property
function prop_base_lteq_top(capbits: bits(128)) -&gt; bool = {
  let c = capBitsToCapability(true, capbits);
  let (base, top) = getCapBounds(c);
  let e = unsigned(c.E);
  e &gt;= 51 | base &lt;= top
}

The file property.ml has a function for gathering all the properties
in a file, as well as a rewrite-pass for properties with type
quantifiers, which allows us to handle properties like

function prop forall 'n, 'n &lt;= 100. (bv: bits('n)) -&gt; bool = exp

by rewriting to (conceptually)

function prop(bv: bits(MAX_BIT_WIDTH)) -&gt; bool =
  if length(bv) &gt; 100 then true else exp

The function return is now automatically negated (i.e. always true =
unsat, sometimes false = sat), which makes sense for quickcheck-type
properties.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than generating SMT from a function called check_sat, now find
any function with a $property directive and generate SMT for it, e.g.

$property
function prop_cap_round_trip(cap: bits(128)) -&gt; bool = {
  let cap_rt = capToBits(capBitsToCapability(true, cap));
  cap == cap_rt
}

$property
function prop_base_lteq_top(capbits: bits(128)) -&gt; bool = {
  let c = capBitsToCapability(true, capbits);
  let (base, top) = getCapBounds(c);
  let e = unsigned(c.E);
  e &gt;= 51 | base &lt;= top
}

The file property.ml has a function for gathering all the properties
in a file, as well as a rewrite-pass for properties with type
quantifiers, which allows us to handle properties like

function prop forall 'n, 'n &lt;= 100. (bv: bits('n)) -&gt; bool = exp

by rewriting to (conceptually)

function prop(bv: bits(MAX_BIT_WIDTH)) -&gt; bool =
  if length(bv) &gt; 100 then true else exp

The function return is now automatically negated (i.e. always true =
unsat, sometimes false = sat), which makes sense for quickcheck-type
properties.
</pre>
</div>
</content>
</entry>
</feed>
