K is very close in spirit and ideology to many
of the aforementioned languages, but differs in many
respects as well. For example, due to the appli-
cation environment of K being targeted to SysML
models, proving class satisfiability and model find-
ing are of prime importance, something for which K
is optimized. K also provides support for specify-
ing and proving specifications with multiple inheri-
tance, something SysML models depend on greatly.
Integration with SMT solvers has proven to be useful
not only for proving class satisfiability, but also for
model finding (including scheduling) and model ex-
ploration. In model exploration, users manually ex-
plore the range of satisfiable solutions for the given
model using iterative refinement techniques (chang-
ing constraints manually).
6 CONCLUSIONS
We have presented an overview of the K language
in this paper. K is intended to be used in a model-
ing environment for proving satisfiability of SysML
models and exploring solutions to various types of
models, such as structure, planning/scheduling, etc.
We have also presented in detail, our methodology
for performing automatic translation of K models to
SMT-LIB, and using an SMT solver such as Z3 to
perform semantic model finding. Using manual meth-
ods of creating K models from SysML models and
reference materials, we have already observed K pro-
vide value in the modeling environment by discov-
ering unsatisfiability of scheduling problems in the
proposed Europa Clipper mission concept, which was
confirmed by external manual analysis. In our cur-
rent experience, K seems to be sufficient for creating
small to medium sized SysML models and proving
properties about them. Concerning problems faced,
a main challenge of course is the higher-order nature
of K, requested by mission engineers (expressiveness
prioritized over guaranteed analyzability). SMT-LIB
is generally first-order. Some problems are a con-
sequence of using SMT-LIB solvers, which struggle
with the combination of arrays (used for the heap and
for sets) and universal quantification. Additionally,
the use of Real numbers and arithmetic on them is
also a known SMT challenge, especially in the con-
text of arrays. We are now in the process of creating
tools to automatically translate SysML models to K
models (and back) and perform analysis on them us-
ing the K infrastructure. This will make it possible to
view a model as graphics as well as in text. The trans-
lation of K needs to be extended to cover more con-
structs, including statements with side-effects. Other
challenges include making K executable, for example
by translation to Scala, including executing OCL-like
expressions; providing support for reflection such that
models can query themselves; and making the K lan-
guage and textual notation user-extensible.
REFERENCES
Allen, J. F. (1984). Towards a general theory of action and
time. Artificial Intelligence, 23:123–154.
Barnett, M., Chang, B.-Y. E., DeLine, R., Jacobs, B., and
Leino, K. R. M. (2006). Boogie: A modular reusable
verifier for object-oriented programs. In Formal meth-
ods for Components and Objects, pages 364–387.
Springer.
Barnett, M., Fähndrich, M., Leino, K. R. M., Müller, P.,
Schulte, W., and Venter, H. (2011). Specification and
verification: the Spec# experience. Communications
of the ACM, 54(6):81–91.
Barras, B., Boutin, S., Cornes, C., Courant, J., Filliatre, J.-
C., Gimenez, E., Herbelin, H., Huet, G., Munoz, C.,
Murthy, C., et al. (1997). The coq proof assistant ref-
erence manual: Version 6.1.
Bjørner, D. and Jones, C. B., editors (1978). The Vienna De-
velopment Method: The Meta-Language, volume 61
of LNCS. Springer.
Bjørner, D. and Jones, C. B. (1982). Formal Specifica-
tion and Software Development. Prentice Hall Inter-
national. ISBN 0-13-880733-7.
Bobot, F., Filliâtre, J.-C., Marché, C., and Paskevich, A.
(2011). Why3: Shepherd your herd of provers.
In Boogie 2011: First International Workshop on
Intermediate Verification Languages, pages 53–64,
Wrocław, Poland.
De Moura, L. and Bjørner, N. (2008). Z3: An efficient smt
solver. In Tools and Algorithms for the Construction
and Analysis of Systems, pages 337–340. Springer.
Europa Clipper Mission (2015). http://www.jpl.nasa.gov/
missions/europa-mission.
Fitzgerald, J., Larsen, P. G., Mukherjee, P., Plat, N., and
Verhoef, M. (2005). Validated Designs For Object-
oriented Systems. Springer-Verlag TELOS, Santa
Clara, CA, USA.
Fortress (2015). https://projectfortress.java.net/.
George, C., Haff, P., Havelund, K., Haxthausen, A., Milne,
R., Nielsen, C. B., Prehn, S., and Wagner, K. R.
(1992). The RAISE Specification Language. The BCS
Practitioner Series, Prentice-Hall, Hemel Hampstead,
England.
Gurevich, Y., Rossman, B., and Schulte, W. (2005). Seman-
tic essence of AsmL. Theoretical Computer Science,
343(3):370–412.
Havelund, K. (2011). Closing the gap between specification
and programming: VDM
++
and Scala. In Korovina,
M. and Voronkov, A., editors, HOWARD-60: Higher-
Order Workshop on Automated Runtime Verification
and Debugging, volume 1 of EasyChair Proceedings.
Manchester, UK.
K: A Wide Spectrum Language for Modeling, Programming and Analysis
121