Skip to main content

Integrity Constraints for Microcontroller Programming in Datalog

  • Conference paper
  • First Online:
Book cover Advances in Databases and Information Systems (ADBIS 2021)

Part of the book series: Lecture Notes in Computer Science ((LNISA,volume 12843))

Included in the following conference series:

Abstract

We consider microcontroller-programming with a declarative language based on the logic-programming language Datalog. Our prototype implementation translates a Datalog dialect to C-code for the Arduino IDE. In order to prove the correctness, one must ensure that the very limited memory of the microcontroller is sufficient for the derived facts. In this paper, we propose a class of constraints called “generalized exclusion constraints” that can be used for this task. Moreover, they are needed to exclude conflicting commands to the hardware, e.g. different output values on a pin in the same state. This class of constraints also generalizes keys and functional dependencies, therefore our results also help to prove such constraints for derived predicates.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

References

  1. Alvaro, P., Marczak, W.R., Conway, N., Hellerstein, J.M., Maier, D., Sears, R.: Dedalus: Datalog in time and space. In: de Moor, O., Gottlob, G., Furche, T., Sellers, A.J. (eds.) Datalog Reloaded – First International Workshop, Datalog 2010. LNCS, vol. 6702, pp. 262–281. Springer, Heidelberg (2011). https://doi.org/10.1007/978-3-642-24206-9_16, http://www.neilconway.org/docs/dedalus_dl2.pdf

  2. Bry, F., Manthey, R., Martens, B.: Integrity verification in knowledge bases. In: Voronkov, A. (ed.) RCLP -1990. LNCS, vol. 592, pp. 114–139. Springer, Heidelberg (1992). https://doi.org/10.1007/3-540-55460-2_9

    Chapter  Google Scholar 

  3. Calì, A., Gottlob, G., Lukasiewicz, T.: A general Datalog-based framework for tractable query answering over ontologies. In: Proceedings of the 28th ACM SIGMOD-SIGACT-SIGART Symposium on Principles of Database Systems (PODS 2009), pp. 77–86. ACM (2009)

    Google Scholar 

  4. Casanova, M.A., Vidal, V.M.P.: Towards a sound view integration methodology. In: Proceedings of the 2nd ACM SIGACT-SIGMOD Symposium on Principles of Database Systems (PODS 1983), pp. 36–47 (1983)

    Google Scholar 

  5. Chabin, J., Halfeld-Ferrari, M., Markhoff, B., Nguyen, T.B.: Validating data from semantic web providers. In: Tjoa, A.M., Bellatreche, L., Biffl, S., van Leeuwen, J., Wiedermann, J. (eds.) SOFSEM 2018. LNCS, vol. 10706, pp. 682–695. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-73117-9_48

    Chapter  Google Scholar 

  6. Engels, C., Behrend, A., Brass, S.: A rule-based approach to analyzing database schema objects with Datalog. In: Fioravanti, F., Gallagher, J.P. (eds.) LOPSTR 2017. LNCS, vol. 10855, pp. 20–36. Springer, Cham (2018). https://doi.org/10.1007/978-3-319-94460-9_2

    Chapter  MATH  Google Scholar 

  7. Imbert, J.-L., Cohen, J., Weeger, M.D.: An algorithm for linear constraint solving: its incorporation in a Prolog meta-interpreter for CLP. J. Log. Program. 16, 235–253 (1993). https://core.ac.uk/download/pdf/82420821.pdf

  8. Schewe, K.D., Thalheim, B.: Towards a theory of consistency enforcement. Acta Informatica 36, 97–141 (1999). https://doi.org/10.1007/s002360050155

    Article  MathSciNet  MATH  Google Scholar 

  9. Scholz, B., Jordan, H., Subotić, P., Westmann, T.: On fast large-scale program analysis in Datalog. In: Proceedings of the 25th International Conference on Compiler Construction (CC 2016), pp. 196–206. ACM (2016)

    Google Scholar 

  10. Shkapsky, A., Yang, M., Interlandi, M., Chiu, H., Condie, T., Zaniolo, C.: Big data analytics with Datalog queries on Spark. In: Proceedings of the 2016 International Conference on Management of Data (SIGMOD 2016), pp. 1135–1149. ACM (2016). http://yellowstone.cs.ucla.edu/~yang/paper/sigmod2016-p958.pdf

  11. Thalheim, B.: Dependencies in Relational Databases. Teubner, Germany (1991)

    Book  Google Scholar 

  12. Van Hentenryck, P., Graf, T.: Standard forms for rational linear arithmetic in constraint logic programming. Ann. Math. Artif. Intell. 5(2), 303–319 (1992). https://doi.org/10.1007/BF01543480

    Article  MathSciNet  MATH  Google Scholar 

  13. Wenzel, M., Brass, S.: Declarative programming for microcontrollers - Datalog on Arduino. In: Hofstedt, P., Abreu, S., John, U., Kuchen, H., Seipel, D. (eds.) INAP/WLP/WFLP -2019. LNCS (LNAI), vol. 12057, pp. 119–138. Springer, Cham (2020). https://doi.org/10.1007/978-3-030-46714-2_9. https://arxiv.org/abs/1909.00043

    Chapter  Google Scholar 

  14. Wenzel, M., Brass, S.: Translation of interactive Datalog programs for microcontrollers to finite state machines. LOPSTR 2020. LNCS, vol. 12561, pp. 210–227. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-68446-4_11

    Chapter  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Stefan Brass .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2021 Springer Nature Switzerland AG

About this paper

Check for updates. Verify currency and authenticity via CrossMark

Cite this paper

Brass, S., Wenzel, M. (2021). Integrity Constraints for Microcontroller Programming in Datalog. In: Bellatreche, L., Dumas, M., Karras, P., Matulevičius, R. (eds) Advances in Databases and Information Systems. ADBIS 2021. Lecture Notes in Computer Science(), vol 12843. Springer, Cham. https://doi.org/10.1007/978-3-030-82472-3_12

Download citation

  • DOI: https://doi.org/10.1007/978-3-030-82472-3_12

  • Published:

  • Publisher Name: Springer, Cham

  • Print ISBN: 978-3-030-82471-6

  • Online ISBN: 978-3-030-82472-3

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics