Skip to content
Draft
Show file tree
Hide file tree
Changes from 3 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
15 changes: 11 additions & 4 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"solargraph.bundlerPath": "bin/bundle",
"solargraph.bundlerPath": "./bin/bundle",
"solargraph.useBundler": true,
"sorbet.lspConfigs": [


{
"id": "container",
"name": "Sorbet (UDB)",
Expand Down Expand Up @@ -34,13 +35,13 @@
"name": "Sorbet (Host)",
"description": "Sorbet on the host",
"command": [
"/usr2/dhower/.rbenv/shims/bundle",
"bundle",
"exec",
"srb",
"typecheck",
"--lsp",
"--dir",
"tools/gems",
"tools/ruby-gems",
"--ignore",
"api_doc",
"--ignore",
Expand All @@ -66,5 +67,11 @@
]
}
],
"sorbet.selectedLspConfigId": "host"
"sorbet.selectedLspConfigId": "host",
"rubyTestExplorer.debugCommand": "bundle exec rdebug-ide",
"rubyTestExplorer.minitestCommand": "bundle exec rake",
"rubyTestExplorer.rspecCommand": "bundle exec rspec",
"rubyTestExplorer.testFramework": "minitest",
"rubyTestExplorer.minitestDirectory": "./tools/ruby-gems/idlc/test/",
"ipynb.experimental.serialization": false
}
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ group :development do
gem "awesome_print"
gem "debug"
gem "rdbg"
gem "ruby-debug-ide"
gem "rubocop-github"
gem "rubocop-minitest"
gem "rubocop-performance"
Expand Down
89 changes: 44 additions & 45 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,19 +38,16 @@ GEM
remote: https://rubygems.org/
specs:
Ascii85 (2.0.1)
activesupport (8.0.2)
activesupport (7.1.4.2)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
mutex_m
tzinfo (~> 2.0)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
afm (0.2.2)
Expand Down Expand Up @@ -81,6 +78,8 @@ GEM
base64 (0.3.0)
benchmark (0.4.1)
bigdecimal (3.2.2)
cgi (0.5.0)
coderay (1.1.3)
commander (5.0.0)
highline (~> 3.0.0)
concurrent-ruby (1.3.5)
Expand All @@ -96,7 +95,8 @@ GEM
diff-lcs (1.6.2)
docile (1.4.1)
drb (2.2.3)
erb (5.0.1)
erb (4.0.4)
cgi (>= 0.3.3)
erubi (1.13.1)
hana (1.3.7)
hashery (2.1.2)
Expand All @@ -122,16 +122,22 @@ GEM
lint_roller (1.1.0)
logger (1.7.0)
matrix (0.4.2)
method_source (1.1.0)
minitest (5.25.5)
netrc (0.11.0)
mutex_m (0.3.0)
nkf (0.2.0)
nokogiri (1.18.8-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.8-x86_64-linux-gnu)
racc (~> 1.4)
observer (0.1.2)
ostruct (0.6.1)
ostruct (0.6.2)
parallel (1.27.0)
parlour (9.1.2)
commander (~> 5.0)
parser
rainbow (~> 3.0)
sorbet-runtime (>= 0.5)
parser (3.3.8.0)
ast (~> 2.4.1)
racc
Expand Down Expand Up @@ -162,6 +168,9 @@ GEM
prawn (~> 2.2)
prettyprint (0.2.0)
prism (1.4.0)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.6)
date
stringio
Expand All @@ -170,10 +179,6 @@ GEM
rack (3.1.16)
rainbow (3.1.1)
rake (13.3.0)
rbi (0.3.3)
prism (~> 1.0)
rbs (>= 3.4.4)
sorbet-runtime (>= 0.5.9204)
rbs (3.9.4)
logger
rdbg (0.1.0)
Expand All @@ -188,22 +193,22 @@ GEM
nokogiri
rexml (3.4.1)
rouge (4.5.2)
rubocop (1.76.0)
rubocop (1.78.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
rubocop-ast (>= 1.45.0, < 2.0)
rubocop-ast (>= 1.45.1, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 4.0)
rubocop-ast (1.45.0)
rubocop-ast (1.45.1)
parser (>= 3.3.7.2)
prism (~> 1.4)
rubocop-github (0.26.0)
rubocop (>= 1.76)
rubocop-github (0.23.0)
rubocop (>= 1.72)
rubocop-performance (>= 1.24)
rubocop-rails (>= 2.23)
rubocop-minitest (0.38.1)
Expand All @@ -220,23 +225,23 @@ GEM
rack (>= 1.1)
rubocop (>= 1.75.0, < 2.0)
rubocop-ast (>= 1.44.0, < 2.0)
rubocop-sorbet (0.10.2)
lint_roller
rubocop (>= 1.75.2)
rubocop-sorbet (0.10.0)
rubocop (>= 1)
ruby-debug-ide (0.7.5)
rake (>= 0.8.1)
ruby-prof (1.7.2)
base64
ruby-progressbar (1.13.0)
ruby-rc4 (0.1.5)
rubyzip (2.4.1)
securerandom (0.4.1)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.1)
simplecov_json_formatter (0.1.4)
simpleidn (0.2.3)
solargraph (0.55.0)
solargraph (0.56.0)
backport (~> 1.2)
benchmark (~> 0.4)
bundler (~> 2.0)
Expand All @@ -248,6 +253,7 @@ GEM
observer (~> 0.1)
ostruct (~> 0.6)
parser (~> 3.0)
prism (~> 1.4)
rbs (~> 3.3)
reverse_markdown (~> 3.0)
rubocop (~> 1.38)
Expand All @@ -263,28 +269,24 @@ GEM
sorbet-static-and-runtime (0.5.12157)
sorbet (= 0.5.12157)
sorbet-runtime (= 0.5.12157)
spoom (1.6.3)
spoom (1.3.2)
erubi (>= 1.10.0)
prism (>= 0.28.0)
rbi (>= 0.3.3)
rexml (>= 3.2.6)
prism (>= 0.19.0)
sorbet-static-and-runtime (>= 0.5.10187)
thor (>= 0.19.2)
stringio (3.1.7)
tapioca (0.16.11)
benchmark
bundler (>= 2.2.25)
netrc (>= 0.11.0)
parallel (>= 1.21.0)
rbi (~> 0.2)
sorbet-static-and-runtime (>= 0.5.11087)
spoom (>= 1.2.0)
thor (>= 1.2.0)
yard-sorbet
tapioca (0.4.27)
bundler (>= 1.17.3)
parlour (>= 2.1.0)
pry (>= 0.12.2)
sorbet-runtime
sorbet-static (>= 0.4.4471)
spoom
thor (>= 0.19.2)
terminal-table (4.0.0)
unicode-display_width (>= 1.1.1, < 4)
thor (1.3.2)
tilt (2.6.0)
tilt (2.6.1)
treetop (1.6.12)
polyglot (~> 0.3)
ttfunk (1.7.0)
Expand All @@ -293,21 +295,17 @@ GEM
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.3)
webrick (1.9.1)
write_xlsx (1.12.1)
nkf
rubyzip (>= 1.0.0)
yard (0.9.37)
yard-solargraph (0.1.0)
yard (~> 0.9)
yard-sorbet (0.9.0)
sorbet-runtime
yard

PLATFORMS
aarch64-linux-gnu
x86_64-linux-gnu
aarch64-linux
x86_64-linux

DEPENDENCIES
asciidoctor-diagram (~> 2.2)
Expand All @@ -328,6 +326,7 @@ DEPENDENCIES
rubocop-minitest
rubocop-performance
rubocop-sorbet
ruby-debug-ide
ruby-prof
ruby-progressbar (~> 1.13)
simplecov
Expand Down
1 change: 0 additions & 1 deletion cfgs/example_rv64_with_overlay.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -547,7 +547,6 @@ params:
MTVEC_BASE_ALIGNMENT_DIRECT: 4
MTVEC_BASE_ALIGNMENT_VECTORED: 4
MSTATUS_FS_LEGAL_VALUES: [0, 1, 2, 3]
MSTATUS_FS_WRITABLE: true
MSTATUS_TVM_IMPLEMENTED: true
HW_MSTATUS_FS_DIRTY_UPDATE: precise
MSTATUS_VS_WRITABLE: true
Expand Down
26 changes: 26 additions & 0 deletions doc/idl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,32 @@ The result of a binary operation is signed if both operands are signed; otherwis
`c` must be boolean, and `t` and `f` must be identical types.
|===

=== Implications

Implications are used to specify dependencies that must hold among data.
Implications cannot appear in general IDL code, and are used in specific contexts, for example when expression link:schema/conditions.adoc#_generic_constraints[generic constraints] in RISC-V Unified Database.

An implication takes the form:

[source,idl]
----
ANTECEDENT -> CONSEQUENT
----

The antecedent and consequent can be any expression with a boolean type.

The implication passes whenever (1) the antecedent is false or (2) both the antecedent and consequent are true.

For example:

[source,idl]
----
false -> true; # passes
false -> false; # passes
true -> true; # passes
true -> false; # fails
----

== Variables and constants

=== Mutable variables
Expand Down
Loading
Loading