In this repository, we formally define the translation of the K Frontend Language into axioms in Matching Logic, the logic over which the semantics of the K Framework are defined. K being a Language used in formal verification, it is important the K frontend constructs have clearly defined semantics. We choose to implement this translation in K itself, since becoming a self-hosting
After installing python3, ninja-build and pandoc simply run ./build
.
TODO: Choose better names for EKore-0
, ...
-
Frontend K
- Includes:
- K Frontend syntax for defining grammar, rules, configuration
- Rules may use:
- User defined syntax (concrete syntax)
- KAST syntax (abstract syntax)
- Eliminate User defined syntax by converting to KAST
- Choose KLabels for each production
#bubble(...)
is replaced with KAST syntax- Disabiguation
require "file.k"
should be expanded to the contents of the file.- ...
- Includes:
-
Extended-Kore
- (EKore-0 -> EKore-1) : Turn
#KProduction
s into koresort
declarations - (EKore-1 -> EKore-2) :
#KProduction
s replaced with kore'ssymbol
declaration - (EKore-2 -> EKore-3) : Rules for functional symbols become axioms (of the form equations, not rewrites).
- (EKore-? -> EKore-?) : Other rules for symbols become
\rewrites
with contexts - Define configuration cell sorts ...
- ...
- (EKore-0 -> EKore-1) : Turn
-
Pre-Kore : No more K frontend constructs
- Generate "No Junk" Axioms
- Generate Functional Axioms
- Generate Strictness Axioms
- Generate Configuration init functions
- Configuration concretization
- ...
In the imp/imp.ekore0
we sketch out what we expect the ekore0
syntax to look like.
-
We Assume dotMap{}() and mapLookup{}(...) are the symbols defined in
DOMAINS
-
We use
_/_
etc as sugar for Lbl'Unds'Div'Unds'{}()
In each of the test files t/foobar-<FEATURE>.ekore
uses a single additional
feature over the expected kore0
syntax (for example: frontend modules, syntax
declarations, rules, contexts...). We expect all these to reduce down to the
same expected output. Eventually we want this expected
file to be kore0
.
kore.k
says thatName
is aSort
, but I think it should be aSortVariable
instead?kore-parse
throws: "Sort variable 'Foo' not declared" otherwise.kore.k
has sort names likeDeclaration
whereaskore-parse
calls its corresponding constructObjectSentence
s. I think we should converge?
-
How will AC lookuPs look
-
Should
#KRequires(\dv{Bool{}("true"))
be#KRequires(\top{..}())
-
Why are bubbles inside
#NoAttrs
/#Attrs
, can we instead have:#KRule{}(#bubble(...), #KAttrs(#KAttrsEmpty(){}, #KRequires{}(...))
- We expect top-level
requires "file.k"
to be handled anddomains.k
etc to be included in the definition.