5. Le segment de desserte optique
5.3.3. Organisation des PBO
Para o processo de avaliação do programa no interpretador implementado foi feita a utilização de threads, que insere a noção de execução assíncrona. Para este trabalho foi feita a escolha de utilizar uma simulação de threads, realizando uma execução síncrona onde os dados são gerenciados de uma maneira assíncrona. Essa escolha foi feita princi- palmente para manter o código simples e o foco do trabalho se mantivesse na parte reativa do programa. Sendo assim, este é um dos principais tópicos para um aperfeiçoamento da linguagem futuramente: a utilização de threads reais na implementação do interpretador. Em relação à integração entre programação reativa com uma linguagem orientada a objetos, este trabalho tratou das situações mais básicas, onde um programa pode fazer uso dos dois paradigmas. O próximo passo seria aperfeiçoar a linguagem de maneira que os dois paradigmas se sobreponham, por exemplo, da mesma maneira que um objeto sempre pode criar e manipular variáveis comuns em atributos, incluir a possibilidade de uma variável especial, e sua manipulação, que trata de dados reativos é uma maneira de integrar os dois paradigmas. Neste ponto, é prciso argumentar se um campo reativo dentro do objeto deve ser simples e manipulável, como uma variável comum, ou complexo e estático, como uma definição de método, onde sua única manipulação é ser executado.
Utilizando outro ponto de vista na integração entre os paradigmas, trazendo orien- tação a objeto à programação reativa, seria a utilização de chamada de métodos como funções alvo em um construtor reativo. Assim, seria possível utilizar objetos comum, por exemplo um dicionário, tendo funções internas para tradução, em uma chamada reativa que traduz palavras recebidas do usuário. Para este trabalho, uma função anônima e uma chamada de método são sintaticamente diferentes, porém uma adaptação pode ser feita para os contrutores reativos.
ARIOLA, Z. M.; FELLEISEN, M. The call-by-need lambda calculus.Journal of functional programming, Cambridge University Press, v. 7, n. 3, p. 265–301, 1997.
BAINOMUGISHA, E. et al. A survey on reactive programming.ACM Computing Surveys (CSUR), ACM, v. 45, n. 4, p. 52, 2013.
BELLIA, M.; OCCHIUTO, M. E. Proving type safety for java simple closures. In: 19th Con- currency, Specification and Programming-CS&P’2010. [S.l.: s.n.], 2010. v. 1, p. 61–72. BLACKHEATH, S.; JONES, A.Functional Reactive Programming. [S.l.]: Manning Publi- cations Company, 2016.
BODDEN, E.; SHAIKH, R.; HENDREN, L. Relational aspects as tracematches. In: ACM. Proceedings of the 7th international conference on Aspect-oriented software deve- lopment. [S.l.], 2008. p. 84–95.
COOPER, G. H.; KRISHNAMURTHI, S. Embedding dynamic dataflow in a call-by-value language. In: SPRINGER.European Symposium on Programming. [S.l.], 2006. p. 294– 308.
CZAPLICKI, E.; CHONG, S. Asynchronous functional reactive programming for guis. In: ACM.ACM SIGPLAN Notices. [S.l.], 2013. v. 48, n. 6, p. 411–422.
EL-ZAWAWY, M. A. A robust framework for asynchronous operations on a functional object- oriented model. In: IEEE.Cloud Computing (ICCC), 2015 International Conference on. [S.l.], 2015. p. 1–6.
ELLIOTT, C. Specification for a Functional Reactive Programming language. 2011. Disponível em: <http://web.archive.org/web/20080207010024/http://www.808multimedia. com/winnt/kernel.htm>.
ELLIOTT, C.; HUDAK, P. Functional reactive animation. In: ACM.ACM SIGPLAN Notices. [S.l.], 1997. v. 32, n. 8, p. 263–273.
EUGSTER, P.; JAYARAM, K. Eventjava: An extension of java for event correlation. In: SPRINGER. European Conference on Object-Oriented Programming. [S.l.], 2009. p. 570–594.
FEITOSA, S. da S.Source-code for FJQuantum Interpreter. [S.l.]: GitHub, 2016. <https: //github.com/fjquantum/master>.
.QuickCheck Property-based testing for Featherweight Java. [S.l.]: GitHub, 2018. <https://github.com/sfeitosa/fj-qc>.
FELLEISEN, M.; FRIEDMAN, D. P.A little Java, a few patterns. [S.l.]: MIT press, 1998. FOSTER, N. et al. Frenetic: A network programming language. ACM Sigplan Notices, ACM, v. 46, n. 9, p. 279–291, 2011.
HANNEMANN, J.; KICZALES, G. Design pattern implementation in java and aspectj. In: ACM.ACM Sigplan Notices. [S.l.], 2002. v. 37, n. 11, p. 161–173.
78
HUDAK, P. et al. Arrows, robots, and functional reactive programming. In: SPRINGER. International School on Advanced Functional Programming. [S.l.], 2002. p. 159–187. IGARASHI, A.; PIERCE, B. C.; WADLER, P. Featherweight java: a minimal core calculus for java and gj.ACM Transactions on Programming Languages and Systems (TOPLAS), ACM, v. 23, n. 3, p. 396–450, 2001.
IGNATOFF, D.; COOPER, G. H.; KRISHNAMURTHI, S. Crossing state lines: Adapting object-oriented frameworks to functional reactive languages. In: SPRINGER. Internatio- nal Symposium on Functional and Logic Programming. [S.l.], 2006. p. 259–276. KRISHNASWAMI, N. R.; BENTON, N.; HOFFMANN, J. Higher-order functional reactive programming in bounded space. In: ACM.ACM SIGPLAN Notices. [S.l.], 2012. v. 47, n. 1, p. 45–58.
LIU, H.; CHENG, E.; HUDAK, P. Causal commutative arrows and their optimization. In: ACM.ACM Sigplan Notices. [S.l.], 2009. v. 44, n. 9, p. 35–46.
LIU, H.; HUDAK, P. Plugging a space leak with an arrow.Electronic Notes in Theoretical Computer Science, Elsevier, v. 193, p. 29–45, 2007.
MAIER, I.; ODERSKY, M. Deprecating the Observer Pattern with Scala. React. [S.l.], 2012.
MEYEROVICH, L. A. et al. Flapjax: a programming language for ajax applications. In: ACM. ACM SIGPLAN Notices. [S.l.], 2009. v. 44, n. 10, p. 1–20.
NEWTON, R.; MORRISETT, G.; WELSH, M. The regiment macroprogramming system. In: IEEE.Information Processing in Sensor Networks, 2007. IPSN 2007. 6th International Symposium on. [S.l.], 2007. p. 489–498.
NILSSON, H. Dynamic optimization for functional reactive programming using generalized algebraic data types. In: CITESEER.ICFP. [S.l.], 2005. v. 5, p. 54–65.
NILSSON, H.; COURTNEY, A.; PETERSON, J. Functional reactive programming, conti- nued. In: ACM.Proceedings of the 2002 ACM SIGPLAN workshop on Haskell. [S.l.], 2002. p. 51–64.
PETERSON, J.; TRIFONOV, V.; SERJANTOV, A. Parallel functional reactive programming. In: SPRINGER.International Symposium on Practical Aspects of Declarative Langua- ges. [S.l.], 2000. p. 16–31.
PIERCE, B. C.Types and programming languages. [S.l.]: MIT press, 2002.
RAJAN, H.; LEAVENS, G. T. Ptolemy: A language with quantified, typed events. In: SPRIN- GER.European Conference on Object-Oriented Programming. [S.l.], 2008. p. 155–179. SALVANESCHI, G.; MEZINI, M. Towards reactive programming for object-oriented applica- tions. In: Transactions on Aspect-Oriented Software Development XI. [S.l.]: Springer, 2014. p. 227–261.
SCULTHORPE, N.; NILSSON, H. Safe functional reactive programming through dependent types.ACM Sigplan Notices, ACM, v. 44, n. 9, p. 23–34, 2009.
STALTZ, A. The introduction to Reactive Programming you’ve been missing. [S.l.]: GitHub, 2014. <https://gist.github.com/staltz/868e7e9bc2a7b8c1f754>.
TRAN, T. M. T.; STEFFEN, M. Safe commits for transactional featherweight java. In: SPRIN- GER.International Conference on Integrated Formal Methods. [S.l.], 2010. p. 290–304. WAN, Z.; TAHA, W.; HUDAK, P. Real-time frp.ACM SIGPLAN Notices, ACM, v. 36, n. 10, p. 146–156, 2001.
. Event-driven frp. In: SPRINGER. International Symposium on Practical Aspects of Declarative Languages. [S.l.], 2002. p. 155–172.
WESTERSTÅHL, D. On mathematical proofs of the vacuity of compositionality.Linguistics and Philosophy, Springer, v. 21, p. 635–643, 1998.
XU, D. N.; KHOO, S.-C. Compiling real time functional reactive programming. In: ACM. Proceedings of the ASIAN symposium on Partial evaluation and semantics-based program manipulation. [S.l.], 2002. p. 83–93.
APÊNDICE A – FORMALIZAÇÃO DA LINGUAGEM PROPOSTA