IT박스

데이터 흐름 프로그래밍 언어

itboxs 2020. 10. 26. 07:48
반응형

데이터 흐름 프로그래밍 언어


데이터 흐름 프로그래밍 언어 란 무엇입니까? 왜 사용합니까? 그리고 그것에 대한 이점이 있습니까?


제어 흐름 언어에는 외부 데이터에서 작동하는 명령 스트림이 있습니다. 조건부 실행, 점프 및 프로 시저 호출은 실행할 명령 스트림을 변경합니다. 이것은 데이터를 통해 흐르는 명령어로 볼 수 있습니다 (예를 들어, 명령어는 명령어에 의해 데이터가로드 된 레지스터에서 작동합니다. 명령어 스트림이 데이터를 이동하지 않는 한 데이터는 정적 임). 제어 흐름 "if"문은 명령 스트림의 올바른 분기로 점프하지만 데이터는 이동되지 않습니다.

데이터 흐름 언어에서는 처리 할 명령어에서 명령어로 전달되는 데이터 스트림이 있습니다. 조건부 실행, 점프 및 프로 시저 호출은 데이터를 다른 명령으로 라우팅합니다. 이는 전기 신호가 회로를 통해 흐르는 방식이나 물이 파이프를 통해 흐르는 방식과 같은 정적 명령을 통해 흐르는 데이터로 볼 수 있습니다. 데이터 흐름 "if"문은 데이터를 올바른 분기로 라우팅합니다.

데이터 흐름 기능 및 언어의 몇 가지 예 :

텍스트 언어

시각 언어

시각적 데이터 흐름 언어를 포함하는 제품 :


Dataflow 프로그래밍 언어는 프로그램 상태에 초점을 맞추고 상태 변경에 따라 작업이 발생하도록하는 언어입니다. 데이터 흐름 프로그래밍 언어는 기본적으로 병렬입니다. 작업이 충족되면 작업이 실행되는 입력에 의존하기 때문입니다. 이것은 하나의 작업 다음에 다음 작업이 오는 일반 프로그램과 달리 데이터 흐름 프로그램에서 입력이 충족되어 설정된 순서가없는 한 실행됩니다.

종종 데이터 흐름 프로그래밍 언어는 키가 프로그램의 데이터이고 테이블의 값이 프로그램 작업에 대한 포인터 인 대형 해시 테이블을 사용합니다. 이렇게하면 각 코어가 작동하는 데 해시 테이블 만 필요하기 때문에 데이터 흐름 프로그래밍 언어로 멀티 코어 프로그램을 더 쉽게 만들 수 있습니다.

데이터 흐름 프로그래밍 언어의 일반적인 예는 다른 데이터 열의 영향을받는 데이터 열이있는 스프레드 시트 프로그램입니다. 한 열의 데이터가 변경되면 다른 열의 다른 데이터도 함께 변경됩니다. 스프레드 시트 프로그램은 데이터 흐름 프로그래밍 언어의 가장 일반적인 예이지만 대부분 그래픽 언어 인 경향이 있습니다.


데이터 흐름 프로그래밍의 한 종류는 반응 형 프로그래밍 입니다. 이러한 스타일의 프로그래밍이 기능적 언어에서 사용되는 경우이를 기능적 반응 프로그래밍 이라고 합니다 . 웹용 기능적 반응 형 프로그래밍 언어의 예는 Flapjax 입니다.

또한 anic 은 최근 Hacker News에서 논의데이터 흐름 언어 입니다.

Another example is Martlet from Oxford.


Dataflow programming languages propose to isolate some local behaviors in so called "actors", that are supposed to run in parallel and exchange data through point-to-point channels. There is no notion of central memory (both for code and data) unlike the Von Neumann model of computers.

These actors consume data tokens on their inputs and produce new data on their outputs.

This definition does not impose the means to run this in practice. However, the production/consumption of data needs to be analyzed with care: for example, if an actor B does not consume at the same speed as the actor A that produce the data, then a potentially unbounded memory (FIFO) is required between them. Many other problems can arise like deadlocks.

In many cases, this analysis will fail because the interleaving of the internal behaviors is intractable (beyond reach of today formal methods).

Despite this, dataflow programming languages remain attractive in many domains:

  • for instance to define reference models for video encoding : a pure C program won't do the job because it makes the assumption that everything run as a sequence of operations, which is not true in computers (pipeline, VLIW, mutlicores, and VLSI). Maybe you could have a look at this: recent PhD thesis. CAL dataflow language is proposed as a unifying language for next generation video encoders/decoders reference.
  • Mission critical where safety is required: if you add some strong assumptions on the production/consumption of data, then you get a language with strong potential in terms of code generation, proofs, etc. (see synchronous languages)

Excel (and other spreadsheets) are essentially dataflow languages. Dataflow languages are a lot like functional programming languages, except that the values at the leaves of the whole program graph are not values at all, but variables (or value streams), so that when they change, the changes ripple and flow up the graph.


Mozart has support for dataflow-like synchronization, and it does have some commercial applications. You could also argue that make is a dataflow programming language.


Many ETL tools are also in this realm. The dataflow tasks in MS SSIS are a good example. Graphical tool in this case.


It is actually quite an old concept - in the 1970s, there was even a language + machine built for efficient dataflow programming and execution (Manchester Dataflow Machine).

The great thing about it is its duality to lazy functional languages like Haskell. Therefore, if your processing steps are pure functional, and given you have enough processing units to evaluate them and pass results around, you get maximum parallelity for free - automatically and without any programming effort!


There are certain domains where dataflow programming just makes a lot more sense. Realtime media is one example, and two widely used graphical dataflow programming environments, Pure Data and Max/MSP, are both focused on realtime media programming. I suppose their visual nature also maps nicely to the dataflow programming.


You could try Cameleon: www.shinoe.org/cameleon which seems to be simple to use. It's a graphical language for functional programming which has a data(work)-flow approach.

It's written in C++, but it can call any type of local or distant programs written in any programming language.

It has a multi-scale approach and seems to be Turing complete (this is a Petri net extension).

참고URL : https://stackoverflow.com/questions/461796/dataflow-programming-languages

반응형