• Title/Summary/Keyword: 모나드

Search Result 15, Processing Time 0.052 seconds

Development of an Assembly Language Interpreter Using Monad (모나드를 이용한 어셈블리 언어 인터프리터 개발)

  • Byun, Sug-Woo
    • Journal of KIISE:Software and Applications
    • /
    • v.37 no.5
    • /
    • pp.403-410
    • /
    • 2010
  • Monad in Haskell allows one to do imperative-style programming as well as pure functional programming. In this work, we characterize monadic abstraction and its programming technique by restructuring an assembly language interpreter coded in pure functional style into the one by the monadic style. Monad programming consists of two phases; the State monad is applied to a stack and a symbol table, and then a State Monad Transformer integrating these two monads is constructed. As a result, we can see that the program code by monad programming is much clearer and more intuitive than one written in the pure functional style.

Implementation of Nondeterministic Compiler Using Monad (모나드를 이용한 비결정적 컴파일러 구현)

  • Byun, Sugwoo
    • Journal of the Korea Society of Computer and Information
    • /
    • v.19 no.2
    • /
    • pp.151-159
    • /
    • 2014
  • We discuss the implementation of a compiler for an imperative programming language, using monad in Haskell. This compiler involves a recursive-descent parser conducting nondeterministic parsing, in which backtracking occurs to try with other rules when the application of a production rule fails to parse an input string. Haskell has some strong facilities for parsing. Its algebraic types represent abstract syntax trees in a smooth way, and program codes by monad parsing are so concise that they are highly readable and code size is reduced significantly, comparing with other languages. We also deal with the runtime environment of the assembler and code generation whose target is the Stack-Assembly language based on a stack machine.

Functional Monadic Programming (함수형 모나드 프로그래밍)

  • 변석우
    • Journal of the Korea Institute of Information and Communication Engineering
    • /
    • v.5 no.1
    • /
    • pp.192-201
    • /
    • 2001
  • It has been a long standing problem in research of pure functional programming to program side-effect, input/output, exception handling, nondeterminism, and etc, preserving declarative property and lazy-evaluation of pure functional languages. Being introduced in 1989, Monadic approach has been suggested as a solution to this problem. In this paper, we introduce the principle of functional monadic programming and its various application techniques using the Pure functional language Haskell.

  • PDF

Feasibility Study Of Functional Programming In Scala Language By Implementing An Interpreter

  • Sugwoo, Byun
    • Journal of the Korea Society of Computer and Information
    • /
    • v.28 no.2
    • /
    • pp.111-119
    • /
    • 2023
  • In this paper, we investigate the feasibility of functional programming in the Scala language. The main issue is to what extent Scala is able to handle major properties of functional programming such as lambda expression, high-order functions, generic types, algebraic data types, and monads. For this purpose, we implement an interpreter of an imperative language. In this implementation, the same functional programming techniques are applied to both Haskell and Scala languages, and then these two versions of implementations are compared and analyzed. The abstract syntax tree of an imperative language is expressed as algebraic data types with generics and enum classes in Scala, and the state transition of imperative languages is implemented by using state monad. Extension and given, new features of Scala, are used as well.

The problem of corporial substance by Leibniz (2): Is the corporial substance a substance? (라이프니츠에서 물체적 실체의 문제 (2): 물체적 실체는 하나의 실체인가?)

  • Yun, SunKoo
    • Journal of Korean Philosophical Society
    • /
    • no.94
    • /
    • pp.53-87
    • /
    • 2011
  • Leibniz regards a corporeal substance, which is composed of monads, as 'one substance' and tries to prove that it has a true unity. This position seems to be contradictionary to his Monadology. Therefore, many scholars have ignored Leibniz's stand that corporeal substance is 'one substance', or consider this only as a stand from his theory of substance in his early works, which has been discarded afterwards. This Research will show that Leibniz adheres to this position throughout his lifetime; that although Leibniz uses the concepts such as substantial form and substantial bond to explain his stand, but the concept of substancial bond doesn't fit in with his philosophical system; that to explain the unity of the corporeal substance, the concept of substancial form and the theory of preestablished harmony are sufficient; and that nevertheless the stand that the corporeal substance is 'one substance' inconsistent with the position that the monad is 'one substance'; and that if Leibniz abandons that stand, the theory of the corporeal substance is a good foundation of his panorganism.

Error Handling Technique Using Arrows (애로우를 이용한 오류 처리 기법)

  • Lee Dong-Ju;Ji Jung-Hoon;Jang Han-Il;Woo Gyun
    • Proceedings of the Korean Information Science Society Conference
    • /
    • 2006.06b
    • /
    • pp.397-399
    • /
    • 2006
  • 모나드의 일반화 버전인 애로우(Arrow)는 모나드에 비해 효율적이며, 프로그램 합성을 위한 직관적인 인터페이스를 제공한다. 여러 프로그램을 합성할 때 합성된 전체 프로그램의 오류 처리는 매우 중요한 문제이다. 각각의 프로그램에서 오류 처리를 일일이 기술하는 것은 매우 번거로우며 비효율적인 작업이기 때문이다. 본 논문에서는 애로우 인터페이스를 이용하는 프로그램을 합성할 때 효율적으로 오류를 처리하기 위한 방법을 제시한다. 모든 애로우 타입에 대하여 오류를 처리하기 위해 새로운 애로우를 정의하며 이를 프로그램 합성 단위로 이용하여 전체적인 프로그램의 오류를 처리한다. 또한 애로우를 이용한 타입 검사 프로그램을 통하여, 논문에서 제시한 오류 처리 기법을 적용하여 효율성을 평가한다.

  • PDF

Performance Comparison between Haskell Eval Monad and Cloud Haskell (Haskell Eval 모나드와 Cloud Haskell 간의 성능 비교)

  • Kim, Yeoneo;An, Hyungjun;Byun, Sugwoo;Woo, Gyun
    • Journal of KIISE
    • /
    • v.44 no.8
    • /
    • pp.791-802
    • /
    • 2017
  • Competition in the modern CPU market has shifted from speeding up the clock speed of a single core to increasing the number of cores. As such, there is a growing interest in parallel programming to maximize the use of resources of many core processors. In this paper, we propose parallel programming models in Haskell to find an advisable parallel programming model for many-core environments. Specifically, we used Eval monad and Cloud Haskell to develop two versions of parallel programs: plagiarism detection and K-means. Then, we evaluated the performance of the developed programs in 32-core and 120-core environments. The results of our experiment show that the Eval monad is highly efficient in an environment with a small number of cores. On the other hand, the Cloud Haskell runtime shows 37% improvement over Eval monad and the scalability shows a 134% improvement over Eval monad as the number of cores increases.

A Study on Spatial Abyss Expressed in Baroque Architecture and Art - Focus on the Monade Theory of Gottfried Leibniz - (바로크 건축과 미술에 표현된 공간의 심연성 연구 - 라이프니츠의 모나드론의 중심으로 -)

  • Han, Myoung-Sik
    • Korean Institute of Interior Design Journal
    • /
    • v.21 no.1
    • /
    • pp.59-67
    • /
    • 2012
  • Eugenio D'Ors, the writer of 'Lo Barroco' called Baroque in the 17th century as the ultimate nostalgia of humanity we can see anywhere, and when our exclusive mental state, classic consciousness, is weakened, countless things within self get to be expressed without limitation. He defines this as Baroque ego. In other words, the abyss of a being is expressed within self, and it gets to come into the abyss of art and be settled in it. Thereupon, this study focuses on the characteristics of such effects of abyss expressed in Baroque art to amplify the depth of space in art and architecture and also its productive effects and considers in what types the abyss gets to be expressed in art and architecture. As a result, it shows nonlinear characteristics whose outline of the model and structural body is invisible, depth resulted from overlapping, unity from formal repetition, and temporal continuity from movement. In other words, formative elements which extend the unit area of space conceptually can be summed up by nonlinearity, overlapping, unity, and movement. Also, in art and architecture, this accelerates men's emotional functions and at the same time, has productive effects to extend space visually. Baroque abyss can be seen as a proper solution to overcome problems which modern architecture implies ultimately, that is, the limitations of area definition.

  • PDF

A study on the characteristics of unfolding in comtemporary architecture space from Monadological perspective - Based on the unfolding in the concept of Fold - (모나드론 관점에서 본 현대건축공간에 나타나는 펼침의 특성에 관한 연구 - 주름 개념에서 펼침의 관점을 중심으로 -)

  • Jung, Won-Wook;Kim, Kai-Chun
    • Korean Institute of Interior Design Journal
    • /
    • v.21 no.4
    • /
    • pp.68-76
    • /
    • 2012
  • Contemporary architecture has a tendency to concretely approach based on the concept of Deuleuze's 'fold' diversity problems creating continuously potential diversities within Post-structural paradigm. Contemporary architecture relates to human life through its relation with human being. The research investigates through case study the possible relation of the concept of Deulezue's 'fold', one of his concepts of 'unfolding' based on Monadology, with logic of creation that constructs a space in contemporary architectural space. Eight contemporary architectural spaces since 1990 with architectural embodiment of Deulezue's 'fold' concept have been selected as cases. Based on the fact that the potential possibility of a space can be embodied by the thinking of 'fold', the research draws four physical activities such as 'properties connection', 'beyond border', 'diversity of circulation' and 'potential opportunity', through which it studies on the principle of actualization of space creation. Consideration of metaphysical theory as a pre-modern and outdated one may lose a huge potentiality. Leibniz's metaphysics can be rediscovered as a model that provides diverse potentiality. The concept of 'fold' in Monadology needs be reconsidered because it possibly suggests a methodology that embodies through the actualization of space the meanings underlain in contemporary architectural space.

  • PDF