skip to main content
research-article

Factor: a dynamic stack-based programming language

Published:18 October 2010Publication History
Skip Abstract Section

Abstract

Factor is a new dynamic object-oriented programming language. It began as an embedded scripting language and evolved to a mature application development language. The language has a simple execution model and is based on the manipulation of data on a stack. An advanced metaprogramming system provides means for easily extending the language. Thus, Factor allows programmers to use the right features for their problem domain. The Factor implementation is self-hosting, featuring an interactive development environment and an optimizing compiler. In this paper, the language and its implementation are presented.

References

  1. }}Dave Beazley and et al. Simplified wrapper and interface generator. http://www.swig.org/, 2010.Google ScholarGoogle Scholar
  2. }}Stephan Becher. StrongForth homepage. http://home.vrweb.de/stephan.becher/forth/, 2008.Google ScholarGoogle Scholar
  3. }}Marc Berndl, Benjamin Vitale, Mathew Zaleski, and Angela Demke Brown. Context Threading: A Flexible and Efficient Dispatch Technique for Virtual Machine Interpreters. In In CGO '05: Proceedings of the international symposium on Code generation and optimization, pages 15--26. IEEE Computer Society, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}James Bielman and Lu´1s Oliveira. CFFI - The Common Foreign Function Interface. http://common-lisp.net/project/cffi/, 2010.Google ScholarGoogle Scholar
  5. }}Daniel G. Bobrow and Gregor Kiczales. The Common Lisp Object System metaobject kernel: a status report. In LFP '88: Proceedings of the 1988 ACM conference on LISP and functional programming, pages 309--315, New York, NY, USA, 1988. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}Benoit Boissinot, Alain Darte, Fabrice Rastello, Benoit Dupont de Dinechin, and Christophe Guillon. Revisiting Out-of-SSA Translation for Correctness, Code Quality and Efficiency. In CGO '09: Proceedings of the 7th annual IEEE/ACM International Symposium on Code Generation and Optimization, pages 114--125, Washington, DC, USA, 2009. IEEE Computer Society. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Gilad Bracha, Peter Ahe, Vassili Bykov, Yaron Kashai, and Eliot Miranda. The newspeak programming platform. http://bracha.org/newspeak.pdf, 2008.Google ScholarGoogle Scholar
  8. }}Preston Briggs, Keith D. Cooper, Timothy J. Harvey, and L. Taylor Simpson. Practical improvements to the construction and destruction of static single assignment form. Softw. Pract. Exper., 28(8):859--881, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}Preston Briggs, Keith D. Cooper, and L. Taylor Simpson. Value numbering. Softw. Pract. Exper., 27(6):701--724, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}Robert Cartwright and Mike Fagan. Soft typing. In PLDI '91: Proceedings of the ACM SIGPLAN 1991 conference on Programming language design and implementation, pages 278--292, New York, NY, USA, 1991. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}Craig Chambers. The Cecil language: Specification and rationale. Technical report, University of Washington, 1993.Google ScholarGoogle Scholar
  12. }}Ron Cytron, Jeanne Ferrante, Barry K. Rosen, Mark N. Wegman, and F. Kenneth Zadeck. Efficiently computing static single assignment form and the control dependence graph. ACM Transactions on Programming Languages and Systems, 13:451--490, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. }}Dibyendu Das and U. Ramakrishna. A practical and fast iterative algorithm for Æ-function computation using DJ graphs. ACM Trans. Program. Lang. Syst., 27(3):426--440, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. }}Christopher Diggins. The Cat Programming Language. http://www.cat-language.com/, 2007.Google ScholarGoogle Scholar
  15. }}ECMA. ECMAScript for XML (E4X) Specification, 2005.Google ScholarGoogle Scholar
  16. }}Daniel Ehrenberg. Closure elimination as constant propagation. Programming Language Design and Implementation, Student Research Contest, 2010.Google ScholarGoogle Scholar
  17. }}Michael Ernst, Craig Kaplan, and Craig Chambers. Predicate Dispatching: A Unified Theory of Dispatch. In ECCOP '98: Proceedings of the 12th European Conference on Object- Oriented Programming, pages 186--211, London, UK, 1998. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}M. Anton Ertl. State-smartness -- Why it is Evil and How to Exorcise it. In EuroForth '98, 1998.Google ScholarGoogle Scholar
  19. }}Martin Odersky et. al. The Scala Language Specification. Technical report, EPFL Lausanne, Switzerland, 2004.Google ScholarGoogle Scholar
  20. }}Tim Bray et. al. Extensible Markup Language (XML) 1.0 (fifth edition). World Wide Web Consortium, 2008.Google ScholarGoogle Scholar
  21. }}Python Software Foundation. ctypes - A foreign function library for Python. http://docs.python.org/library/ctypes.html, 2010.Google ScholarGoogle Scholar
  22. }}Python Software Foundation. Python/C API Reference Manual. http://docs.python.org/library/ctypes.html, 2010.Google ScholarGoogle Scholar
  23. }}Python Software Foundation. struct - Interpret strings as packed binary data. http://docs.python.org/library/struct.html, 2010.Google ScholarGoogle Scholar
  24. }}Michael Franz. Compiler Optimizations Should Pay for Themselves. In P. Schulthess, editor, Advances in Modular Languages: Proceedings of the Joint Modular Languages Conference, 1994.Google ScholarGoogle Scholar
  25. }}Brent Fulgham. Computer Language Benchmarks Game. http://shootout.alioth.debian.org/, 2010.Google ScholarGoogle Scholar
  26. }}Erich Gamma, Richard Helm, Ralph Johnson, and John Vlissides. Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley Professional, 1994. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}James Gosling, Bill Joy, Guy Steele, and Gilad Bracha. Java Language Specification. Addison Wesley, 3rd edition, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}Paul Graham. On Lisp. Prentice Hall, 1993.Google ScholarGoogle Scholar
  29. }}David Gudeman. Representing Type Information in Dynamically Typed Languages, 1993.Google ScholarGoogle Scholar
  30. }}Dominikus Herzberg and Tim Reichert. Concatenative Programming: An Overlooked Paradigm in Functional Programming. In Proceedings of ICSOFT 2009, 2009.Google ScholarGoogle Scholar
  31. }}Rich Hickey. Clojure. http://clojure.org/, 2010.Google ScholarGoogle Scholar
  32. }}Urs H¨olzle, Craig Chambers, and David Ungar. Optimizing Dynamically-Typed Object-Oriented Languages With Polymorphic Inline Caches. In ECOOP '91: Proceedings of the European Conference on Object-Oriented Programming, pages 21--38, London, UK, 1991. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. }}American National Standards Institute. X3.215-1994, Programming Language Forth, 1996.Google ScholarGoogle Scholar
  34. }}Ecma International. Standard ECMA-334: C# Language Specification. 4 edition, 2006.Google ScholarGoogle Scholar
  35. }}Gregor Kiczales, Jim des Rivieres, and Daniel G. Bobrow. The Art of the Metaobject Protocol, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  36. }}Xavier Leroy. The Objective Caml system - Documentation and user's manual. http://caml.inria.fr/pub/docs/manual-ocaml/.Google ScholarGoogle Scholar
  37. }}Tim Lindholm and Frank Yellin. Java Virtual Machine Specification. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  38. }}Christophe Rhodes. SBCL: A Sanely-Bootstrappable Common Lisp. In Self-Sustaining Systems: First Workshop, S3 2008 Potsdam, Germany, May 15--16, 2008 Revised Selected Papers, pages 74--86, Berlin, Heidelberg, 2008. Springer- Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  39. }}Vivek Sarkar, Mauricio J. Serrano, and Barbara B. Simons. Register-sensitive selection, duplication, and sequencing of instructions. In ICS '01: Proceedings of the 15th international conference on Supercomputing, pages 277--288, New York, NY, USA, 2001. ACM. Google ScholarGoogle ScholarDigital LibraryDigital Library
  40. }}Andrew Shalit. The Dylan reference manual: the definitive guide to the new object-oriented dynamic language. Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1996. Google ScholarGoogle ScholarDigital LibraryDigital Library
  41. }}Bjarne Stroustrup. The C++ Programming Language. Addison-Wesley, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  42. }}Dave Thomas, Chad Fowler, and Andy Hunt. Programming Ruby: The Pragmatic Programmers' Guide, 2004.Google ScholarGoogle Scholar
  43. }}Omri Traub. Quality and Speed in Linear-Scan Register Allocation. In SIGPLAN Conference on Programming Language Design and Implementation, pages 142--151. ACM Press, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  44. }}Manfred von Thun. Rationale for Joy, a functional language, 2000.Google ScholarGoogle Scholar
  45. }}Mark N. Wegman and F. Kenneth Zadeck. Constant propagation with conditional branches. ACM Transactions on Programming Languages and Systems, 13:291--299, 1991. Google ScholarGoogle ScholarDigital LibraryDigital Library
  46. }}Paul R. Wilson. Uniprocessor Garbage Collection Techniques. In IWMM '92: Proceedings of the International Workshop on Memory Management, pages 1--42, London, UK, 1992. Springer-Verlag. Google ScholarGoogle ScholarDigital LibraryDigital Library
  47. }}Christian Wimmer. Linear Scan Register Allocation for the Java HotSpotTMClient Compiler. Master's thesis, Institute for System Software, Johannes Kepler University Linz, 2004.Google ScholarGoogle Scholar

Index Terms

  1. Factor: a dynamic stack-based programming language

      Recommendations

      Comments

      Login options

      Check if you have access through your login credentials or your institution to get full access on this article.

      Sign in

      Full Access

      • Published in

        cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 12
        DLS '10
        December 2010
        107 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1899661
        Issue’s Table of Contents
        • cover image ACM Conferences
          DLS '10: Proceedings of the 6th symposium on Dynamic languages
          October 2010
          120 pages
          ISBN:9781450304054
          DOI:10.1145/1869631

        Copyright © 2010 ACM

        Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

        Publisher

        Association for Computing Machinery

        New York, NY, United States

        Publication History

        • Published: 18 October 2010

        Check for updates

        Qualifiers

        • research-article

      PDF Format

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader