27.03.2014 Views

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SEKE 2012 Proceedings - Knowledge Systems Institute

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

however, does not allow variables for head predicates in<br />

clauses [13]. H igher-order programming can be done in<br />

standard Prolog, but requires special features, such as the ‘call’<br />

predicate. [14]<br />

(5) non-atomic characters – Character representation is not<br />

part of the core language, but defined as a syntax extension.<br />

There are no built-in character functions, but instead these<br />

would be defined in a library.<br />

(6) non-atomic symbols – Non-atomic symbols eliminate the<br />

need for built-in decimal numbers, since they can be easily<br />

defined through library utilities.<br />

(7) flat sequences – Sequences in axiomatic language are<br />

completely "flat" compared with the underlying head/tail “dot”<br />

representation of Prolog and Lisp.<br />

(8) string variables – T hese provide pattern matching and<br />

metalanguage support. String variables can yield an infinite set<br />

of most-general unifications. For example, ($ a) unifies with (a<br />

$) with the assignments of $ = '', 'a', 'a a', ....<br />

(9) metalanguage – T he flexible syntax and higher-order<br />

capability makes axiomatic language well-suited to metaprogramming,<br />

language-oriented programming [15], and<br />

embedded domain-specific languages [16]. T his language<br />

extensibility is sim ilar to that of Racket [17], but axiomatic<br />

language is smaller.<br />

(10) no built-in arithmetic or other functions – The minimal<br />

nature and extensibility of axiomatic language means that basic<br />

arithmetic and other functions are provided through a library<br />

rather than built-in. But this also means that such functions<br />

have explicitly defined semantics and are more amenable to<br />

formal proof.<br />

(11) explicit definition of approximate arithmetic – Since there<br />

is no built-in floating point arithmetic, approximate arithmetic<br />

must also be defined in a library. But this means symbolically<br />

defined numerical results would always be identical down to<br />

the last bit, regardless of future floating point hardware.<br />

(12) negation – In axiomatic language a form of negation-asfailure<br />

could be defined on encoded axioms.<br />

(13) no non-logical operations such as cut – This follows from<br />

there being no procedural interpretation in axiomatic language.<br />

(14) no meta-logical operations such as v ar, setof, findall –<br />

These could be defined on encoded axioms.<br />

(15) no assert/retract – A set of axioms is static. Modifying<br />

this set must be done “outside” the language.<br />

VI. CONCLUSIONS<br />

A tiny logic programming language intended as a pure<br />

specification language has been described. T he language<br />

defines infinite sets of symbolic expressions which are<br />

interpreted to represent the external behavior of programs. The<br />

programmer is expected to write specifications without concern<br />

about efficiency.<br />

Axiomatic language should provide increased programmer<br />

productivity since specifications (such as the earlier sort<br />

definition) should be smaller and more readable than the<br />

corresponding implementation algorithms. Furthermore, these<br />

definitions should be more general and reusable than<br />

executable code that is c onstrained by efficiency. N ote that<br />

most of the axioms of this paper could be considered reusable<br />

definitions suitable for a library. Axiomatic language has finegrained<br />

modularity, which encourages the abstraction of the<br />

general parts of a solution from specific problem details and<br />

minimizes boilerplate code. The metalanguage capability<br />

should enable programmers to define a rich set of specification<br />

tools.<br />

The challenge, of course, is the efficient implementation of<br />

the programmer's specifications. [18] Higher-order definitions<br />

and the metalanguage capability are powerful tools for software<br />

specification, but make program transformation essential. The<br />

difficult problem of transformation should be helped, however,<br />

by the extreme simplicity and purity of the language, such as<br />

the absence of non-logical operations, built-in functions, state<br />

changes, and in put/output. Future work will address the<br />

problem of transformation.<br />

REFERENCES<br />

[1] L. Prechelt, “An empirical comparison of seven programming<br />

languages,” IEEE Computer, vol. 33, no. 10, pp. 23-29, October 2000.<br />

[2] U. Wiger, “Four-fold increase in productivity and quality”, Ericsson<br />

Telecom AB, 2001.<br />

[3] http://www.axiomaticlanguage.org<br />

[4] W. W. Wilson, “Beyond Prolog: software specification by grammar,”<br />

ACM SIGPLAN Notices, vol. 17, #9, pp. 34-43, September 1982.<br />

[5] W. Chen, M. Kifer, D. S. Warren, “HiLog: a foundation for higher-order<br />

logic programming,” in J. of Logic Programming, vol. 15, #3, pp. 187-<br />

230, 1993.<br />

[6] J. Backus, “Can programming be liberated from the von Neumann style?<br />

A functional style and its algebra of programs,” CACM, vol. 21, #8, pp.<br />

613–641, August 1978.<br />

[7] S. Peyton Jones, “Tackling the Awkward Squad: monadic input/output,<br />

concurrency, exceptions, and foreign-language calls in Haskell”,<br />

Engineering Theories of Software Construction, ed. T. Hoare, M. Broy,<br />

R. Steinbruggen, IOS Press, pp. 47-96, 2001.<br />

[8] A. Pettorossi, M. Proietti, R. Giugno, “Synthesis and transformation of<br />

logic programs using unfold/fold proofs,” J. Logic Programming, vol.<br />

41, 1997.<br />

[9] P. Wadler, “How to declare an imperative,” ACM Computing Surveys,<br />

vol. 29, #3, pp. 240-263, September, 1997.<br />

[10] K. L. Clark, Micro-Prolog: Programming in Logic, Prentice Hall, 1984.<br />

[11] Allegro Prolog, http://www.franz.com/support/documentation/8.2/doc/<br />

prolog.html.<br />

[12] The XSB Research Group, http://www.cs.sunysb.edu/~sbprolog/<br />

index.html.<br />

[13] D. S. Warren, K. Sagonas, private communication, 2000.<br />

[14] L. Naish, “Higher-order logic programming in Prolog,” Proc. Workshop<br />

on Multi-Paradigm Logic Programming, pp. 167-176, JICSLP’96, Bonn,<br />

1996.<br />

[15] M. Ward, “Language oriented programming”, Software Concepts and<br />

Tools, vol. 15, pp. 147-161, 1994.<br />

[16] P. Hudak, “Building domain-specific embedded languages,” ACM<br />

Computing Surveys, vol. 28, #4es, December 1996.<br />

[17] S. Tobin-Hochstadt, V. St-Amour, R. Culpepper, M. Flatt, M. Felleisen,<br />

“Languages as Libraries”, PLDI’11, 2011.<br />

[18] P. Flener, Achievements and Prospects of Program Synthesis, LNAI<br />

2407, pp. 310-346, 2002.<br />

490

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!